Loading...
  OR  Zero-K Name:    Password:   

Post edit history

loading mechanism of rejoining battle

To display differences between versions, select one or more edits in the list using checkboxes and click "diff selected"
Post edit history
Date Editor Before After
11/2/2022 1:48:02 PMGBrankPresstabstart before revert after revert
11/2/2022 1:45:27 PMGBrankPresstabstart before revert after revert
11/2/2022 1:44:49 PMGBrankPresstabstart before revert after revert
11/2/2022 1:41:31 PMGBrankPresstabstart before revert after revert
Before After
1 Correct me if I'm wrong, but there is no guarantee the game states from simulating the battle upto a point and loading a game up to a point are going to be identical. If something is ignored or there are errors during serialisation/deserialisation, it will lead to hard to debug desyncs. 1 Correct me if I'm wrong, but there is no guarantee the game states from simulating the battle upto a point and loading a game up to a point are going to be identical. If something is ignored or there are errors during serialisation/deserialisation, it will lead to hard to debug desyncs.
2 \n 2 \n
3 CReg ( Code component Registration system) is responsible for serialising and deserialising the game state ( both Lua and engine-side) . It's probably one of the more complex parts of the engine. It contains a custom implementation of run-time type information ( among other things) that is platform independent and is rather hard to read: 3 CReg ( Code component Registration system) is responsible for serialising and deserialising the game state ( both Lua and engine-side) . It's probably one of the more complex parts of the engine. It contains a custom implementation of run-time type information ( among other things) that is platform independent and is interesting but rather hard to read:
4 https://github.com/spring/spring/blob/develop/rts/System/creg/creg.cpp 4 https://github.com/spring/spring/blob/develop/rts/System/creg/creg.cpp
5 \n 5 \n
6 That isn't the most complex part however, this is: 6 That isn't the most complex part however, this is:
7 https://github.com/spring/spring/blob/develop/rts/System/creg/SerializeLuaState.cpp 7 https://github.com/spring/spring/blob/develop/rts/System/creg/SerializeLuaState.cpp
8 \n 8 \n
9 Who knows, maybe sending over the game state would just work flawlessly the first time with no further changes needed. But if it doesn't whoever decides to implement this has quite a bit of work on their hands I think; you will be dealing with CReg, Lua internals, Streflop/floating point stuff possibly, desyncs... the most painful and complicated parts of the engine. There may be some things CReg doesn't serialise or doesn't identically serialise, you'll have to be prepared to change that. 9 Who knows, maybe sending over the game state would just work flawlessly the first time with no further changes needed. But if it doesn't whoever decides to implement this has quite a bit of work on their hands I think; you will be dealing with CReg, Lua internals, Streflop/floating point stuff possibly, desyncs... the most painful and complicated parts of the engine. There may be some things CReg doesn't serialise or doesn't identically serialise, you'll have to be prepared to change that.
10 \n 10 \n
11 I could be 100% wrong here, just saying it might not be easy. 11 I could be 100% wrong here, just saying it might not be easy.