Why are the walls in Doom fully 3D, but enemies can only be rendered as 8-directional sprites?

524 viewsOtherTechnology

I’ve read that enemies in Doom are rendered as sprites because of hardware limitations. But why is it that walls, stairs, etc. appear fully 3d by contrast?

[example](https://www.youtube.com/watch?v=tDmf9dgso84)

​

In: Technology

9 Answers

Anonymous 0 Comments

Doom was written for a time when the average hardware was a low-end 486 or a high-end 386. You could not rely on the CPU supporting floating point instructions, and if they did it would be slow. 3d accelerator cards wouldn’t be in the hands of the general public for around 5 years or so. Having a 66 MHz CPU meant the game would run REALLY well.

The graphics engine really cheated by having limits on the terrain. This meant it could make assumptions that wouldn’t be valid for real 3d rendering, but a hacky way of doing the graphics would be fast and look good enough under these limits. Rooms look 3d, but you could only have staircases, no ramps. Rooms could not be placed above/below each other. The way the drawing worked was based on columns, knowing that each surface being drawn was either a vertical wall or a flat floor/ceiling.

This meant that all the rest of the things were just drawn as sprites. The game was not really 3d, and a “model” for a 3d thing didn’t exist. Enemies and things were just drawn, scaled based on distance, with their position on the floor as a reference for where to draw it.

Anonymous 0 Comments

The walls of Doom aren’t fully 3D, they use a trick to look like 3D but you can’t look up and down, only straight ahead (there are mods that let you look up and down but it doesn’t look correct like a modern FPS it makes the view distorted).

This trick was needed because it’s faster to render than 3D and most computers at the time wouldn’t have been fast enough to draw 3D. That’s also true of the enemies which is why they are drawn as 2D. Possibly they could have had very low poly 3D enemies but they would have looked much worse than the detailed 2D sprites.

Obviously the above doesn’t apply to some modernized Doom versions that do render the levels as 3D so that they can use your graphics card.

Anonymous 0 Comments

They are *not* “fully 3D” in full traditional sense.

Doom uses Binary Space Partitioning to render the walls – whole map is divided into 2D sectors (made of vectors), similar to architectural and technical drawings – you can scale up and down, but distance between points stays proportional.

You can think of it like so: you draw a rectangle on paper. To draw one, you need to know it’s four corners. That’s what Doom calculates.

Now, you come a step closer, and draw another rectangle, maybe overlapping old one a bit. And so on. It’s all about what player can see, not really the 3D world. A bit like how raytracing works. And so forth. of course, it’ll also scale the textures to match the walls. And that’s how it works, basically. Drawing polygons and rectangles in such fashion is a bit different than modern 3D – that uses world-space and screen-space rendering (what the world is / what screen shows).

Now, drawing enemies and items in such fashion would make very little sense. Also, hardware acceleration didn’t really exist back then. Video cards were good at drawing 2D shapes, but not doing vector/matrix calculations needed for 3D. And speaking of sprites, compared to 2D games of the day – Doom had quite simple sprites and animations. Most enemies have like only few frames of animation for each interaction. So Id Software wasn’t really focused on that aspect.

Anonymous 0 Comments

Think of it this way. Why are IRL chess pieces 3 dimensional, when you can only move the pieces in 2d? You could just as easily print the icons on flat poker chips and the game would be the same, but would only be viewable from a “top-down” perspective.

Its all about the artistic choice of the game creators. The visual representation doesn’t change the rules of the game at all.

Anonymous 0 Comments

Its not that it was impossible to make enemies 3D — there just wasn’t enough “polygon budget” left. Rendering the walls took most of the CPU time.

Note, that when there are multiple enemies on screen — their “polygon cost” stacks. If you want many enemies on screen – the polygon count of each must be very low. Doom just goes to an extreme of very low — each enemy uses just 1 polygon.

Anonymous 0 Comments

The not-quite-correct, but more EL5 answer:

you can think of the walls and ceilings and floors of Doom also as nothing but 2D sprites being moved around the screen to make you feel like you’re moving around a 3D space.

Longer:

Doom uses clever mechanisms that allow you to explore a three-dimensional-looking environment while saving your processor a lot of work.

Every level in Doom is a 2D level, meaning the entirety of the geometrical information required to draw a Doom map can be represented in flat, 2D space. Nothing is ever ‘above’ or ‘below’ anything, or at an angle, or in changing relationships. The minimap you can look at in Doom actually contains all geometrical information about the environment and is, in fact, how your computer ‘sees’ the level. Everything is designated a function as either ‘floor’, ‘ceiling’ or ‘wall’ and as you push buttons to ‘move’ your character, the designation tells the computer how to stretch and zoom each element.

But, even this simple sort of ‘geometry’ would push the computers way past their limits if they had to compute the entire level at once. So, before the game was shipped, they applied an algorithm that would pre-determine, and then save, which parts of the level are visible from which other part of the level. Doom doesn’t ‘calculate’ which parts of the level the player is currently able to see – it just looks it up from pre-computed data. Same with the ‘lighting’ (ie color tint and brightness), it’s all baked in.

All of this is much, much, much easier for a processor to do than to render, in the modern sense, even a single complex 3D object with lots of triangles and lighting and curved or angled surfaces and rotations and whatnot. That’s why all complex shapes in this game are 2D sprites.

Complex rendering things need the shuffling around of lots of complicated and complex numbers. The Doom engine reduces everything to a small amount of simple numbers, with nothing but extremely simple transformations applied, assembled via a 2D level layout that contains all information to ‘pull it up’ into a series of ‘3D rooms’. Rendering even a single enemy in actual, real 3D would triple and quadruple the necessary computations.

Anonymous 0 Comments

There are lots of great answers already. I just want to comment that if you want to see an example of a real 3D world with sprite enemies, you can look at the Duke Nukem 3D – [https://www.youtube.com/watch?v=nP34zCaRHHE](https://www.youtube.com/watch?v=nP34zCaRHHE)

But it came out much later, around Quake time.

Anonymous 0 Comments

Each surface is 4 points. Constructing a realistic monster would take dozens or over a hundred points which would have maxed out the memory required to display them and they would have looked pretty blocky.

Each of those points would have to be stored and manipulated every time the monster moved. Remember that when doom came out, we only had 4 MB or less of memory.

Anonymous 0 Comments

A wall is just one polygon. A simple flat shape that is easy for computers to render.

A realistic 3D model of a monster would have thousands and thousands of polygons. Even an unrealistic model would have hundreds. So, it is much harder for computers to render, and a computer of that time wouldn’t be able to.

If you make the monster just a flat shape with the 2D image of the monter drawn on it, it is much easier to render.