Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data ā all from the browser, and deployed in milliseconds.
A Galaxian-style arcade space shooter, built with vanilla JS + HTML Canvas on Val Town. Aliens hold a swaying formation, then peel off and dive-bomb your ship in classic Galaxian fashion. Pure procedural pixel-art sprites and synthesized WebAudio sound ā no external image or audio assets.
| Input | Action |
|---|---|
ā ā or A D | Move ship |
Space (or ā / W) | Fire |
| On-screen buttons | Touch / mobile controls |
- Shoot aliens for points. Aliens shot while diving are worth double.
- Clear all aliens to advance to the next level (dives get faster each level).
- You start with 3 lives and earn a bonus life at 5,000 points, then every 8,000 after. High score is saved in your browser.
| Alien | Color | Points |
|---|---|---|
| Flagship | š” yellow | 60 |
| Escort | šµ cyan | 40 |
| Grunt | š“ red | 20 |
(Double when hit mid-dive.)
Rendering mermaid diagram...
main.tsxā HTTP entrypoint; serves the static files and a/sourceredirect.game/main.jsā game loop, state machine (menu ā playing ā dying ā game over), formation + dive scheduling, collisions, scoring.game/entities.jsāPlayer,Alien(formation / diving / returning states with bezier dive paths),Bullet,Explosion.game/sprites.jsā all sprites drawn from small character grids, no images.game/starfield.jsā three-layer parallax starfield.game/audio.jsā synthesized arcade sound effects.game/input.jsā keyboard and on-screen touch controls.
Built on the basic-html-starter template.