Skip to content

Casts: the game with commentary, the Cast window, the cinematic view (0.12.0) - #9

Merged
jeany55 merged 15 commits into
economyfrom
cast
Oct 15, 2026
Merged

jeany55 merged 15 commits into
economyfrom
cast

Conversation

@jeany55

@jeany55 jeany55 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

A broadcast of a replay: the camera on the action and two commentators — a play-by-play caster and an analyst — written and voiced by the scmjs.dev server. Offered when the scmjs.dev plugin is signed in to an account the server gives casts to (admin only for now) and the replay has been analysed. Stacked on #8 (Economy + Tech); merge that first and this retargets to main.

What it is

  • Facts (cast.ts, pure, tested): the whole game as stretches — the quiet parts played fast, the key fights at 1×, no cuts — or the key moments only; for each stretch, timed facts in seconds on screen: supply-counted openings, each player's economy / buildings / upgrades / whole army, supply blocks, and key fights blow by blow (what fell every 1.5 s and what killed it, firsts, the heaviest exchange, where the fight moves). Cards: each research (from its real start, by the game's tables) and the first of each unit and building, tagged in the facts.
  • Schedule: one timeline for the whole cast; lines placed after the one before, dropped when they'd come too late for their priority; the last frame held for the sign-off.
  • Reel (castplay.ts): plays on the replay's own clock, changes speed at each stretch (cuts only in Key moments), starts each voice at its frame, follows the person's pause and ends on a jump elsewhere. Every line is brought to one loudness (BS.1770-gated, −18), so the two voices match.

Making and watching

  • Cast window (one Cast… button on the strip): format, banter, voiced or captions only, cards, notes for the commentators, and the likely length, cost and time to make. Making shows each step live — planning, writing (part and lines as the script streams in), voicing (in batches of twelve), timing — with a clock and the storyline's first sentence (the rest would spoil it). The window can be closed; the strip says when it's ready.
  • Kept casts (castmake.ts): IndexedDB, keyed by the replay file's SHA-256 + options, with the voices — watching again needs no server. Reopening the replay offers its newest cast as Watch cast (with Cast… beside it). Asks the browser to keep the storage; past 30 casts or 300 MB the ones watched longest ago go.
  • Captions and cards over the game (icon, player, name, progress bar while it's made); no legend under the captions.
  • Cinematic view: while a cast plays in the Game view, the game full screen without the editor — a broadcast bar (names, races, supply, workers, army, clock, map), a title card, a key-fight banner, the winner at the end, larger captions, Pause / Leave on pointer move. Needs the Game view.

Tested

  • 115 tests (cast facts, segments, schedule, cards, loudness, stream reading, batches, estimate, eviction, Korean catalogue).
  • In the editor, headless: a real cast (Opus 5.5 + ElevenLabs via a local ai-server) — 4× opening, 1× fights on time, voices at their frames, loudness gains applied, pause/resume, cards on screen, no errors. The window, progress, kept casts across a reload, and the cinematic view were driven against a stand-in server and a stand-in engine view.

Needs

🤖 Generated with Claude Code

jeany55 and others added 15 commits October 15, 2026 11:57
…e scmjs.dev server

cast.ts makes the highlight clips (a key fight each, from a little before to a little
after), the facts each moment is written from (openings, what changed, where the armies
stand, what fell when, how it came out), and the schedule of lines once their voices are
measured. castplay.ts plays the reel on the replay's clock at 1x, holding a clip's last
frame while a line finishes, with captions. The Cast button shows when the scmjs.dev
account service is there and its server offers the cast recipe to the caller.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… each player stands, supply blocks

Each clip now starts with each player's economy (supply, workers, income, bank), buildings
(halls and production first), upgrades and whole army; the openings carry the supply each
order was given at; long supply blocks are news; a fight's units are told apart from the
whole army.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…the format and banter as choices

castSegments plays the opening and the stretches between key fights fast (2-16x) and the
fights at 1x; the facts and the lines are timed in seconds on screen; the schedule is one
timeline for the whole cast; the reel changes speed at each stretch (and cuts only in a
key-moments cast). The strip offers Whole game / Key moments and No / Some / Lots of banter;
a cast is kept for each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…of interests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…heir killer, firsts, the heaviest exchange, the fight moving

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The caster's lines came back about 9 dB under the analyst's and varied by 14 dB among
themselves. The reel measures each clip (BS.1770 gating, without K-weighting) and plays it
through a gain to -18, within 15 dB either way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…far along it is

castCards lists each research (from its start, by the game's research times) and the first
of each unit and building; the facts are tagged with them; a line's card is drawn at the top
left while it is said — icon, player, name, and a bar while it is made or researched. A
Cards switch on the strip turns them off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l, the speed menu showing the stretch's speed

From the first run inside the editor: the legend's box met the subtitles, the card covered
the editor's line at the map's top left, and the speed menu kept the opening's 4x through
the fights.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sts kept in the browser

The strip has one Cast button: it opens a window with the format, banter, voiced or
captions only, cards, notes for the commentators and what it will likely cost and take,
and the casts already made of this replay to watch or delete. Making one shows each stage
— reading the game, planning, writing (part and lines as the script streams in), voicing
(lines, in batches of twelve), timing — with the first sentence of the storyline and a
clock; the window can be closed and the timeline says when it is ready. Finished casts are
kept in IndexedDB with their voices, so watching again needs no server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oadcast

A Cinematic button while a cast plays takes Aftermath's Game view full screen: a bar along
the top with each player's name, race, supply, workers and army value and the game's clock,
the title card as the cast starts, a banner when a key fight begins, the winner over the
last frame, larger captions, the cards below the bar, and Pause / Leave when the pointer
moves. No editor marks (orders, legend, Spectate's line) in it; Esc or the cast ending leaves.
It needs the Game view, the game drawn by its engine in an element of Aftermath's own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…in, and the browser's room looked after

When a replay opens, its casts kept in the browser are looked up, and the timeline offers
the newest as Watch cast (with Cast… beside it for the window). Keeping a cast asks the
browser, once, to keep this storage when it runs short; past 30 casts or 300 MB of voices
the ones watched longest ago go. The window says how much is kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e Cast window, the cinematic view

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jeany55
jeany55 merged commit 0cfc11e into economy Oct 15, 2026
1 check passed
@jeany55
jeany55 deleted the cast branch October 15, 2026 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant