Forged Alliance Forever Forged Alliance Forever Forums 2012-08-08T23:22:31+02:00 /feed.php?f=2&t=1336 2012-08-08T23:22:31+02:00 2012-08-08T23:22:31+02:00 /viewtopic.php?t=1336&p=17323#p17323 <![CDATA[Re: replay desyncs]]>
rootbeer23 wrote:
eXcalibur wrote:i know that you guys think a desync is a major issue and therefore the desync warning is important. i agree. but about 98% of all desyncs i see are in replays (caused by players not exiting correctly through the score menu) and not in actual games.
if the function, which causes the desync cannot be identified, i would prefer the desync window to disappear all together in all replays. this would make watching replays much more comfortable.

another solution would be to make the desync window dragable. this way it could get moved to the side where it does not bother so much.


a replay that pops up a desync warning every 5 seconds is broken.
a replay is basically just the list of commands given to units in a game.
every unit and weapon and whatnot is then resimulated during the replay.
a desync means that the game state of the engine during replay is not the same state as observed during the game.
a checksum of the game state is taken every 5 seconds of the gamestate and written to the replay file, so that the desync can be detected during replay. in practical terms that mean for the first minute after the initial divergence in gamestate, the replay will still be close to the actual game, but the longer you wait, the greater the difference will be.
in a desynced replay you will often see units just standing around. that is likely caused by the unit having been destroyed in the proper simulation, so that no new commands for the unit exist in the replay stream.

It's usually not all that noticeable, but once and a while you'll see a game that takes a COMPLETELY different course than the original. Pretty funky-fun to watch sometimes, but the majority that don't make a big difference simply cause confusion; despite not looking changed, these replays are now a different game.

Statistics: Posted by Adraius — 08 Aug 2012, 23:22


]]>
2012-08-08T20:25:22+02:00 2012-08-08T20:25:22+02:00 /viewtopic.php?t=1336&p=17306#p17306 <![CDATA[Re: replay desyncs]]>
eXcalibur wrote:
i know that you guys think a desync is a major issue and therefore the desync warning is important. i agree. but about 98% of all desyncs i see are in replays (caused by players not exiting correctly through the score menu) and not in actual games.
if the function, which causes the desync cannot be identified, i would prefer the desync window to disappear all together in all replays. this would make watching replays much more comfortable.

another solution would be to make the desync window dragable. this way it could get moved to the side where it does not bother so much.


a replay that pops up a desync warning every 5 seconds is broken.
a replay is basically just the list of commands given to units in a game.
every unit and weapon and whatnot is then resimulated during the replay.
a desync means that the game state of the engine during replay is not the same state as observed during the game.
a checksum of the game state is taken every 5 seconds of the gamestate and written to the replay file, so that the desync can be detected during replay. in practical terms that mean for the first minute after the initial divergence in gamestate, the replay will still be close to the actual game, but the longer you wait, the greater the difference will be.
in a desynced replay you will often see units just standing around. that is likely caused by the unit having been destroyed in the proper simulation, so that no new commands for the unit exist in the replay stream.

Statistics: Posted by rootbeer23 — 08 Aug 2012, 20:25


]]>
2012-08-08T17:38:45+02:00 2012-08-08T17:38:45+02:00 /viewtopic.php?t=1336&p=17283#p17283 <![CDATA[Re: replay desyncs]]> if the function, which causes the desync cannot be identified, i would prefer the desync window to disappear all together in all replays. this would make watching replays much more comfortable.

another solution would be to make the desync window dragable. this way it could get moved to the side where it does not bother so much.

Statistics: Posted by eXcalibur — 08 Aug 2012, 17:38


]]>
2012-06-01T17:22:44+02:00 2012-06-01T17:22:44+02:00 /viewtopic.php?t=1336&p=14254#p14254 <![CDATA[Re: replay desyncs]]>
FunkOff wrote:
rootbeer23 wrote:The cause seems to be obvious to me: During the live game when a player quits there is some code executed that
has an impact on the simstate and that piece of code is not getting executed at the point in the replay, thus the
divergent simstate.



Try looking at OnDefeat(). That is the function called when a player army is defeated.


This function is called during replay, as it kills all the units.

in score.lua:CreateDialog the function SessionEndGame is called (whatever that does), and i cannot find a call anywhere else.
So it is likely only called when exiting through the score screen. But this is just guesswork.

Unfortunately i dont have the resources to debug the problem, i doubt anyone is willing to install a custom version of the game just to debug the problem.
The theory that exits not going through the score screen mess up replays seems reasonable.
So for an upcoming patch: can you broadcast the method by which a player quits the game, write that information together with the beat# to the game.log
Or alternatively, is it possible to make a UI mod broadcast an automated chat message on exit through the menu?
Currently it is not possible to tell even when a player quit while watching the replay, afaik.

Statistics: Posted by rootbeer23 — 01 Jun 2012, 17:22


]]>
2012-06-01T16:15:14+02:00 2012-06-01T16:15:14+02:00 /viewtopic.php?t=1336&p=14250#p14250 <![CDATA[Re: replay desyncs]]>
rootbeer23 wrote:
The cause seems to be obvious to me: During the live game when a player quits there is some code executed that
has an impact on the simstate and that piece of code is not getting executed at the point in the replay, thus the
divergent simstate.



Try looking at OnDefeat(). That is the function called when a player army is defeated.

Statistics: Posted by FunkOff — 01 Jun 2012, 16:15


]]>
2012-06-01T15:57:57+02:00 2012-06-01T15:57:57+02:00 /viewtopic.php?t=1336&p=14248#p14248 <![CDATA[Re: replay desyncs]]> Statistics: Posted by Ze_PilOt — 01 Jun 2012, 15:57


]]>
2012-06-01T14:36:22+02:00 2012-06-01T14:36:22+02:00 /viewtopic.php?t=1336&p=14237#p14237 <![CDATA[Re: replay desyncs]]>
Ze_PilOt wrote:
It's true when there is only one desync popup. It can't see how a replay can be right if it popup every 5 seconds.

The explanation of this is really well explained in a gamasutra article :

Each tick of the simulation is hashed. That hashed is compared to the replay in the replays/sent by other players.
If two hashes are different, that's mean that the state of the sim if different, and so the game is desync.


The cause seems to be obvious to me: During the live game when a player quits there is some code executed that
has an impact on the simstate and that piece of code is not getting executed at the point in the replay, thus the
divergent simstate. Is there any evidence to support the theory that it is an engine fault? If there is some
piece of lua code that gets executed when a player leaves (and does not get executed in the replay), it could
alter the simstate in an improper way (i.e. using methods that will not cause a record to be added to the replay stream).

I would guess that there are a bazillion functions you can call that have an impact on the simstate and only a subset of them
causes the alteration to be recorded. One thing to try is not to deallocate anything on the lua side when a player quits.
I.e. store pointers in trash vars to avoid them being garbage collected.

Statistics: Posted by rootbeer23 — 01 Jun 2012, 14:36


]]>
2012-06-01T14:00:55+02:00 2012-06-01T14:00:55+02:00 /viewtopic.php?t=1336&p=14235#p14235 <![CDATA[Re: replay desyncs]]>
noobymcnoobcake wrote:
need to put a tip saying you need to leave via score screen and cntrl-K your commander when you want to quit. Put tip
in new players topic
viewtopic.php?f=2&t=537


The "Quit Game" menu item could also be disabled. I think it is not too much to ask for to spend another 10 seconds
quitting the game properly. If that indeed works around the problem.

Statistics: Posted by rootbeer23 — 01 Jun 2012, 14:00


]]>
2012-06-01T11:25:04+02:00 2012-06-01T11:25:04+02:00 /viewtopic.php?t=1336&p=14224#p14224 <![CDATA[Re: replay desyncs]]> in new players topic
viewtopic.php?f=2&t=537

Statistics: Posted by noobymcnoobcake — 01 Jun 2012, 11:25


]]>
2012-06-01T10:56:00+02:00 2012-06-01T10:56:00+02:00 /viewtopic.php?t=1336&p=14220#p14220 <![CDATA[Re: replay desyncs]]>
The explanation of this is really well explained in a gamasutra article :

Each tick of the simulation is hashed. That hashed is compared to the replay in the replays/sent by other players.
If two hashes are different, that's mean that the state of the sim if different, and so the game is desync.

Statistics: Posted by Ze_PilOt — 01 Jun 2012, 10:56


]]>
2012-06-01T09:52:53+02:00 2012-06-01T09:52:53+02:00 /viewtopic.php?t=1336&p=14214#p14214 <![CDATA[Re: replay desyncs]]> Statistics: Posted by TA4Life — 01 Jun 2012, 09:52


]]>
2012-06-01T09:29:46+02:00 2012-06-01T09:29:46+02:00 /viewtopic.php?t=1336&p=14211#p14211 <![CDATA[Re: replay desyncs]]>
The replay desync is a engine issue. If you can find the cause, we can maybe avoid it. I have no clue what is causing it exactly and all you can read about it are just wild guesses.

But it has something to do with people leaving, that's sure. The conditions are not.

Statistics: Posted by Ze_PilOt — 01 Jun 2012, 09:29


]]>
2012-06-01T08:21:42+02:00 2012-06-01T08:21:42+02:00 /viewtopic.php?t=1336&p=14205#p14205 <![CDATA[Re: replay desyncs]]>
TA4Life wrote:
On gpgnet I had the desync window removed from the lua.scd file so that this type of desync was never a problem.

the desync window is never a problem, not the desync itself. game still stays messed up

Statistics: Posted by Raging_Squirrel — 01 Jun 2012, 08:21


]]>
2012-06-01T06:11:07+02:00 2012-06-01T06:11:07+02:00 /viewtopic.php?t=1336&p=14202#p14202 <![CDATA[Re: replay desyncs]]> Statistics: Posted by TA4Life — 01 Jun 2012, 06:11


]]>
2012-06-01T06:01:20+02:00 2012-06-01T06:01:20+02:00 /viewtopic.php?t=1336&p=14201#p14201 <![CDATA[Re: replay desyncs]]>
Raging_Squirrel wrote:
you should not quit until the game is finished, because quits do ruin replays

any idea why that is the case?

Statistics: Posted by rootbeer23 — 01 Jun 2012, 06:01


]]>