Not a member yet? Why not Sign up today
Create an account  

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
2024-03-16 Celarious' File, Decay Systems, Save Game, Terrain Option, City Lights

#1
Celarious' Game File
Celarious allowed me to download a large saved game file, in excess of 4gB. He was curious about why the file was so large. That file flushed out some bugs.

The original file is used more or less like this:
  • 5mB of game data, empires, and species.
  • 4gB of building blueprints, 329 of them.
  • 300mB of spacecraft blueprints, 32 of them. Nice spaceships!
  • 30mB of Universe and its atoms.

A big surprise was watching memory usage. As soon as QFile::open is called on the file, 8gB of memory gets consumed. That is without reading any data from the file. The memory does not appear to be released after I close the file. I am continuing to research this feature. Total memory usage only gained 1gB after that, for a final total of 11gB virtual and 8gB resident.

Another surprise was the 2,626 sectors, 52,526 solar systems, and 2,383 ringworld arc sections. This led to some improvements to the solar system decay logic, which reduced these numbers to 606 sectors, 13,615 solar systems, and 28 ringworld arc sections.

A small number of obsolete blueprints were deleted automatically.

Some of the decay logic happens in stages. After running the game a few times, the save game file lost about 110mB of size.

Decay Solar Systems
A ringworld prevents the solar system contents from decaying.

This was improved to allow ringworld solar systems to decay when there are no dependencies.

Save Large Game to File Fails
Saving the Current Game to a file fails when the game data is larger than 2gB.

The code to save a game to a single file does about the same thing as zipping the two files together into one. My code to do this is very simplistic, simply loading the entire file into a QByteArray at once. Well a QByteArray is limited to 2gB in size.

This function is not important enough to do the work necessary to overcome this limitation.

Instead a message is presented now, when the file size is too large. The message advises the user to simply zip the files, and it reports the full path to the two files that are needed.

Save Game to File Fails
Saving any game to a file, other than the Current Game, does absolutely nothing.

Fixed file path error.

Save Customizations to Gear
Deantwo suggested that the spacecraft customizations be stored into the avatar's gear, rather than to a disk file.

This was such a good idea that I dug into it right away. It is done.

Terrain Improvement Option
Improvements were made to terrain generation. The changes do not affect worlds that have already been created. Can this be done?

A message now appears when an old version game file is loaded. The message box offers to fix the terrain. After the game is saved, the message does not appear again.

City Lights
Cities do not look like cities at night. There isn't enough light. They should glow more.

Added blobs of light to buildings at night, if they have power.
Reply

#2
This will be the last 32 bit Windows update, unless a serious problem is discovered.
Reply

#3
Yes, I recently discovered that my entire C drive is completely clogged, it turned out that I have either 8 or 20 saves per gigabyte, why doesn't the game overwrite its old saves? For example, there are only 3 saves per world (character) and they will constantly be overwritten
Reply

#4
(03-17-2024, 12:23 AM)Haxus Wrote: Decay Solar Systems

Save Game to File Fails

Save Customizations to Gear

Terrain Improvement Option

City Lights

Thanks for the nice fixes and changes!

Saying the Terrain Improvement can't be undone/reverted seems weird though, couldn't you just load a previous save?

(03-17-2024, 12:23 AM)Haxus Wrote: Celarious' Game File
...
4gB of building blueprints, 329 of them.
...
A small number of obsolete blueprints were deleted automatically.
...

I think I asked for this before. But do we have a way to manually mark blueprints as obsolete?

Celarious has talked about before that a lot of the blueprints in his save are created with an avatar as the architect, so he couldn't delete them or anything. Which explains why there are duplicate building blueprints and such in his save-game, if I remember his explanation correctly.

It would be useful if we could mark any (non-default) blueprint as obsolete manually. So if we don't want to use a specific blueprint anymore, we can mark it as obsolete and then the game can clean it up when it is no longer in use.
Hazeron Forum and Wiki Moderator
hazeron.com/wiki/User:Deantwo
Reply

#5
It happens that I recently added an item to my todo list to make a way to manage those blueprint libraries.
Reply

#6
Thanks! I asked because in older versions, specifically 2024-01-19 and earlier, my save was only ~1GB, was the way blueprints are stored changed?
What even
Reply

#7
I added some blueprints. Storage method did not change.

The complete set of default building, spacecraft, and item blueprints takes about 280mB. Those are the ones distributed with the software.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)