A complete side-scrolling shooter game built with Phaser 3 and TypeScript, featuring procedural assets, deterministic gameplay, and a comprehensive tuning system.
- Side-scrolling shooter gameplay inspired by R-Type
- Procedural graphics - all assets generated at runtime using Phaser Graphics
- Deterministic RNG - seeded random number generator for reproducible gameplay
- Complete game systems - player, enemies, bullets, power-ups, boss battles, shields
- HUD overlay - score, lives, weapon tier, bombs, shields, timer
- Pause system - pause/resume functionality
- Audio system - procedural WebAudio sound effects
- Object pooling - efficient memory management
- Balancing system - centralized tuning hub for all game parameters
The game currently uses procedural (runtime-generated) assets. To use real sprite assets:
- See ASSETS_SETUP.md for detailed instructions
- Quick links: DOWNLOAD_LINKS.md
- After downloading, use the organize script:
node scripts/organize-assets.mjs <download-path> <asset-type>
- Build assets:
npm run assets:build
- Node.js 18+ and npm
npm installStart the development server:
npm run devThe game will open in your browser at http://localhost:3000.
Build for production:
npm run buildPreview the production build:
npm run previewRun unit tests:
npm run testLint the code:
npm run lintFormat the code:
npm run format- WASD / Arrow Keys: Move player ship
- Space: Fire (hold for charge shot)
- B: Use bomb
- N: Activate shield (5 seconds of invincibility)
- ESC: Pause/Resume
- R: Re-seed (on menu screen)
- Player: Move with WASD/arrows, fire with Space
- Charge Shot: Hold fire button for 600ms to unleash a powerful charged shot
- Weapon Tiers: Collect weapon power-ups to upgrade your firepower (3 tiers)
- Bombs: Clear screen of enemies and bullets (limited supply)
- Lives: Start with 3 lives, collect health power-ups to restore
- Boss: Face off against a multi-phase boss at 90 seconds
The game uses a deterministic random number generator for reproducible gameplay. To change the seed:
- On the menu screen, press R to generate a new random seed
- Or modify
src/config/constants.tsto change thedefaultSeedvalue - The seed is displayed on the menu screen
src/
config/ - Game constants and configuration
entities/ - Game entities (Player, Enemy, Bullet, Boss, etc.)
scenes/ - Phaser scenes (Boot, Preload, Menu, Game, HUD, Pause)
systems/ - Game systems (Input, Collision, Spawner, Audio, etc.)
ui/ - UI utilities (bitmap font generation)
utils/ - Utility functions (math, events)
tests/ - Unit tests
styles/ - CSS styles
The game supports both procedural (runtime-generated) and pre-built assets:
- All assets are generated at runtime if atlas/audio files are missing
- Works immediately without any asset setup
- Drop PNG files in
assets/raw/sprites/and WAV files inassets/raw/audio/ - Run
npm run assets:buildto generate atlases and audio sprites - The game will automatically use these when available
See docs/ASSETS.md for detailed asset management guide.
assets:clean- Clean generated assetsassets:svg- Optimize SVG filesassets:atlas- Generate sprite atlasesassets:opt- Optimize atlas imagesassets:audio- Pack audio spritesassets:build- Run all asset buildsassets:watch- Watch for changes and rebuild
See DesignTweaks.md for detailed tuning information.
All game balance values are centralized in src/systems/Balancer.ts. This includes:
- Player speed, HP, fire rates
- Enemy HP, speeds, spawn schedules
- Power-up drop rates
- Boss configuration
- Weapon specifications
See DesignTweaks.md for a complete guide to balancing.
- Phaser 3.70+: Game framework
- TypeScript: Type-safe development
- Vite: Build tool and dev server
- Vitest: Unit testing
- ESLint + Prettier: Code quality
- seedrandom: Deterministic RNG
- howler: Audio playback
- simplex-noise: Procedural noise generation
- sat: Collision detection (SAT)
- bezier-easing: Animation curves
- colord: Color utilities
- phaser3-rex-plugins: UI and utility plugins
- zod: Schema validation
- tone: Audio synthesis (optional)
- spritesheet-js: Atlas generation
- sharp: Image processing
- audiosprite: Audio sprite packing
- svgo: SVG optimization
This project is provided as-is for educational purposes.