Skip to content

Cub3D is a project in the curriculum of the 42 coding school that involves creating a first-person 3D maze game using raycasting techniques. The objective is to build a program that generates a 3D representation of a maze and allows the player to navigate through it. The project is inspired by the game Wolfenstein 3D

Notifications You must be signed in to change notification settings

Khoubaib-Boughalmi/cub3D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cub3D Documentation

Cub3D is a project in the curriculum of the 42 coding school that involves creating a first-person 3D maze game using raycasting techniques. The objective is to build a program that generates a 3D representation of a maze and allows the player to navigate through it. The project is inspired by the game Wolfenstein 3D and requires the use of the MiniLibX library for graphics rendering.

Prerequisites

  • macOS operating system
  • Solid CPU

Gameplay Preview

Here's a preview of the game:

Cub3D Gameplay

This gif showcases the immersive gameplay experience you can expect from Cub3D. Enjoy exploring the maze and battling your way through!

Running the Project

To run the Cub3D project, follow these steps:

  1. Clone the Cub3D repository.
  2. Build the project by running the make bonus command.
  3. Execute the program by running the ./cub3D_bonus map_bonus.cub command.

Make sure to provide the map.cub file as an argument when running the ./cub3D command. This file should contain the necessary information to generate the maze and configure the game.

Controls

The controls for playing Cub3D are as follows:

  • Movement: Use the keys W, A, S, and D to move forward, left, backward, and right, respectively.
  • Rotation: Use the left and right arrow keys ( and ) to rotate the view.
  • Mouse Rotation: Alternatively, you can rotate the view by moving the mouse.
  • Speed boost: Press SHIFT to activate a speed boost and move faster.
  • Interaction: Use SPACE to open doors.
  • Exit: Press ESC or click the red cross to exit the game.

Mandatory Part

The mandatory part of the Cub3D project includes the following features:

  • Wall textures: The maze walls are rendered with textures.
  • Sprite: A sprite is displayed within the maze.
  • Limited controls: Only the keys W, A, S, and D are available for movement, and the left and right arrow keys for rotation.

Bonus Part

In addition to the mandatory part, the Cub3D project offers bonus opportunities. The bonus part adds extra features and functionality to enhance the game. These may include:

  • Wall collisions: Implement collision detection with walls to prevent the player from passing through them.

  • Minimap system: Create a minimap display that provides an overview of the maze layout and the player's position.

  • Doors: Implement doors that can open and close, adding an interactive element to the game.

  • Animated sprite: Add animations to the sprite, such as walking or attacking animations, to bring it to life.

  • Rotate the point of view with the mouse: Enable the player to rotate the view using mouse movements, providing a more immersive experience.

  • Description 1

  • Description 1

About

Cub3D is a project in the curriculum of the 42 coding school that involves creating a first-person 3D maze game using raycasting techniques. The objective is to build a program that generates a 3D representation of a maze and allows the player to navigate through it. The project is inspired by the game Wolfenstein 3D

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published