feat(maps): layout select, scale tiers, and the City Streets generator#148
Merged
Conversation
- MapLayout decoupled from Environment (auto/dungeon/cavern/wilderness/ city; building reserved for PR 2). Auto maps Urban to city and Any to dungeon; plain dungeons are directly selectable in any environment - MapScale tiers (Skirmish/Standard/Large/Massive) replace the width/height picker on both pages; dimensions derive per layout with +/-8pct seeded jitter; engine ceiling raised to 60x45; width/height remain exact overrides for legacy links and JSON callers - generateCity: full-run street lattice, solid building masses with street-facing locked doors (UVTT portals), plazas/markets/groves, gate + far-ward + landmark zones, connectivity by construction - Grim city flavor pools (Gallows Corner, Execution Square, ...) - URL params ml/ms on both pages; legacy mw/mh parse and round-trip; scale-mode links serialize ms so regeneration replays jitter draws (map-history stubs likewise) - Export pixels-per-grid auto-scales to the 4096px raster cap - Fourth-wall note: third accepted grid-stream break; all hash pins re-recorded (env Any + exact dims pin proves legacy-mode continuity) Closes #145
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR 1 of milestone #8 Map Layouts & Scale (spec:
docs/superpowers/specs/2026-07-19-map-layouts-design.md). Closes #145.What changed
width/heightsurvive as exact overrides.msand history stubs replay scale mode — regenerating with explicit dimensions would skip the draws and change the grid. Caught by TDD before it shipped; legacymw/mhlinks parse and round-trip untouched.min(70, floor(4096/longest side))feeds PNG and the UVTT resolution block alike — grid alignment exact at every size (Massive ≈ 68 px/cell).Compatibility
Third accepted grid-stream break (jitter draws lead the stream; Urban seeds re-layout as cities). All 9 hash pins re-recorded — including an
environment: 'Any'+ exact-dims pin whose hash is unchanged from the previous contract, proving legacy-mode draw continuity.Tests
11 new layout/scale tests + scale-mode history round trip; dungeon-shaped fixtures moved to explicit
layout: 'dungeon'; freeze file now pins 9 configurations. Full suite 657 passing; typecheck, lint, build clean. Verified on the static build: Standard city from a share link with grim zone names, Massive city at 60×43, width inputs gone.