tiled parser discussion
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
id: AGD-0030
|
||||
ticket: studio-tiled-parser-assets-scene-asset-type
|
||||
title: Tiled Parser and Scene Asset-Type Ownership in Assets Workspace
|
||||
status: open
|
||||
status: accepted
|
||||
created: 2026-04-15
|
||||
resolved:
|
||||
decision:
|
||||
resolved: 2026-04-17
|
||||
decision: DEC-0027
|
||||
tags:
|
||||
- studio
|
||||
- assets
|
||||
@@ -125,7 +125,10 @@ There is already one strong constraint from the user:
|
||||
|
||||
The current direction also suggests an important simplification:
|
||||
|
||||
- Prometeu can assume one tileset per tilemap in its first wave;
|
||||
- Prometeu can assume exactly one tileset per tilemap in its first wave;
|
||||
- a `Scene Bank` may contain more than one tilemap asset in the same bank scope;
|
||||
- each scene may contain up to `4` layers in wave 1;
|
||||
- each scene layer is associated with one tilemap, so a scene bank may keep more than one `TMX` file in the same asset directory;
|
||||
- the parser still needs to understand `Tiled` identifiers correctly, but the Studio-side scene model can intentionally narrow to one linked `Tileset` glyph bank per map;
|
||||
- this keeps the runtime/editor model simpler while still using `Tiled` as the interchange and tooling format.
|
||||
|
||||
@@ -164,15 +167,23 @@ Implications:
|
||||
|
||||
#### 1. Persistence model of the new `Scene Bank`
|
||||
|
||||
Direction: the new `Scene Bank` MUST persist its own Studio-owned asset format.
|
||||
Direction: the new `Scene Bank` MUST persist full `TMX` documents as its maintained Studio asset format, plus any additional support files needed by the asset.
|
||||
|
||||
Implications:
|
||||
|
||||
- the `Scene Bank` is not a raw persisted `TMX` document;
|
||||
- the Studio-owned format MUST retain the identity relationships and internal references needed to regenerate `TMX` deterministically;
|
||||
- the Studio may generate and keep the corresponding `TMX` as a derived Tiled-facing artifact for the asset;
|
||||
- the `Scene Bank` keeps `TMX` as the authoritative map-side document format rather than normalizing into a separate Studio-owned scene schema;
|
||||
- one scene-facing asset directory may contain more than one `TMX` file, because a scene may bind distinct tilemaps to distinct layers;
|
||||
- wave 1 limits each scene to at most `4` layers;
|
||||
- the asset may include additional Studio support files alongside the maintained `TMX`;
|
||||
- those support files own the Studio-side convention that maps scene layers to the corresponding tilemaps;
|
||||
- the `Assets` workspace may expose a dedicated area to inspect and edit that scene-bank support data;
|
||||
- `TMX` generation remains part of the Studio asset flow, but the generated `TMX` is also the canonical maintained map document for the asset bank;
|
||||
- final pack materialization into a dedicated `assets.pa` representation is explicitly outside this wave.
|
||||
|
||||
Implementation note accepted during agenda convergence:
|
||||
|
||||
- the exact shape of the support files is intentionally deferred and may be discovered during implementation, as long as the final direction preserves an explicit layer-to-tilemap mapping owned by the scene-facing asset.
|
||||
|
||||
#### 2. Ownership of scene-asset management in `Assets`
|
||||
|
||||
Direction: the `Assets` workspace MUST fully manage the scene-facing asset lifecycle.
|
||||
@@ -193,15 +204,30 @@ Implications:
|
||||
- the Studio must be able to ingest existing `TMX` and `TSX` documents;
|
||||
- the Studio must also emit `TMX` and `TSX` documents from its owned asset state.
|
||||
|
||||
#### 3a. Asset-file placement and reference model
|
||||
|
||||
Direction: `TSX` files are generated by the `Glyph Bank` asset specialized as `Tileset`, and `TMX` files are generated inside the scene-facing asset and must reference those generated `TSX` files in the tileset asset directories.
|
||||
|
||||
Implications:
|
||||
|
||||
- a `Tileset` specialization on a `Glyph Bank` owns the generation of the Tiled-facing `TSX` files for that asset;
|
||||
- the scene-facing asset owns the generation and maintenance of the corresponding `TMX` files;
|
||||
- each tilemap inside the scene-facing asset must reference exactly one generated `TSX` in wave 1;
|
||||
- the reference path model between `TMX` and `TSX` must remain deterministic so the asset bank can be regenerated and validated safely.
|
||||
|
||||
Open precision still to be normalized in the future:
|
||||
|
||||
- the exact canonical naming convention for multiple `TMX` files in the same scene-bank directory is not yet fixed, but it must be canonical and must remain compatible with the layer-to-tilemap support-file convention.
|
||||
|
||||
#### 4. Pack boundary for the current wave
|
||||
|
||||
Direction: pack integration is NOT part of the current wave.
|
||||
|
||||
Implications:
|
||||
|
||||
- the current work should stay inside Studio until the asset model and Tiled interop are normalized;
|
||||
- the current work should stay inside Studio until the asset model and Tiled interop are stabilized;
|
||||
- no packer-facing publication or final asset-pack contract is required to move this agenda forward;
|
||||
- later pack work can materialize a dedicated `assets.pa` representation once the Studio-side model has stabilized.
|
||||
- later pack work will materialize the `TMX`/`TSX` asset mass plus support files into a dedicated binary representation.
|
||||
|
||||
#### 5. Persistence of the Studio-only specialization flag
|
||||
|
||||
@@ -235,6 +261,16 @@ Implications:
|
||||
- the same diagnostic discipline should block pack when inconsistencies remain;
|
||||
- this keeps the failure model aligned with the existing asset-validation experience rather than introducing a second error system.
|
||||
|
||||
#### 7a. External-edit acceptance workflow
|
||||
|
||||
Direction: wave 1 MUST use an explicit acceptance workflow between Studio-owned scene assets and external `Tiled` edits.
|
||||
|
||||
Implications:
|
||||
|
||||
- the initial workflow is: create the scene asset in Studio, edit the generated `TMX`/`TSX` documents in `Tiled`, then return to Studio to validate and explicitly accept the resulting changes;
|
||||
- a scene bank is considered ready only after Studio validation succeeds and the user explicitly accepts the converged state;
|
||||
- Studio remains the place where external edits are reviewed and accepted, rather than auto-merging them silently.
|
||||
|
||||
#### 8. Supported Tiled feature subset in wave 1
|
||||
|
||||
Direction: wave 1 should support `Object Layers`, properties, flips, and collisions from the start.
|
||||
@@ -279,14 +315,15 @@ Accepted local direction for this agenda:
|
||||
- visibility and enablement of those commands SHOULD be driven by the Studio-only specialization flag of the glyph bank;
|
||||
- the summary remains responsible for identity and type presentation, including the complementary specialization chip.
|
||||
|
||||
That makes Option A the current best fit for convergence, but it still needs the agenda to narrow the supported `Tiled` subset, the one-tileset-per-map constraint, and the editorial-role contract before a new decision can be written.
|
||||
That makes Option A the current best fit for convergence, and the latest discussion now also closes the first-wave one-tileset-per-tilemap rule, `TMX`/`TSX` asset ownership, and the explicit Studio-side acceptance workflow for external `Tiled` edits. The remaining work is to turn those accepted directions into a precise decision text while marking the support-file shape and multi-`TMX` naming convention as intentionally deferred implementation details.
|
||||
|
||||
## Resolution
|
||||
|
||||
Recommended next step:
|
||||
|
||||
- converge this agenda around a first-wave `Tiled` subset;
|
||||
- define whether the new scene asset is raw-imported or normalized;
|
||||
- lock the Studio-only glyph-bank specialization-flag model for `Tileset`, `Sprites`, and `UI`;
|
||||
- lock the first-wave one-tileset-per-map rule;
|
||||
- then write a replacement decision for asset ownership, parser boundary, and wave-1 scope.
|
||||
- write a replacement decision for `Scene Bank` ownership in `Assets`;
|
||||
- codify `TMX` as the maintained map document format and `TSX` as the tileset-facing generated format;
|
||||
- codify the first-wave rule of exactly one tileset per tilemap, while allowing more than one tilemap inside a `Scene Bank`;
|
||||
- codify the Studio-only glyph-bank specialization-flag model for `Tileset`, `Sprites`, and `UI`;
|
||||
- codify the wave-1 supported `Tiled` subset, validation model, and explicit acceptance flow for external edits;
|
||||
- carry forward the support-file shape and multi-`TMX` naming convention as deferred implementation details rather than pretending they are already closed.
|
||||
|
||||
Reference in New Issue
Block a user