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
makeat the root of the directory to build the project - run
./cub3Dat 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 30means 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,WorEwill be the initial position and the direction of the player1means wall0means empty block
This is a fork of my project for 42 School.
Only tested on MacOS.
