Small implementation of a Ray Casting renderer in ASCII.
Highly inspired of Lode Vandevenne blog post on Ray Casting.
Sample of the player moving around
- clone repo
- run
make
at the root of the directory to build the project - run
./cub3D
at the root of the directory to run it./cub3D [map]
to run a custom map
You can copy the example ./maps/city.cub
for inspiration.
- the
R 90 30
means resolution ofwidth=90 x height=30
(a.k.a. how many pixels (characters) to print) - you can safely ingore all the setting after it
- the map is represented with characters at the end of the file (it has to be a rectagle)
N
,S
,W
orE
will be the initial position and the direction of the player1
means wall0
means empty block
This is a fork of my project for 42 School.
Only tested on MacOS.