Ticket #112 (closed enhancement: fixed)

Opened 3 years ago

Last modified 2 years ago

One Saved Games File per Player

Reported by: knowknowledge Owned by: knowknowledge
Priority: blocker Milestone: 0.5.0
Component: Game Data Version:
Keywords: XML, SavedGames, Players Cc:

Description

Each player should have a different saved game file. This would make it easier to share and back up saved games, while making it harder to accidentally overwrite or corrupt alternate players when one player hits a bug.

The loading screen needs access to some player information without needing all of it. Specifically, it needs to know the unique identifying characteristics, but cannot attempt to load any Simulation specific attributes (like equipment or last land location) beyond just the strings themselves.

Change History

comment:1 Changed 2 years ago by knowknowledge

  • Priority changed from major to critical

Upgrading to critical because this breaks backwards compatibility. Players saved games may be lost when they update from one version to the next.

comment:2 Changed 2 years ago by knowknowledge

  • Priority changed from critical to blocker

Upgrading to Blocker. We can't release a new version of Epiar without this feature.

comment:3 Changed 2 years ago by knowknowledge

  • Owner set to knowknowledge
  • Status changed from new to accepted

I have an implementation of this feature that still needs to be tested by another developer on my SavedGames? branch. It includes an automatic converter from the old format to the new format.

Of course, the saved-games.xml file is not strictly necessary as the player information could theoretically be accessed from the player specific xml file directly. The saved-games.xml file makes it easy to get a list of the players names without actually creating Player instantiations, but this could be done by scanning a directory as well.

Another possible benefit will be to allow the players to define which simulation they are in. Then the Player load should exist in the Main Menu and load a different Simulation depending on which player is loaded.

The new format is for the most part identical to the old format except:

  • The player description resides in a file named with the player's name. This contains all of the information that was previously in the saved-games.xml file.
  • The saved-games.xml file contains a very small amount of information about the player:
    • Their Name.
    • The File where the rest of their information is stored.
    • The path to an Image file that should be used as an avatar for game loading purposes.
    • The timestamp of the last time the player was loaded.

This format cannot support drag and drop player sharing/backup. The saved-games.xml file would have to be hand modified or Epiar would have to create an "Import" function.

comment:4 Changed 2 years ago by knowknowledge

  • Status changed from accepted to closed
  • Resolution set to fixed

This feature has been pushed to master.

Note: See TracTickets for help on using tickets.