This project was developed as part of the Ecole 42 curriculum in collaboration with Tuukka Tikanoja.
cub3d
is a project at Ecole 42 inspired by the iconic Wolfenstein 3D. This project focuses on creating a game engine that will utilize ray casting to create a 3D maze in a 2D environment. The player is then able to navigate within this area.
The cub3d
project is a challenging graphics programming exercise. The main lessons learned from the projects:
- Graphics Programming in C: Utilizing only a very barebones graphics library (opening a window and coloring pixels).
- Texture Rendering: Reading texture files that are then rendered to make the game more immersive.
- Raycasting Algorithms: Creating a fast running algorithm to update graphics information.
- Game Engine Development: Creating a simple, smooth and robust engine to handle the parsing, algoritms, rendering and gameplay loop.
- Soft Skills and Teamwork: Breaking the subjest into smaller tasks, dividing them, communicating and merging code.
- Error Handling: Figuring out all the edge cases and making the program as foolproof as possible.
To run cub3d
, you are going to need the Minilibx
library.
If you are a 42 student, this should already be on your Mac. If not, please download the library and add the path to Makefile & cub3d.h.
git clone https://github.com/Jaurasma/cub3d.git cub3d && cd cub3d && make
Cd to the installation location and execute with the path to the .cub file as an argument.
./cub3d maps/classic42.cub
If you wish to start a similar project, I would highly recommend Lode's Raycasting tutorial, 3DSage's video series, javidx9's tutorial on DDA, and to get familiar with MLX: MLX Documentation