This project is inspired by the world-famous eponymous 90's game, which was the first FPS ever. It will enable you to explore ray-casting. Your goal will be to make a dynamic view inside a maze, in which you'll have to find your way.
This project is part of the 42 curriculum and focuses on creating a 3D maze game using raycasting techniques. The main objectives include:
- Implementing a raycasting engine from scratch
- Creating a first-person perspective view
- Handling player movement and rotation
- Managing textures for walls
- Processing keyboard inputs for smooth controls
- Understanding 3D graphics fundamentals
Gameplay.webm
- The game must use raycasting for 3D rendering
- Player must be able to move through the maze with WASD keys
- Player must be able to rotate the camera with arrow keys
- Configuration file must specify:
NO
/SO
/WE
/EA
Texture for wallsF
/C
Floor and ceiling colors
- Map must be constructed with these components:
1
Walls0
Empty spacesN
/S
/E
/W
Player starting position and orientation
- Wall collisions
- Minimap system
- Doors that can open and close (
D
in map) - Animated sprites (
Tab
separated) - Mouse rotation
- 3D graphics programming fundamentals
- Raycasting implementation
- Texture mapping and rendering
- Mathematical concepts for graphics
- Optimization techniques for real-time rendering
- Event handling in a graphical environment
For Ubuntu/Debian
sudo apt-get install gcc libbsd-dev libxext-dev make xorg
For macOS
brew install xquartz
reboot
make
./cub3d_bonus assets/maps/mc_subject_bonus.cub
./cub3d_bonus assets/maps/mc_subject_bonus.cub -k zqsd # AZERTY layout
You can replace assets/maps/mc_subject_bonus.cub
by any .cub
file.
![](https://private-user-images.githubusercontent.com/48162803/402097437-099e6b70-35e1-49e3-9ac4-dc3194232eb8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMDQyNjgsIm5iZiI6MTczOTIwMzk2OCwicGF0aCI6Ii80ODE2MjgwMy80MDIwOTc0MzctMDk5ZTZiNzAtMzVlMS00OWUzLTlhYzQtZGMzMTk0MjMyZWI4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDE2MTI0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTMxMmZkYTI5YmUzMmFiNDE5NTgzOTU1OWQ0ODBjZmFlOTEwZTdhMTIwNDM3MGQwOGQ1OGRkNzhhOWNhNmY3OTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.t2yOOM0xGLulVhJUhG10eCn-xSYJylSk2zNXKponYHY)