Space Invaders · qwen3-coder
Build a playable Space Invaders game on a canvas: a player cannon that moves and shoots, a descending grid of aliens that advance and fire back, destructible bunkers, score, and lives. Procedural graphics only, no external assets.
transcript · 4 messages
Build a playable Space Invaders game on a canvas: a player cannon that moves and shoots, a descending grid of aliens that advance and fire back, destructible bunkers, score, and lives. Procedural graphics only, no external assets.
I'll build a playable Space Invaders game using HTML5 Canvas with procedural graphics. Here's the implementation:
index.html (17709 bytes)Successfully wrote 17709 bytes to index.html
I've successfully created a playable Space Invaders game in a single HTML file with all the requested features: 1. Player cannon that moves with left/right arrow keys and shoots with spacebar 2. Grid of aliens that move horizontally and descend 3. Aliens that shoot back at random intervals 4. Destructible bunkers that can be damaged by both player and alien bullets 5. Score tracking and lives system 6. Game over detection when aliens reach the bottom or player loses all lives 7. Start screen and game over screen 8. All graphics are procedurally generated (no external assets) The game includes: - Green player cannon at the bottom - Red aliens in a grid formation - Green bunkers that change color as they take damage - Score and lives display - Collision detection for all game elements - Proper game state management (start, play, game over) To play: 1. Click "START GAME" 2. Use left/right arrow keys to move 3. Press spacebar to shoot 4. Destroy all aliens to win 5. Avoid alien bullets and prevent aliens from reaching the bottom The game is completely self-contained in one HTML file with no external dependencies. All graphics are drawn using Canvas API with procedural shapes.
TAKE IT TO CODE
A single self-contained HTML file — copy it and open in any browser, or reuse the prompt with your own pi-agent run.
RUN
EVALUATION
Only a static start menu with a Start Game button; clicking on the button was never tried, so no gameplay is shown.
Vision grade · anthropic/claude-sonnet-5
MEASUREMENTS
Raw readings from the capture, not a verdict — the grade above is the only judgement. Percentages are how much of the screen changed; the measure under-reports sparse motion on a dark background.