What was the deal with 2.5D games like DOOM?

What exactly is 2.5D? Why did so many games have to use it rather then a 3D engine? Why could you not have a “room over room” in a 2.5D engine? How did ‘Duke Nukem’ overcome this?

I think it’s to do with the way that the level maps were stored.

      • A 2.5-D game is one that typically tried to represent a 3-D world, but that did not actually use true 3-D models for all the on-screen objects. Computers were limited in their abilities, and it simply wasn’t practical to expect a typical setup to be able to run a true 3-D program and have it look nice and run at a decent speed for an action game.
  • Doom in particular was called 2.5-D, because the walls, floors and ceilings were actual 3-D models, but all the monsters were 2-D sprites. To represent a 2-D sprite in 3-D, you draw a number of pictures, each showing the same monster from different angles. The program figures out which view to use by what angle the monster is turned and what angle you are viewing it from, and it scales the drawing larger or smaller by figuring out how far away from you the monster is.
  • Doom was most notable for the fact that the floors didn’t all have to be on the same level, and the walls didn’t have to all be at 90-degree angles and the same height. Previous simpler games used limited room shapes and took mathematical processing shortcuts in order to run faster, and simply accepted the limitations of room shapes (the old Castle Wolfenstein was one). No game ever overcame this, so to speak: all the programmers knew how to do true 3-D all along. What improved was the average processing capabilities of the consumer PC. - DougC

Everything you always wanted to know about 2.5D can be found in Doom 3D Engine techniques

Okay, I knew that, but why no room over room? What was it about the 2.5D system that did not alow this, or even walls that were not straight up?

      • The original Duke Nukem was a 2-D side scroller game. Maybe you mean Duke Nukem 3-D.
  • What is room-over-room, exactly? And what walls not straight up? - DougC

In Doom, you can not have a two story building. You cannot have a bridge that you can both walk over and under.

Walls cannot tilt, they are always perpendicular to the ground.

I think that’s because the maps were stored in pretty much the same way (conceptually) as you’d store a 2D map of your street; it’s difficult to represent the fact that your house has 2 floors (and how far separated they are) and the height of your garden fence in a plan view.

Ok, but why did they have to store maps like that?

It made the CPU have to do less work. In 2.5D games like Doom collisions are detected solely through comparing the X and Y positions of objects, rather than their true positions in 3 dimensions. The physics model of the game was basically a 2D workd with the third dimension sort of grafted on. This enables the game to run faster on the processers available in those days.

Actually, both of these things were finally figured out by the great PWAD designer Iikka Keränen (who was ultimately hired by id Software, and for good reason.) The over-and-under bridge was first used in Dystopia 3, released in May 1996, and was simple enough to be copied by several other designers, who even were able to stack 3 or 4 bridges on top of each other. It basically involved a “moving sector” that was invisible and normally remained at ground level, but instantly rose to bridge level whenever your marine approached the bridge. (I’m not sure what would happen in multiplayer if you tried to go over and under at the same time, never tried it.)

The room-over-room effect was only done once that I know of, in the secret level of the Requiem megawad, released in 1997. It never caught on since it was purely decorative (you couldn’t walk on the top floor), plus it was insanely hard to design, from what I heard.

Obviously, they didn’t have to (or we wouldn’t be doing otherwise now), they just chose to (or more likely, they didn’t get as far as thinking of another way at that point).

It’s a bit like asking why people had to build steam trains; why didn’t they just make Diesel/Electric ones from the start?

Just an interesting factoid: Wolf3d maps were actually stored as ASCII art so everything had to be in blocks. Thats why you couldnt walk right up to the tables and everything.

Doom uses a binary space partition tree. This is a mathematical structure that basically says ok, let’s draw a line down the middle of the universe. Everything on the left is on one side of the tree, and everything on the right is on the other side. You keep adding “nodes” into the tree which further subdivide the world. BSP trees are a bit of a pain to set up, but once you’ve got it all set up then sorting all of your wall polygons is a simple matter of traversing nodes in the tree (essentially, the data structure does the sorting for you). If you have to sort all of the polygons and they can be in any random dirction, there is no way in heck that the renderer will run at an acceptable speed on a 486. There just isn’t enough computing power available.

Doom was the first game that I was aware of that used BSP trees for fast polygon sorting. Later games like Duke Nukem 3D and Dark Forces used overlaid BSP trees to kind of “cheat” and give you rooms over rooms, a structure which can’t be stored in a simple 2-D BSP tree. Quake still uses a BSP tree, but it’s a much more sophisticated version that handles the 3rd dimension much better. Other 3-D engines use what is called “portal rendering” which is basically looking at the world as a bunch of “rooms” and “doors”, and only rendering polygons that can be seen through the “doors”. It is my understanding that Unreal is a portal renderer.

The techniques used in modern 3-D games rely on the fact that the processor has more oomph these days. Doom and other games of its era had to rely on various tricks just to run fast enough. Remember that the target system back then was a 486 without any fancy graphics processor.

Doom maps are basically a bunch of X/Y coordinates for the “corners” of the rooms, then a floor height and ceiling height. This data is then pre-compiled into a BSP tree which is what the game uses to draw everything with.

A “door” in doom is a sector whose ceiling height is the same as its floor height. The door “opens” by changing its ceiling height.