Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/iker-gonzalez/cub3d

Small simulated 3D game done using raycasting principles and inspired by the famous Wolfenstein 3D game
https://github.com/iker-gonzalez/cub3d

42cursus c dda-algorithm minilibx raycasting

Last synced: 1 day ago
JSON representation

Small simulated 3D game done using raycasting principles and inspired by the famous Wolfenstein 3D game

Awesome Lists containing this project

README

        


🧊 Cub3D 🧊


Development repo for 42cursus' cub3D project

For further information about 42cursus and its projects, please refer to 42cursus repo.


GitHub code size in bytes
Number of lines of code
Code language count
GitHub top language
GitHub last commit


About
·
Usage
·
Game

---

## 🗣️ About

> Small simulated 3D game inspired by the famous [Wolfenstein 3D game](https://www.youtube.com/watch?v=561sPCk6ByE). We need to create a "realistic" 3D graphical representation of the inside of a maze from a first person perspective, using ray casting principles.

![Game](https://github.com/iker-gonzalez/cub3d/blob/main/game.gif)

For detailed information, refer to the [**subject of this project**](https://github.com/iker-gonzalez/42_cursus/blob/main/_PDFs/en.subject_cub3d.pdf)

## 🛠️ Usage
Clone the repository in your computer using the following command:

`git clone https://github.com/iker-gonzalez/cub3d.git`

Then, you need to run the command `make` on the root directory.

This will compile the executable file `cub3d`

Last, run `./cub3d maps/map_of_your_choice`

## Game
To play this game you can use any map of your choice as long as follows the following rules:

* The extension needs to be `.cub`
* It must be surrounded by walls `1`
* Characters allowed:

| Character | Object |
|:-----------:|:---------------------------------------:|
| *1* | wall |
| *0* | Empty |
| *N* | Player starting position (north facing) |
| *E* | Player starting position (east facing) |
| *S* | Player starting position (south facing) |
| *W* | Player starting position (west facing) |

### Controls
You can use `AWSD` to move `UP`, `DOWN`, `LEFT`, `RIGHT` respectively.
Use right and left arrows to look right and left in the maze.
For restarting the game press `ESC` or click on the red cross on the upper-left corner of the window.

### Credit

This two-person project was done with my colleague and friend Iñigo [@Z3n42](https://github.com/z3n42).