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

Design save file Flatbuffers schema #140

Closed
4 tasks done
wateret opened this issue Feb 24, 2019 · 3 comments
Closed
4 tasks done

Design save file Flatbuffers schema #140

wateret opened this issue Feb 24, 2019 · 3 comments
Labels

Comments

@wateret
Copy link
Owner

wateret commented Feb 24, 2019

What to save

Mandatory

  • Scenario
    • Meta (nothing for now)
    • ResourceManager
      • TerrainManager
      • HeroClassManager
      • MagicManager
      • EquipmentManager
      • HeroTemplateManager
    • Assets
      • Heros
      • Equipments
      • Money
    • Stage (Currently playing) -> For now, no save in the middle of stage
      • Assets
      • Map
      • StageUnitManager
        • Units
      • ...
    • Lua State (HOW??)
      • Some kind of hash for the lua script code (to verify it is the same script)

Optional

  • Cmd History

Design schema

TBD

@wateret
Copy link
Owner Author

wateret commented Apr 7, 2019

How to handle enum values?

  • Save them as integer and rely on the core module's enum classes
  • Create enum in schema as well and convert them(manually)

@wateret
Copy link
Owner Author

wateret commented Apr 27, 2019

How to save lua state?

  • Do not save lua state
    • Keep everything in core module
    • Global variables(lua side) are not kept(Behaves differently when first run / file loaded)
      • How to keep callbacks(sol::function)?
  • Save lua state -> how?
    • Do not see any easy way to do this

An alternative way:

  • Save all Cmd in the save file and then play it, then the game is restored (This may be the only solution)

@wateret
Copy link
Owner Author

wateret commented May 1, 2019

Let's do Lua script hash checker later. Closing.

@wateret wateret closed this as completed May 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant