Story: Orbi-Fax pages stay until OK; the Mode button reads in full (0.110.13-story-p1000, versionCode 296)
From Paul's first play: the wave 5 teaser went by too quickly, and the Mode button showed 'S...' and a book glyph. Both Orbi-Fax pages now wait for OK (the game waits too): OK while typing shows the rest, then a gentle 'OK > CONTINUE' at the foot of the page (steady with Reduce flashing or Reduce motion). The button says MODE: STORY or MODE: ENDLESS, words only, with where Story starts shown beside the best scores. A new test checks both titles' button words fit (BumbleHive in Barlow, Orbi-Raiders at font scale 1.3). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -178,8 +178,8 @@ internal fun OrbiRaidersScreen(play: ArcadePlay) {
|
||||
|
||||
when (stage) {
|
||||
Stage.Title -> {
|
||||
val storyLine = if (StorySave.done(play.level, play.difficulty) && StorySave.startWave(play.level, play.difficulty) == 1) "Complete ★"
|
||||
else StorySave.startWave(play.level, play.difficulty).let { if (it == 1) "From wave 1" else "From wave $it" }
|
||||
val storyLine = if (StorySave.done(play.level, play.difficulty) && StorySave.startWave(play.level, play.difficulty) == 1) "complete ★"
|
||||
else StorySave.startWave(play.level, play.difficulty).let { "from wave $it" }
|
||||
TitleScreen(pilot, play.best, book.bestWave, play.difficulty.title, refocus = !howTo, onPilot = { pilot = it; latestPlay.setLevel("pilot", it.name) },
|
||||
mode = mode, storyLine = storyLine, onMode = { mode = if (mode == RaidersMode.Story) RaidersMode.Endless else RaidersMode.Story; latestPlay.setLevel("mode", mode.name) },
|
||||
onPlay = ::startRun, onHowTo = { howTo = true }, onBack = { latestPlay.onLeave() })
|
||||
@@ -219,6 +219,9 @@ internal fun OrbiRaidersScreen(play: ArcadePlay) {
|
||||
|
||||
// ---------- Title (frame 10) ----------
|
||||
|
||||
/** The Mode button's words: the mode in full, nothing else on the button. */
|
||||
internal fun modeLabel(mode: RaidersMode) = "MODE: " + mode.title.uppercase()
|
||||
|
||||
@Composable
|
||||
private fun TitleScreen(chosen: Pilot, best: Int, bestWave: Int, difficulty: String, refocus: Boolean, onPilot: (Pilot) -> Unit,
|
||||
mode: RaidersMode, storyLine: String, onMode: () -> Unit, onPlay: () -> Unit, onHowTo: () -> Unit, onBack: () -> Unit) {
|
||||
@@ -267,9 +270,8 @@ private fun TitleScreen(chosen: Pilot, best: Int, bestWave: Int, difficulty: Str
|
||||
}
|
||||
Column(Modifier.width(190.dp), verticalArrangement = Arrangement.spacedBy(8.dp)) {
|
||||
ArcadeButton("Play", Modifier.fillMaxWidth().focusRequester(playButton), icon = "▶", primary = true, height = 34.dp, onClick = onPlay)
|
||||
// Story (20 waves, four bosses, a checkpoint after each) or Endless.
|
||||
ArcadeButton(mode.title, Modifier.fillMaxWidth(), icon = if (mode == RaidersMode.Story) "📖" else "∞", height = 34.dp,
|
||||
detail = if (mode == RaidersMode.Story) storyLine else "Every 5th wave a boss", onClick = onMode)
|
||||
// Story (20 waves, four bosses, a checkpoint after each) or Endless. Words only, so it always reads in full.
|
||||
ArcadeButton(modeLabel(mode), Modifier.fillMaxWidth(), height = 34.dp, onClick = onMode)
|
||||
ArcadeButton("How to Play", Modifier.fillMaxWidth(), icon = "?", height = 34.dp, onClick = onHowTo)
|
||||
ArcadeButton("Back to Arcade", Modifier.fillMaxWidth(), icon = "←", height = 34.dp, onClick = onBack)
|
||||
}
|
||||
@@ -278,6 +280,7 @@ private fun TitleScreen(chosen: Pilot, best: Int, bestWave: Int, difficulty: Str
|
||||
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(14.dp)) {
|
||||
Row { Text("Your best ", color = ArcadeColours.Muted, fontSize = 14.sp); Text(if (best > 0) "%,d".format(best) else "—", color = ArcadeColours.Ink, fontSize = 14.sp, fontWeight = FontWeight.Bold) }
|
||||
Row { Text("Best wave ", color = ArcadeColours.Muted, fontSize = 14.sp); Text(if (bestWave > 0) "$bestWave" else "—", color = ArcadeColours.Ink, fontSize = 14.sp, fontWeight = FontWeight.Bold) }
|
||||
Row { Text("Story ", color = ArcadeColours.Muted, fontSize = 14.sp); Text(storyLine, color = ArcadeColours.Ink, fontSize = 14.sp, fontWeight = FontWeight.Bold) }
|
||||
Text("🔒 No Household record: Orbi-Raiders is new since profiles", color = ArcadeColours.Muted, fontSize = 13.sp)
|
||||
}
|
||||
Spacer(Modifier.weight(1f))
|
||||
|
||||
@@ -293,7 +293,7 @@ internal fun DrawScope.drawRaidersField(art: RaidersArt, story: StoryArt, sim: R
|
||||
// Double Luna's slow time: a steady soft purple over the field.
|
||||
if (sim.slow < 1f) drawRect(Color(0xFFA77BFF), Offset.Zero, Size(FIELD_W, FIELD_H), alpha = .1f)
|
||||
// Story: an Orbi-Fax page takes the whole field.
|
||||
if (sim.phase == Phase.Fax) { with(story) { faxPage(sim) }; return@scale }
|
||||
if (sim.phase == Phase.Fax) { with(story) { faxPage(sim, time, still = reduceFlashing || calm) }; return@scale }
|
||||
val wizardOn = sim.bossOn && sim.boss == Boss.Wizard
|
||||
if (wizardOn && sim.wizardPhase == WizardPhase.Overload) with(story) { overloadCard(time, still = reduceFlashing || calm) }
|
||||
signal(sim.bars, sim.maxBars)
|
||||
|
||||
@@ -220,8 +220,6 @@ internal object FaxPage {
|
||||
/** Letters a second as a page types out (the teaser is quicker: it's a glimpse). */
|
||||
const val TYPE_RATE = 18f
|
||||
const val TEASER_RATE = 80f
|
||||
const val TEASER_HOLD = 1.2f
|
||||
const val WIZARD_HOLD = 2.5f
|
||||
const val ENDING_HOLD = 3f
|
||||
}
|
||||
|
||||
@@ -456,13 +454,14 @@ internal class RaidersSim(var pilot: Pilot = Pilot.Ollie, difficulty: Difficulty
|
||||
else -> 0
|
||||
}
|
||||
|
||||
private fun faxLength(): Float = when (fax) {
|
||||
FaxPage.TEASER -> (if (calm) 0f else FaxPage.TEASER_CHARS / FaxPage.TEASER_RATE) + FaxPage.TEASER_HOLD + (if (calm) 1.3f else 0f)
|
||||
else -> (if (calm) 0f else StoryPlan.CUT_IN_CHARS / FaxPage.TYPE_RATE) + FaxPage.WIZARD_HOLD
|
||||
}
|
||||
/** The page has finished typing (at once under Reduce motion); it then waits for OK (Paul: "stay up till user presses ok"). */
|
||||
fun faxReady(): Boolean = phase == Phase.Fax && faxShown() >= (if (fax == FaxPage.TEASER) FaxPage.TEASER_CHARS else StoryPlan.CUT_IN_CHARS)
|
||||
|
||||
/** OK on an Orbi-Fax page: on to what comes next. */
|
||||
fun skipFax() { if (phase == Phase.Fax) endFax() }
|
||||
/** OK on an Orbi-Fax page: while it's typing, the rest appears; once it's all there, on to what comes next. */
|
||||
fun skipFax() {
|
||||
if (phase != Phase.Fax) return
|
||||
if (!faxReady()) faxT = 1e4f else endFax()
|
||||
}
|
||||
|
||||
private fun endFax() {
|
||||
val page = fax
|
||||
@@ -482,7 +481,8 @@ internal class RaidersSim(var pilot: Pilot = Pilot.Ollie, difficulty: Difficulty
|
||||
ticks++
|
||||
val dt = STEP
|
||||
clock += dt
|
||||
if (phase == Phase.Fax) { faxT += dt; if (faxT >= faxLength()) endFax(); return }
|
||||
// An Orbi-Fax page: everything waits while it types and stays until OK.
|
||||
if (phase == Phase.Fax) { if (faxT < 1e4f) faxT += dt; return }
|
||||
if (phase == Phase.Ending) {
|
||||
endingT += dt
|
||||
if (endingT >= (if (calm) 0f else StoryPlan.ENDING.length / FaxPage.TYPE_RATE) + FaxPage.ENDING_HOLD) finishStory()
|
||||
|
||||
@@ -68,7 +68,7 @@ internal class StoryArt(density: Density, measurer: TextMeasurer) {
|
||||
|
||||
// ---------- the Orbi-Fax pages ----------
|
||||
|
||||
private fun buildPage(fax: Int, shown: Int) {
|
||||
private fun buildPage(fax: Int, shown: Int, prompt: Boolean) {
|
||||
page.clear()
|
||||
var left = shown
|
||||
fun line(row: Int, col: Int, text: String, colour: Int, double: Boolean = false) {
|
||||
@@ -90,15 +90,19 @@ internal class StoryArt(density: Density, measurer: TextMeasurer) {
|
||||
val lines = StoryPlan.CUT_IN
|
||||
for (i in lines.indices) line(3 + i * 2, 21, lines[i], if (i == lines.lastIndex) Teletext.YELLOW else Teletext.WHITE, double = true)
|
||||
}
|
||||
// Once it's all there: OK to go on, in Orbi-Fax's own colours at the foot of the page.
|
||||
if (prompt) page.put(23, 26, "OK > CONTINUE", Teletext.BLACK, Teletext.CYAN)
|
||||
TeletextRenderer.render(page, pixels)
|
||||
pageBitmap.setPixels(pixels, 0, Teletext.WIDTH, 0, 0, Teletext.WIDTH, Teletext.HEIGHT)
|
||||
}
|
||||
|
||||
/** An Orbi-Fax page over the whole field: black, with the page at 4:3 in the middle. */
|
||||
fun DrawScope.faxPage(sim: RaidersSim) {
|
||||
fun DrawScope.faxPage(sim: RaidersSim, time: Float, still: Boolean) {
|
||||
val shown = sim.faxShown()
|
||||
val key = sim.fax * 10_000 + shown
|
||||
if (key != pageKey) { pageKey = key; buildPage(sim.fax, shown) }
|
||||
// The prompt blinks gently (twice a second), or stays steady with Reduce flashing or Reduce motion.
|
||||
val prompt = sim.faxReady() && (still || ((time * 2f).toInt() % 2 == 0))
|
||||
val key = sim.fax * 20_000 + shown * 2 + (if (prompt) 1 else 0)
|
||||
if (key != pageKey) { pageKey = key; buildPage(sim.fax, shown, prompt) }
|
||||
drawRect(Color.Black, Offset(-20f, -20f), Size(FIELD_W + 40f, FIELD_H + 40f))
|
||||
val h = FIELD_H; val w = h * 4f / 3f
|
||||
drawImage(pageImage, IntOffset.Zero, IntSize(Teletext.WIDTH, Teletext.HEIGHT), IntOffset(((FIELD_W - w) / 2).toInt(), 0), IntSize(w.toInt(), h.toInt()), filterQuality = FilterQuality.None)
|
||||
|
||||
Reference in New Issue
Block a user