76 lines
4.2 KiB
Markdown
76 lines
4.2 KiB
Markdown
# All Battle Maps V2 Rollout
|
|
|
|
Date: 2026-07-15
|
|
|
|
## Scope
|
|
|
|
- Battle 1 retains the approved direct repaint at `src/assets/images/battle/first-battle-map-v2.webp`.
|
|
- Battles 2-66 use the same original V2 terrain language through a deterministic atlas compositor.
|
|
- Scenario coordinates, terrain arrays, units, goals, movement rules, and map keys are unchanged.
|
|
- Runtime-corrected terrain is exported from the loaded `battleScenarios` data, so secure terrain-center overrides are included before rendering.
|
|
|
|
## Original V2 Sources
|
|
|
|
The reusable source set lives in `src/assets/images/battle/terrain-v2/`:
|
|
|
|
- `plain-v2-source.png`
|
|
- `road-v2-source.png`
|
|
- `hill-v2-source.png`
|
|
- `forest-v2-source.png`
|
|
- `river-v2-source.png`
|
|
- `cliff-v2-source.png`
|
|
- `village-v2-source.png`
|
|
- `fort-v2-source.png`
|
|
- `camp-v2-source.png`
|
|
|
|
The sources were created with the built-in image generation workflow. The prompt set requested original orthographic late-Han battlefield materials with muted olive, ochre, stone, timber, and blue-green water; hand-painted tactical readability; restrained lighting; and no grid, UI, units, text, logos, watermarks, modern objects, or reproduction of copyrighted game assets.
|
|
|
|
## Production Pipeline
|
|
|
|
1. `scripts/export-battle-map-v2-data.mjs` loads the production scenario and map-asset modules through Vite SSR.
|
|
2. It exports the 66 runtime map grids, asset paths, dimensions, map keys, and unit positions to `tmp/battle-map-v2-runtime-data.json`.
|
|
3. `scripts/generate-battle-maps-v2.py` composites battles 2-66 with seeded texture quilting, organic visual masks, sparse terrain features, meandering wide-map rivers, non-grid road paths, component-spaced structures, scenario-era grading, and event atmosphere.
|
|
4. The generator writes `docs/battle-map-v2-manifest.json` and `docs/battle-map-v2-contact-sheet.jpg` after a full run.
|
|
|
|
The output is deterministic for a fixed source set and seed. The adaptive tile policy uses 96, 88, 80, 72, 64, or 60 source pixels per logical tile and guarantees that neither image edge exceeds 8,192 px.
|
|
|
|
## Reproduction
|
|
|
|
```powershell
|
|
pnpm run generate:battle-maps-v2
|
|
pnpm run verify:battle-map-assets
|
|
pnpm run audit:visual-assets
|
|
pnpm run qa:battle-maps:webgl
|
|
```
|
|
|
|
For a targeted preview:
|
|
|
|
```powershell
|
|
node scripts/export-battle-map-v2-data.mjs
|
|
python scripts/generate-battle-maps-v2.py --maps 2,66 --quality 84 --skip-artifacts
|
|
```
|
|
|
|
## Visual Quality Controls
|
|
|
|
- Overlapping feathered source crops replace hard rectangular tiling.
|
|
- Forest and structure feature masks remove visible source-sheet boxes.
|
|
- Large road components become a small number of natural routes instead of a tactical-looking lattice.
|
|
- Thick late-game river blocks become meandering water channels inside a subtly graded logical floodplain.
|
|
- Structure placement is capped and spatially separated by connected component.
|
|
- Noise, feature selection, theme grading, and placements use stable seeded hashes.
|
|
- The first battle remains untouched, providing the approved quality and palette reference for the rollout.
|
|
|
|
## Verification
|
|
|
|
Local release-candidate verification completed on 2026-07-15:
|
|
|
|
- `verify:battle-map-assets`: 66 scenario map keys and 66 battle-map assets matched, including exact image axes and the 8,192 px edge ceiling.
|
|
- `audit:visual-assets`: all 66 maps passed the V2 density and maximum-edge audit.
|
|
- `verify:static-data`: all 20 static-data gates passed for the 66-battle campaign.
|
|
- `build`: TypeScript and the production Vite build passed (546 modules transformed).
|
|
- `qa:battle-maps:webgl`: 12 representative battles passed in the real Phaser WebGL renderer, with 12 victories, zero failures, and 71/71 objectives achieved. The set includes battles 40, 54, 59, and 61 for flood, river, and late-game large-map coverage.
|
|
- `verify:performance`: all 8 budgets passed; first battle became playable 5,717 ms after the story transition in the measured local run.
|
|
- `verify:release`: the release-candidate browser flow passed, including new-game auto-save, reload/continue, defeat retry, victory-to-camp return, FHD input mapping, and WebGL battle smoke coverage.
|
|
|
|
The tracked release pipeline re-runs the full local verification and all-battle QA before NAS publication, then checks the public release manifest.
|