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

Trying to calclate Doomguy's real speed [a whole lot of wrongness ITT]

Recommended Posts

How many units does Doomguy move per second at max speed? I want to know so that I can calculate the equivalent speed in real life. 8 units in Doom is officially a foot, by the way.

Share this post


Link to post
Marnetmar said:

I think it was concluded that he ran at 57 mph.


Now that is fast! Is that measurement based on him running straight or diagonally? (you move even faster diagonally). I wish more modern shooters were that fantastic.

Share this post


Link to post

Doomguy is faster not only compared to modern FPS, but also compared to most FPS of its day. Either way, it works because of the game's mechanics and architecture. It's not the same thing as using the equivalent of a -turbo cheat in CoD or Far Cry.

Share this post


Link to post

The running speed varies between 16 and 18 units per tic. I estimated it by shooting a Dehacked-modified projectile in that speed range. In effect, you run at about 600 units per second. I think the walking speed is half (300), you can verify it via Dehacked. These numbers are useful when comparing with the speeds from other games, such as Quake (200 walking, 320 running) or Doom 3 (less than 200 walking, less than 300 running).

The doomguy speed is like a moderate/safe car speed (41km/h, 25 miles/hour), by using sizes of 16 as feet.

If you lower the archvile or cyberdemon walking frame durations to 1, you'll have a monster about as fast as the player. Technically a wee bit slower, but the player stops to orient himself.

EDIT: I think the Dark Forces Katarn runs faster than Doomguy... but then again, his running is harder to control.

Not sure whether BJ Blazkowicz runs faster or not than Doomguy.

Baratus IS faster than Doomguy, but everyone ignores him.

Share this post


Link to post

So the calculation is used by Doomguy's speed meter shows 100?
Well, I havn't think of his speed at all. His speed is probably faster than an archvile.

Doomguy's speed is 41km/h? Is that really possible? That speed is just as the speed as Olympic runners!!! If that so, his acceleration maybe very fast also, by the equations to calculate:

v = u + at
s = 1/2(u + v)t
s = ut + 1/2 vt^2
v^2 - u^2 = 2as

Share this post


Link to post

And exactly how can you compare "units" of different games, even if they were made -partially- by the same programmers? A "unit" in Quake or Doom 3 may mean something entirely different than Doom's pixels.

There's also no need to guesstimate the speed of Doomguy: it's all there in the code.

fixed_t		forwardmove[2] = {0x19, 0x32}; 
fixed_t		sidemove[2] = {0x18, 0x28}; 
expressed as map units/tic in hexadecimal. In decimal, here they are:
fixed_t		forwardmove[2] = {25, 50}; 
fixed_t		sidemove[2] = {24, 40}; 
Look familiar? SR40/SR50 ring a bell?

So in a second (35 map tics) the distances covered would be (in map units PER SECOND):
{875, 1750} ; 
{840, 1400};
They are not little, by any standard.

Now depending on how you interpret a map unit, real-life estimated speed will also vary. Some say that 64 units = 1 meter (makes sense for use euro-pinkos that use the metric system, this would also make floor tiles be 1 m^2 in area).

Some say that 16 units= 1 foot (reasonable, since the game's authors were American, and would make floor tiles be 16 ft^2 in area).

So if we go with the "europinko" interpretation:

Walking speed = 875/64 = 13.67 m/s = 49.17 km/h
Running speed = 1750/64 = 27.34 m/s = 98.43 km/h

which are perhaps a tad high.

With the "All American" interpretation, they would be:

Walking speed = 875/16 = 54.68 ft/s = 16.66 m/s = 60 km/h
Running speed = 1750/16 = 109.375 ft/s = 33.33 m/s = 120 km/h

That settles it. Doomguy walks as fast as a moped (the very least), and can run just short of the legal highway speed limit. This is masked by the fact that the architecture and proportions are all warped and generally oversized.

However there must be some other factor at play here, since a timed run through the void "only" had him move 16000 or so map units in the horizontal direction in 30 seconds (with the movement angle perfectly neutral) , which would mean a speed of "only" 533 map units/sec and thus "only" 15 map units per tic.

This is weird...I gotta see where/how these stated speeds of 50 units get chopped off to so little....

Share this post


Link to post

And this thread, ladies and gentlemen, proves why Doom is the best FPS games ever created by a human being. It's all in the speed of gameplay.

Share this post


Link to post

OK, here's the deal: those values in the forwardmove/sidemove arrays actually represent ACCELERATION RATES, which are then multiplied by 2048 before being added to to player's total momentum.

Ask not why, but after some really complex shit, they result in adding some momentum to Doomguy. Only monsters and projectiles actually have fixed on-off speeds, while Doomguy's is the result of some really fucked up interactions.

Anyway, the ONE value that does matter here is that deep down in the Code of Doom lies a MAXMOVE constant, which is set at 30 map units, and that is considered as Doomguy's TOP SPEED CAP IN EITHER THE X OR Y DIRECTION (however, it does not apply cumulatively to their modulo, which is what makes SR50 possible). Also, it does not apply to glides/wallrunning because these are done after this check.

The walking speed is not exactly set in stone, but is the result of interaction with the FRICTION constant. However the top straight walking speed is set, and is 30 units per map unit.

This DEFINITIVELY sets the speed of doomguy to:

30 map units/tic = 1050 map units/sec = 65.625 ft/sec = 20 m/s = 72 km/h = 45 mph.


There. And now don't ever ask or try to "calclate" Doomguy's speed ever again or I will fucking kill you.

Share this post


Link to post

I got so fed up with that that I added a speedometer to Doomguy, inside P_MobjThinker, which measures effective per-tic map unit distance.

Running: 16.666 mu/tic
Walking: 8.333 mu/tic

Strafe-running: 13.333 mu/tic
Strafe-walking: 7.9999 mu/tic

SR-40 effective: 21.34 mu/tic

Wallrunning: ~30 mu/tic(CAPPED BY MAXMOVE)

Jodwin confirmed these results by analyzing the movement/friction code.

So the EFFECTIVE moving speeds are not hardcoded anywhere, but they are de-facto limited by friction and safeguarded by MAXMOVE against gaining too much momentum.

Interestingly, even removing friction results in a top speed of only 42 or so mu/sec, because there's still MAXMOVE's thrust-limiting mechanism in place (which however fails to honour its set limit).

So, how much can Doomguy run? Wallrunning does indeed give 45 mph (30 mu/tics). Normal running is 25 mph (still, nothing short of moving around on a moped), normal walking is half that (still as fast as normal biking or rollerskating).

QED: Doomguy runs abnormally fast. Class dismissed.

Share this post


Link to post

EDIT: Why was this merged into the speed thread? I wanted to have it as a separate discussion. Oh well.

I've seen people claim that 12 map units are a foot, 16 are a foot, and all that crap. Wrong. It's 8 map units per foot. Both directions (despite the aspect ratio), no exceptions. It is absolutely 100% wrong to state that a foot is anything but 8 map units.

I know what you're thinking. "But Soda, where the hell are you getting these numbers? You're just pulling them out of your ass!" No, I'm not, and id themselves will prove it:


Doom press release blurbs from the Doom Bible:
"Wolfenstein's walls were always at ninety degrees to each other, and were always
eight feet thick."

Wolfenstein's walls were 64x64 units. 64/8 = 8. So there. 8 units is a foot horizontally.


Readme file from the 0.4 alpha:
"Some new gfx, but now that you can't climb up higher than 3 feet, you can get to the cool bits."

In Doom, you can only climb up to 24 map units. 24/8 = 8. So that's 8 map units per foot vertically too.

Share this post


Link to post
Sodaholic said:

I've seen people claim that 12 map units are a foot, 16 are a foot, and all that crap. Wrong. It's 8 map units per foot. Both directions (despite the aspect ratio), no exceptions. It is absolutely 100% wrong to state that a foot is anything but 8 map units.

I still hold on to that Doom-Metrics proposed theory that a foot is like 16 map units horizontally or 10 units vertically. Anisotropic as it might be, I was able to fit the rooms of my apartment just fine into Doom by working at this scale. After rounding them to multiples of 8, the doors became 40x64 ingame, which is just a little more than the player character -- very similar to real life doors. The rooms were 80 units tall, eight feet that is, which feels natural too.

Share this post


Link to post
Maes said:

I got so fed up with that that I added a speedometer to Doomguy, inside P_MobjThinker, which measures effective per-tic map unit distance.

Running: 16.666 mu/sec
Walking: 8.333 mu/sec

Strafe-running: 13.333 mu/sec
Strafe-walking: 7.9999 mu/sec

SR-50 effective: 21.34 mu/sec

Wallrunning: ~30 mu/sec (CAPPED BY MAXMOVE)

Did you mean mu/tic?

Maes said:

Jodwin confirmed these results by analyzing the movement/friction code.

So the EFFECTIVE moving speeds are not hardcoded anywhere, but they are de-facto limited by friction and safeguarded by MAXMOVE against gaining too much momentum.

Interestingly, even removing friction results in a top speed of only 42 or so mu/sec, because there's still MAXMOVE's thrust-limiting mechanism in place (which however fails to honour its set limit).

30*sqrt(2)=42.43

Share this post


Link to post

I'm sure there was a more relevant, later announcement by Romero & co. saying that in DOOM, as in, in the final product that got delivered, it was 16 units per foot.

Not only that, but vertically it's 10 units per foot (which is closer to your estimate of 8 units per foot). But horizontally? No chance. Everything should be ENORMOUS.

And again, how are the units of a _different_ game relevant in any way?

Share this post


Link to post
tempun said:

Did you mean mu/tic?


Yes _-_ Correcting it now.

tempun said:

30*sqrt(2)=42.43


Nono I mean that even accelerating _perfectly forward_ with no friction results in that number. There's this code in P_XYMovement() which somehow puts a cap to the impulse Doomguy can receive:

 do
    {
	if (xmove > MAXMOVE/2 || ymove > MAXMOVE/2)
	{
	    ptryx = mo->x + xmove/2;
	    ptryy = mo->y + ymove/2;
	    xmove >>= 1;
	    ymove >>= 1;
	}
	else
	{
....
and since this is in a loop, results in an asymptote. This is done AFTER the check for whether any of momx/momy exceeds MAXMOVE, so exceeding MAXMOVE/2 in terms of residual impulse also triggers a forced deceleration which has nothing to do with friction, and is independent of using SR50.

SR50 or wallrunning don't trigger this (dynamic) limit mostly because none of their components seems exceeds MAXMOVE/2.

Share this post


Link to post

Where is this announcement stating that it was 16 units per foot?

As for the "different game" part, it appears to be likely that this scale was created when they were working on Wolfenstein (hell, possibly even Catacombs 3d), and they just happened to be using the same scale for Doom. By the time Quake rolled around, it was probably changed to a unit per inch, which is what they've been using since.

The fast player speed makes everything feel smaller.

If 10 units per foot were really the vertical height for things, that would mean Doomguy's eyes are 4 feet off the ground, rather than 5. As for Doomguy's hitbox of 56 units tall, that was probably more for making sure the viewbobbing never went above the ceiling. It was likely not meant to be his actual physical size. Keep in mind, his sprite is slightly below the ground, so pointing out that his sprite is 56 units is invalid too.


Doomguy's real speed when running is 49.714 MPH.

Share this post


Link to post

No.

http://www.trilobite.org/doom/doom_metrics.html

Seriously, try making your own levels or better yet, sprites based on real objects. You'll find that 8 units per foot will result in very miniaturized objects and skewed proportions. So an 8-unit step is 1 foot tall? That's an OBSTACLE, not a step.

Share this post


Link to post
Maes said:

No.

That's just some random guy's estimate. It's not id saying that. Now, I would believe you if I saw that quote from Romero stating that the scale was not 8 units per foot.

Until then, I'll take id's word over some random estimate. Seriously, what makes Scott Ampoker a more reliable source than id themselves?

Share this post


Link to post
Sodaholic said:

Seriously, what makes Scott Ampoker a more reliable source than id themselves?


The fact that he has designed more levels than you and has a better feel of how stuff should look?

As a practical example, take a look at Cybie2's car and motorcycle sprites and even the proportions of the basketball court. Those were made using the 16 units/feet convention and applied to the actual size of the objects. Now imagine them halved in size. They would look silly now, wouldn't they?

Also, a 64-unit wide door would, in "your" units, be ridiculously wide in "real" life, and yet it would appear just right for Doomguy. So Doomguy and the monsters are giants?

Finally, the wiki makes no clear statement about the map unit, other than suggesting a -very gross- approximation of 32 units to a meter.

However the only interesting tidbit is this:

16 units: small map details such as support beams and wall lamps
32 units: smallest gap the player can pass through


32 units or 2 feet seems reasonable for a man-crossable gap, and 16 seems about right for beams (1 foot thick). Double these distances....yup, too big.

As we say in my country, either the shoreline is inclined, or you are simply not sailing straight ;-)

Share this post


Link to post
Maes said:

The fact that he has designed more levels than you and has a better feel of how stuff should look?

I'm not saying that the scale looks bad. In fact, I think it looks a lot better than 8 units per foot. But that doesn't change the fact that 16 per foot isn't what id used. Remember, Doom was designed to be a game in huge techbases. The levels were supposed to be big, to give the player a sense of awe. So yes, the doors were 8 feet wide.

Generally, a lot of stuff in Doom 1 was supposed to look a lot bigger than it really appears. They thought that 128 tall rooms were "huge". I say this because of the texture naming. BIGDOOR isn't really that big, and standard DOOR textures look kinda small. COMPOHSO was OHSOTALL in the alpha. It's not that tall at all, but it was supposed to be in their heads when designing the rooms and textures.

Early in Doom's development, room height was generally determined by texture height. They later stopped bothering to do that later on (since it looked bland), but still, most textures were drawn with the intention of the room that they were placed in to be the same size.

Maes said:

So Doomguy and the monsters are giants?

Collision box wise, yes, visually, no.

Share this post


Link to post

About the "8 units == 1 foot" thing...

Player sprite is 56-pixel-tall. That's 7'. Seems quite tall, but maybe reasonable for a big beefy guy in space boots and space helmet.
Chainsaw pickup is 24-pixel-wide. That's 3'. Quite impressive, but not impossible.
Barrels are about 4' tall.
The bollard column is 6' tall.
The alpha office chair is just shy of 4' tall, with the seat itself at 2'.

As far as sprites go, the scale seems to sorta work. Maybe not perfectly, but it does seem like that at the very least, it has been used as a guideline for proportions early on.

Sodaholic said:

Keep in mind, his sprite is slightly below the ground, so pointing out that his sprite is 56 units is invalid too.


I have never seen a less relevant argument. The down shifting is to make sprites seem like they are truly standing on the floor, rather than floating a few centimeters above it. It's a small hack that relies on the renderer drawing each and every pixel even if they're "below the ground" as you put it.

Surprise surprise, if you are ten centimeters deep in the ground, that doesn't make you ten centimeters shorter. Ten centimeters lower, yeah. Shorter, no. But it's moot anyway since the sprites aren't below the ground.




On the scale issue, it seems like level geometry and sprites are not drawn at the same scale. This is a common occurrence in video games.

Share this post


Link to post

Fun fact: I had a lengthier response here but on second thought, this one is better:

Sodaholic said:

In fact, I think it looks a lot better than 8 units per foot.


So that makes your previous argument void, and even kind of bullshitting, doesn't it?

Share this post


Link to post

I'm not saying that 8 pixels per foot looks good, and I never did, I'm just saying that it's what id used. I'm not contradicting myself.

I'm just fucking around anyway, try not to take most of my arguing seriously, I'm usually kidding.

Gez said:

I have never seen a less relevant argument. The down shifting is to make sprites seem like they are truly standing on the floor, rather than floating a few centimeters above it. It's a small hack that relies on the renderer drawing each and every pixel even if they're "below the ground" as you put it.

What I meant by "below the ground" is that they ARE drawn beneath the ground (I never said that they were physically below the ground, but the sprites are drawn below). My point in bringing that up is that when considering the size of the sprites, you must consider that there is a bit of "overdraw" above and below the sprite, thus you must not take the sprite's actual measurements literally, but rather interpret it as being slightly smaller.

So if going by sprite size alone, Doomguy is shorter than 56 pixels tall, if you take off roughly 4 pixels top and bottom, meaning that he is closer to 6 feet, visually.

Collision boxes are bad judge of scale, too. They were deliberately made larger so that in a gameplay point of view, objects wouldn't be too close to each other.

For example, Doomguy's dimensions would probably be more accurately at 20x48, but that wouldn't feel right in game.

Share this post


Link to post
Sodaholic said:

I'm just fucking around anyway, try not to take most of my arguing seriously, I'm usually kidding.

That's dangerously close to trolling. You don't want to do that.

Share this post


Link to post

I thought it was okay since I wasn't attempting to actually piss people off or otherwise make them feel bad, but I'll stop anyway. Thanks for the warning.

Share this post


Link to post

I still don't see why you feel that the sprite is smaller than it is because it has an offset. Forget about the overdraw thing; it's merely a point of technical trivia. Is the sprite not 56-pixel-tall from the sole of the boots to the top of the helmet? How is an engine technicality that you'd never know about if you were just playing the game instead of delving into its data file and source code makes it smaller than what it is?

Again, they aren't drawn below. If they were, you wouldn't see them. They are drawn right on the floor, in a way which helps give a better sense of depth and 3Dness to what is just a flat sprite.

It's really not rocket science. Does the renderer display each and everyone of the 56 rows of pixel, as this?


Or does it "cut off the four top and bottom because it's underground lol" like so?


When I play Doom and see other marines, they look like the first image, not like the second. 56 pixels it is. It's what it's drawn to be. It's the scale at which it was drawn.

Share this post


Link to post

I'm done screwing around, the below is meant to be serious.


The origin point of most sprites is not the bottom of the sprite, it's typically a few pixels above. I've created this crappy little image to demonstrate what I mean:



The green dot in the middle of that cross on the bottom plane of the box is the origin point. You must remember, Doom's sprites were 3D models (of clay, not polygons, but still 3d and still models nonetheless), they were not flat. If they were flat, and did not have depth, then it would be safe to assume that the bottom is the origin point.


And again, they are drawn below. Their origin points are in the negatives vertically, are they not? And yes, you would see them if they were below the ground, since the Doom engine does not clip sprites against flats.

The offset is below the origin point, therefore, it is below the ground. Visually, they are not meant to look like that, but the fact is that the sprites are below the ground.

They are not drawn right on the floor, if they were, they'd look like they were floating a few inches above the ground. They are offset below the ground to correct this, so that the bottom center of the actor is at the origin point, and not slightly above.


As for those images, the first one is of course how it appears in game, but the second image shows what they are physically supposed to be, size wise.

These sprites have depth, the front of what space they take up is closer to the camera than the origin point. Things that are closer to you look larger. Therefore, the sprites are slightly larger visually than they are physically, to account for the fact that the front of the sprites space is not at the origin.


The main problem with how you are interpreting this is that you are interpreting it as strictly 2D, which it is not. It is 3d space being rendered on a 2d surface.

Share this post


Link to post

Sodaholic's 8-unit-per foot conspiracy?

Sodaholid said
I'm just saying that it's what id used.


You don't have any more proof that me or that other guy saying they used 16 and 10, respectively, and citing other unrelated games is not proof.

Then again, you shot yourself in the foot for what regards seriousness or credibility already, so...

P.S. I wouldn't mind so much if you didn't have brought up an interesting -even if kinda old and tired- topic and then trolled it like that. Throw in some electric cars and conspiracy theories to top it off.

Share this post


Link to post
Guest
This topic is now closed to further replies.
×