Skip to content

ui: unified theme selector with seasonal scene packs + animated scenes (C3X + C4)#162

Open
ghbarker wants to merge 4 commits into
BluePilotDev:bp-devfrom
ghbarker:unified-theme-selector
Open

ui: unified theme selector with seasonal scene packs + animated scenes (C3X + C4)#162
ghbarker wants to merge 4 commits into
BluePilotDev:bp-devfrom
ghbarker:unified-theme-selector

Conversation

@ghbarker

@ghbarker ghbarker commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

One BPThemePack selector drives all theming on both devices: the 8-Bit Racer code theme or one of 11 bundled seasonal packs, each a plain asset directory (colors, sounds, wheel icon, scene) — user packs drop into /data/bp_themes.

What each pack gets

  • Bespoke horizon per holiday: pine forest, spooky ridge, lit-window skylines, capitol + monument, mesas with saguaros, heart summits, egg hills, shamrock mounds, farmland, US flag line, jester zigzag. New Year's adds a looping Times-Square ball drop.
  • Hero mascot riding centered above the torque bar on both devices (sleigh, ghost, turkey, bunny, winged heart, pot of gold, rocket, sombrero, jester hat, disco orb, US flag) — the pack-scene answer to Rad Racer's ego car.
  • Animated particles + static decor (snow, hearts, clovers, poppies, bats, fireworks, garlands, bunting) — full strength in Minimal Driving View, subtle over camera, hard budget caps, colors-only fallback.
  • Auto Seasonal toggle (BPThemeAutoSeasonal, default off): each pack declares its window in season.json (fixed dates or anchored to Easter / US Thanksgiving); shortest window wins overlaps; user packs participate equally. Outside windows the manual selection applies.

All art is procedural (numpy SDF -> texture at load, no bundled scene images). Sunnylink gets the full Theme selector + the seasonal toggle, replacing the stale BPRadRacerTheme entry. 34 unit tests cover parsing, clamps, budgets, a 10k-frame allocation check, seasonal date math, and the hero-placement contract.

Pack Minimal Driving View (C3X)
Christmas
Halloween
New Year's
Veterans Day
Valentine's
Easter
St. Patrick's
Thanksgiving
Fourth of July
Cinco de Mayo
April Fools
comma 4 (MICI) — same scenes, hero above the torque bar

🤖 Generated with Claude Code

Adds a single Theme selector (Settings -> Visuals) to the C3X and comma
four UIs, driven by one BPThemePack param and one shared entry list, so
theming behaves identically on both devices. The selector carries Off,
the existing 8-Bit Racer theme (its separate toggle is absorbed), and
ten bundled seasonal packs covering New Year's through Christmas.

A pack is a directory of plain assets - no code:
  colors/colors.json        Path, PathEdge, LaneLines, LeadMarker,
                            RoadEdges, Accent, Background (all optional)
  sounds/<name>.wav         alert-sound overrides by filename
  steering_wheel/wheel.png  wheel icon override

Themed views render as full scenes: Background paints a sky gradient
whenever Minimal Driving View hides the camera, the path ribbon runs a
full-strength gradient, lane lines and road edges use the wider
minimal-view geometry with a stronger glow halo, the torque-bar fill
and set-speed value take the Accent color, and the vision-lead chevron
and info box follow LeadMarker.

The C3X page selects via a scrollable option dialog and the MICI page
via a cycling toggle - both built from the same entries, so any number
of packs stays inside the widget. Users can drop additional packs into
/data/bp_themes over SSH; malformed pieces degrade gracefully to stock
(bad wavs fall back to stock sounds, missing colors keep stock colors).

Bundled palettes are original; wheel icons are from OpenMoji
(CC BY-SA 4.0, credited in the README).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ghbarker
ghbarker force-pushed the unified-theme-selector branch from 61886fb to 39623fe Compare July 22, 2026 08:23
ghbarker and others added 3 commits July 22, 2026 04:33
…ecture

Builds on the theme selector: a SceneBase interface (background pass before the
model render, foreground pass under alerts, replaces_road/replaces_hud
capability flags) unifies every theme kind. Rad Racer participates through a
capability adapter — its drawing is untouched, the ad-hoc dispatch checks are
gone. Seasonal packs get data-driven scenes from a per-pack scene.json:
particle layers (falling snow, rising hearts, tumbling leaves, fluttering
bats, firework bursts), static decor (string lights, garlands, bunting,
corner pieces) and a sky treatment — full strength in Minimal Driving View,
subtle over the live camera, alerts always on top. Sprites are procedurally
rendered signed-distance fields (no bundled images), tinted per particle at
draw time. Budgets are hard-capped and validated; a pack without scene.json
is colors-only, exactly as before.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
BPThemeAutoSeasonal (default off): during a holiday window the matching pack
takes over automatically; outside windows the manual Theme selection applies
unchanged. Every pack is treated equally — the window lives in the pack itself
(<pack>/season.json, fixed MM-DD or anchored to easter/us_thanksgiving), so
user-dropped packs participate and shadow bundled ones by name. Overlaps go to
the shortest window (April Fools inside Easter week). Toggle on both settings
pages; sunnylink gains the toggle plus the full Theme selector, replacing the
stale BPRadRacerTheme entry.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Every pack's horizon now belongs to its holiday: heart-summit mountains
(valentines), giant egg hills (easter), shamrock mounds (st patricks),
farmland with barns and silos (thanksgiving), capitol dome + monument with
lit windows (july 4), saguaros among the mesas (cinco), lit-window skyline
(new years). The rainbow's legs dissolve into horizon mist instead of
hard-clipping. New Year's gains a looping Times-Square ball drop (glowing
faceted orb on a pole) and punchier fireworks, as does July 4.

New pack: veterans_day (Nov 8-12) — flag-line memorial hillside backdrop,
drifting remembrance poppies and gold stars, poppy wheel icon, navy/poppy-red
palette. Selector picks it up automatically; sunnylink option added.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ghbarker
ghbarker force-pushed the unified-theme-selector branch from 39623fe to c7f5384 Compare July 22, 2026 10:10
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