Skip to content

Conversation

@royfalk
Copy link
Contributor

@royfalk royfalk commented Sep 7, 2025

  • Game will only save as JSON.
  • Game will try to load JSON and then legacy.

Also:

  • Remove duplicate parameter system in ParseSaveGame.
  • Remove function getCurrentSaveGame.
  • Remove unused API getCurrentSaveGame. Is not used in either VS or privateer. Delete basecomputer

Code Changes:

Issues:

  • Save game is about 20% larger. 10MB vs. 12MB, double the size 24MB vs 10MB. However, we can improve this by either zipping the file or figuring out what is being saved. I suspect it is saving the universe state and that could be done once per installation.
  • The save game mechanism is unclear to me. I don't mean the format of the file. That's almost clear. I mean what the game saves and why. This requires more research.

- Game will only save as JSON.
- Game will try to load JSON and then legacy.

Also:
- Remove duplicate parameter system in ParseSaveGame.
- Remove function getCurrentSaveGame.
- Remove unused API getCurrentSaveGame. Is not used in either VS or privateer.
Delete basecomputer
@royfalk royfalk self-assigned this Sep 7, 2025
@royfalk royfalk marked this pull request as draft September 7, 2025 16:10
@royfalk
Copy link
Contributor Author

royfalk commented Sep 7, 2025

The save game saves two types of mission data - mission data and mission string data.
It appears mission data is a legacy format we can drop it.

"This variant loads it from float data, converting to character data. It's a legacy variant, highly and unpleasantly convoluted and sub-performant, but we must support it to be compatible with old savegames"

I checked and the only place in it's used in assets is in New_Game. The mission is unit_to_dock_with and the value is ascii of Atlantis in floats.

@royfalk
Copy link
Contributor Author

royfalk commented Sep 8, 2025

And yet, somehow it is used for storing news. Somehow, it is accessing the variable and putting data there. Hmm.

@royfalk
Copy link
Contributor Author

royfalk commented Sep 8, 2025

@evertvorster can you upload a save game with more content. I mean a save game after you've played a few hours at least. Killed enemies. Did missions. etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants