A simple 3D ray-casting engine written in C using MLX42.
This project is inspired by Wolfenstein 3D and was built as part of the 42 School curriculum to explore low-level graphics, math, and game engine design.
- 🧭 First-person 3D view using ray-casting
- 🗺️ Map parsing from
.cubfiles - 🎨 Textured walls and environments
- 🧍 Player movement and rotation
- 🧱 Collision detection
- 🌗 Minimalistic graphics engine built on MLX42
- 🧩 Custom libft for utilities and memory management
Cub3d/
├── include/ # Header files
├── libft/ # Custom library
├── maps/ # Example map files
├── src/ # Source code
├── textures/ # Wall and floor textures
├── Makefile # Build instructions
└── README.md
- GCC or Clang
makeMLX42(included or linked in project)
make./cub3D maps/example.cub- Understanding ray-casting math
- Managing player view and angles
- Parsing custom map formats
- Using MLX42 for pixel rendering
- Writing clean, modular C code
This project is for educational purposes (42 School).
You are free to explore, learn from, or adapt it for your own studies.
Mossa Jehad
GitHub Profile