Space combat and arcade shooters (vertical and horizontal shmups, Asteroids-likes, twin-stick space shooters). Player ship movement and firing, weapon upgrades, enemy formations and flight paths, waves and bosses, bullets that read well, hitboxes, scoring and multipliers, scrolling starfields, screen-space bounds, touch controls with auto-fire, and a starter plan from the projectile, wave, pool...
Download skill (.zip) Files on GitHubSpace shooter development
Core: move, shoot, dodge, power up, survive waves and bosses.
Starter template
A playable starter for the game-scaffolding template is in assets/starter/. Waves in formations (line, V, sine), enemy aimed shots, a twin-shot player, lives with invulnerability, explosions, screen shake, a starfield and a win after the last wave. Waves are data in config.js.
python3 <game-scaffolding>/scripts/scaffold.py my-game --title "My Game" --starter <this skill>/assets/starter
Controls: Arrows/WASD or mouse drag; hold Space to fire. Touch: stick plus auto-fire. Esc pauses. All numbers to tune are in src/config.js; the gameplay is in src/scenes/play.js.
Hits, scoring and wave progression were checked with an aiming bot.
Structure
Play scene: player ship, player bullets pool, enemies pool, enemy bullets pool, wave director, power-ups, starfield, HUD.
Collisions through a spatial grid with layers (collision-detection LAYER).
Growing the starter (tested modules)
- Ship:
topDown()(player-movement) clamped to the screen; slightly slower when firing for precision. - Firing: cooldown +
spread()levels (projectile-system); pooled bullets (game-object-pooling). - Enemies: formations entering on paths (Bézier or sine), then attack patterns;
leadAnglefor aimed shots. - wave-spawning director with scripted early waves, a boss every 5 waves (boss-battles).
- Power-ups (spread, rapid, shield, bomb) with power-up-system; explosions with particle-effects.
- Starfield: 3 layers of dots at different speeds (parallax-backgrounds idea).
Readability
- Player hitbox tiny (a few px, shown as a dot when focusing); enemy bullets bright, outlined, slower than player bullets.
- Player bullets don’t hide enemy bullets (lower alpha, different color).
- Big screen-clearing bomb as a panic button (limited).
Numbers
| Thing | Value |
|---|---|
| Player speed | 250–350 px/s |
| Fire rate | 8–12 shots/s |
| Enemy bullet speed | 120–250 px/s |
| Wave length | 20–40 s |
Controls
Touch: drag anywhere to move (ship follows the finger with an offset so it isn’t hidden), auto-fire. Keyboard: arrows/WASD + auto-fire or Space.
Pitfalls
Bullets that blend into the background, instant-death from off-screen, too many simultaneous bullets for phones (cap and pool), and difficulty from bullet speed instead of patterns.