Skip to content
A Wolfenstein3D gaming engine, inspired by the world-famous eponymous 90’s game
C Objective-C Roff Makefile
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.


The 3rd project of the 42 Silicon Valley graphics branch

--Project Description--

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.

--Coding Style--

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".

--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 ft_wolf3d
• cd ft_wolf3d
• make && ./wolf3d "garden"
• Additionally, you might try "room" in place of "garden"

--User Controls--

• 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:

You can’t perform that action at this time.