diff --git a/assets/music/vega/colony.mp3 b/assets/music/vega/colony.mp3 new file mode 100644 index 0000000..9275ba6 Binary files /dev/null and b/assets/music/vega/colony.mp3 differ diff --git a/assets/videos/vega/colony-arid.mp4 b/assets/videos/vega/colony-arid.mp4 new file mode 100644 index 0000000..58c3ac8 Binary files /dev/null and b/assets/videos/vega/colony-arid.mp4 differ diff --git a/assets/videos/vega/colony-barren.mp4 b/assets/videos/vega/colony-barren.mp4 new file mode 100644 index 0000000..d79f096 Binary files /dev/null and b/assets/videos/vega/colony-barren.mp4 differ diff --git a/assets/videos/vega/colony-dead.mp4 b/assets/videos/vega/colony-dead.mp4 new file mode 100644 index 0000000..ee5f861 Binary files /dev/null and b/assets/videos/vega/colony-dead.mp4 differ diff --git a/assets/videos/vega/colony-desert.mp4 b/assets/videos/vega/colony-desert.mp4 new file mode 100644 index 0000000..865a4b0 Binary files /dev/null and b/assets/videos/vega/colony-desert.mp4 differ diff --git a/assets/videos/vega/colony-inferno.mp4 b/assets/videos/vega/colony-inferno.mp4 new file mode 100644 index 0000000..06342f9 Binary files /dev/null and b/assets/videos/vega/colony-inferno.mp4 differ diff --git a/assets/videos/vega/colony-jungle.mp4 b/assets/videos/vega/colony-jungle.mp4 new file mode 100644 index 0000000..45b0cf5 Binary files /dev/null and b/assets/videos/vega/colony-jungle.mp4 differ diff --git a/assets/videos/vega/colony-minimal.mp4 b/assets/videos/vega/colony-minimal.mp4 new file mode 100644 index 0000000..d7e79e0 Binary files /dev/null and b/assets/videos/vega/colony-minimal.mp4 differ diff --git a/assets/videos/vega/colony-ocean.mp4 b/assets/videos/vega/colony-ocean.mp4 new file mode 100644 index 0000000..65d10d5 Binary files /dev/null and b/assets/videos/vega/colony-ocean.mp4 differ diff --git a/assets/videos/vega/colony-radiated.mp4 b/assets/videos/vega/colony-radiated.mp4 new file mode 100644 index 0000000..0bad78c Binary files /dev/null and b/assets/videos/vega/colony-radiated.mp4 differ diff --git a/assets/videos/vega/colony-steppe.mp4 b/assets/videos/vega/colony-steppe.mp4 new file mode 100644 index 0000000..c37e9e5 Binary files /dev/null and b/assets/videos/vega/colony-steppe.mp4 differ diff --git a/assets/videos/vega/colony-terran.mp4 b/assets/videos/vega/colony-terran.mp4 new file mode 100644 index 0000000..4623168 Binary files /dev/null and b/assets/videos/vega/colony-terran.mp4 differ diff --git a/assets/videos/vega/colony-toxic.mp4 b/assets/videos/vega/colony-toxic.mp4 new file mode 100644 index 0000000..96e36c6 Binary files /dev/null and b/assets/videos/vega/colony-toxic.mp4 differ diff --git a/assets/videos/vega/colony-tundra.mp4 b/assets/videos/vega/colony-tundra.mp4 new file mode 100644 index 0000000..964e535 Binary files /dev/null and b/assets/videos/vega/colony-tundra.mp4 differ diff --git a/assets/videos/vega/ship-ursaal-scout.mp4 b/assets/videos/vega/ship-ursaal-scout.mp4 new file mode 100644 index 0000000..31ff4a6 Binary files /dev/null and b/assets/videos/vega/ship-ursaal-scout.mp4 differ diff --git a/data/mastervega-artwork.json b/data/mastervega-artwork.json index afcd8d8..d52052e 100644 --- a/data/mastervega-artwork.json +++ b/data/mastervega-artwork.json @@ -79,6 +79,23 @@ "asteroids": { "key": "vega-world-asteroids", "path": null } }, + "_colonyVideosReadme": "Colony-founding VIGNETTE clips — 960x544, muted, ~10s, one per COLONISABLE planetType id. VegaColonyIntro.js plays one full-screen the moment the player plants a colony, over assets/music/vega/colony.mp3. Only colonisable types are listed: canColonize() rejects gasgiant and asteroids before any species trait is consulted, so a clip for those could never play. A null path — or a colonisable type missing from this block — falls back to that type's worldBackgrounds still, and then to the gradient, exactly like the colony screen, so a newly colonisable world is presentable the day it is added.", + "colonyVideos": { + "terran": { "key": "vega-colony-terran", "path": "assets/videos/vega/colony-terran.mp4" }, + "ocean": { "key": "vega-colony-ocean", "path": "assets/videos/vega/colony-ocean.mp4" }, + "jungle": { "key": "vega-colony-jungle", "path": "assets/videos/vega/colony-jungle.mp4" }, + "steppe": { "key": "vega-colony-steppe", "path": "assets/videos/vega/colony-steppe.mp4" }, + "arid": { "key": "vega-colony-arid", "path": "assets/videos/vega/colony-arid.mp4" }, + "desert": { "key": "vega-colony-desert", "path": "assets/videos/vega/colony-desert.mp4" }, + "tundra": { "key": "vega-colony-tundra", "path": "assets/videos/vega/colony-tundra.mp4" }, + "minimal": { "key": "vega-colony-minimal", "path": "assets/videos/vega/colony-minimal.mp4" }, + "barren": { "key": "vega-colony-barren", "path": "assets/videos/vega/colony-barren.mp4" }, + "dead": { "key": "vega-colony-dead", "path": "assets/videos/vega/colony-dead.mp4" }, + "inferno": { "key": "vega-colony-inferno", "path": "assets/videos/vega/colony-inferno.mp4" }, + "toxic": { "key": "vega-colony-toxic", "path": "assets/videos/vega/colony-toxic.mp4" }, + "radiated": { "key": "vega-colony-radiated", "path": "assets/videos/vega/colony-radiated.mp4" } + }, + "sheets": { "ships": { "key": "vega-ships", diff --git a/docs/mastervega-build-plan.md b/docs/mastervega-build-plan.md index 226d40f..407e0ed 100644 --- a/docs/mastervega-build-plan.md +++ b/docs/mastervega-build-plan.md @@ -263,6 +263,25 @@ Each of these was a real bug that produced a plausible-looking but broken game. has its own world transform and does **not** follow a moving parent — the flyout tween drags it along by hand in `onUpdate`. +23. **A Phaser `Video` does not report a width of zero before it decodes.** + Every video in this game is sized by scaling *from* its source width rather + than calling `setDisplaySize`, guarded as `obj.width || SRC`. That guard + never fires: a freshly created `Video` carries a **placeholder** size until + its first frame decodes, at which point `updateTexture()` builds the real + texture and re-sizes the object to it. So the scale is set from the + placeholder and stays wrong by `placeholder / realWidth` once the real + texture lands. It hid for as long as it did because every clip in the game + **was** 256 px square — placeholder and fallback were the same number, so + both branches agreed. The 960×544 colony clips exposed it: the vignette + opened 2.5× too large (`640 / 256`, which is how the placeholder is known to + be 256 — phaser is not vendored in this repo to read it off), and corrected + itself only on the *second* lap of the loop, when the re-fit ran against a + texture that was real by then. Removing the loop is what made it permanent + and visible. `VegaArt.sourceWidth()` is now the single guard: it gates on + `videoTexture`, null until that moment and the only reliable way to tell the + two states apart, so the placeholder's actual value never matters. Section 2 + asserts both branches. + ### Ship rows carry video, so they have to be pooled Every place a ship is listed — the side panel's task force, its in-transit, @@ -304,6 +323,108 @@ reports `7/80 recorded` rather than failing. What it does assert is that nothing *declared* is wrong — every key must equal `shipVideoKey(species, hull)`, which is the trap the `colonyship` / `ship-human-colony.mp4` filename mismatch sets. +### Founding a colony is a cutscene, not a report row + +Planting a colony is the most consequential thing a player does on the map, and +it used to be announced the *next* turn as one row in the "New Turn" popup — +the same weight the game gives a finished refit. `VegaColonyIntro.js` replaces +that with a full-screen vignette the moment the Found Colony button is pressed: +the soundtrack ducks, the world's own 1920×1080 backdrop fills the screen, a clip +of *this world* being settled plays in a framed window over it alongside +`assets/music/vega/colony.mp3`, and the founding numbers are read out underneath. +`colonised` is **out of `NOTABLE_TYPES`** as a result — put it back and the same +event is announced twice, the second time smaller. + +Seven things about it. + +**The clips are fetched just in time, not by the asset manifest — and Phaser's +video loader does not fetch anything at all.** `VideoFile.load()` records the +URL, marks itself complete and returns; its own comment reads *"we don't +actually load anything (the Video Game Object does that)"*. The bytes arrive +when a `Video` sets `el.src`. So putting 13 clips in the manifest never cost +19 MB at game-room entry — it cost 13 cache entries — and a "warm-up" that only +went through `scene.load` would have warmed nothing. What keeping the block out +of the manifest actually buys is **ownership of the timing**: +`ensureColonyVideo()` registers the URL *and* pulls the bytes through a detached +`