Update Design Doc: `level` tool

master
Ashley N. 2023-09-07 00:50:42 +00:00
parent 26720d1900
commit 6c9006d95f
1 changed files with 3 additions and 5 deletions

@ -16,16 +16,14 @@ reskit level -i map.tmx -c mapping.toml --system md --tile-size 2x2
Reskit will compile and output a .lvl file and .til file which you can then bundle into your game project, as well as a tilemap file formatted to the system defined in `--system`. See below for information on .lvl format.
## Entity-Component System
Reskit assumes a best-practice entity-component engine design and the objects defined in your .tmx file effectively serve as the entities.
Reskit assumes a best-practice entity-component engine design and the objects defined in your .tmx file effectively serve as the entities. By adding a property `reskit-component[x]` to each object, where x is the index of the component in an array, you can attach various components to the target object/entity. Each component may have various properties you choose to define, which can be formatted as Tiled property `reskit-component[x].y`, where x is the index of the component and y is the property name for that component.
By adding a property `reskit-component[x]`, where x is the index of the component in an array, you can attach various components to the target entity. Each component may have various properties you choose to define, which can be formatted as Tiled property `reskit-component[x].y`, where x is the index of the component and y is the property name for that component.
By default, reskit will attach one component to each entity: `position`, which is generated from the position set in Tiled Editor. This component has two 16-bit values: x and y position on the map (in pixels, 0,0 is top left of the map). The array index of this component will be one more than the last index listed by the designer.
On your object layer in Tiled, you can use property `reskit-system[x]` to define systems, where x is the index of the system on the whole object layer. Systems should iterate only over entities sharing components relevant to each system.
On your object layer in Tiled, you can also use property `reskit-system[x]` to define systems, where x is the index of the system applying to the whole object layer. In your game engine design, each system should iterate only over entities sharing components relevant to the system.
What your game does with this information is entirely up to you: reskit just compiles the information on which entities are where and what components are attached to them.
By default, reskit will attach one component to each entity: `position`, which is generated from the position set in Tiled Editor. This component has two 16-bit values: x and y position on the map (in pixels, 0,0 is top left of the map).
## Configuration TOML
This is provided on the command line via `-c, --config-file`. This argument is required. The configuration TOML primarily is a mapping of string identifiers to numeric identifiers, which are better suited for use on 8-bit and 16-bit systems. You must define numeric identifiers for each string you use as a `reskit-component[x]`.