Jump to content

How does monster speed work?


Recommended Posts

I wasn't sure where to put this but I was wondering if anyone can help answer this question I have on how monster speed works in the original games. I found on a doom wiki (and also in the source code) that (just for an example) the zombieman has a speed of 8 map units per frame, yet it also says that it moves 70 map units a second. I don't understand how this works out.

 

The second thing I don't understand is that the shotgun guy also has a coded movement speed of 8, but his movement speed per second is 93.3. So the zombieman and shotgun both have the same movement speed per frame, but different movement speeds per second. I don't understand this. Can anyone help?

Share this post


Link to post

A "sprite frame" lasts a certain number of tics.

 

A "tic" is 1/35th of a second.

 

Monsters perform a single move each sprite frame (simplifying a little bit) -- it is really a jump from the old position to the new position.  If the speed is the same but the sprite frames are shorter (less tics), a monster will move faster.

Edited by andrewj

Share this post


Link to post

Specifically, here's the relevant logic (in DECORATE code) for the zombieman:

 

POSS AABBCCDD 4 A_Chase

 

Meaning he moves 8 units every 4 tics, which is equal to 70 units/second

 

The Shotgun guy animates slightly more quickly:

 

SPOS AABBCCDD 3 A_Chase

 

He moves 8 units every 3 tics, which works out as 93.333 units/second.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...