Update Design Doc: `level` tool

master
Ashley N. 2023-09-13 06:32:30 +00:00
parent e2731502f6
commit 29a6405a2c
1 changed files with 20 additions and 0 deletions

@ -21,11 +21,31 @@ The string property `reskit-layer` set on a Tile Layer indicates which layer sho
### Valid Options Per Console
#### `--console md`
##### Layers and Tile Size
* `a`/`A` for Plane A
* `b`/`B` for Plane B
Tile layers without `reskit-layer` set are ignored by the `level` tool. If no tile layer is specified using the `reskit-layer` property, or you use a setting invalid for the selected system, you will receive an error on the command line. Ensure both your tilemap and tileset are set to 8x8 tiles, or you will get a validation error upon running `level`.
##### Palette Assignment
Reskit makes a best effort to fit your tiles across four 15-colour + transparency palettes and choose a palette per 8x8 region. You may receive an error if reskit is unable to place a tile within any palette due to too many colours being used, or too many variations of colours used making it impossible to fit the tile in any single palette. Suggestion is to revise artwork such that all 8x8 regions fit within one of four 15-colour palettes.
1. Generate a tile palette for the given 8x8 tile.
* If > 15 colours, throw error.
2. Select the existing palette containing the most colours from this tile palette.
* If there are no leftovers in the tile palette:
* Generate a new 8x8 tile which uses the same colours, but indexed from the selected palette.
* Write the tile and assign the selected palette.
* ✨done
* If there are leftovers in the tile palette:
* If there is room to insert the leftovers in the selected palette:
* Insert the leftover colours into the selected palette
* Generate a new 8x8 tile which uses the same colours, but indexed from the selected palette.
* ✨done
* If there is no room to insert the leftovers into the selected palette:
* Throw error - we don't want to cascade copies of the tile into other palettes, wasting colour space
* Your fix here should be reducing the number of colours used in the given tile or making it more similar to other tiles.
## Collision Map
The boolean property `reskit-collision` set on a Tile Layer to `true` indicates which layer should be used for building the tile collision map. Any non-zero item placed indicates a tile which the player is not permitted to pass through. How you implement this is up to your game engine - reskit will simply save the collision map in a `.lvc` file as an artifact (`collision.lvc`).