Cub3D is a 42 school team project to create a dynamic view inside a 3D maps. Using the MiniLibX library, we must implement raycasting in the style of the famous Wolfenstein 3D game, the first true FPS in videogame history. This project is collaborative of Taha Braymi and Me.
Clone the repository including the MiniLibX submodule:
git clone https://github.com/HYYPNNOSS/Graphic-3d-Raycasting.git
To compile the program, cd
into the cloned directory and:
make
To run the program:
./cub3d maps/**anymap you want just make sure to add .ber at the end**
The program takes a map file as an argument. Maps are available in the maps
directory. There are good maps which the program should run smoothly with, and bad maps which the program should reject.
Controls for movement and rotation are:
W
: move forwardS
: move backwardA
: strafe leftD
: strafe rightleft arrow
: rotate leftright arrow
: rotate right
Useful resources for this project are:
- Minilibx: hsmits MiniLibX documentation
- Minilibx: gontjarow's MiniLibX tutorial
- Xlib (for MLX events): The Xlib Manual
- Raycasting: Lode's Computer Graphics Tutorial - Raycasting
- Raycasting: Permadi's Raycasting tutorial
- Movement: Calculating heading in 2d games: Using trigonometric functions part 1