Add ROM upload, local table library, engine bump, and UX/responsiveness fixes

- Bump @valknar/vpinball-wasm to 0.3.2 (PinMAME ROM support, MsgBox fix)
- Add optional PinMAME ROM .zip upload alongside .vpx tables
- Persist uploaded tables/ROMs in IndexedDB so users don't have to
  re-upload on later visits, with a library list on the landing page
- Fix Insert Coin key mismatch with the engine's real coin-door gating
  (now bound to 4, matching the shared table scripts) and surface it
  in the controls legend and "Tap to Start" hint
- Make the landing page, staging panel, and in-game HUD responsive for
  portrait phone widths; drop the landscape hint since portrait plays fine
- Replace the separate STATS HUD toggle with an FPS row in the info panel

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N9JmzRBZenapVkFWjw9jmG
This commit is contained in:
2026-08-23 20:15:41 +02:00
co-authored by Claude Sonnet 5
parent 5b30442c4a
commit 35fb68c916
21 changed files with 472 additions and 99 deletions
+16 -3
View File
@@ -8,6 +8,11 @@ a WebAssembly build of the real [Visual Pinball](https://github.com/vpinball/vpi
## Features
- **Play any self-contained `.vpx` table** — drag a file onto the landing page, or click to browse.
- **ROM support for real-hardware ("SS") tables** — attach the table's PinMAME ROM `.zip` alongside
the `.vpx` upload; most tables don't need this.
- **A local table library** — uploads are saved in the browser (IndexedDB) so you don't have to
re-upload the same table (and its ROM) on your next visit. Nothing leaves your browser; there's
no server-side storage.
- **Demo mode** — a bundled table plays instantly with no upload required.
- **Fullscreen**, a live **FPS/stats** readout, and a **game info** panel (table name, size, load
time) in an in-game HUD styled after a pinball cabinet's coin door.
@@ -88,10 +93,11 @@ pnpm run sw:bump
| Key | Action |
| -------------- | ------------- |
| 4 | Insert coin |
| 1 | Start game |
| Enter | Launch ball |
| Left Shift | Left flipper |
| Right Shift | Right flipper |
| Enter | Plunger |
| 1 | Start game |
On touch devices, an on-screen control overlay appears automatically once a table is running.
@@ -101,12 +107,19 @@ Inherited from the underlying engine:
- Only self-contained `.vpx` tables are supported — tables that reference an external `.vbs`
script override or a `Music/` folder won't load correctly.
- No PinMAME, DOF, or FlexDMD plugin support.
- PinMAME (`VPinMAME.Controller`) ROM-driven emulation runs, but on-screen DMD/backglass output
and hands-on switch/solenoid/scoring behavior aren't yet confirmed end-to-end — see the engine's
own README for the current state. No DOF, FlexDMD, or backglass (`.directb2s`) plugin support.
ROM files are copyrighted; only supply ones you're legally entitled to use.
- The ROM `gameName` PinMAME needs is derived from the uploaded zip's filename (e.g.
`hvymetal.zip``hvymetal`) — rename the zip to match if a table doesn't recognize its ROM.
- Single-threaded (no `SharedArrayBuffer`) — performance depends on your device's single-core
WebGL2 throughput.
- Initial engine download is ~34 MB (cached after the first visit).
- Gamepad input and DMD rendering are implemented but not yet confirmed on real hardware/tables.
- Raw cabinet hardware input (real nudge/plunger boards) has no browser equivalent.
- The table library lives in the browser's IndexedDB storage — clearing site data removes it, and
it doesn't sync across browsers/devices.
## License