Wolf3D is a program developed for my learning course at 42 school.
The objective of this project is to recreate the principle of ray casting of the famous game Wolfenstein.
For this we have to realize in C all necessary functions without using graphic libraries (except the Libmlx library required to create a window on MacOS provided by the 42 school).
PS : This game has not a real goal, you can simply explore the mazes.
Several options are available (see Keyboard shortcuts or/and Mouse controls sections for more infos) :
- Move in any directions (sideways movements included)
- Rotation with keys (or mouse position)
- Textured Mode (with floor and ceil casting)
- Walls collision (with an slight realistic offset)
- Minimap with rotation according to the player rotation
- Fire Torch Lighting simulation (in Normal & Hardcore Mode only)
- Several songs (with Selection of track / Play / Pause and Stop options)
- Hardcore Mode & Easy Mode
- Ambient occlusion
git clone https://github.com/BenjaminSouchet/Wolf3D ~/Wolf3D
cd ~/Wolf3D && ./wolf3d maps/good/Maze_Medium.w3d
You have to launch the program with a parameter. This is the name of the map you would like open at the execution of the program. This parameter as to be the name of a valid map, below the list of available maps :
maps/good/Basic_00.w3d
maps/good/Basic_01.w3d
maps/good/Maze_Small.w3d
maps/good/Maze_Medium.w3d
maps/good/Maze_Large.w3d
Example :
Open one maze map ⇣
./wolf3d maps/good/Maze_Large.w3d
Description | Key(s) |
Close the program (aka quit/exit) | esc |
Reset all the changes made | clear |
Hold to run faster | shift |
Enable or disable the mouse controls | M |
Make a step forward | ▲ or W |
Make a step backward | ▼ or S |
Make a step to the left | A |
Make a step to the left | D |
Rotate to the left | ◄ or Q |
Rotate to the right | ► or E |
Hardcore Mode Switcher | H |
Easy Mode Switcher | Z |
Play / Pause the current song | P |
Switch to the first song | 1 |
Switch to the second song | 2 |
Switch to the third song | 3 |
Switch to the fourth song | 4 |
Description | Action |
Change the view according to the mouse position in the window | Move the cusor in the window |
Rotate to the left | Stay the cursor in left side of the window |
Rotate to the right | Stay the cursor in right side of the window |
If you want to contact me, or fix / improve this project, just send me a mail at bsouchet@student.42.fr