Guest User

Revenants and tics

a guest
May 13th, 2020
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.30 KB | None | 0 0
  1. Fuck, I didn't even know that revenants homing projectiles are distinguished by having a trail of smoke (which looks exactly like bullet puff) until I noticed smoke spawning code in source code - non-homing don't have that.
  2.  
  3. Then again, when I played Doom in 90s, I thought revenants' missiles were always homing, and that mancubus shot projectiles in all three directions every time, rather than 2 and in different patterns. I think I learned how they actually work from wiki in 2010s, as I preferred to duck into cover every time revenants or mancs shot in 90s, until they were over. When missiles didn't home in, I just though I ran into cover fast enough for them to lose track on me (which they actually can't do, by looking at source code, there is no sight check - homing will home in even when lost sight of you).
  4.  
  5. Also, fun fact: although it seems that homing missiles have 50% chance of appearing, that doesn't mean there are only 2 revenant projectile variants. Actually, from technical perspective there are four outcomes when projectile is spawned because the formula is not gametic modulo 2, but a bit more involved. Every spawned missile will call A_Tracer every 2 tics, which is where the actual possibly-homing behaviour is implemented; whenever a thing is spawned, it never call the function of the frame initially, so there is at least 2 tics delay before revenant's missile MAY adjust itself. The homing only occurs if "<gametic at the moment of A_Tracer call> BITWISE-AND 3 <> 0". So there are four outcomes, I'll list "gametic modulo 4 at the moment of spawn" in first column, as it is obvious from it what the result of above operation will be, the second column is what is after 2 tics pass (after that it loops):
  6. 0 2 - homes in after 4 tics pass after spawn and then every 4 tics from then. Because 2 BITWISE-AND 3 = 2 > 0, while the call at 0 didn't happen yet (but will for all repeats). Yet 0 BITWISE-AND 3 = 0
  7. 1 3 - never homes.
  8. 2 0 - homes in after 2 tics pass after spawn and then every 4 tics from then. 0 BITWISE-AND 3 = 0
  9. 3 1 - never homes.
  10. This makes 3 variants: a non-homing, a homing projectile that picks up the trail 2 tics after being launched and a homing projectile that picks up the trail 4 ticks after being launched, and the latter two readjust themselves every 4 tics, but it is obvious that neither would adjust them at the same as the other.
  11. I researched it when I was trying to squeese more codepointers in vanilla dehacked. Revenant missiles use two codepointer frames, and it is IMPOSSIBLE to implement this any more efficiently then the original game does in demo-compatible way (bar modifying source code, but then there is no point in modding vanilla).
  12.  
  13. I don't remember if I noticed the armor different protection levels in 90s or whether I picked up from wiki. It is easier to notice than "a homing projectile has trailing smoke", though. I still think most things in Doom are only possible to learn from community/wiki but not in-game unless you are immortal and/or have nothing else do in your life than playing Doom.
  14.  
  15. Also, it is quite curious to hear that people try to pistol four Arch-Viles yet somehow manage to download a DBP... it seems that DBP are well known, then, if the newbies that don't know how much HP a monster is worth (vs how much HP per shot a pistol is worth) are downloading them.
Add Comment
Please, Sign In to add comment