The 3rd project of the 42 Silicon Valley graphics branch
ft_wolf3d is a Wolfenstein3D gaming engine that implements a ray-casting algorithm. Multiple wall/ceiling/floor textures are supported, as well as unlimited sprites and object collision detection. To facilitate quick frame rendering, I've employed both multithreading and principle of efficient calculating.
At 42, we follow a strict norm in order to teach us to follow style guides. This norm also prevents us from using many built-in functions. In this project, we are limited to using a barebones graphic library called minilibx. This library limits the functionality to creating windows, handling input hooks, and coloring specific pixels.
The allowed functions are :
exit, malloc, free, and the functions of minilibx and math.h.
The Project is written in C and in accordance with "The Norm".
• Functions must not exceed 25 lines • No more than 5 function-definitions in a .c file • One instruction per line • One single variable declaration per line; cannot stick declaration and initialisation on the same line • No more than 5 variables per bloc • No more than 4 parameters per function • Forbidden keywords are: [for] [do ... while] [switch] [case] [goto]
--Demo Instructions (Mac OSX Sierra)--
• Open Terminal and run the following commands: • git clone https://github.com/thedigglemister/ft_wolf3d ft_wolf3d • cd ft_wolf3d • make && ./wolf3d "garden" • Additionally, you might try "room" in place of "garden"
• WASP keys are used to move forward, backwards, and sideways • Left and Right arrow keys are used to rotate • Space is used to jump • C is used to crouch • esc to exit
All worlds are generated from a series of numerical grids that specify the textures and locations of walls, floors, ceilings, and sprites: