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 classic Space Invaders game with all the requested features. Let me start by exploring the project structure.
Now let me build the game. I'll create a canvas-based Space Invaders with all requested features. First, updating the title.
Now let me create the game constants and sprite data file.
Now let me create the core game engine with all the game logic (marching aliens, shields, UFO, pixel-perfect collision).
Now the renderer that draws everything to canvas.
Now the React component with the game loop, input handling, and HUD/overlays.
Now let me build to confirm everything compiles.
The build succeeded. I've created a complete, polished Space Invaders game. Here's what's included:
Features Implemented
🛸 Marching Aliens
- Classic 5×11 grid with 3 alien types (30/20/10 points), each with 2-frame walk animation
- Aliens step horizontally in unison, drop down and reverse at screen edges
- Game over if they reach the player line
⚡ Increasing Speed
- The fewer aliens remaining, the faster they march (dynamic step interval)
- Each level also boosts base speed, enemy fire rate, and bullet velocity — waves get relentless
🛡️ Destructible Shields
- 4 bunkers rendered as pixel grids
- Both player and enemy bullets erode them with a realistic blast radius, cell by cell
🌟 UFO Bonus
- Mystery ship periodically flies across the top for random bonus points (50/100/150/300)
🎯 Pixel-Perfect Collision
- Collisions test actual filled sprite pixels (not just bounding boxes) for aliens, UFO, player, and shields
- Player bullets can even cancel enemy bullets mid-air
Extra polish
- Twinkling starfield, glowing explosions, retro pixel sprites
- Full HUD (score, hi-score, level, lives), single-bullet firing rule (authentic feel)
- Start / wave-cleared / game-over overlays with score legend
- Keyboard controls (arrows/WASD + space) and on-screen touch buttons for mobile
Controls: ← → move, SPACE fire. Everything is organized across
src/game/sprites.ts(pixel data),engine.ts(game logic),renderer.ts(canvas drawing), andApp.tsx(loop, input, UI).Files built: , , , ,
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.