Create Space Invaders with marching aliens, shields, UFO bonus, increasing speed, and…
- User
Create Space Invaders with marching aliens, shields, UFO bonus, increasing speed, and pixel-perfect collision.
Assistant
I'll create a Space Invaders game with all the classic features. Let me start by exploring the project structure.
Now let me build the game. I'll create the Space Invaders game using an HTML canvas with a game loop, implementing all requested features: marching aliens, destructible shields, UFO bonus, increasing speed, and pixel-perfect collision.
Let me first update the title, then create the game engine and components.
Now I'll create the sprite definitions file with pixel-art bitmaps for aliens, player, and UFO. These bitmaps are also used for pixel-perfect collision.
Now I'll create the core game engine with all logic: marching aliens, shields, UFO, increasing speed, and pixel-perfect collision.
Now the renderer that draws everything to the canvas, and the React component that runs the game loop and handles input.
Now the main App component with the game loop, keyboard + touch controls, and responsive canvas scaling.
Now let me build to verify everything compiles correctly.
The build succeeded. I've created a complete Space Invaders game with all the requested features.
What I built
A classic arcade Space Invaders rendered on an HTML canvas at a logical 224×256 resolution (scaled crisply with pixel-perfect rendering), organized across four files:
src/sprites.ts— Hand-crafted pixel-art bitmaps (0/1 grids) for all three alien types with 2 animation frames each, the player ship, the UFO, explosions, and the bunker/shield shape. These same bitmaps drive both rendering and collision.src/game.ts— The full game engine.src/render.ts— Canvas renderer with HUD, starfield, score-advance table, and overlays.src/App.tsx— React shell: game loop, responsive scaling, keyboard + touch controls.
Features implemented
- Marching aliens — 5×11 fleet in a formation that steps side-to-side, drops down and reverses at the edges, with the classic 2-frame wobble animation and three point values (30/20/10).
- Increasing speed — Movement delay shrinks as fewer aliens remain (the fleet accelerates as you clear it) and each wave starts faster, descends lower, drops more bombs, and moves in bigger steps.
- Destructible shields — 4 bunkers built from a pixel grid that gets carved away blast-by-blast by both your bullets and enemy bombs, degrading realistically.
- UFO bonus — A mystery ship periodically flies across the top; shooting it awards a random bonus (50/100/150/300) with a floating score popup.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.