A Space Invaders clone built with PixiJS and React.
- React 18.2
- PixiJS 7.3 (via @pixi/react 7.1)
- TypeScript 5.7
- Vite 6.1
- Zustand 4.x
The game uses a modern, functional architecture:
- Entities are composed of reusable components (Sprite, Movement, Explosive)
- Each component handles a specific aspect of entity behavior
- Pure functions for component operations
- Component-based architecture for flexible game logic
- Dedicated stores for each entity type (player, enemies, missiles)
- Clean separation of concerns between game elements
- Predictable state updates using Zustand
- Each store manages its own initialization and cleanup
- Collision checking between game entities
- Entity factory for creating game objects
- Component utilities for common operations
- Sprite management and texture handling
- Left/Right Arrow: Move ship
- Space: Fire missile
- Shift: Boost speed
- Backtick (`): Toggle performance stats
pnpm dev
- Start development serverpnpm build
- Build for productionpnpm preview
- Preview production build
- Code by @crisu83
- Music by Ian Aisling