heleenoomen / cub3D

This project is inspired by the world famous game Wolfenstein 3D, which was the first ever FPS game. With the use of Ray-Casting we created a dynamic view inside a maze in which you'll have to find your way.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cub3D

This project is inspired by the world famous game Wolfenstein 3D, which was the first ever FPS game. With the use of Ray-Casting we created a dynamic view inside a maze in which you'll have to find your way.

cub3D_vid.mov

Getting Started

Prerequisites

  • Installed C compiler like gcc, clang or Cmake
  • installed or compiled minilibx

On Mac OS

install brew:

rm -rf $HOME/.brew && git clone --depth=1 https://github.com/Homebrew/brew $HOME/.brew && echo 'export PATH=$HOME/.brew/bin:$PATH' >> $HOME/.zshrc && source $HOME/.zshrc && brew update

install glfw:

brew update
brew install glfw

compile and run:

make
make run

On Debian based Linux distributions

On Arch Linux


Usage

control

  • W: move forwards
  • S: move backwards
  • A: move left
  • D: move right
  • Arrow Key Left: rotate left
  • Arrow Key Right: rotate right
  • Mouse: rotation control (left-right)
  • M: show mouse pointer
  • H: hide mouse pointer
  • ESC/Q: quit the game

map customization

  1. Navigate to directory /maps
  2. Set textures (directory /textures)
  3. Set RGB floor and ceiling colors
  4. Set player position on the map

Roadmap

  • Optimize FPS controller

  • Add more features:

    • Moving enemies ๐Ÿ‘พ
    • Animated sprites ๐ŸŒฑ
    • Implement doors and portals ๐ŸŸ ๐Ÿƒโ€โ™€๏ธ๐Ÿ”ต
    • Implement weapons and life-management โš”๏ธ
    • Add menu and sound

Contributing

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!


Acknowledgments

Useful tutorial to understand ray casting:

https://lodev.org/cgtutor/raycasting.html

About

This project is inspired by the world famous game Wolfenstein 3D, which was the first ever FPS game. With the use of Ray-Casting we created a dynamic view inside a maze in which you'll have to find your way.


Languages

Language:C 89.2%Language:C++ 7.5%Language:Python 1.4%Language:Makefile 1.2%Language:Batchfile 0.2%Language:CMake 0.2%Language:Shell 0.2%Language:GLSL 0.2%