hajimehoshi / unagi

An RPG Editor on a modern browser
Other
5 stars 0 forks source link

Change the game data structure using id-to-data hash #10

Open hajimehoshi opened 8 years ago

hajimehoshi commented 8 years ago

The current game data struct is:

{
  maps: [
    {
      id: "id-yyyy",
      ....
    }
  ],
  actors: [
    ...
  ]
}

I'd like to change this like:

{
  main: "id-main",
  objects: {
    "id-main": {
      maps: "id-xxxx",
      actors: "id-zzzz"
    },
    "id-xxxx": [ "id-yyyy", ... ],
    "id-yyyy": { ... },
    "id-zzzz": [ ... ]
    ...
  }
}

Updating object from the editor should be simpler. Some existing hashes can be removed.