entity-system-js icon indicating copy to clipboard operation
entity-system-js copied to clipboard

Implement export and import to JSON

Open adngdb opened this issue 8 years ago • 0 comments

One of the biggest advantages of using the Entity System is that it makes saving and loading very easy, since all the state is in components.

Eventually there should be ways to save to and load from databases like MySQL of Postgres directly, but as a first step, having a way to export all the data of a manager into a JSON structure would be nice.

Features:

  • function export() - returns a JSON document containing all the states of all components, and the list of all entities
  • function import(source) - takes a JSON document like the one created by export and imports it into a manager

JSON format to be decided.

adngdb avatar Feb 21 '17 14:02 adngdb