/Cub3d42

Creating a game with the use of Raycasting

Primary LanguageC

cub3D

The goal of this project is to build a simple 3D game using the raycasting technique.

Table of Contents

  1. About
  2. Installation
  3. Usage
  4. Bonus

About

cub3D is a graphical program that provides a "realistic" 3D graphical representation of the inside of a maze, which the player must navigate through. The program is designed to be a tribute to the historic game Wolfenstein 3D, the first-ever first-person shooter.

Installation

  1. Clone the repository:
    git clone https://github.com/lpincoli/Cub3d42.git
  2. Move to the project's directory:
    cd Cub3d42
  3. Compile the project:
    make

Usage

The program takes one argument, a scene description file with the .cub extension:

./cub3D map.cub

The .cub file describes the maze map and specifies various settings such as the textures of the walls and the colors of the floor and ceiling. The maze map is made up of characters: '1' for walls, '0' for empty spaces, and 'N', 'S', 'E', or 'W' for the player's start position and orientation.

Once the program is running, use the left and right arrow keys to look around and the W, A, S, and D keys to move. Press ESC or click on the red cross on the window's frame to exit the program.

Bonus

To compile the bonus part of the code, use the following command:

make bonus

The bonus part includes additional features such as wall collisions, a minimap system, interactive doors, animated sprite, and the ability to rotate the point of view with the mouse. Be aware that your base program must be fully functional and error-free to have the bonus part evaluated.

Subject

For more information about the project, read the subject file.