Posted: Tue Apr 07, 2020 6:05 am Post subject: Players' Aim Is One Frame Off
After playing numerous of duels, and wondering what is the reason for these 'dropped shots', I noticed that by comparing my live matches (video file recorded during the match) to the replay files, the angle shown to the player during live play is one frame off.
If I have SSG equipped, and I press fire command on frame 100, this is what happens during the liveplay:
100: Fire command
103: SSG shoots, and the angle of the player is taken from the current 103th frame. (This is the correct and wanted behaviour.)
However, this is what happens between the server and the client (and for the demofile):
100: Fire command
103: SSG shoots, BUT the ANGLE OF PLAYER IS TAKEN FROM 102th FRAME WHICH IS INCORRECT
This is what causes most of the dropped shots in the game. The aiming of _ALL_ of the players is lagging 1 frame behind. It is very easy to replicate with turn180 key. Simply aim at a player who is standing still, shoot at it, and press turn180 key the same time as you shoot: You will kill the player, but also see all the pellets go 180 degree wrong.
This makes players, who have a tendency to make a 'fast quick fix', to have a lot more dropped shots than those who tend to keep their aim at their target all of the time.
It doesn't matter if you have 0 ping, 100 ping, 1000 ping. Not related to internet connection.
Also, this also makes it possible for the players in Judas to run backwards into the teleport and shoot a rocket and you will hit the teleport and die, instead of shooting straight forward. That's because the teleport couldn't change your aim correctly for the shot: aiming is 1 frame off.
If you compare these two, the demo file and the live play, you will see that, in this case, my aiming/turning is 1 frame behind of what I actually see during the liveplay. So, what is shown in my youtube video about my 'view angle', it is not true for the server.
They are exactly the same frames, but the angle is 1 frame behind.
I can give replay + link to live video, if needed.
Also, here you can check it frame-by-frame, that the coordinates of the player are almost 100% identical (that's a great thing!), when comparing the same frame. The angle is just different.
Edit: Seems like I cropped them 1 frame off of each other. You can sync it by looking at the frame when the ssg shoots in both of them as they are the same frame: they have same position just different angle
The order of commands inside a single frame, at least in original doom, is:
1. Turning: TURN LEFT / TURN RIGHT command
2. Use command
3. Shot of a weapon
4. then the movement
This is very easy to see in Doom Replay Editor, as you can change the values in a replay file. This order of commands mean that:
1. TURN is the highest priority action inside doom. Which means, the aiming is not lagging behind.
2. You can manipulate the angle of the shot the same frame as you shoot.
3. You can NOT manipulate the position of the player for the shot by changing, for example, strafe LEFT 50 into strafe RIGHT 50 value. It will NOT change nor affect the shot in ANY way.
My GUESS is that the order of priority of the commands was changed by accident, so that the SHOT OF A WEAPON is calculated first, instead of TURNING and USE. This is just a guess, but I think somewhat educated one.
Well, I got a new computer. Increased monitor refresh rate from 60hz to 240hz, changed capped (35 FPS) to uncapped (500 FPS) and 95% of the dropped shots disappeared. I assume the high FPS helps with the one frame delay a lot. Not sure if it is capped at 240hz or 500 FPS.
For example, in the past I had capped, so the aiming delay was 1/35th of a second (28ms), but now it is either 1/240th of a second (4ms) or 1/500th of a second (2ms). Just a guess once again though.
Maybe the introduction of uncapped FPS accidently alters the capped aiming, too. (again just a guess)
Well, I just heard information that there was a "one frame delay in aiming" in Zandronum, so I assume the delay originates from zdoom mouse handling. Maybe this should give some insight to the problem?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum