This is the second graphics project at 42, our first RayCaster with miniLibX.
Cub3D is a team project at 42 that asks us to create a "3D" game engine with miniLibX. This project is inspired by the world-famous 90's game Wolfenstein 3D, which was the first FPS ever. The objective of this project is to deep dive into the mathematical concepts behind the ray-casting algorithm such as calculating distances, height, sprite locations and field of view to create a projection using primarily trigonometry.
- Rigor
- Imperative programming
- Graphics
- Algorithms & AI
Follow the steps below
# Requirements: X11 miscellaneous extensions library and Utility functions from BSD
# To install the dependencies, open the terminal window and write
sudo apt-get install libxext-dev libbsd-dev
# Clone the project and access the folder
git clone https://github.com/wwwwelton/cub3D && cd cub3D/
# Run make so you can build the game
make bonus
# Run the game with one of these maps as an argument
./cub3D assets/maps/bonus/maze.cub
./cub3D assets/maps/bonus/dust2.cub
# Clean output objects with
make fclean
# Well done!
Game Controller Keys
Move player: W, A, S, D
Move camera: 🡡, 🡠, 🡣, 🡢
Interact: E
Shoot: Left shift or left mouse button
Menu: ESC
The project is regularly updated with bug fixes and code optimization.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Made by:
João Rodriguez 👋 See my Github
Welton Leite 👋 See my linkedin