Why can replays lag?

Why can replays lag?

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Why can replays lag?

Post by Regret »

Assume the whole game was without desync errors. Why would a replay of such a game lag or stutter when your connection was bad in said game?

It makes no sense to store 'lag information'/delays in replays as it is now.
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Why can replays lag?

Post by zerver »

Well, this is something new to me. I have never seen my replays lag.
User avatar
bartvbl
Posts: 346
Joined: 21 Mar 2009, 15:55

Re: Why can replays lag?

Post by bartvbl »

http://replays.adune.nl/?1822
watch this one.
Somewhere halfway or 2/3rd ish there is a big lag.
User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: Why can replays lag?

Post by aegis »

I could possibly modify my demo reader to correct lag...
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Why can replays lag?

Post by imbaczek »

replays lag because packet timestamps are saved in the demo and are used during playback. like aegis said, you could probably easily fix this by going over a replay and setting the timestamp to framenum/30 or so.
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Why can replays lag?

Post by Regret »

aegis wrote:I could possibly modify my demo reader to correct lag...
DO EEEET
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Why can replays lag?

Post by Tobi »

imbaczek wrote:replays lag because packet timestamps are saved in the demo and are used during playback. like aegis said, you could probably easily fix this by going over a replay and setting the timestamp to framenum/30 or so.
Why don't we just do this when saving?

(I suggested this 2 days ago to BD actually when he was making his dedicated client [as gu->modGameTime wasn't available in this] and this worked fine.)

Or is it that we really want to record the duration of pauses?
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: Why can replays lag?

Post by Regret »

Tobi wrote:Or is it that we really want to record the duration of pauses?
Length of pause in the sense of pressing the pause button is not recorded afaik.

The 'lag pause' is useless unless you want to prove you were lagging.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Why can replays lag?

Post by lurker »

Why does it save timestamps at all, let alone issues of changing them.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Why can replays lag?

Post by Tobi »

Probably to prevent dumping the entire replay at once into the (loopback) network buffers.

Not sure what kind of (adverse) effects that has though, feel free to try ;-)
User avatar
bartvbl
Posts: 346
Joined: 21 Mar 2009, 15:55

Re: Why can replays lag?

Post by bartvbl »

imbaczek wrote:replays lag because packet timestamps are saved in the demo and are used during playback. like aegis said, you could probably easily fix this by going over a replay and setting the timestamp to framenum/30 or so.
Why wouldn't you make all events frame-dependant instead? At least framerate is always constant. Timestamps are affected by lag. At least to me that seems a far better way of doing it.
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: Why can replays lag?

Post by BrainDamage »

one of the possible negative effects is the compression of events that happends in pre-game into a single instant ( frame count fixed at 0 )
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Why can replays lag?

Post by zerver »

That is a positive effect imo, we dont have to wait for noobs who take forever to select start pos :)
SirMaverick
Posts: 834
Joined: 19 May 2009, 21:10

Re: Why can replays lag?

Post by SirMaverick »

zerver wrote:That is a positive effect imo, we dont have to wait for noobs who take forever to select start pos :)
/skip +1

When pausing you might want to have the ability to read the chat and not getting printed 100 lines of chat at once. If you don't /skip +1 helps there too.
User avatar
bartvbl
Posts: 346
Joined: 21 Mar 2009, 15:55

Re: Why can replays lag?

Post by bartvbl »

Then why not go for the timestamps on the first part, since that is blabbering anyways, and once the game has started switch to frame numbers? It just requires some extra code like this:
if(frameNum > 0)
{
//record/play using frames
} else {
//record/play using timestamps
}
Although I guess things are quite a bit more complicated than that, but you get the idea :P
Post Reply

Return to “Help & Bugs”