Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistence and serialization #11

Open
benpollarduk opened this issue Jan 24, 2024 · 1 comment
Open

Persistence and serialization #11

benpollarduk opened this issue Jan 24, 2024 · 1 comment
Assignees

Comments

@benpollarduk
Copy link
Owner

Allow game state to be serialised and restored.

@benpollarduk benpollarduk self-assigned this Jan 24, 2024
@benpollarduk
Copy link
Owner Author

benpollarduk commented Oct 31, 2024

This needs to be done to keep alignment with NetAF.

Do in two parts.

Part 1
Make changes needed to support serialisation:

  • Change to multiple players on game
  • Align game creation signatures
  • Add ItemContainer interface and implement on Room and PlayableCharacter
  • Remove Morph from Item and fix examples
  • Remove AddExit and RemoveExit from Room and fix examples
  • Update readme code examples
  • Update PlayableCharacter documentation to remove acquire and require methods and add add item and remove item methods
  • Make Examination and Interaction private set
  • Make description and commands private set
  • Make conversations private set
  • Add property to custom commands to set if they can be interpreted when not visible, and update interpreter and tests
  • Remove Morph method from Item documentation
  • Remove AddExit and RemoveExit from Room documentation
  • Update documentation for examination, custom commands, conversations
  • Refactor commands to include help
  • Add GameMode interface and instances for all game modes
  • Refactor Game.execute so that it is less complex

Part 2
Add serialisation

  • Add serialise and restore from serialisation interfaces
  • Add serialise for all assets, attributes and game
  • Implement restore interface on all assets
  • Add RestorePoint
  • Add AssetArranger and associated data classes
  • Add JsonFile
  • Unit test all of the above
  • Add example save and load commands to example game
  • Add persistence documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant