The Doom Game Engine Part 2

Over this last weekend, I was moving into my new college apartment, so I was SUPER busy! 

But today is Doom Engine part 2! 

The level editor in the game engine consisted of basic objects, such as vertices to represent single 2D points in space. These vertices can be joined together to create lines, which are known as "linedefs" in the engine. Each of these "linedefs" could have either one or two sides, known as "sidedefs." The editor could group these sidedefs together to create 2D polygons, and the polygons in the game engine are called sectors, which represent certain areas/rooms in a given level. One-sided linedefs represent a solid wall in the engine, while two-sided linedefs represent connections between two different sectors. Sidedefs are used to store wall textures, which are completely separate from the floor texture and ceiling texture.  

Every sector has a certain number of properties:

  • a floor height,

  • a ceiling height,

  • a light level,

  • a floor texture,

  • and a ceiling texture.

What's interesting is that each sector only has ONE light level, so if you want to change the level of the lighting, you'd have to create a whole new sector and alter the light level of that sector! Sidedefs are used to store wall textures, which are completely separate from the floor texture and ceiling texture. Each sidedef can have up to 3 textures: the lower, middle and upper textures. With one-sided linedefs (i.e. solid walls), it is only possible to use the middle texture for the entire wall! But with two-sided linedefs (i.e. connections between sectors), the lower and upper textures are used to fill the gaps where adjacent sectors have different floor and ceiling heights. For example, the lower textures would be used to represent stairs. Most sidedefs don't utilize the middle texture often, even though they technically could. However, the middle texture is only really useful for hanging textures in mid-air. An example of a middle texture would be a transparent bar texture that appears to form a cage on a two-sided linedef!

Doom_map.png