This project aims at reproducing a basic FPS game by using the raycasting method.
first, copy paste the following code on your terminal:
cd ~ && cd Downloads && git clone https://github.com/phperrot/cub3d.git cub3d && cd cub3d && chmod 777 Cub3D_bonus && chmod 777 Cub3D && ./Cub3D_bonus maps/master_map.cub
this should open a new window:
KEY | Action |
---|---|
ESC |
exit game |
SPACE BAR |
shoot |
A |
move left |
D |
move right |
W |
move forward |
S |
move backward |
→ |
turn right |
← |
turn left |
M |
hide/display map |
O |
open/close door |
P |
open/close secret door |
option |
change weapon |
F10 |
sound on/off |
Collect treasures to unlock new levels !
You can now create your own map by following this norm:
Object | Code |
---|---|
1 |
wall |
0 |
floor |
2 |
sprite #1 |
3 |
sprite #2 |
N /E /W /S |
player initial position + orientation |
A |
ammo |
B |
bonus |
O |
ennemy |
T |
treasure |
D |
door |
P |
secret door |
You can have a look at the subject for further details on how .cub
files work.
Some useful links can be found in the documentation file