Update Design Doc: `level` tool

master
Ashley N. 2023-09-09 14:44:58 +00:00
parent da6445873f
commit 892d0b2cf6
1 changed files with 5 additions and 3 deletions

@ -88,13 +88,14 @@ The collision map is just an array of 8-bit unsigned integers laid out with the
This file contains the entity-component system defined by the [attributes](#entity-component-system) set in Tiled Map Editor's object layer(s). This file contains the entity-component system defined by the [attributes](#entity-component-system) set in Tiled Map Editor's object layer(s).
#### Type Table #### Type Table
Holds the registry of types and which set of components is associated with each type. Holds the registry of types and which set of components is associated with each type. An index into this table is the ID of the type. If there are no components in the type, that type ID is unused.
``` ```
2 bytes: Number of Types (A Type is a predetermined combination of components.) 2 bytes: Number of Types (A Type is a predetermined combination of components.)
2 bytes: Type Definition Union Size 2 bytes: Type Definition Union Size
* This is the size in bytes of the largest combo of components for a type. * This is the size in bytes of the largest combo of components for a type.
* Remember each component ID is 1 byte.
For (Number of Types * Type Definition Union Size): For (Number of Types * Type Definition Union Size):
1 byte: ID of the component (00 = No component in this slot, supposed to be at end) (Type Definition Union Size) bytes: ID of the component (00 = No component in this slot, supposed to be at end)
``` ```
#### Object Table #### Object Table
@ -112,7 +113,8 @@ Holds the list of active component attributes for each entity. Is a tagged union
``` ```
2 bytes: Component Attribute Union Size 2 bytes: Component Attribute Union Size
* This is the size in bytes of the largest type * This is the size in bytes of the largest type
* i.e. the one requiring the most bytes for its component attributes (2 bytes each). * i.e. the one requiring the most bytes for its component attributes
* Remember each Component Attribute is 2 bytes.
For (Object Table Size * Component Attribute Union Size): For (Object Table Size * Component Attribute Union Size):
(Component Attribute Union Size) bytes: (Component Attribute Union Size) bytes:
``` ```