@web-engine-dev/space-shooter
Example space shooter game built with the Web Engine. Demonstrates core engine features including ECS, rendering, physics, input, audio, and particle systems in a complete playable game.
Play
bash
# From monorepo root
pnpm --filter @web-engine-dev/space-shooter devFeatures Demonstrated
- Entity-Component-System: Game entities composed from reusable components
- Input System: Keyboard and gamepad controls with action mapping
- 2D Physics: Collision detection for bullets, enemies, and pickups
- Sprite Rendering: Animated sprite sheets with batch rendering
- Particle Effects: Explosions, engine trails, bullet impacts
- Audio: Spatial sound effects and background music
- UI: Score display, health bar, game-over screen
- Camera: Smooth camera follow with screen shake on explosions
- Object Pooling: Bullet and particle recycling for zero-allocation gameplay
- State Management: Menu → Playing → Paused → Game Over state machine
Game Architecture
┌──────────────────────────────────────────┐
│ Game Systems │
├──────────────────────────────────────────┤
│ PlayerControlSystem │ EnemyAISystem │
│ WeaponSystem │ WaveSpawner │
│ CollisionSystem │ ScoreSystem │
│ ScreenShakeSystem │ PowerUpSystem │
├──────────────────────────────────────────┤
│ Engine Runtime │
├──────────────────────────────────────────┤
│ ECS │ Input │ Physics │ Renderer │ Audio│
└──────────────────────────────────────────┘Controls
| Input | Action |
|---|---|
| Arrow keys / WASD | Move ship |
| Space | Fire weapon |
| P | Pause |
| ESC | Menu |
Assets
Uses Kenney's space shooter assets (CC0 license) located in temp/kenney_space-shooter-redux/.
Dependencies
@web-engine-dev/engine— Full engine umbrella package@web-engine-dev/ecs— Entity-Component-System@web-engine-dev/input— Input handling@web-engine-dev/physics2d— 2D collision detection@web-engine-dev/sprites— Sprite rendering@web-engine-dev/particles— Visual effects@web-engine-dev/audio— Sound playback@web-engine-dev/ui— HUD elements