This project was done in partnership with Mariana Morais
Cub3D is a simple 3D game engine developed in C, inspired by the classic Wolfenstein 3D. It was built as part of the 42 School curriculum to deepen our understanding of low-level graphics programming, raycasting, and real-time rendering.
The objective was to simulate a first-person view inside a maze using a raycasting algorithm. We implemented dynamic player movement, wall collisions, a minimap, texture mapping, and sprites — all rendered in a 2D context with 3D-like visuals using MiniLibX, a lightweight graphics library.
Clone the repository:
git clone https://github.com/marianaobmorais/cub3d.gitEnter the cloned directory:
cd cub3dRun make to compile the program:
make bonusStart the program – choose any valid map as argument:
./cub3D_bonus assets/maps/valid/subject_map_bonus.cubFollow screen instructions: press enter
| Key | Action |
|---|---|
W |
Move Forward |
S |
Move Backward |
A |
Move left |
D |
Move right |
Left arrow or move mouse to left |
Rotate Camera to left |
Right arrow or move mouse to right |
Rotate Camera to right |
M |
Free mouse from rotating |
CTRL |
Feed the pigeons |
ESC |
Close window |
This project is written in accordance to the 42 School's "The Norm" (Version 4). To review the Norm, click here.
If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.
If you are searching resources to learn more about your own cub3D, I encourage you to turn to your peers and the function manuals. Do not implement any code you do not understand and cannot code from scratch.
