Log inGet started
World

Banana 2077

Branchmain
Branchesmain
Commit49a1306fab

README.md

Screens

Banana 2077's screens. The scene entrypoint attaches it to mount_ui when play starts. It owns every screen and is the only code that calls R.startRun().

Phases (from game.rules, applied when phaseChanged fires):

  • title: the glitchy chromatic BANANA 2077 logo, whose 0 is a drawn banana slice, with cyan/magenta jittering copies and glitch slivers. Under it, a pulsing PRESS ENTER TO START between gold rules, plus a row of keycaps (MOVE, SMACK, SPRINT, ROLL, SHADES, MAP, JOURNAL). When R.hasSave() and the profile has progress (level > 1, any XP or any quest), the prompt is replaced by two options on their own screen (b77_titleopt): CONTINUE — LEVEL n and NEW GAME. Up / down (arrows, W / S, D-pad) picks one and Enter / Start / South confirms it; on touch, each option is tapped. NEW GAME asks twice: the first press turns it into a blinking red PRESS AGAIN TO WIPE YOUR SAVE for 3 s, and the second calls R.newGame() and starts the run. It plays over a looping drone shot around the hero on a rooftop (game.screens.titleset, through cutscene.play).
  • playing: the HUD.
    • Top-left: HEALTH and a 25-segment yellow bar that turns red and pulses at 30% or below, the number beside it, and the €$ eddies counter.
    • Top-right: the tracked quest's title in yellow (◆ THE ROTTEN APPLE, or ◆ OBJECTIVE with nothing tracked), the cyan objective from R.objectiveText() under it, and under that the distance to the quest waypoint in the waypoint's colour (▲ 42 M · DEX, from R.questWaypoint(), at 5 Hz, redrawn only when the text changes).
    • By the health bar: a magenta LEVEL n badge with xp / next XP (or MAX LEVEL), a thin XP bar under the health bar, and cyan RAM pips (R.ram()). They redraw only on xp, levelUp, ram, stats, attributes, profileLoaded and reset.
    • Bottom-right: a round navy minimap with a cyan ring and an N badge, north-up (world +x to the left). It draws the real city plan from game.city.map: each street as a wide sidewalk stroke under a dark asphalt stroke 2*RH wide with a dashed centre line, the Gold Row roundabout, the original Peel Kabuki street and plaza, the alleys and promenade, the sea, places tinted in their own colour, and the elevated Banana Expressway in translucent cyan. Over that sit the quest waypoint (a diamond in its colour, pinned to the ring when out of range), a yellow player arrow and red enemy dots from R.targets(). Dots out of range are pinned to the ring as hollow rings, and the boss is magenta.
    • Above the minimap: where you are. It shows ◆ PLACE and the place name in its colour (Map.placeAt), or ◆ STREET and the street name (Map.streetAt), or ◆ OFF STREET.
    • NEW PLACE DISCOVERED: the first time in a run the player steps into one of the ten places, a banner shows the name in the place's colour, its tagline and n/10 FOUND, then fades after ~3 s. Finds are kept in R.state.discovered (created by Screens) and cleared on reset. The market you spawn in counts at once.
    • Also: the SHADES · THREAT SCAN tint while the sunglasses are on, hurt vignette, hit marker, combo / HEAVY SMACK!, eddies pops, kill callouts, and the Don Aubergine boss bar.
    • DISTRICT RECLAIMED: on bossDefeated, a non-modal chromatic banner for ~4 s (PEEL KABUKI · ROTTEN CREW BROKEN). The run carries on; the quests slice holds its own banners until it is gone.
  • City map (while playing, toggled with M / D-pad Down / the MAP touch button): a full-screen map of the whole city.
    • Streets are named along their curves, and the expressway, water and roundabout are drawn.
    • Found places appear in colour with their name and tagline. Unfound ones show as ???.
    • It has a places list, a legend, PLACES FOUND n/10, a pulsing YOU ARE HERE arrow, the quest waypoint as a pulsing diamond with its label, and M CLOSE.
    • The minimap hides while it is open.
  • lost: FLATLINED over a banana-mush splat, with eddies, EDDIES LOST (from the flatlined event: the share of eddies the death cost), time and crew smacked. Enter / Start / tap retries (R.startRun()).
  • won: kept for compatibility (the rules no longer set it): DISTRICT RECLAIMED with the same stats. Enter runs it back.

Input:

  • The game.screens.menu input map (start: Enter / Numpad Enter, gamepad Start or South, and a START touch button; up / down: arrows, W / S, D-pad, for the title options). It is active only on the title and end screens, so its touch button never covers gameplay. Clicking or tapping the title (without saved progress) or the end screen also starts the run; with saved progress, the CONTINUE / NEW GAME rows are tapped.
  • The game.screens.hud input map (citymap: M, D-pad Down, MAP touch button). It is active only while playing.
  • Combat touch buttons (SMACK, ROLL, SHADES) come from game.player.banana.

Screens (layer): b77_citywarm 100, b77_hud 110, b77_live 111, b77_fx 112, b77_map 113, b77_quest 114, b77_prog 115, b77_city 116, b77_citypos 117, b77_title 120, b77_titleopt 121, b77_end 130.

Cost:

  • The live readouts rebuild only when their values change.
  • Minimap: redraws at 12 Hz. The city geometry is built once, as cached SVG strings pre-split into ~40 m road tiles, and each redraw emits only the tiles inside the map's view.
  • City map: its geometry is built once. The player marker (b77_citypos) redraws at 10 Hz on its own screen, so the big map is never re-sent while it is open.
  • SVG size: the UI svg parser stops at about 64 KiB, so the city base and the place overlay are two svgs stacked in the same box.
  • First-open hitch: parsed svgs are cached by their text. To keep the first M press from hitching on that parse, the base is drawn once, nearly invisible, on b77_citywarm under the title screen, then removed.