Cub3D is a project inspired by the world-famous Wolfenstein 3D game, which was the first FPS ever. It enables you to explore ray-casting techniques, with the goal of creating a dynamic 3D view inside a maze, where you must find your way out.
Cub3D is a challenging project that introduces students to various aspects of game development, including map parsing, 2D mini-map generation, raycasting, 3D rendering, texture mapping, event handling (keyboard and mouse), and animation.
-
Map Parsing: Parse map files to generate the maze layout and define its characteristics.
-
2D Mini-Map: Generate a mini-map representation of the maze to aid in navigation.
-
Raycasting: Implement raycasting algorithms to create a dynamic 3D view of the maze.
-
3D Rendering: Render the maze walls and textures to provide depth and detail to the environment.
-
Texture Mapping: Map textures into the walls to enhance visual quality.
-
Event Handling: Handle keyboard and mouse events for player movement and interaction.
-
Animation: Implement animation effects to enhance the gameplay experience.
Fire Animation: Press the F key to trigger a fire animation.
Door Opening: Press the spacebar to open doors.
Clone the repository:
git clone git@github.com:kaboussi00/3dGame.git
Navigate to the project directory:
cd cub3d
Compile the project:
make
Run the executable:
./cub3d map.cub
Controls
- Movement: Use arrow keys or WASD keys to move forward, backward, and strafe left or right.
- Look: Move the mouse to look around and change the view direction.
- Fire Animation: Press the F key to trigger the fire animation effect.
- Door Opening: Press the spacebar to open doors within the maze.
- Exit: Press ESC key to exit the game.
Lode's Raycasting Tutorial
Wolfenstein 3D on Wikipedia