0.118.0 (versionCode 309): Test Card Tangle, Orbi-Fax Codebreaker, Arcade Daily and the seasonal backdrops in one build

- Six more backdrops: Seaside Pier, Drive-In, Snowfall, Sakura Night, Retro Living Room, Moon Base
- Fit checks for the new games' buttons and every backdrop name
- docs/new-originals.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-09 11:30:38 +00:00
co-authored by Claude Opus 5.5
parent d4d9c80746
commit aab877afc9
7 changed files with 190 additions and 8 deletions
+2 -2
View File
@@ -9,8 +9,8 @@ android {
applicationId = "tv.orbit.classic"
minSdk = 26
targetSdk = 36
versionCode = 308
versionName = "0.117.0-quiz-night"
versionCode = 309
versionName = "0.118.0-new-originals"
}
buildFeatures { compose = true }
// The finished build for the TVs (Paul, 6 November 2026: the test build stuttered on the box). Not debuggable, so
@@ -31,7 +31,9 @@ import kotlin.random.Random
*/
internal enum class ArcadeBackdrop(val title: String) {
DeepSpace("Deep Space"), Aurora("Aurora"), Rooftops("Rooftops"), SatelliteRing("Satellite Ring"),
Nebula("Nebula"), TestCardDusk("Test-Card Dusk"), Meadow("Meadow at Night"), Teletext("Teletext Grid");
Nebula("Nebula"), TestCardDusk("Test-Card Dusk"), Meadow("Meadow at Night"), Teletext("Teletext Grid"),
// The seasonal and channel set (approved 9 November 2026).
SeasidePier("Seaside Pier"), DriveIn("Drive-In"), Snowfall("Snowfall"), SakuraNight("Sakura Night"), RetroLivingRoom("Retro Living Room"), MoonBase("Moon Base");
companion object {
/** A saved choice, read back. Before the collection there were three: Night Sky (the default, so "each game's own" now), Nebula and Moonrise. */
@@ -145,6 +147,14 @@ internal fun Modifier.arcadeBackdrop(which: ArcadeBackdrop): Modifier = drawWith
else -> {}
}
val ringed = Offset(w * .16f, h * 1.02f)
// The seasonal set's shapes, made once.
val flakes = if (which == ArcadeBackdrop.Snowfall || which == ArcadeBackdrop.SakuraNight) starField(which.ordinal + 77, 110, w, h) else FloatArray(0)
val pierLights = if (which == ArcadeBackdrop.SeasidePier) FloatArray(14) { it * w * .045f + w * .32f } else FloatArray(0)
val crater = if (which == ArcadeBackdrop.MoonBase) Path().apply {
moveTo(0f, h); lineTo(0f, h * .78f)
for (i in 0..30) { val x = w * i / 30f; lineTo(x, h * (.78f + .025f * kotlin.math.sin(i * 1.3).toFloat() + .015f * kotlin.math.cos(i * 2.9).toFloat())) }
lineTo(w, h); close()
} else Path()
val teleCells = if (which == ArcadeBackdrop.Teletext) Random(99).let { m -> IntArray(40 * 24) { m.nextInt(100) } } else IntArray(0)
onDrawBehind {
fun starsAt(alpha: Float, div: Float) { for (i in 0 until stars.size / 3) drawCircle(Color.White.copy(alpha = alpha + stars[i * 3 + 2] / div), stars[i * 3 + 2], Offset(stars[i * 3], stars[i * 3 + 1])) }
@@ -211,6 +221,76 @@ internal fun Modifier.arcadeBackdrop(which: ArcadeBackdrop): Modifier = drawWith
flowers.forEach { (o, c) -> drawCircle(c.copy(alpha = .7f), 3f, o); drawCircle(Color(0xFFFFDE59).copy(alpha = .8f), 1.2f, o) }
windows.forEach { o -> drawCircle(Color(0xFFFFDE59).copy(alpha = .16f), 7f, o); drawCircle(Color(0xFFFFF2A8).copy(alpha = .8f), 1.8f, o) }
}
ArcadeBackdrop.SeasidePier -> {
drawRect(Brush.verticalGradient(listOf(BackdropNavy, Color(0xFF1C2E66)), 0f, h * .62f))
starsAt(.18f, 5f)
// The sea, the moon's path on it, and the pier with its string of lights.
drawRect(Brush.verticalGradient(listOf(Color(0xFF0B1E48), Color(0xFF061232)), h * .62f, h), Offset(0f, h * .62f), Size(w, h * .38f))
drawCircle(Color(0xFFF4F0DC), h * .06f, Offset(w * .2f, h * .2f))
for (k in 0 until 9) drawRect(Color(0xFFF4F0DC).copy(alpha = .25f - k * .025f), Offset(w * .2f - h * .05f + (k % 2) * h * .02f, h * (.64f + k * .035f)), Size(h * .1f - k * h * .008f, h * .008f))
drawRect(Color(0xFF0A1022), Offset(w * .3f, h * .58f), Size(w * .7f, h * .025f))
for (k in 0 until 10) drawRect(Color(0xFF0A1022), Offset(w * (.32f + k * .07f), h * .6f), Size(w * .006f, h * .12f))
drawRect(Color(0xFF0A1022), Offset(w * .82f, h * .5f), Size(w * .12f, h * .08f))
drawPath(Path().apply { moveTo(w * .8f, h * .5f); lineTo(w * .88f, h * .43f); lineTo(w * .96f, h * .5f); close() }, Color(0xFF0A1022))
pierLights.forEachIndexed { i, x -> drawCircle((if (i % 3 == 0) Color(0xFFFF4FA3) else if (i % 3 == 1) Color(0xFFFFDE59) else Color(0xFF35D6F2)).copy(alpha = .85f), 2.5f, Offset(x, h * .565f)) }
}
ArcadeBackdrop.DriveIn -> {
drawRect(Brush.verticalGradient(listOf(Color(0xFF0A0F2E), Color(0xFF231A4A))))
starsAt(.18f, 5f)
// The big screen glowing over a field of parked cars, as at the Orbit Drive-In.
drawRect(Color(0xFF15122E), Offset(w * .3f, h * .62f), Size(w * .02f, h * .3f)); drawRect(Color(0xFF15122E), Offset(w * .68f, h * .62f), Size(w * .02f, h * .3f))
drawRect(Color(0xFF9FB4FF).copy(alpha = .16f), Offset(w * .22f, h * .2f), Size(w * .56f, h * .44f))
drawRect(Color(0xFFDDE4FF).copy(alpha = .55f), Offset(w * .26f, h * .24f), Size(w * .48f, h * .36f))
drawPath(Path().apply { moveTo(w * .5f, h * .6f); lineTo(w * .2f, h); lineTo(w * .8f, h); close() }, Color(0xFF9FB4FF).copy(alpha = .05f))
drawRect(Color(0xFF0B0A1E), Offset(0f, h * .86f), Size(w, h * .14f))
for (k in 0 until 7) { val x = w * (.04f + k * .14f); drawRoundRect(Color(0xFF0B0A1E), Offset(x, h * .8f), Size(w * .1f, h * .07f), androidx.compose.ui.geometry.CornerRadius(h * .02f)); drawRoundRect(Color(0xFF0B0A1E), Offset(x + w * .02f, h * .76f), Size(w * .06f, h * .05f), androidx.compose.ui.geometry.CornerRadius(h * .02f)) }
}
ArcadeBackdrop.Snowfall -> {
drawRect(Brush.verticalGradient(listOf(Color(0xFF0A1A3A), Color(0xFF2A3A6A))))
// Snow falling (still: drawn once), hills of it, and a lit cottage window or two, for the Mistletoe season.
for (i in 0 until flakes.size / 3) drawCircle(Color.White.copy(alpha = .35f + flakes[i * 3 + 2] / 4), flakes[i * 3 + 2] * 1.4f, Offset(flakes[i * 3], flakes[i * 3 + 1]))
drawOval(Color(0xFFDDE6F5), Offset(-w * .2f, h * .74f), Size(w * .8f, h * .5f)); drawOval(Color(0xFFEFF3FA), Offset(w * .4f, h * .78f), Size(w * .9f, h * .5f))
drawRect(Color(0xFF1E2A50), Offset(w * .7f, h * .66f), Size(w * .1f, h * .13f))
drawPath(Path().apply { moveTo(w * .68f, h * .66f); lineTo(w * .75f, h * .58f); lineTo(w * .82f, h * .66f); close() }, Color(0xFFEFF3FA))
drawRect(Color(0xFFFFD27A), Offset(w * .73f, h * .69f), Size(w * .025f, h * .035f))
}
ArcadeBackdrop.SakuraNight -> {
drawRect(Brush.verticalGradient(listOf(Color(0xFF14102E), Color(0xFF3A1E4A))))
starsAt(.18f, 5f)
// A full moon, a blossoming branch across it, and petals drifting (still), for Orbit Sakura.
drawCircle(Color(0xFFFFF0F5).copy(alpha = .15f), h * .24f, Offset(w * .7f, h * .32f)); drawCircle(Color(0xFFFFF0F5), h * .17f, Offset(w * .7f, h * .32f))
drawPath(Path().apply { moveTo(0f, h * .2f); quadraticTo(w * .3f, h * .25f, w * .55f, h * .12f); lineTo(w * .56f, h * .14f); quadraticTo(w * .3f, h * .29f, 0f, h * .25f); close() }, Color(0xFF2A1A28))
for (i in 0 until 26) { val t = i / 26f; val x = w * .55f * t; val y = h * (.21f - .07f * t) + (if (i % 2 == 0) -1 else 1) * h * .03f; drawCircle(Color(0xFFFFB7D2), h * .022f, Offset(x, y)); drawCircle(Color(0xFFFF8FBF), h * .008f, Offset(x, y)) }
for (i in 0 until flakes.size / 3) if (i % 3 == 0) drawOval(Color(0xFFFFB7D2).copy(alpha = .6f), Offset(flakes[i * 3], flakes[i * 3 + 1]), Size(5f, 3f))
}
ArcadeBackdrop.RetroLivingRoom -> {
drawRect(Brush.verticalGradient(listOf(Color(0xFF1A1230), Color(0xFF2C1C3A))))
// A cosy room at night: patterned wallpaper, a lamp's glow, and an old telly glowing with Orbit's test card.
for (r in 0 until 8) for (c in 0 until 14) drawCircle(Color(0xFF3A2650).copy(alpha = .6f), h * .012f, Offset(w * (c + (r % 2) * .5f) / 14f, h * r / 8f + h * .04f))
drawRect(Color(0xFF231427), Offset(0f, h * .78f), Size(w, h * .22f))
drawCircle(Color(0xFFFFC27A).copy(alpha = .12f), h * .3f, Offset(w * .15f, h * .45f))
drawPath(Path().apply { moveTo(w * .11f, h * .38f); lineTo(w * .19f, h * .38f); lineTo(w * .17f, h * .3f); lineTo(w * .13f, h * .3f); close() }, Color(0xFFFFC27A))
drawRect(Color(0xFF3B2A1A), Offset(w * .148f, h * .38f), Size(w * .004f, h * .4f))
drawRoundRect(Color(0xFF4A3220), Offset(w * .55f, h * .48f), Size(w * .3f, h * .3f), androidx.compose.ui.geometry.CornerRadius(h * .03f))
drawRect(Color(0xFF4A3220), Offset(w * .57f, h * .78f), Size(w * .02f, h * .08f)); drawRect(Color(0xFF4A3220), Offset(w * .81f, h * .78f), Size(w * .02f, h * .08f))
val bars = listOf(Color(0xFFF4F6FB), Color(0xFFFFDE59), Color(0xFF35D6F2), Color(0xFF6EDCAA), Color(0xFFFF4FA3), Color(0xFFFF6B6B), Color(0xFFA77BFF))
val sw = w * .2f / bars.size
bars.forEachIndexed { i, c -> drawRect(c.copy(alpha = .8f), Offset(w * .58f + i * sw, h * .52f), Size(sw + .5f, h * .2f)) }
drawCircle(Color.White.copy(alpha = .06f), w * .2f, Offset(w * .68f, h * .62f))
}
ArcadeBackdrop.MoonBase -> {
drawRect(Brush.verticalGradient(listOf(Color(0xFF02050F), Color(0xFF0B1430))))
starsAt(.3f, 4f)
// The Earth up in the sky, and a little Orbit base on the Moon's grey ground.
drawCircle(Color(0xFF2E6FD8), h * .1f, Offset(w * .8f, h * .2f)); drawCircle(Color(0xFF6EDCAA).copy(alpha = .7f), h * .04f, Offset(w * .78f, h * .18f))
drawCircle(Color(0xFF02050F), h * .1f, Offset(w * .84f, h * .17f))
drawPath(crater, Color(0xFF4A4F60))
drawOval(Color(0xFF3A3E4E), Offset(w * .15f, h * .86f), Size(w * .12f, h * .04f)); drawOval(Color(0xFF3A3E4E), Offset(w * .62f, h * .9f), Size(w * .08f, h * .03f))
drawArc(Color(0xFFDDE4F5), 180f, 180f, true, Offset(w * .36f, h * .7f), Size(w * .14f, h * .16f))
drawRect(Color(0xFFDDE4F5), Offset(w * .5f, h * .74f), Size(w * .1f, h * .05f))
drawLine(Color(0xFFDDE4F5), Offset(w * .55f, h * .74f), Offset(w * .55f, h * .62f), 2f); drawCircle(Color(0xFFFF4FA3), 3f, Offset(w * .55f, h * .62f))
drawCircle(Color(0xFFFFDE59), 3f, Offset(w * .4f, h * .76f)); drawCircle(Color(0xFFFFDE59), 3f, Offset(w * .44f, h * .76f))
}
ArcadeBackdrop.Teletext -> {
drawRect(Color(0xFF02060F))
// A faint mosaic in the teletext colours, on a grid, as if a page were showing through.
@@ -1,6 +1,5 @@
package tv.orbit.classic.arcade.codebreaker
import android.graphics.Bitmap
import android.view.KeyEvent
import androidx.activity.compose.BackHandler
import androidx.compose.foundation.Canvas
@@ -129,7 +128,7 @@ internal fun CodebreakerScreen(play: ArcadePlay) {
// Page 888, drawn into one small bitmap only when something on it changes.
val page = remember { TeletextPage() }
val pixels = remember { IntArray(Teletext.WIDTH * Teletext.HEIGHT) }
val bitmap = remember { Bitmap.createBitmap(Teletext.WIDTH, Teletext.HEIGHT, Bitmap.Config.ARGB_8888) }
val bitmap = remember { androidx.core.graphics.createBitmap(Teletext.WIDTH, Teletext.HEIGHT) }
val image = remember(bitmap) { bitmap.asImageBitmap() }
val doneToday = dailyDone(saved, today)
@@ -61,7 +61,7 @@ internal fun ArcadeDailyScreen(play: ArcadePlay) {
Text(if (done) "Done: today has its star ★" else "Not yet. Whenever you like, or not at all.", color = if (done) ArcadeColours.Yellow else ArcadeColours.Muted, fontSize = 16.sp, fontWeight = FontWeight.SemiBold)
Spacer(Modifier.weight(1f))
Row(horizontalArrangement = Arrangement.spacedBy(10.dp)) {
if (game != null) ArcadeButton("Play ${game.title}", Modifier.width(280.dp).focusRequester(first), icon = "▶", primary = true, height = 36.dp, onClick = { latestPlay.openGame(game.id) })
if (game != null) ArcadeButton("Play ${game.title}", Modifier.width(340.dp).focusRequester(first), icon = "▶", primary = true, height = 36.dp, onClick = { latestPlay.openGame(game.id) })
ArcadeButton("Back to Arcade", Modifier.width(200.dp).then(if (game == null) Modifier.focusRequester(first) else Modifier), icon = "←", height = 36.dp, onClick = { latestPlay.onLeave() })
}
}
@@ -61,7 +61,9 @@ class BackByContextTest {
assertNull(ArcadeBackdrop.parse("SomethingElse"))
val defaults = ArcadeGames.classics.map { ArcadeBackdrop.forGame(it.id) }
assertEquals(8, defaults.size)
// Seven of the eight backdrops are a Classic's own; the eighth (Aurora) is one of Comet Trail's changing skies.
assertEquals(ArcadeBackdrop.entries.toSet(), (defaults + ArcadeBackdrop.cometSkies).toSet())
// Every Classic has its own, and Comet Trail its changing skies, all from the collection.
assertTrue(ArcadeBackdrop.entries.toSet().containsAll(defaults + ArcadeBackdrop.cometSkies))
// The seasonal and channel set are choices for every game (Arcade Settings › Backdrop).
assertEquals(14, ArcadeBackdrop.entries.size)
}
}
@@ -179,4 +179,17 @@ class TitleTextFitsTest {
for (mode in tv.orbit.classic.arcade.quiz.QuizMix.entries) assertTrue(mode.title, width(sans, "◆ ${mode.title}") <= 230 - 2 * 12 - 4)
assertTrue(width(sans, "▶ Who's playing?") <= 230 - 2 * 12 - 4)
}
@Test fun theNewOriginalsWordsFit() {
val sans = Font(Font.SANS_SERIF, Font.BOLD, 1).deriveFont(14f * 1.3f)
// Arcade Daily's Play button names the day's game: every game's title fits it.
for (g in ArcadeGames.all) assertTrue(g.title, width(sans, "▶ Play ${g.title}") <= 340 - 2 * 12 - 4)
assertTrue(340 + 10 + 200 <= 960 - 96 - 24 - 240 - 40)
// Test Card Tangle's and Codebreaker's title buttons and modes.
for (label in listOf("▶ Level 30", "◆ Picture Perfect", "◆ Daily code", "◆ Practice", "▶ Practise instead", "▶ A practice code", "▶ Today's code"))
assertTrue(label, width(sans, label) <= 230 - 2 * 12 - 4)
// The backdrop button's longest name, in an Arcade Settings card (about 330 dp).
val detail = Font(Font.SANS_SERIF, Font.PLAIN, 1).deriveFont(12f * 1.3f)
for (b in tv.orbit.classic.ArcadeBackdrop.entries) assertTrue(b.title, width(sans, "Backdrop") + 8 + width(detail, b.title) <= 330 - 24 - 4)
}
}
+88
View File
@@ -0,0 +1,88 @@
# The new Originals and seasonal backdrops (0.118.0, versionCode 309, 9 November 2026)
One combined build on `classics-modes`, for a single install when Paul asks. On top of 0.116.0 (306, installed downstairs).
It carries the 0.116.1 label fix and BumbleHive's stacked title buttons, Quiz Night (`docs/quiz-night.md`), and the work
below. Not installed; nothing seen running.
## Test Card Tangle
- **The puzzle:** a calm cable puzzle over Orbit's own test card (the cast's colours as bars, Orbit's ring, Ollie in the
middle, not anyone else's card). Turn the pieces (◀▶▲▼ to move, OK to turn) until every one joins up to the signal in
the middle, with no loose ends. Each square's bar of the card brightens as it joins, and the whole picture comes back at
the end.
- **Thirty levels** in three packs (Warming Up, Tangled Up, Picture Perfect), from 4×3 to 8×6.
- Each is a random tree over every square, from a fixed seed, so it can always be solved, its pieces then turned out
of place.
- Drift's par is the fewest turns, plus a little room. Three stars down to one. No timer, no fail.
- **Saves:** each level's best is saved per profile, and High Scores count the pictures back on. Kids-suitable.
- **Checks** (`TangleTest`):
- None starts solved, and each answer is complete.
- A bot solves every level in exactly the fewest turns, within par.
## Orbi-Fax Codebreaker
- **The puzzle:** a five-letter word in six tries, drawn on Orbi-Fax teletext page 888 by Orbi-Fax's own page and
renderer, unchanged.
- Marks: green for the right place, yellow for in the word, blue for not in it. The on-screen keyboard shows what's
known.
- Move with ◀▶▲▼, OK types, TRY checks. Back takes a letter off, and pauses when there are none (Back by context).
- **The day's code** is the same for everyone and comes from a list of 255 family words, every one before any repeats.
**Practice** gives as many as you like.
- **No dictionary:** any five letters are a try (lenient for kids).
- **The wizard of page 999** drops in, his Orbi-Fax art unchanged: on a win in two tries or fewer, and one day in seven.
- **Saves:** High Scores count the codes cracked, and the day's result is saved per profile. Free, no streaks.
- **Light:** the page is redrawn into one small bitmap only when something on it changes.
- **Checks** (`CodebreakerTest`):
- The words, the daily rotation, and marking with repeated letters.
- A game's six tries, and the keyboard fitting teletext's 40 columns.
- The pages build.
## Arcade Daily
- **The challenge:** one free challenge a day, from across the games a profile can play (Kids profiles only from the
kids-suitable ones). For example "Score 2,000 in Star Chase", "Win a game of Patience", "Crack a code in Orbi-Fax
Codebreaker".
- Its page shows today's challenge, Play (which opens that game), and this week's stars.
- No streaks, nothing lost by missing a day.
- **The star** goes on as soon as a run in that game meets it, wherever it's played from. Classic tables only: Signal Run
doesn't count for Star Chase's challenge. High Scores count the days with a star.
- **Checks** (`ArcadeDailyTest`):
- Every challenge is for a real game, and the day's pick rotates.
- A Kids profile never gets a game it can't play.
- A star once a day, short runs don't count, and the week strip.
## The Arcade home
- There are 9 Originals now. The Originals row scrolls sideways when there are more than five, and the cards keep their
size.
- 15 Kids-suitable games.
## Seasonal and channel backdrops
Six more in the collection, drawn in code like the first eight (no pictures, each in its own layer, still), chosen for
every game from Arcade Settings › Backdrop:
- **Seaside Pier:** moonlit sea and a pier strung with lights.
- **Drive-In:** the big screen over parked cars, as at the Orbit Drive-In.
- **Snowfall:** snow, hills and a lit cottage, for the Mistletoe season.
- **Sakura Night:** a full moon, a blossoming branch and petals, for Orbit Sakura.
- **Retro Living Room:** wallpaper, a lamp and an old telly with Orbit's test card.
- **Moon Base:** the Earth in the sky over a little Orbit base.
There are 14 backdrops in all.
## Checks
- **Unit tests:** 1,075 run, 24 skipped, 0 failed.
- **Lint:** 0 errors, 87 warnings (none new).
- **Fit checks** at the largest font scale, which covers 720p and 1080p alike:
- Arcade Daily's Play button fits every game's name.
- The new titles' buttons and modes fit.
- Every backdrop's name fits its button.
- **Release APK:** 48,252,515 bytes: +49,156 on Quiz Night's 0.117.0, and +81,924 on 0.116.0 (306, downstairs).
## Not built
- Test Card Tangle has no level picker (Play continues from the next level; Replay from each result).
- Codebreaker has no dictionary.
- None of the new games has new sounds.