5.4 KiB
| id | ticket | title | status | created | accepted | agenda | plans | tags | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| DEC-0029 | studio-scene-pack-runtime-binary-contract | Studio scene pack contract for runtime SCENE binary payload | accepted | 2026-04-29 | 2026-04-29 | AGD-0032 |
|
|
Decision
The canonical publication contract for Scene Bank assets SHALL be the studio -> packer scene-pack request and its direct compilation into runtime SCENE payload bytes.
TMX and TSX SHALL remain supported editorial surfaces for wave 1 inside the studio domain, but they MUST NOT define the normative publication contract, the runtime asset shape, or the packer boundary.
The system MAY support additional scene editors in the future. Any supported editor MUST materialize the same canonical scene-pack request and MUST pass the same validation and Accept gating rules before publication.
prometeu-packer SHALL compile only the canonical scene-pack request into the runtime SCENE payload. It MUST NOT parse TMX, TSX, or any other editor-specific surface directly.
The runtime SCENE dependency contract SHALL use glyph_asset_id per layer. Resolution from glyph_asset_id to runtime glyph slot SHALL remain a runtime concern and MUST NOT be serialized by Studio or packer as a pre-resolved slot.
Rationale
This decision preserves the already accepted wave-1 editorial direction from DSC-0028 while preventing Tiled from becoming the canonical asset model by accident.
The binary SCENE runtime payload already exists and is the true sink of the pipeline. The missing architectural piece is therefore not a new scene schema, but a stable domain boundary that lets Studio accept editorial state and lets packer compile a runtime-owned request without absorbing external-tool concerns.
Treating TMX and TSX as supported but non-canonical keeps the current workflow viable, while leaving the door open for future integrated editors or multiple editors without reopening the packer or runtime contract.
Technical Specification
1. Domain Ownership
studioSHALL own editorial scene authoring, validation, diagnostics, andAccept.packerSHALL own compilation of the canonical request into binarySCENE.runtimeSHALL own decoding, binding, and operational slot resolution for glyph dependencies.
2. Supported Editorial Surfaces
- Wave 1 SHALL support
TMXandTSXas editorial surfaces instudio. - These surfaces MUST be treated as replaceable editor integrations, not as canonical publication artifacts.
- Future editors MAY replace or coexist with Tiled-backed surfaces if they emit the same canonical request and satisfy the same validation semantics.
3. Canonical studio -> packer Request
The canonical request SHALL be defined as:
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
Normative rules:
request -> SCENESHALL be as direct as possible.tile_countSHALL be derived fromwidth * height.- Binary reserved fields MUST NOT be mirrored into the request unless they gain explicit editorial meaning.
layersSHALL always materialize exactly4entries in wave 1.
4. Layer and Tile Semantics
glyph_asset_idSHALL be derived from the glyph asset/tileset selected for the layer in Studio.parallax_factor_xandparallax_factor_ySHALL be modeled as layer-owned editorial fields in Studio.palette_idSHALL be modeled with a layer-level editorial default in Studio, with optional per-tile override when supported by the editorial surface.activeat layer scope SHALL indicate whether the layer participates in publication output.activeat tile scope SHALL indicate whether the tile contributes an active tile record to the published scene payload.- Wave 1 SHALL remain limited to exactly
1 TSXperTMXper layer.
5. Validation and Acceptance
- Publication MUST be gated by absence of blocking diagnostic errors.
- The
Acceptstep in Studio SHALL be the moment where supported editorial state is validated and projected into the canonical request. - Studio MUST NOT silently auto-accept external editor mutations.
6. Manifest and Runtime Projection
- The manifest output format SHALL remain
SCENE/tilemap_v1for this wave. - The runtime payload SHALL carry
glyph_asset_idper layer. - Runtime slot allocation and
asset_id -> slotresolution MUST remain runtime-internal behavior.
Constraints
- This decision MUST NOT be interpreted as introducing a dedicated scene workspace.
- This decision MUST NOT be interpreted as allowing packer to parse editor-specific formats directly.
- This decision MUST NOT be interpreted as making Tiled temporary or deprecated; it is supported, but non-canonical.
- This decision does not reopen wave-1 limits around single-tileset-per-layer authoring.
- Any future change to the canonical request or runtime projection SHALL require explicit decision review.
Revision Log
- 2026-04-29: Initial draft from AGD-0032.
- 2026-04-29: Accepted and decomposed into implementation plans PLN-0059, PLN-0060, and PLN-0061.