Skip to content

Savefile format

Harri Pellikka edited this page Apr 16, 2018 · 1 revision

Ratio Editor uses a JSON-like format for saving and loading levels. This JSON flavor comes from LibGDX project.

Structure

The basic structure of a level is like this:

{
    tilesets: []
    properties: []
    layers: []
    objects: []
}

All tilesets (both image-based and palettes) are stored in the tilesets array. Level-wide properties are stored in the properties array. Tile layers are stored in layers array, and objects in objects array.

Tilesets

A tileset has always three entries: name, type and tiles.

  • Name is whatever the user types into the editor.

  • Type is either normal for image-based tilesets, or palette for palettes.

  • tiles contains all the tiles that were used in the level from this tileset. Each tile denotes the id, X and Y coordinates and the size of the tile.

If the tileset is a palette, it will also have colors array, which contains the color data of the palette.

Properties

TODO

Layers

TODO

Objects

TODO

Clone this wiki locally