cub3D is a project developed as part of our curriculum at 42 school. It’s a mini 3D game using the raycasting technique, built with the MiniLibX graphics library. This project uses an enhanced version of MiniLibX called MiniLibX-Extended, which provides additional features.
cub3D is a 3D reinterpretation of the classic Pac-Man. Main features include:
- Main goal: Collect all the yellow balls to win.
- Ghosts: Avoid them, or eat them after grabbing a green ball.
- Minimap: 2D view of the map, similar to the original Pac-Man.
- Doors: Open them with a left click or the Space key.
- Pause: Press Tab to pause the game.
To try cub3D, follow these steps:
-
Clone this repository along with the original MiniLibX version.
-
Compile the project by running:
make
-
Launch the game with:
./cub3D maps/valid/[your_map].cub
For the best experience, try the default map:
./cub3D maps/valid/pacman.cub
cub3D lets you create your own custom maps with an integrated generator.
-
Run the map generator script:
python ./map_gen.py
-
Once your map is generated (as
gen_map.cub), run it with:./cub3D maps/gen_map.cub
| Action | Key/Command |
|---|---|
| Move | W, A, S, D |
| Rotate camera | Mouse or Left/Right Arrows |
| Open doors | Space or Left Click |
| Pause | Tab |
This project was developed by:
