Page MenuHomeWildfire Games

Fix cinematics OOS, when queue isn't synced
ClosedPublic

Authored by vladislavbelov on Apr 7 2017, 8:09 PM.

Details

Summary

Serialize/deserialize all queue data too.

Test Plan
  1. Start multiplayer game on the CinemaDemo map
  2. Connect to this game after the cutscene's start
  3. Check that all work synchronously

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vladislavbelov created this revision.Apr 7 2017, 8:09 PM
Vulcan added a subscriber: Vulcan.Apr 7 2017, 8:54 PM

Build has FAILED

Link to build: http://jw:8080/job/phabricator/710/
See console output for more information: http://jw:8080/job/phabricator/710/console

elexis accepted this revision.Apr 8 2017, 2:08 AM

Changes of this diff after the first revision:

  • (minimize serialization data): The first version of the diff had serialized all path data in m_Paths and m_PathQueue, the second one now serializes only the names of the path queue to save size when rejoining or doing savegames.
  • 2048 for names is not needed, we decided to reduce it to 128 as that is fully sufficient. If there should be some additional data stored, it should be written to some custom tag.
  • Removed the // TODO: maybe implement String_Unbounded which would be useful, but should be documented in a trac ticket instead. We already have a way to serialize strings by length (all JS strings are serialized this way, in CBinarySerializerScriptImpl::ScriptString)
  • Added few \n

Future Improvements:

  • The path rendering is only advanced if the window has focus (even in multiplayer). The path should always be in sync with the simulation, at least in a 1 second margin (so that if a map author wants to focus a specifc entity at a specific time, it should happen that way no matter what)
  • It should become impossible to save both rotation and lookAt coordinates (since the camera can look only in one direction). If that is enforced, we can also save less data when serializing.
This revision is now accepted and ready to land.Apr 8 2017, 2:08 AM
This revision was automatically updated to reflect the committed changes.
elexis added a comment.Apr 8 2017, 2:11 AM

Thanks for the patch!! All known serialization issues should be fixed now!