Public
Remixed
Galaxian-style arcade space shooter
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.

šŸ‘¾ GALAXIAN

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.

How to play

InputAction
← → or A DMove ship
Space (or ↑ / W)Fire
On-screen buttonsTouch / 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.

Scoring

AlienColorPoints
Flagship🟔 yellow60
EscortšŸ”µ cyan40
GruntšŸ”“ red20

(Double when hit mid-dive.)

Architecture

Rendering mermaid diagram...
  • main.tsx — HTTP entrypoint; serves the static files and a /source redirect.
  • 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.