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

Automatically serialized save data & game-provided tables that use it #168

Open
Meowlala opened this issue May 21, 2021 · 1 comment
Open
Labels
enhancement New feature or request lua Involves LUA code

Comments

@Meowlala
Copy link
Collaborator

Currently, save data is enough to do just about anything, but very barebones, and requires large amounts of boilerplate to achieve basic functionality. If the game provided a few automatically serialized tables for various conditions, the problem of managing save data could be averted almost entirely.

Such tables could include:

  • Global save data that is never reset
  • Run save data that is reset upon starting a new run, but kept through continues
  • Level save data that is reset upon entering a new stage
  • Room save data that is reset upon entering a new room
  • Entity save data that is tied to individual persistent entities, like the player, pickups, and slot machines

Serialization should cover:

  • Numbers, bools, strings, nil, and tables of various depths containing those values
  • Vectors
  • Colors (if this is possible given Colorize?)
  • Error detection if a value is included that cannot be serialized

It could make sense to just use json for serialization like mods do currently, for ease of serializing basic values, with special handling for vectors and similar.

@Meowlala Meowlala added enhancement New feature or request lua Involves LUA code labels May 21, 2021
@Zamiell
Copy link

Zamiell commented Mar 24, 2022

It's probably worth noting here that the IsaacScript save data manager now does everything now that is included in the OP (and more).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lua Involves LUA code
Projects
None yet
Development

No branches or pull requests

2 participants