A playable browser port of K9DTV/space-wars-tang-primer-20k: the Space Wars-style game that runs on the Sipeed Tang Primer 20K Dock + 5" 800x480 RGB LCD.
This is not a Gowin bitstream and not cycle-accurate HDL. It is the same game loop in TypeScript so you can show and play it without the FPGA tools or the board.
HDL baseline: version 1.01.DONE (final GW2A-18 board release - chip full; DIP5 test when down; timer max 59:59; finer AI facing; CFG_SHIP_MAXV = 10).
Run locally
npm install
npm run dev
Then open the printed URL (default http://127.0.0.1:43127). Production build:
npm run build
npm run preview
Controls
| Dock | Keyboard | On-screen |
|---|---|---|
| S1 left | A / <- |
Diamond |
| S2 right | D / -> |
Wedge |
| S3 thrust | W / ^ |
Thrust |
| S4 fire | Space / K |
Fire |
| S0 hyperspace | Shift / H / Z |
Hyper |
| DIP5 test (toggle) | 5 / T |
DIP5 |
On boot the board (and this sim) runs an attract demo: both ships are AI. Press Fire to start a 1:30 match. Press DIP5 (5 / T) to toggle attract test mode (fly the Diamond; AI frozen; Fire shoots instead of starting). Press again to leave test. Match start clears test mode. (On the Dock, DIP5 is a physical switch that stays up/down.)