Screencast.from.2025-09-18.20-45-01.webm
Cub3D is a 3D game project developed in C using MiniLibX, inspired by the classic Wolfenstein 3D. It demonstrates understanding of raycasting, graphics rendering, and game logic in a minimalistic environment.
- Clone the repository:
git clone https://github.com/kras2v/cub3d.git
cd cub3d- Compile the project:
make- Run the game:
./cub3d maps/<map_file>.cub- C compiler (
gcc) - MiniLibX
- X11 development libraries (Linux):
./cub3d maps/<map_file>.cub- Replace
<map_file>with a.cubfile containing your map layout. - The program reads the map, renders walls, floors, and sprites in a first-person 3D perspective.
- W / Up Arrow – Move forward
- S / Down Arrow – Move backward
- A / Left Arrow – Move left
- D / Right Arrow – Move right
- Left / Right Arrow – Rotate view
- ESC – Exit the game
- Mouse Movement – Rotate view horizontally
- Raycasting engine for 3D rendering
- Textured walls and floor/ceiling
- Sprite rendering
- Collision detection
- Animated sprite
- Doors that opens and closes
- Configurable
.cubmap files
cub3d/
│
├── bonus/ # Bonus part
├── srcs_bonus/ # Bonus source code
├── includes_bonus/ # Bonus headers
├── libs/libft/ # Libft library
├── mandatory/ # Mandatory part
├── mandatory_srcs/ # Mandatory source code
├── mandatory_includes/ # Mandatory headers
├── maps/ # Example map files
├── textures/ # Textures
├── minilibx_linux/ # MiniLibX submodule
├── Makefile
└── README.md