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

325 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

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.

You are viewing 1 out of 9 answers, click here to view all answers.