Cub3d is a project from 42 School that involves creating a 3D graphical representation of a maze using raycasting techniques in C. The goal of this project is to gain a deeper understanding of how raycasting works and to develop advanced programming skills in C and graphics programming.
- Real-time rendering of a 3D maze using raycasting.
- Textured walls and sprites.
- Player movement and collision detection.
-
Unix-based operating system (Linux or macOS)
-
GCC compiler
-
MLX42 library for graphics (provided by 42 School)
-
In Linux:
sudo apt install build-essential libx11-dev libglfw3-dev libglfw3 xorg-dev
-
Clone the repository:
git clone https://github.com/pablovilchez/42-cub3d.git
-
Navigate to the project directory:
cd cub3d
-
Compile the project:
make
Run the program by executing the following command:
./cub3d [map_file.cub]
./cub3d maps/map.cub
- Move forward: W
- Move backward: S
- Strafe left: A
- Strafe right: D
- Rotate left: Left arrow
- Rotate right: Right arrow
- Exit the program: ESC
- Davyd - github.com/BredyByte
This project is licensed under the MIT License.
- Thanks to 42 School for the project guidelines and support.
- Special thanks to my teammate Davyd for his incredible effort, hard work, and for putting up with me throughout the project.