Opened 16 years ago

Closed 16 years ago

Last modified 6 years ago

#8939 closed patch

BS1: Save/load overhaul

Reported by: bluegr Owned by: bluegr
Priority: normal Component: Engine: Sword1
Version: Keywords:
Cc: Game: Broken Sword 1

Description

This is a rewrite of the way save games are handled in BS1. The current save system suffers from many problems: - All save games have the same names, i.e. "savegame.001", "savegame.002" and so on. This makes it impossible to use save games for multiple versions of the game (e.g. English and German) - An index file is used for the save descriptions, which is a bad practice: it can get out of sync, and it makes copying of save games across systems a complete nightmare - There is no save game versioning (this makes any possible additions to the save format problematic) - There is no save header, to verify that the save is correct

The attached patch does the following: - Removes the need for an index file - save descriptions are stored within the save files themselves - Names save files consistently, based on the game id, like in other engines - Adds a save game version field - Provides functionality to convert the old format to the new one - Adds GMM functionality to delete save states - Adds meta info functionality (thumbnails, though it doesn't work yet) and creation date/time

Saving/loading from the GMM is included as well, but it's disabled as I've had crashes when trying to load a game

Ticket imported from: #2307224. Ticket imported from: patches/1044.

Attachments (1)

sword1-savegames.patch (21.4 KB ) - added by bluegr 16 years ago.
Broken Sword 1 save/load overhaul

Download all attachments as: .zip

Change History (6)

by bluegr, 16 years ago

Attachment: sword1-savegames.patch added

Broken Sword 1 save/load overhaul

comment:1 by sev-, 16 years ago

Looks good. Please, commit it. Do you plan to address those TODOs?

comment:2 by bluegr, 16 years ago

Thanks. I believe that the game crashes when loading from the GMM because it expects a game to be loaded at a very specific point - after the game's main menu is closed. It looks like that the game's main loop should be changed, which I'm planning of doing, unless someone with more knowledge on the engine beats me to it.

I'll commit the patch and close this

comment:3 by bluegr, 16 years ago

Owner: set to bluegr
Status: newclosed

comment:4 by SF/kaminari, 16 years ago

Shouldn't it use the user-defined profile ID instead of the built-in game ID? Every other game engine relies on the sooner than the latter.

Personally, I'm used to edit my config file and define my own IDs. For example with Broken Sword 2, I use the profile ID [broken2_win]. My save games are thus named broken2_win.000, etc. But with Broken Sword 1 and this recent patch, the save games are invariably named sword1.xxx and not broken1_win.xxx as I expected them to be. Not quite consistent with how the other engines behave.

Just a thought, mind you -- sword1.xxx is better than the previous generic savegame.xxx.

comment:5 by digitall, 6 years ago

Component: Engine: Sword1
Game: Broken Sword 1
Note: See TracTickets for help on using tickets.