Studio scene pack contract for runtime SCENE binary payload
This commit is contained in:
@@ -212,6 +212,65 @@ Rules:
|
||||
- any tile in the bank may be rendered with any palette in the bank at runtime;
|
||||
- palette selection is a runtime draw concern, not a tile-payload embedding concern.
|
||||
|
||||
## Format-Specific Baseline: `SCENE/tilemap_v1`
|
||||
|
||||
`SCENE/tilemap_v1` is the wave-1 Scene Bank publication format.
|
||||
|
||||
### Canonical Build Input
|
||||
|
||||
Rules:
|
||||
|
||||
- packer receives a canonical editor-agnostic Scene Bank request as its publication input;
|
||||
- packer must not parse `TMX`, `TSX`, or other editor-specific source files directly as part of runtime scene publication;
|
||||
- the request is produced by Studio from canonical scene state after canonical validation;
|
||||
- equivalent requests must produce equivalent emitted `SCENE` payloads.
|
||||
|
||||
Baseline request shape:
|
||||
|
||||
```text
|
||||
ScenePackRequest
|
||||
- version: int
|
||||
- layers: [ScenePackLayerRequest; 4]
|
||||
|
||||
ScenePackLayerRequest
|
||||
- active: bool
|
||||
- glyph_asset_id: int
|
||||
- tile_size: int
|
||||
- parallax_factor_x: float
|
||||
- parallax_factor_y: float
|
||||
- width: int
|
||||
- height: int
|
||||
- tiles: List<ScenePackTileRequest>
|
||||
|
||||
ScenePackTileRequest
|
||||
- active: bool
|
||||
- glyph_id: int
|
||||
- palette_id: int
|
||||
- flip_x: bool
|
||||
- flip_y: bool
|
||||
```
|
||||
|
||||
### Request Semantics
|
||||
|
||||
Rules:
|
||||
|
||||
- the request always materializes exactly `4` layer entries in wave 1;
|
||||
- `tile_count` is derived from `width * height`;
|
||||
- `glyph_asset_id` is the runtime-facing glyph dependency identity carried by the scene payload;
|
||||
- `active` at layer scope determines whether the layer participates in emitted scene output;
|
||||
- `active` at tile scope determines whether the tile contributes an active tile record to the emitted scene payload;
|
||||
- `palette_id` uses a layer-owned editorial default with optional per-tile override before the request reaches packer;
|
||||
- packer consumes only the resolved per-tile `palette_id` values present in the canonical request;
|
||||
- request-to-binary projection should remain as close to isomorphic as possible.
|
||||
|
||||
### Wave-1 Constraints
|
||||
|
||||
Rules:
|
||||
|
||||
- wave 1 remains limited to exactly one logical tileset/glyph source per layer before request emission;
|
||||
- packer does not own editor-format interoperability rules; it trusts the canonical request boundary once the request is structurally valid;
|
||||
- binary reserved fields must not require corresponding request fields unless a later decision gives them editorial meaning.
|
||||
|
||||
## Determinism
|
||||
|
||||
Equivalent build inputs must produce equivalent outputs.
|
||||
|
||||
Reference in New Issue
Block a user