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

Add serialization to be able to save/load games #13

Open
5 tasks
SuperFola opened this issue Sep 29, 2021 · 5 comments · May be fixed by #17
Open
5 tasks

Add serialization to be able to save/load games #13

SuperFola opened this issue Sep 29, 2021 · 5 comments · May be fixed by #17
Assignees
Labels

Comments

@SuperFola
Copy link
Owner

I'm currently trying something on this branch, but before going further, maybe one should consider trying a premade library for this, like cereal

The goal is to be able to serialize:

  • the player
  • the player attributes: attack, defense, bags and the objects in it, its position, health and such
  • the objects we picked up, so that they aren't regenerated when the game starts again
  • the terrain modifications (if any, currently we don't support it), if the player destroyed a wall or whatever (can be skipped for now)
  • the seed of the random number generator (we should use the same seed everywhere or the same RNG, to generate the same map)
@HexDecimal
Copy link
Contributor

Cereal is on Vcpkg. It should be easy to add it to the Vcpkg manifest and the CMake scripts.

@gusmccallum
Copy link

Hi I'd like to work on this, please assign it to me.

@SuperFola
Copy link
Owner Author

Ok!

@gusmccallum
Copy link

Thanks!

@SuperFola SuperFola self-assigned this Mar 4, 2022
@SuperFola
Copy link
Owner Author

I've picked up the issue again, correcting your code @gusmccallum.

This does compile now, but there are a few blocking things upon saving (and most likely when loading as well).

@SuperFola SuperFola linked a pull request Nov 10, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants