Cub3D is a 42 school team project to create a dynamic view inside a 3D maze. Using the MiniLibX library, we must implement raycasting in the style of the famous Wolfenstein 3D game, the first-person shooter (FPS) in videogame history.
Grade: 115%.
Clone the repository including the MiniLibX submodule:
git clone https://github.com/ysahih/cub3D.git
To compile the game, cd
into the cloned directory and:
- Compile the project using the provided build instructions:
make
- Run the executable to launch Cub3D:
./cub3D <path/to/map.cub>
- Enjoy exploring the graphical features and mathematical applications within the project.
The program takes a map file as an argument. Maps are available in the maps
directory.
For example:
./cub3D maps/map.cub
should run.
Controls for movement and rotation are:
W
: move forwardS
: move backwardA
: strafe leftD
: strafe rightleft arrow
: rotate leftright arrow
: rotate rightmouse
: rotate by moving the mouse
Useful resources for this project are:
- MLX42: codam MLX42 documentation
- Raycasting: Lode's Computer Graphics Tutorial - Raycasting
- Raycasting: Permadi's Raycasting tutorial
- Movement: Calculating heading in 2d games: Using trigonometric functions part 1
Made by sahih and isBarka