Re: Improving savegames
Posted: Wed May 23, 2012 3:20 am
Quake2 handles things like the sky, statusbar, etc via configstrings. They're sent from server to client on connecting, and are saved for each level in a hub in a separate .sv2 file. Because fog could be different for each player based on location (trigger_fog in the Lazarus mod), and configstrings are global for all players, I just added a svc_fog servercommand. Fog values from trigger_fog and target_fog are re-sent when a savegame is loaded (as the game module is re-loaded, and the last fog state values are initialized).
This .sv2 file is usually mostly 0's, and became quite large due to KMQ2's extended limits (which meant more configstrings). So I changed the save code to zip it with the corresponding .sav file for each map, making them about 90-95% smaller. Hubs now save faster, because it's not copying a bunch of bloated .sav and .sv2 files from the working folder to the destination save folder.
This .sv2 file is usually mostly 0's, and became quite large due to KMQ2's extended limits (which meant more configstrings). So I changed the save code to zip it with the corresponding .sav file for each map, making them about 90-95% smaller. Hubs now save faster, because it's not copying a bunch of bloated .sav and .sv2 files from the working folder to the destination save folder.