Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Blastfrog

Angle display behavior

Recommended Posts

I noticed some peculiar differences about Doom's sprite angle handling, compared to other earlier id engine games (and even early versions of Doom).

In Wolfenstein 3D, ROTT, Shadowcaster and the Doom alphas, the sprite angle displayed was relative to the player's angle and the actor's angle. For example, if you're standing parallel to another player facing you, and you start turning clockwise, their displayed angle will turn clockwise as well. If you happen to be facing them but not turning, and you start strafing left and right, being completely parallel to them, they will not change angle.

This is inverted in the public release of Doom. In the non-alpha versions of Doom, if you are standing in front of another player and start turning, their displayed angle will never change. But if you start strafing left and right, their angle will start to change.

When you consider how perspective is supposed to work in this case, and that sprites are after all just flat, the original behavior is more "correct". Imagine a sprite of a flat wall, if you were strafing around it but always facing parallel to it, it would never become angled looking. But if you were to start to turn while in place, it would start to look angled.

Share this post


Link to post
ComicMischief said:

I don't know what you're saying, but it seems you think that an object's angle turns when you do. This is not true, it changes as you move.

That's exactly what I was pointing out. In Doom, it changes as you move. What I was trying to bring attention to is that before Doom, it didn't change as you moved, but instead changed as you turned.

Share this post


Link to post

Do you have a question, or proposing to use this in some way? You like this trick, or don't like it? Both methods are "incorrect" because sprites can only ever be two dimensional, and it's rather clever on the programmers' part to find these halfway solution to give the feel of more dimension.

It's like analyzing Loony Toons for the dark section of the mountain, where a train pops out and runs over the bad guy, and saying "Hey that's not realistic". It's an early animation trick to save from drawing many frames.

God I love Loony Toons. Not sure where we're going with this.

Share this post


Link to post
Vorpal said:

Do you have a question, or proposing to use this in some way?

Not the latter, really. While I do prefer the earlier method, since it's more relevant when it comes to the sprites being flat, it's not really what I'm getting at. All I'm doing is pointing out this small difference, and while I didn't ask directly in the OP, I'm curious as to why they would've changed this midway through Doom's development.

Share this post


Link to post

Doom's method is over-all better. See this case (NUTS.WAD):


If it followed Wolfenstein's motif and didn't change rotation based on your strafing, all monsters would have to be with their backs at you, making the formation look fan-like. I'm going to try Wolfenstein though.

Share this post


Link to post

Let's see if I get you:



The camera viewpoint is the arrow along the line. The three other arrows correspond to the angle of three things. The octogons represent the various angles of the sprites that can be displayed.

In cyan is lit the face that is shown by using a purely angle-based method; in yellow is lit the face that is shown by using the position-based method. If it's green, then the same face is chosen by both methods.

Share this post


Link to post

Sodaholic is right. Let's look at Wolfenstein 3D (original executable):


All officers look the same from this viewpoint. If you turn around, they will gradually update their rotation.

This seems to have been fixed in Wolf4SDL:



Their turning adapts to your perspective. AND also if you turn around, they will update their rotation.

In Eternity, GZDoom etc. it looks like this:



Notably, their rotation is updated to your perspective, but doesn't change when you turn. Observe:


The leftmost officer looks odd.

Share this post


Link to post
printz said:

This seems to have been fixed in Wolf4SDL:

Hmm weird. I guess if someone's interested they can find the code in the DOS source and compare. My guess is at high resolutions the old method didn't work as well.

That's not to say Wolf4SDL's method is that great either. The comments even say that it "works well enough for 8 rotations." Personally I see guards running towards me diagonally way to often. :P

Share this post


Link to post
printz said:

This seems to have been fixed in Wolf4SDL

"Fixed"? I mean, if the way it was coded suggests that it might not have been the original intention, then fine, but since this was done in the Wolf engine, Shadowcaster's engine, AND the alpha versions of the Doom engine suggest to me that this kind of rotation wasn't a bug, since that's three different engines having the same behavior, two different opportunities to correct it if it were a bug. But then again, if it were a bug, that'd mean that they squashed it on their third try.

Whichever the case, I stand by my assertion that the older method is more correct in perspective, even if it's admittedly a little flatter looking.

Blzut3 said:

My guess is at high resolutions the old method didn't work as well.

Aesthetically or functionally? If for aesthetic purposes, I can't say I exactly agree with them changing it, since the old way was apparently the original intention. If it was somehow resolution dependent, then they should have tried keeping the same rotation behavior while having it adapt to whatever resolution the user is using.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×