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.
- Host: GitHub
- URL: https://github.com/daisvke/cub3d
- Owner: daisvke
- Created: 2022-08-27T23:22:11.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-16T20:22:28.000Z (12 months ago)
- Last Synced: 2025-06-03T05:59:27.486Z (7 months ago)
- Topics: 42born2code, cub3d, ecole42, labyrinth-game, minilibx, raycasting
- Language: C
- Homepage:
- Size: 2.52 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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**