Skip to main content
Topic: Question on savegame-format (Read 3278 times) previous topic - next topic

Question on savegame-format

I made a version jump from 102.1-2432 to 102.3-2941.

For my large map, I found out, that the size of the savegame changed immediately from 2,1MB to 750kB.
Unfortunately, despite the smaller size, the savegame is loaded slower now, compared to the old bigger version.

Was there a change in zipping of the file?
Also I saw, that all options in simuconfig.tab are #-lines now. The option 'savegame format' does not appear in game and in the pakset config. Could this be a reason?

Merry Christmas!

Edit: Yes, that is true...changing the format into 'zipped' lets the file grow back to 1,7MB (still smaller than before), but opens and saves more quickly.
Maybe it would be a good idea either

to choose 'zipped' as default
or
to put the savegame format into the in-game-options?


Re: Question on savegame-format

Reply #2
Default is bz2, since for games on disk or transferred via network (or as attachments) size matters a lot. Why wasting 33% percent space for a very little slowdown (at least on double cores and multi cores). One could even think of rendiring the whole game into a buffer and compress it in another thread to make it a little faster. But even on my slowest computers it works well enough to avoid such measures.

Re: Question on savegame-format

Reply #3
Yes, but I didn't understand one thing:

The fact of 33% zipping was in my case only after changing the settings in simuconfig.tab to 'zipped'

The default setting was quite different. There, the size of the savegame shrinked by 66% and it was not a little slowdown, but rather a pain to load and save the game.

So generally there is a difference. Look at the screenshot:

The lower files are made with the old version.
The files from 24.12 are made with the default setting in the new version
The first file on the top is made with the setting 'zipped' in simuconfig.tab

Re: Question on savegame-format

Reply #4
Yes, bz2 is slower. But for online games the whole game must be transferred via the net, and then the transfer is slower than any unpacking.

The zipped version is smaller, since also some data in the map array was removed (in 102.2) compared to older versions. I have to try to make the maps as small as possible, to make online games as fast as possible even for people on slower lines or server on ADSL (which has usually a low upload.)

The new settings give you more freedom. Since usually people's computer are nowadays quite powerful, I changed the setting to bz2. You are free to revert this to the default setting, there are no other incompatibilities connected with it.

Re: Question on savegame-format

Reply #5
Prissi,

how large a map can work effectively on a network game with Bz2 enabled?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Re: Question on savegame-format

Reply #6
That depends on the download speed from the server to the client. The CPU heaviest game I have is 6,4MB bz2, and that is also the size of the largest games I have at all. This would mean at least 64s pause if a new player joins a server (if the server or client has only 1000 KBit line, as ADSL upload/download is quite common.)

However, the size is mainly governed by the map size. A 512x512 map is usually 1-1.5MB (depends on tree number, city size, and water).

 

Re: Question on savegame-format

Reply #7
I guess even, that the trees have the most effect on it. This is my personal experience. A large map 1200x1200 with big forests is almost unplayable. My old Prague scenario had about 15MB, which was even with the old format ok.

Anyway, you are right with the remark, that the game is now much better to play. When you see, what I packed into the 1,7MB in my new scenario, it is quite impressive...