Bug Tracker – Bug 801

Moving sector improvements

Last modified: 2012-03-22 15:18:22 UTC
Bug 801 - Moving sector improvements
Summary: Moving sector improvements
Status: NEW
Alias: None
Product: Odamex
Classification: Unclassified
Component: Client (show other bugs)
Version: (old) 0.6-dev
Hardware: All All
: P1 enhancement
Assignee: Odamex Bug Reporter
Depends on:
Reported: 2012-03-15 22:07 UTC by Dr. Sean
Modified: 2012-03-22 15:18 UTC (History)
1 user (show)

See Also:


Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this bug.
Description Dr. Sean 2012-03-15 22:07:30 UTC
Sectors currently move very smoothly client-side with the exception of sectors that are moved by the local player.

Local player has a 250ms ping to the server and therefore is predicting his own movement 125ms ahead of the server receiving the movement input.  The player opens a door and the prediction code begins opening the door immediately.  If the door is moving up 4 units every tic, the player can successfully walk underneath the opening door 392ms later.

However, when the server receives the player's input to open the door, it will send a message telling all clients to begin opening the door.  So 250ms after the local player started to predict opening the door, he receives a message from the server to begin opening the door.  Currently in Odamex, this causes the local player to put aside its initial prediction of the door and accept the server's state message for the door, essentially resetting the door to the state where it was when it began to open.  This causes a visual jitter in the movement of the door and also causes the client to mis-predict his own position when he tries to move through the door since the client will think the door is at the wrong height in relation to his prediction.
Comment 1 Russell Rice 2012-03-22 15:18:22 UTC
I had a wild theory the other night as to why a jitter happens on a moving platform when a player is on it (it happens to doors/crushers too)

A client only receives an update to a sector every so often, so the sector keeps moving clientside even if there are no updates, next it receives the update and therefore moves the sector back to the servers position (which is slightly in the past on the client)

Is this correct?