Bug 882

Summary: weird ticbuffer/high ping timing behavior
Product: Odamex Reporter: JKist3 <jkist3>
Component: Server & ClientAssignee: Odamex Bug Reporter <odamex-bug-reporter>
Status: RESOLVED FIXED    
Severity: critical CC: ijgjgr
Priority: P1    
Version: 0.6.x   
Hardware: All   
OS: All   

Description JKist3 2012-07-22 19:17:08 UTC
Ok so i have been testing odamex and have noticed that I basically can't defend myself from attacks.  Since i can on zdaemon i decided to look further into this to figure out what the difference is. I present the following example/situation for illustration on the type of behavior I'm talking about:

In entryway map01 i stand at the entrance to the blue room with ssg so that i can see when someone runs out of the bfg room.  someone in the bfg room fires bfg and runs out so that when they come into view, tracers from the prefired bfg ball hit the area im waiting in.  I hear the bfg and time it so that right when they come around i shoot them with ssg and run back into the blue room, hiding myself from bfg. 

In ZDaemon (which has unlagged code) i can hit this shot and escape damage nearly 100% of the time vs any player regardless of ping.  I tested it in odamex under a few different conditions and found the following:

-vs a low ping player with tic buffer off i can hit the shot consistently
-vs a low ping player with tic buffer on i cant hit the shot without taking damage
-vs a high ping player with tic buffer on any setting i cant hit the shot without taking damage

Here are demos for the tests: http://speedy.sh/7jHTP/PINGADVANTAGE.zip
Here is a demo verifying zdaemon behavior: http://www.speedyshare.com/tEVkv/jkist-capo-bfgtestzdaemon-zddl4.108.zip

I talked to DevastatioN and in doom2.exe you should be able to shoot the player with ssg and not take bfg damage, so the zdaemon behavior is ideal.  Why does ticbuffer and high ping break this behavior?  Could it be that the bfg sound is not being played at the correct time under these conditions so that i cannot time it correctly? If you look at the demos where i play vs high pingers or have tick buffer on.. in many shots i am pushing it to the limit in terms of shooting and dodging. I dont think i can get out of they way any quicker. it seems that high ping and ticbuffer give a boost to the attacker that they realy shoudln't have.
Comment 1 Amateur Spammer 2012-07-23 08:32:38 UTC
Keep in mind that BFG traces are "unlagged" too.
Comment 2 Amateur Spammer 2012-07-23 08:51:39 UTC
So here's my totally unproven theory.

In vanilla, all players game simulation (or whatever it's called) runs in lockstep; so before bfg player's center moves around the corner, ssg player can hit him, knocking him back just enough to escape the bfg spray, regardless of spray timing.

In Odamex, the BFG spray is "unlagged", as I said; so at the moment of BFG spray the server drags the ssg player back to where he was a few moments ago (and therefore in the bfg player view), BFG spray damages him, and then server moves him back.

Also, hello Player from ZDDL server ;)
Comment 3 JKist3 2012-07-24 00:13:46 UTC
If this were true id expect to be hit by the bfg vs both high and low ping players with tic buffer off (low ping players are still unlagged back by their delay).  However, vs a low ping player with tic buffer off (and unlagged on) the correct behavior is observed.
Comment 4 JKist3 2012-10-15 02:19:39 UTC
Hi so here are some more demos showing current odamex bfg behavior.  It doing the same move as described above.  Attached is my demo recording, and the demo recorded by my opponent.  I've been using stepmode, and "step + 1" to inch through these demos.  From the pov of both players I believe these shots should NOT hit, but they do.  

There is a small pause between when the bfg ball explodes and when the bfg tracer cone is fired.  As explained by the doom wiki:

"it [bfg ball] explodes and causes 100-800 hit points of damage to the target, in round multiples of 100.

After a further pause of 16 tics (about 0.457 seconds), additional damage is calculated: 40 invisible tracer rays are emitted by the player in a cone-shaped area (about 45° half-angle) in the direction the plasma ball was fired."

I've recorded a couple bfg test demos on odamex and gone tic by tic through them.  In the demos, after the ball hits something, the opponent lights up in green bfg flash damage anywhere between 12 and 16 tics afterwords.  I've done the same on zdaemon and this same behavior is observed (12 to 16 tics after ball impact).  I'm not sure why there is variance for this time, but since I see it in both ports it shouldn't be cause for concern.

In the demos I post you can pause the demo the tic that the ball impacts, and then inch forward counting the tics it takes until I get hit.  From the 200 ping player's recording I get out of the way usually around 8 to 10 tics after the explosion, and from my understanding should not be hit. From my recording, it's absurd, I get out of the way probably 3 to 5 tics after impact, sometimes even 1 tic after (see the kill ~1:45 from my pov).  From the 200 ping players pov some of these kills look absurd as well.  

I also will reattach the zdaemon demo (my recording) vs capodecima in the same situation.  It's a little harder to pause bc on zdaemon when stepping through the demo frame by frame there is no sound unlike odamex.  However you can take capo's pov and the tic the ball impacts the wall switch to me.  Again you will see I get out of the way 3 to 5 tics after impact from my pov.  Here I take no damage.  (you can watch the zdaemon demos in slo mo on the new 1.09 client, just unzip to a folder and start the zlauncher in local mode, no need to connect.  the launcher has tabs for demo watching.)

Note: the very first kill in the odamex demo looks a bit weird... it appears I get out of the way, and then get rewound to a previous position almost.  I never saw this in any other shot, it might not mean anything, who knows.  Also the next few shots I screw up and dont get out of the way in time, I'm not complaining about these.  I start dodging them (should be dodging) at ~1:00 min in.

Odamex demos: http://www.speedyshare.com/VxtR4/bfgtest-ZDDL4.wad-map03.zip

ZDaemon demo: http://www.speedyshare.com/UB7Td/jkist-capo-bfgtestzdaemon-zddl4.108.zip
Comment 5 JKist3 2013-03-12 01:10:45 UTC
This was fixed a while back.  Unlagged was
Comment 6 JKist3 2013-03-12 01:14:38 UTC
*this was fixed a while back. Unlagged was being applied to the bfg when it shouldn't have been.