Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 1.01 KB

README.md

File metadata and controls

44 lines (29 loc) · 1.01 KB

FDF

An over-engineered ray casting engine.

42

Maps

Maps are described in a 2D-grid format, one scalar for every vertex of the grid, describing its height.

For exemple, to do a flat square with the top right corner rising up, you would do

0 0 1 2 3 4 5 6 7 8 9
0 0 0 1 2 3 4 5 6 7 8
0 0 0 0 1 2 3 4 5 6 7
0 0 0 0 0 1 2 3 4 5 6
0 0 0 0 0 0 1 2 3 4 5
0 0 0 0 0 0 0 1 2 3 4
0 0 0 0 0 0 0 0 1 2 3
0 0 0 0 0 0 0 0 0 1 2
0 0 0 0 0 0 0 0 0 0 1

Build

You will need to install libmlx. After that:

  • make to compile the whole project.
  • fdf ./my_map.txt to run it.

Controls

  • W A S D to rotate around the origin.
  • I J K L to shift the camera 1 unit to the the top/left/right/bottom, conserving the same angle.
  • U O to move 1 unit toward/away the origin.

Screenshot

france

Grade

FDF was originally a school project at 42. It was graded 125/100.