maniator / maniator/verticopolis

[Parity]: [P2] Pin the TDT routing-tail size law beyond 2-star saves

Open
#310 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

classic parity
Dominant language
TypeScript
Stars
5
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Imported from the engineering backlog (_bmad-output/implementation-artifacts/backlog.md, story tdt-export-routing-tail).
Priority P2 (do-first order) | Severity: med | Status: open | Epic: SimTower parity | Type: task | Recorded: 2026-07-08

Divergence from the 1994 original

Follow-up to the now-resolved tdt-trailing-structure-layout export half (v1.14.0). The exporter reaches the game's expected file length by emitting a FIXED-size 0xFF routing tail (TDT_ROUTING_TAIL_SIZE = 0x6400), validated for Classic towers up to 2★ (the only real saves on hand: empty TSTSAVE.TDT + a 2★ my_tower). The real game's trailing region is not a single fixed size across saves, so a much bigger 3★+ tower (more elevators/floors, sky lobbies, big crowds, cinemas/cathedral) could read past the fixed tail and 0x0799 again. Over-emitting is safe (the game ignores trailing slack); under-emitting is the crash. TODO once higher-star real saves are available: pin the tail SIZE as a function of tower content (or confirm a safe upper bound) and replace the fixed constant. Also refine the people census: our count is low (77 for a tower the game runs at ~291) because the IMPORT under-captures office/condo occupancy (see tdt-import-population-seed) and commercial customers aren't counted (see population-census-parity); the export faithfully mirrors whatever we import, so this rides those two items. NEEDS: a few 3★/4★ saves with varied transport (multiple/express/service elevators, escalators, sky lobbies, parking) to RE the tail-size law.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the _bmad-output/implementation-artifacts/backlog.md entry for tdt-export-routing-tail and inspect the exporter’s TDT_ROUTING_TAIL_SIZE handling. Start by obtaining varied 3★/4★ saves and comparing their trailing-region needs; done means replacing the fixed tail with a validated content-based law or safe upper bound without risking reads past the routing tail.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
game-dev
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.