README updated
This commit is contained in:
50
README.md
50
README.md
@@ -5,11 +5,59 @@
|
|||||||
## Description
|
## Description
|
||||||
<!-- Section that clearly presents the project, including its goal and a brief overview -->
|
<!-- Section that clearly presents the project, including its goal and a brief overview -->
|
||||||
|
|
||||||
|
cub3D is a graphical project inspired by early 3D games such as *Wolfenstein 3D*.
|
||||||
|
Its goal is to render a 3D representation of a maze from a 2D map using the **raycasting technique**, written entirely in C using MLX graphics library.
|
||||||
|
|
||||||
|
This project renders a 3D view of a 2D map described in a '.cub' file.
|
||||||
|
The player can move inside the map, rotate the camera and see textures walls, floor and ceiling.
|
||||||
|
|
||||||
|
This rendering is possible duo to classic **raycasting algorithm**, where one ray is cast per screen column to calculate wall distance and draw it correctly.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Instructions
|
## Instructions
|
||||||
<!-- Section containing any relevant information about compilation, installation, and/or execution -->
|
<!-- Section containing any relevant information about compilation, installation, and/or execution -->
|
||||||
|
|
||||||
|
### Requirements
|
||||||
|
- Linux or macOS
|
||||||
|
- MLX / MLX42
|
||||||
|
- 'gcc' or 'clang'
|
||||||
|
|
||||||
|
### Compilation
|
||||||
|
```bash
|
||||||
|
make
|
||||||
|
```
|
||||||
|
|
||||||
|
### Execution
|
||||||
|
```bash
|
||||||
|
./cub3D assets/maps/example.cub
|
||||||
|
```
|
||||||
|
|
||||||
|
### Controls
|
||||||
|
|
||||||
|
Use W, A, S and D to mover the player.
|
||||||
|
Use UP, DOWN, LEFT and RIGHT arrows to rotate camera.
|
||||||
|
Use ESC for exit the program.
|
||||||
|
|
||||||
|
|
||||||
|
### Map configuration (.cub)
|
||||||
|
|
||||||
|
A **.cub** file contains:
|
||||||
|
- Wall textures (NO, SO, WE, EA)
|
||||||
|
- Floor and ceiling colors (RGB format)
|
||||||
|
- Map layout, composed of:
|
||||||
|
- 1 for walls
|
||||||
|
- 0 for empty space
|
||||||
|
- N, S, E or W for the player start position
|
||||||
|
|
||||||
|
The map is strictly validated:
|
||||||
|
- Exactly one player position
|
||||||
|
- Fully closed by walls
|
||||||
|
- Only valid characters
|
||||||
|
- RGB values between 0 and 255
|
||||||
|
|
||||||
## Resources
|
## Resources
|
||||||
<!-- section listing classic references related to the topic, as well as a description of how AI was used - specifying for which tasks and which parts of the project -->
|
<!-- section listing classic references related to the topic, as well as a description of how AI was used - specifying for which tasks and which parts of the project -->
|
||||||
|
|
||||||
|
|
||||||
g<!-- ADITIONAL SECTIONS MAY BE REQUIRED DEPENDING ON THE PROJECT (usage examples, feature list, technical choices, etc... -->
|
<!-- ADITIONAL SECTIONS MAY BE REQUIRED DEPENDING ON THE PROJECT (usage examples, feature list, technical choices, etc... -->
|
||||||
|
|||||||
Reference in New Issue
Block a user