feat(dungeon): lossless JSON schema 3 with decoded maps and tiles #398

Merged
jqueuniet merged 1 commit from feat/390-schema3-maps into main 2026-10-28 22:23:39 +01:00
Owner

First step of the #390 schema 3 work: maps and tiles. Records (doors, teleporters, texts, items, then actuators and creatures) follow in later PRs.

  • Each maps entry merges the map header and body.
  • Packed words become named fields: level, flags, difficulty, map_graphics_style, door types, etc.
  • Width and height follow from the tile grid; the graphics and creature-type counts follow from their lists.
  • tiles[x][y] holds one object per tile, tagged by type, e.g. {"type": "pit", "objects": true, "open": true}. False and zero fields are omitted.
  • Bits without a known meaning go into residual_* fields, written only when non-zero.
  • Reconstruct rejects:
    • values that don't fit their bit fields;
    • ragged or oversized grids;
    • schema 1 and 2 input.

Round-trip is byte-identical over every fixture. The DOS-EN dump is 1.13 MB pretty-printed (473 KB compact), against 530 KB for schema 2.

Refs #390

https://claude.ai/code/session_01WCNjYNkYSAapvFewz9wfkw

First step of the #390 schema 3 work: maps and tiles. Records (doors, teleporters, texts, items, then actuators and creatures) follow in later PRs. - Each `maps` entry merges the map header and body. - Packed words become named fields: `level`, `flags`, `difficulty`, `map_graphics_style`, door types, etc. - Width and height follow from the tile grid; the graphics and creature-type counts follow from their lists. - `tiles[x][y]` holds one object per tile, tagged by `type`, e.g. `{"type": "pit", "objects": true, "open": true}`. False and zero fields are omitted. - Bits without a known meaning go into `residual_*` fields, written only when non-zero. - Reconstruct rejects: - values that don't fit their bit fields; - ragged or oversized grids; - schema 1 and 2 input. Round-trip is byte-identical over every fixture. The DOS-EN dump is 1.13 MB pretty-printed (473 KB compact), against 530 KB for schema 2. Refs #390 https://claude.ai/code/session_01WCNjYNkYSAapvFewz9wfkw
feat(dungeon): lossless JSON schema 3 with decoded maps and tiles
All checks were successful
CI / python bindings (3.11) (pull_request) Successful in 24s
CI / audit (push) Successful in 19s
CI / msrv (1.90) (pull_request) Successful in 28s
CI / audit (pull_request) Successful in 19s
CI / stable (pull_request) Successful in 51s
CI / msrv (1.90) (push) Successful in 28s
CI / stable (push) Successful in 51s
CI / python bindings (3.11) (push) Successful in 24s
3db2e95d4f
Each map's header and body merge into one entry with named fields; tiles
become objects tagged by type. Counts and size follow from the lists and
the grid, unknown bits go to residual fields, and out-of-range values
are rejected. Byte-exact over every fixture.

Refs #390

Claude-Session: https://claude.ai/code/session_01WCNjYNkYSAapvFewz9wfkw
jqueuniet deleted branch feat/390-schema3-maps 2026-10-28 22:23:39 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jqueuniet/dm2-tools!398
No description provided.