diff --git a/docs/battle-map-terrain-atlas-pipeline.md b/docs/battle-map-terrain-atlas-pipeline.md index 31fa8e2..9cbb248 100644 --- a/docs/battle-map-terrain-atlas-pipeline.md +++ b/docs/battle-map-terrain-atlas-pipeline.md @@ -2,7 +2,7 @@ ## Scope -The first fifty-four campaign battles now use the same hand-painted tactical map pipeline. The renderer still reads the original scenario tile coordinates and battle logic; only the map texture asset changes from flat/vector map art to low-contrast raster terrain. +The first fifty-six campaign battles now use the same hand-painted tactical map pipeline. The renderer still reads the original scenario tile coordinates and battle logic; only the map texture asset changes from flat/vector map art to low-contrast raster terrain. ## Art Direction @@ -20,6 +20,7 @@ The first fifty-four campaign battles now use the same hand-painted tactical map - Extreme large maps can use a 152px tile target through `EXTREME_LARGE_MAP_TILE_SIZE` when 160px output exceeds WebP encoder limits. - Massive maps can use a 144px tile target through `MASSIVE_LARGE_MAP_TILE_SIZE` when 152px output approaches the WebP encoder edge. - Colossal maps can use a 136px tile target through `COLOSSAL_LARGE_MAP_TILE_SIZE` when 144px output hits WebP encoding error 6. +- Gigantic maps can use a 128px tile target through `GIGANTIC_LARGE_MAP_TILE_SIZE` when 136px output would exceed the known WebP encoder comfort range. - Re-evaluate the tile target before a generated map's longest edge approaches roughly 16,384px at 192px per tile. - Use `--tile-size` only for controlled comparisons; commit the selected production size in the map config. @@ -83,6 +84,8 @@ python scripts/generate-handpaint-map-sample.py --map fifty-first --webp-quality python scripts/generate-handpaint-map-sample.py --map fifty-second --webp-quality 90 python scripts/generate-handpaint-map-sample.py --map fifty-third --webp-quality 90 python scripts/generate-handpaint-map-sample.py --map fifty-fourth --webp-quality 90 +python scripts/generate-handpaint-map-sample.py --map fifty-fifth --webp-quality 90 +python scripts/generate-handpaint-map-sample.py --map fifty-sixth --webp-quality 90 ``` Comparison example: @@ -147,6 +150,8 @@ python scripts/generate-handpaint-map-sample.py --map thirtieth --tile-size 192 - `src/assets/images/battle/fifty-second-battle-map.webp` - `src/assets/images/battle/fifty-third-battle-map.webp` - `src/assets/images/battle/fifty-fourth-battle-map.webp` +- `src/assets/images/battle/fifty-fifth-battle-map.webp` +- `src/assets/images/battle/fifty-sixth-battle-map.webp` ## QA Outputs @@ -256,5 +261,9 @@ python scripts/generate-handpaint-map-sample.py --map thirtieth --tile-size 192 - `docs/fifty-third-battle-map-handpaint-preview.png` - `docs/fifty-fourth-battle-map-handpaint-before-after.png` - `docs/fifty-fourth-battle-map-handpaint-preview.png` +- `docs/fifty-fifth-battle-map-handpaint-before-after.png` +- `docs/fifty-fifth-battle-map-handpaint-preview.png` +- `docs/fifty-sixth-battle-map-handpaint-before-after.png` +- `docs/fifty-sixth-battle-map-handpaint-preview.png` Browser screenshots are saved per verification run after build/deploy. diff --git a/docs/fifty-fifth-battle-map-handpaint-before-after.png b/docs/fifty-fifth-battle-map-handpaint-before-after.png new file mode 100644 index 0000000..314942e Binary files /dev/null and b/docs/fifty-fifth-battle-map-handpaint-before-after.png differ diff --git a/docs/fifty-fifth-battle-map-handpaint-preview.png b/docs/fifty-fifth-battle-map-handpaint-preview.png new file mode 100644 index 0000000..cbba52a Binary files /dev/null and b/docs/fifty-fifth-battle-map-handpaint-preview.png differ diff --git a/docs/fifty-sixth-battle-map-handpaint-before-after.png b/docs/fifty-sixth-battle-map-handpaint-before-after.png new file mode 100644 index 0000000..782783c Binary files /dev/null and b/docs/fifty-sixth-battle-map-handpaint-before-after.png differ diff --git a/docs/fifty-sixth-battle-map-handpaint-preview.png b/docs/fifty-sixth-battle-map-handpaint-preview.png new file mode 100644 index 0000000..30ed083 Binary files /dev/null and b/docs/fifty-sixth-battle-map-handpaint-preview.png differ diff --git a/scripts/generate-handpaint-map-sample.py b/scripts/generate-handpaint-map-sample.py index 093a6a3..04057dd 100644 --- a/scripts/generate-handpaint-map-sample.py +++ b/scripts/generate-handpaint-map-sample.py @@ -22,6 +22,7 @@ ULTRA_LARGE_MAP_TILE_SIZE = 160 EXTREME_LARGE_MAP_TILE_SIZE = 152 MASSIVE_LARGE_MAP_TILE_SIZE = 144 COLOSSAL_LARGE_MAP_TILE_SIZE = 136 +GIGANTIC_LARGE_MAP_TILE_SIZE = 128 TILE = DEFAULT_TILE_SIZE RNG = random.Random(240704) @@ -541,6 +542,26 @@ MAP_CONFIGS = { "seed": 241234, "tile_size": COLOSSAL_LARGE_MAP_TILE_SIZE, }, + "fifty-fifth": { + "slug": "fifty-fifth-battle-map", + "terrain_export": "fiftyFifthBattleMap", + "units_export": "fiftyFifthBattleUnits", + "ally_positions_export": "fiftyFifthBattleAllyPositions", + "out": BATTLE_IMAGE_DIR / "fifty-fifth-battle-map.webp", + "before": BATTLE_IMAGE_DIR / "fifty-fifth-battle-map.svg", + "seed": 241244, + "tile_size": GIGANTIC_LARGE_MAP_TILE_SIZE, + }, + "fifty-sixth": { + "slug": "fifty-sixth-battle-map", + "terrain_export": "fiftySixthBattleMap", + "units_export": "fiftySixthBattleUnits", + "ally_positions_export": "fiftySixthBattleAllyPositions", + "out": BATTLE_IMAGE_DIR / "fifty-sixth-battle-map.webp", + "before": BATTLE_IMAGE_DIR / "fifty-sixth-battle-map.svg", + "seed": 241254, + "tile_size": GIGANTIC_LARGE_MAP_TILE_SIZE, + }, } @@ -597,6 +618,7 @@ def ts_condition_to_python(condition: str) -> str: expression = expression.replace("===", "==") expression = expression.replace("&&", " and ") expression = expression.replace("||", " or ") + expression = re.sub(r"!\s*(?!=)", " not ", expression) expression = expression.replace("Math.floor", "math.floor") return expression @@ -1179,8 +1201,8 @@ def main() -> None: config = dict(MAP_CONFIGS[args.map]) if args.tile_size is not None: - if args.tile_size < 136: - raise ValueError("--tile-size must be 136 or greater") + if args.tile_size < 128: + raise ValueError("--tile-size must be 128 or greater") config["tile_size"] = args.tile_size out_path = args.out or Path(config["out"]) before_path = args.before or Path(config["before"]) diff --git a/src/assets/images/battle/fifty-fifth-battle-map.svg b/src/assets/images/battle/fifty-fifth-battle-map.svg deleted file mode 100644 index 6a2bcc8..0000000 --- a/src/assets/images/battle/fifty-fifth-battle-map.svg +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/assets/images/battle/fifty-fifth-battle-map.webp b/src/assets/images/battle/fifty-fifth-battle-map.webp new file mode 100644 index 0000000..2a62f7b Binary files /dev/null and b/src/assets/images/battle/fifty-fifth-battle-map.webp differ diff --git a/src/assets/images/battle/fifty-sixth-battle-map.svg b/src/assets/images/battle/fifty-sixth-battle-map.svg deleted file mode 100644 index 1fcff2b..0000000 --- a/src/assets/images/battle/fifty-sixth-battle-map.svg +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/assets/images/battle/fifty-sixth-battle-map.webp b/src/assets/images/battle/fifty-sixth-battle-map.webp new file mode 100644 index 0000000..69a3d09 Binary files /dev/null and b/src/assets/images/battle/fifty-sixth-battle-map.webp differ diff --git a/src/game/data/battleMapAssets.ts b/src/game/data/battleMapAssets.ts index 9b8bd33..f9c8bbf 100644 --- a/src/game/data/battleMapAssets.ts +++ b/src/game/data/battleMapAssets.ts @@ -6,7 +6,7 @@ import fiftyFirstBattleMapUrl from '../../assets/images/battle/fifty-first-battl import fiftySecondBattleMapUrl from '../../assets/images/battle/fifty-second-battle-map.webp'; import fiftyThirdBattleMapUrl from '../../assets/images/battle/fifty-third-battle-map.webp'; import fiftyFourthBattleMapUrl from '../../assets/images/battle/fifty-fourth-battle-map.webp'; -import fiftyFifthBattleMapUrl from '../../assets/images/battle/fifty-fifth-battle-map.svg'; +import fiftyFifthBattleMapUrl from '../../assets/images/battle/fifty-fifth-battle-map.webp'; import fiftyEighthBattleMapUrl from '../../assets/images/battle/fifty-eighth-battle-map.svg'; import fiftyNinthBattleMapUrl from '../../assets/images/battle/fifty-ninth-battle-map.svg'; import sixtiethBattleMapUrl from '../../assets/images/battle/sixtieth-battle-map.svg'; @@ -17,7 +17,7 @@ import sixtyFourthBattleMapUrl from '../../assets/images/battle/sixty-fourth-bat import sixtyFifthBattleMapUrl from '../../assets/images/battle/sixty-fifth-battle-map.svg'; import sixtySixthBattleMapUrl from '../../assets/images/battle/sixty-sixth-battle-map.svg'; import fiftySeventhBattleMapUrl from '../../assets/images/battle/fifty-seventh-battle-map.svg'; -import fiftySixthBattleMapUrl from '../../assets/images/battle/fifty-sixth-battle-map.svg'; +import fiftySixthBattleMapUrl from '../../assets/images/battle/fifty-sixth-battle-map.webp'; import fifthBattleMapUrl from '../../assets/images/battle/fifth-battle-map.webp'; import fifteenthBattleMapUrl from '../../assets/images/battle/fifteenth-battle-map.webp'; import firstBattleMapUrl from '../../assets/images/battle/first-battle-map.webp';