Skip to content

Add Space Invaders Nouveau: a full PWA recreation with Art Nouveau st…#347

Open
rubyrayjuntos wants to merge 2 commits into
huggingface:mainfrom
rubyrayjuntos:claude/space-invaders-art-nouveau-9u4yia
Open

Add Space Invaders Nouveau: a full PWA recreation with Art Nouveau st…#347
rubyrayjuntos wants to merge 2 commits into
huggingface:mainfrom
rubyrayjuntos:claude/space-invaders-art-nouveau-9u4yia

Conversation

@rubyrayjuntos

Copy link
Copy Markdown

…yling

Implements the complete spec: requestAnimationFrame game loop with a finite-state machine (attract/play/game-over), hive-mind alien swarm with hardware-accurate speed-up, deterministic Rolling/Plunger/Squiggly alien firing patterns, hidden shot-count-based UFO scoring table, and pixel-level destructible bunkers via off-screen canvas + ImageData.

Reskins the classic in a gilded, jewel-toned Art Nouveau visual language (vector-drawn stained-glass aliens, whiplash-curve backdrops, ornamental frame) with all sound effects procedurally synthesized via the Web Audio API rather than sampled. Includes mobile touch controls gated on pointer:coarse, a web app manifest, and a cache-first service worker for offline play.

…yling

Implements the complete spec: requestAnimationFrame game loop with a
finite-state machine (attract/play/game-over), hive-mind alien swarm
with hardware-accurate speed-up, deterministic Rolling/Plunger/Squiggly
alien firing patterns, hidden shot-count-based UFO scoring table, and
pixel-level destructible bunkers via off-screen canvas + ImageData.

Reskins the classic in a gilded, jewel-toned Art Nouveau visual language
(vector-drawn stained-glass aliens, whiplash-curve backdrops, ornamental
frame) with all sound effects procedurally synthesized via the Web Audio
API rather than sampled. Includes mobile touch controls gated on
pointer:coarse, a web app manifest, and a cache-first service worker for
offline play.
Copilot AI review requested due to automatic review settings July 3, 2026 12:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a complete, dependency-free Space Invaders “Nouveau” Progressive Web App under space-invaders/, including an offline-capable service worker, web app manifest, and a full Canvas/WebAudio implementation with a finite-state game loop.

Changes:

  • Introduces a finite-state-machine game loop (attract/play/game-over) with core gameplay entities (swarm, player, bullets, bunkers, UFO) and collision handling.
  • Adds a full Art Nouveau rendering layer (vector-drawn sprites, background, ornamental frame) plus procedural sound synthesis via Web Audio.
  • Implements PWA packaging: manifest.webmanifest, cache-first sw.js, icons, and a static index.html + CSS UI including touch controls.

Reviewed changes

Copilot reviewed 23 out of 27 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
space-invaders/index.html Game shell markup (HUD/canvas/touch controls) and module entrypoint.
space-invaders/css/style.css Responsive styling and touch-control layout for mobile.
space-invaders/manifest.webmanifest PWA metadata (name/theme/icons/scope).
space-invaders/sw.js Cache-first service worker and precache list for offline play.
space-invaders/README.md Local run instructions and control summary.
space-invaders/icons/icon.svg App icon (SVG).
space-invaders/js/game.js Main game orchestration, RAF loop, and state machine wiring.
space-invaders/js/constants.js Centralized gameplay/rendering constants and palette.
space-invaders/js/input.js Unified keyboard/touch input handler with edge-triggered fire.
space-invaders/js/audio.js Procedural SFX generation and playback manager.
space-invaders/js/render.js Canvas rendering for aliens/explosions/background/frame.
space-invaders/js/collision.js Broad/narrow-phase collisions + effects and bullet resolution.
space-invaders/js/state/stateMachine.js Minimal state machine for attract/play/game-over flow.
space-invaders/js/state/attractState.js Title/legend screen and new-game transition.
space-invaders/js/state/playState.js Core gameplay update/render and wave/life transitions.
space-invaders/js/state/gameOverState.js Game-over screen, delay, and restart transition.
space-invaders/js/entities/alien.js Alien model (type/points/size).
space-invaders/js/entities/swarm.js Swarm hive-mind movement, stepping cadence, and rendering.
space-invaders/js/entities/alienFireController.js Deterministic-pattern alien firing controller.
space-invaders/js/entities/player.js Player movement, firing, and vector-rendered ship.
space-invaders/js/entities/bullet.js Player/alien bullet behavior and rendering.
space-invaders/js/entities/bunker.js Offscreen-canvas bunkers with pixel-destructible damage.
space-invaders/js/entities/explosion.js Lightweight explosion particle entity.
space-invaders/js/entities/mysteryShip.js UFO spawn/loop and shot-count-based scoring.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread space-invaders/index.html
<canvas id="game-canvas" width="224" height="256"></canvas>
</div>

<div id="touch-controls" aria-hidden="true">
Comment on lines +21 to +24
reset() {
this.timer = 0;
this.nextInterval = this._randomInterval();
}
Comment on lines +11 to +23
transition(name) {
if (this.current && this.states[this.current].exit) this.states[this.current].exit();
this.current = name;
if (this.states[this.current].enter) this.states[this.current].enter();
}

update(dt) {
this.states[this.current].update(dt);
}

render(ctx) {
this.states[this.current].render(ctx);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants