Create config json

Derek Detweiler edited this page Aug 16, 2017 · 6 revisions

The Platypus configuration is the central configuration for the game and uses SpringRoll's Config System. If you start with the Platypus template as described in Build-Instructions, it can be found in "src/config/" with Platypus-specific settings in a "platypus" subfolder.

Its structure takes the following form:

  {
      "platypus": {
          "entities": {},
          "levels": {},
          "scenes": {},
          "spriteSheets": {}
      },
      "sounds": {}
  }

Entities

This section lists the JSON entity definitions used in the game.

Scenes

This section lists the scenes used in the game.

Levels

The levels that make up the game. These should be JSON exports from the Tiled Map Editor. The template includes a levels.js script in "src/config/platypus/" to pull these automatically from "assets/levels/".

spriteSheets

The sprite sheets to use for the RenderSprite component. The template includes a spriteSheets.js script in "src/config/platypus/" to pull these automatically from "assets/images/".