Files
OrbitTv/docs/orbi-raiders-prototype.md
T
pauljdandClaude Opus 5.5 760c957818 Orbi-Raiders: power-ups as on the Stage B sheet
Paul decided the approved power-up sheet wins over the brief: Turbo Tuner
lasts 10 s, Double Broadcast 12 s, and the Guide Bomb clears one row (the
lowest occupied row of the grid, divers included, a Corrupt Pixel doesn't
split; the Dead Channel and its sprites are immune). Tests and the prototype
doc updated (43 Raiders tests pass).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 20:31:40 +00:00

13 KiB
Raw Blame History

Orbi-Raiders: playable prototype (Arcade Stage D)

8 November 2026. Branch arcade-orbi-raiders, from arcade-stage-c (cdc3629), in the worktree /home/pauljd/Documents/OrbitTV/orbit-arcade. Local commits only: nothing pushed or merged, nothing installed, no TV touched.

Built from Stage B frames 10 (title), 11 (play), 12 (boss), 13 (result), 20-23 (shared menus), the power-up sheet (png/powerups.png), the proposal decisions (pilots, invaders, power-ups) and docs/arcade-stage-c.md. It runs on the Stage C framework (ArcadeGame, ArcadeSession, ArcadeGameLoop, ArcadeInput, ArcadeAudio, ArcadeStore, the cast drawing functions). Everything is drawn in code on the Canvas; no engine, no bitmaps from disk, no new libraries. The cast is unchanged: the pilots' faces are drawn by drawOrbMascot and drawOrbChaser, and only Ollie has a mouth.

The Orbi-Raiders card in the Arcade is now playable (no longer "Coming soon") and is Kids-suitable.

Controls

Key In play
◀ ▶ (held) Move. The ship speeds up while held and turns round quickly; it stops when let go.
OK Fire. One press, one shot.
Hold OK Auto-fire at the pilot's fixed rate. The remote's own key repeats never add shots (RepeatGuard).
▲ Overdrive, when the meter is full. One per press.
Back (or Play/Pause) Pause: Resume, Restart Level, How to Play, Sound, Exit to Arcade.

Title (frame 10): ◀ ▶ choose a pilot, OK plays with that pilot, ▼ goes to the menu (Play, How to Play, Back to Arcade), Back returns to the Arcade. The first game shows the shared How to Play card (frame 23) before the title, as every Arcade game does.

Result (frame 13): after a boss, Next Wave, Retry, Back to Arcade. When the signal is lost, Retry and Back to Arcade.

How it plays

  • Waves come down from the top in formation and sway side to side, stepping down at each edge. An invader that reaches the Orbit signal costs a bar and pushes the wave back up. A cleared wave pays 100 × the wave number and the next one comes in.
  • Every fifth wave is The Dead Channel: a grinning test-card CRT set with a faint 999 on its dial. It sways across the top and cycles three attacks, each warned before it lands: static rain (the antennas light yellow, then five slow shots in a fan), the test-card beam (its column is outlined yellow where the ship is, then a soft static band) and two little static sprites. Its health bar and name are along the top. Beating it brings the result card; Next Wave goes on.
  • The Orbit signal along the bottom is the lives: 3 bars (Zip 2). A hit costs a bar, resets the combo and gives a moment of safety. No bars left and the run ends.

Invaders

Invader First wave Hits Points What it does
Static Sprite 1 1 10 The basic one; drops straight shots
Signal Gremlin 2 1 20 Breaks off and zigzag-dives at the ship, then flies back to its place
Corrupt Pixel 3 1 15 Splits into two small Pixel bits (1 hit, 5 points each)
Rogue Satellite 4 (always the top row from 4) 3 30 (+5 per armour hit) Its panels dim as its armour goes; its shots lean towards the ship
Void Broadcast 6 2 40 Fades in and out; it can only be hit while it's showing
The Dead Channel 5, 10, 15… 45 / 60 / 80 (+20 each later boss) 5 a hit, 1,500 × boss number when beaten Above

Pilots

Pilot Top speed (units/s) Shot gap Shot width Pierce Bars Shield Overdrive
Ollie 190 0.22 s 6 – 3 – Wide Orbit (1.1 s): a ring sweeps out to 220 units, one hit on every invader it passes, clears the shots it passes, 6 on the boss
Blaze 228 (+20%) 0.22 s 4.4 (narrow) – 3 – Blaze Run (3 s): dashes side to side on his own firing 4× as fast; can't be hit
Luna 190 0.25 s (slower) 6 – 3 Regrows every 50 s Double Luna (3.5 s): a shield, and everything but her ship at 60% speed
Zip 190 0.23 s 6 1 2 (one less) – Zip Split (2.2 s): a five-shot fan every 0.24 s

Power-ups

About one fallen invader in 13 at Normal drops a hexagon badge (Pixel bits never do). Catch it with the ship. At most one timed power-up is on at a time; a new one replaces it. The HUD shows its badge with a ring for the time left, its name and "n s left" in words, so it never relies on colour.

Power-up Kind What it does Chance weight
Signal Shield timed, 8 s Soaks up one hit, then goes 22
Turbo Tuner timed, 10 s Ship 45% faster 18
Rewind Burst timed, 3 s Pushes the wave back up (up to 40 units) and the invaders fire at 35% 14
Double Broadcast timed, 12 s Two shots side by side 22
Guide Bomb instant Clears one row: the lowest occupied row of the grid, every invader in it (divers from that row too; a Corrupt Pixel doesn't split). The Dead Channel and its free-flying sprites are immune 12
Orbit Overdrive instant Fills the Overdrive meter 12

The timings and the Guide Bomb follow the approved Stage B power-up sheet: Paul decided on 8 November 2026 that the sheet wins over the brief (which had Turbo Tuner 8 s, Double Broadcast 10 s and a bomb that cleared the weak invaders).

Score

  • Each invader's points × the combo multiplier: ×2 from 10 kills in a row without being hit, ×3 from 25, ×4 from 50. A hit resets it to ×1.
  • Wave cleared: +100 × wave (not multiplied). Boss beaten: +1,500 × boss number. Boss hit: 5 × multiplier.
  • Overdrive meter: +4.5% a kill (1.5% a Pixel bit), +0.6% a boss hit.

Difficulty (Arcade Settings › Gameplay; Kids start on Gentle)

Gentle Normal Tricky
Invader fire (× a base of one shot every 1.35 s, +7% a wave) 0.5 1 1.45
Invader shot speed (units/s) 70 92 118
Gremlin dives (× a base of one every 3.4 s, quicker later) 0.55 1 1.4
Formation sway (units/s, +5% a wave) 12 16 22
Power-up drop chance 11% 7.5% 5.5%
The Dead Channel's health 45 60 80
Boss warning before each attack 1.4 s 1.0 s 0.75 s
Safety after losing a bar 2.2 s 1.6 s 1.2 s
Rows of invaders one fewer – –

Waves: rows 2 + (wave − 1) / 2 (2 to 5), columns 5 + wave / 2 (up to 8). Wave 1 is 2 × 5 Static Sprites.

The world is 420 × 300 units, scaled to the field. The ship accelerates at 1,500 units/s², stops at 2,200 and turns round at 3,600; player shots fly at 380 units/s.

Balance (bot, Normal, 24 seeded runs each, up to 10 minutes)

The same bot flies each pilot through the same seeds (RaidersBalanceTest). It holds fire, leads the swaying formation, steps out from under shots and the beam, and fires Overdrive when it's full. It plays better than a person, so these are for comparing the pilots, not for how long a run lasts at home.

Pilot Mean score Damage/s Survived (s) Damage per run Mean wave
Ollie 56,395 3.53 271.5 958 14.5
Blaze 52,843 3.21 281.3 903 14.0
Luna 57,234 2.55 377.7 963 14.6
Zip 56,466 5.21 176.7 921 13.8

Score and damage per run (damage/s × time survived) are within ±15% of the four-pilot mean (all within 5% today). Damage/s and survival on their own trade against each other by design, so they're only held within ±50%: Zip is the glass cannon (+44% damage/s, −36% survival), Luna the opposite. Difficulty orders how far the bot gets: Ollie reaches wave 25.9 on Gentle, 15.5 on Normal and 10.5 on Tricky (12 seeds).

Accessibility

  • Reduce motion (Orbit-wide): no screen shake, no spark bursts, steady glows on the Dead Channel, a still flame, and the NEW RECORD cheer stands still.
  • Reduce flashing (Arcade Settings › Accessibility, on by default): no full-screen flashes; a hit only tints the sprite, and the ship's moment of safety is steady see-through rather than blinking. With it off, losing a bar gives one soft flash (18% white, 0.15 s) and the safe ship blinks gently.
  • Sound goes through ArcadeAudio, so Orbit Quiet, night-quiet and Wind Down hold it down whatever is set. The pause menu's Sound turns the game's effects on or off for this profile. Pausing pauses every cue still sounding.
  • Difficulty Gentle / Normal / Tricky (Arcade Settings › Gameplay), per profile; a Kids profile starts on Gentle.
  • Auto-fire (Arcade Settings › Gameplay, off by default): the ship fires on its own, no button held.
  • Power-ups are named in words with their seconds left; pilots, bars and the boss's health are shapes and numbers as well as colours.

Saves

  • Through ArcadeStore, per profile: the top 10 runs (points, detail "Wave n · Pilot"), the best wave (level.bestWave) and the last pilot chosen (level.pilot). Reset Progress › level progress clears those two.
  • Every run is saved once, however it ends: the signal lost, Retry, Back to Arcade, Exit from the pause menu, or the screen going away mid-run (sleep timer, profile switch) through RaidersRunBook and the Stage C RunTracker.
  • Arcade-wide choices added to the profile file: choices.difficulty (new, a string), settings.autoFire, settings.reduceFlashing. Schema stays 1: older files read as before and older code ignores the new keys.

Performance (2 GB box)

  • Fixed 60 Hz simulation (FixedStep) apart from the screen's frames; a long frame is at most 5 ticks, and time paused or hidden is thrown away.
  • Pools made up front: 64 invaders, 40 player shots, 32 invader shots, 4 power-ups, 40 sparks (at most 141 sprites, under 150; sparks at most 40). A full pool skips the spawn.
  • The simulation allocates nothing in steady play: RaidersBalanceTest steps 10,000 ticks with the bot after a warm-up and measures the thread's allocated bytes: 0. The most sprites at once in that run was 49.
  • Drawing: paths, strokes and the "999" text layout are made once (RaidersArt); the pilots' faces are drawn once into 96 px bitmaps from the cast functions, because those build small lists as they draw. The field redraws each frame from a frame counter without recomposing; the HUD numbers are separate states, so a kill recomposes only the score. Drawing allocation was not measured (no device or emulator here).
  • Pause stops the loop (ArcadeGameLoop gated), the simulation and its timers, and the sound (ArcadeAudio.pauseAll).

Code

File What it holds
arcade/raiders/RaidersSim.kt The rules: pools, waves (seeded), the Dead Channel, pilots, Overdrives, power-ups, scoring, FixedStep. No Android.
arcade/raiders/RaidersControls.kt The remote in play (held moves, OK hold and repeat guard, ▲ once a press) and RaidersRunBook (every run saved once).
arcade/raiders/RaidersArt.kt All the drawing: ships, invaders, badges, the Dead Channel, the beam, the signal.
arcade/raiders/OrbiRaidersScreen.kt Title, play with its HUD, pause, result.

Changed in the framework: ArcadeGames.kt (the card is playable, a Sound effects setting), ArcadePlay.kt (difficulty, auto-fire and reduce flashing for games that use them), ArcadeStore.kt (choices, Difficulty, the three readers), ArcadeAudio.kt (pauseAll, resumeAll), ArcadeHome.kt (passes them in), ArcadePages.kt (Gameplay card with Difficulty and Auto-fire; Reduce flashing).

Prototype only

  • One boss (The Dead Channel) for every fifth wave, a little tougher each time.
  • Sound is the five existing power_*.ogg cues: a power-up caught, each pilot's Overdrive, the boss beaten. No shot, hit or music sounds yet.
  • The title has Play, How to Play and Back to Arcade; frame 10's High Scores and Settings buttons aren't there (both are on the Arcade's own menu).
  • The result card says "Saved to your high scores" rather than the profile's name.
  • The game's result card comes after each boss and at the end of a run, not after every wave.
  • No opening moment (the other games' host streaking in, Moments.kt): Orbi-Raiders opens straight on How to Play (first time) or its title.

Known gaps

  • Nothing has been seen running. There is no emulator or AVD on this PC and no TV was to be used, so the screens, focus order, feel and frame times are checked only by the compiler, the unit tests and reading the code against the frames. The first look should be Paul's, on the box.
  • Balance is a bot's balance. The real feel of the ship's acceleration with a held remote key, the auto-fire rate, the Gentle setting for a child and the boss's warnings from the sofa all need a person.
  • Frame 05's aim help, slower speed, hints, reduced impact sounds, high contrast, larger text and calm mode aren't built.
  • The power-up sheet and the brief disagree on three power-ups (above).
  • Per-profile Arcade saves still don't travel with Rooms' "Bring in" (as in Stage C).