Wolfenstein 3D engine
From Wikipedia, the free encyclopedia
The Wolfenstein 3D engine is the engine that powers Wolfenstein 3D. The biggest part of the engine is programmed by John Carmack. It is written in C and ASM, and is almost a real complete engine. It features graphics (raycasting), sound (WAV and IMF), player physics and game control. Many enthusiasts are trying to improve the engine since the code was released.
Contents |
[edit] Games
Wolfenstein 3D was the first game that used this engine, and some other games followed:
- Blake Stone: Aliens of Gold
- Blake Stone: Planet Strike
- Operation Body Count
- Corridor 7
- Super 3D Noah's Ark (which is not made by iD)
- Rise of the Triad (slightly based on the engine)
[edit] Info
The game is 2.5D which means you see it though first person but it's not all 3D.
- sprites used for enemies
- you can't look up and down
- textured walls
- the whole level is at the same brightness
- the whole level is a at the same level (eg. no staircases)
[edit] The engine
The engine consists of 53 source files written in C and ASM. Most of the game is managed by 17 WL_*.C files. They are listed below.
- WL_ACT1.C - it manages actors
- WL_ACT2.C - this one too
- WL_AGENT.C - this file, the favorite of many ones, is used to manage game variables
- WL_ASM.C - used to enable ASM commands and to bind the ASM files to the C files
- WL_DEBUG.C - the engine comes with a debugger, and this file contains most of it
- WL_DEF.H - in this file most of the extern variabeles and void's are stored
- WL_DR_A.ASM - ?
- WL_GAME.ASM - used to handle the game itself, loading and saving and some other stuff
[edit] Raycasting
Raycasting is the main technique used in Wolf3D. Raycasting is similar to raytracing, but differs in a few points. With the raycasting technique, only the line of sight is calculated from the 'eye' of the player to the pixel in case. Raytracing uses another technique, which enables for instance shadowing, reflections and refractions. Since raycasting only uses one line of sight, shadowing or reflecting is impossible.
[edit] Links
- Engine source code and compiling instructions
- DieHard Wolfers Forum - Forum about Wolf3D and programming