A first-person 3D renderer using raycasting — inspired by Wolfenstein 3D and powered by C and MiniLibX.
Cub3D is a 42 School project that challenges students to build a simple 3D engine using raycasting. The player explores a world rendered from a 2D map, with textured walls, real-time movement, and collision detection — all without using any external game engine.
But for me, this project became something more personal.
I truly enjoyed working on Cub3D because I used it as an opportunity to turn the in-game walls into an art gallery — featuring my own original artworks as textures! Framing my art within the digital space I built from scratch was both surreal and incredibly fulfilling. It felt like coding a canvas, and every hallway became a piece of interactive storytelling.
- Raycasting-based 3D rendering from a 2D map
- Real-time movement, rotation, and collision detection
- Wall textures and sky/floor coloring
- Minimap overlay (optional)
- Custom map parsing from
.cub
files - Keyboard controls for movement and escape
W
/↑
– Move forwardS
/↓
– Move backwardA
– Strafe leftD
– Strafe right←
/→
– Rotate viewESC
– Exit game
make
./cub3D maps/ayeshamk.cub
- Raycasting and line-of-sight rendering
- Grid-based movement and collision handling
- Texture mapping and perspective projection
- Parsing and validating custom map formats
- Low-level graphics programming with MiniLibX
- Clean code architecture and real-time input handling