GALAGA

SOURCE

GALAGA

A browser remake of Namco's 1981 arcade game. The formation flies in and takes its places, a Boss Galaga stops to open its tractor beam and hauls your fighter away, and shooting that boss down wins it back as a dual fighter — the same game you remember.

Controls

Move← → or A D
FireSpace — hold it down for rapid fire · tap the screen
StartEnter or Space
PauseP
WatchG — it plays itself and cannot run out of lives
PhoneDrag to move; hold to keep firing

Only two shots may be on screen at once, as in the original — holding fire sends the next one the instant a shot leaves the screen or lands. A dual fighter gets four.

The address bar takes three options: ?stage=15 starts on that stage (0–255), ?speed=4 runs the game that many times faster, and ?god=1 starts a watch-only run that flies itself. They combine — ?god=1&speed=8&stage=20 is a fast demo from stage 20. It still dodges; it simply never runs out of lives.

Scoring

In formationIn flight
Zako (blue bee)50100
Goei (red butterfly)80160
Boss Galaga150400 / 800 / 1600
Captured fighter—1000

A boss takes two hits. The first turns it from cyan to violet. A boss that dives with escorts is worth more while they live — 400 alone, 800 with one, 1600 with two.

An extra fighter arrives at 20,000 points and every 70,000 after that.

Tractor beam & dual fighter

A boss breaks off, stops overhead and opens its beam. Get caught and your fighter is pulled up under the boss — that costs you a life.

Shoot that boss down and the captured fighter comes back for you. Touch it to merge: twice the width and twice the firepower, but twice the hitbox as well. Shoot it by mistake and you get 1000 points and lose it — a profit you did not want.

Challenging stage

Stage 3, then every fourth stage (7, 11, 15…). Forty enemies fly through and never shoot back. Each hit is worth 100, and clearing all forty pays 10,000.

Hit-miss ratio

When the game ends it reports shots fired, hits and accuracy, just like the original. Shots fired during a challenging stage are not counted.

No build step and no dependencies. The sprites are 16×16 dot patterns stored as data in the source — there is not one image file. The sound is synthesised with Web Audio on the spot.
Source · github.com/civilian7/galaga