An open API service indexing awesome lists of open source software.

https://github.com/daisvke/cub3d

This project focuses on creating a “realistic” 3D graphical representation of the interior of a maze from a first-person perspective, based on the principles of Ray-Casting.
https://github.com/daisvke/cub3d

42born2code cub3d ecole42 labyrinth-game minilibx raycasting

Last synced: 3 months ago
JSON representation

This project focuses on creating a “realistic” 3D graphical representation of the interior of a maze from a first-person perspective, based on the principles of Ray-Casting.

Awesome Lists containing this project

README

          

# **cub3D**

## **Description**
This project focuses on creating a “realistic” **3D graphical representation** of the interior of a maze from a first-person perspective, based on the principles of **Ray-Casting**.

---

## **Commands**

### **Running the Program**
Compile and run the program using the following commands:
```bash
make
./cub3D [map]
# Example:
./cub3D maps/ok_test_map_labyrinth.cub
```

---

### **Controls**
| **Action** | **QWERTY Key** | **AZERTY Key** |
|-------------------|----------------|----------------|
| **Move Up** | `W` | `Z` |
| **Move Down** | `S` | `S` |
| **Move Left** | `A` | `Q` |
| **Move Right** | `D` | `D` |
| **Quit** | `ESC` | `ESC` |

---

## **Map Format**
The program requires a **map description file** (with the `.cub` extension) as its first argument.

### **Map Elements**
The map must include only the following **7 characters**:
| **Character** | **Description** |
|---------------|------------------------------------------|
| `0` | Empty space |
| `1` | Wall |
| `X` | Exit point of the map |
| `N, S, W, E` | Player's starting position and direction |

---

### **Map Rules**
1. The map must be **fully enclosed by walls** (i.e., surrounded by `1`).
2. Below is an example of a **valid map**:
```plaintext
1111111111111
1001000000001
1000011111001
100011E000001
1111111111111
```

---

## **Screenshots**