Cub3D is a 3D graphics project that utilizes the raycasting technique to create a simple yet immersive first-person perspective game. This project is part of the curriculum at 42 School.
Cub3D is inspired by the classic game Wolfenstein 3D and serves as an introduction to the world of computer graphics. It involves the creation of a game engine that renders a 3D maze using the raycasting technique.
- First-person perspective rendering
- Textured walls and sprites
- Floor and ceiling colors
- Player movement and rotation
- macOS (only tested on macOS)
- Make sure you have
gcc
andmake
installed
- Clone the repository
git clone https://github.com/your-username/Cub3D.git cd Cub3D
- Clone the repository
git clone https://github.com/your-username/Cub3D.git cd Cub3D make
Run the executable with a provided map file:
./Cub3D maps/map.cub
- W: Move forward
- A: Strafe left
- S: Move backward
- D: Strafe right
- →: Rotate right
- ←: Rotate left
- ESC: Exit the game
The map file specifies the layout of the 3D maze and includes information about textures, colors, and the starting position of the player.
This project was completed as part of the curriculum at 42 School. Thanks to the creators of Wolfenstein 3D for the inspiration. A massive thank you to juan for being a great teammate and hard worker.