Commit Graph

71 Commits

Author SHA1 Message Date
rshtirmer 8b3743a2bb chore(gem-catcher): add vite base path and progress notes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 16:33:22 -05:00
rshtirmer 7d2b826189 feat(gem-catcher): add Strudel BGM + Web Audio SFX with mute toggle
Step 3 of game creation pipeline: audio integration.

- BGM: Gameplay theme (130 cpm, magical night-sky arpeggios) and
  Game Over theme (60 cpm, somber descending melody) via Strudel
- SFX: 5 Web Audio API one-shot sounds (gem catch chime, skull hit
  thud, life lost alarm, difficulty up fanfare, button click)
- AudioBridge wires EventBus events to audio triggers
- Mute toggle via M key + speaker icon button (both scenes),
  persisted in localStorage
- Audio init deferred to first user interaction (autoplay policy)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-23 16:24:01 -05:00
rshtirmer a8b3e5c284 feat(gem-catcher): add visual polish — particles, screen effects, juice, and transitions
Add comprehensive visual design layer (Step 2) with:
- Particle bursts on gem catch (color-matched), skull hit (red/dark), and difficulty up (golden shower)
- Gem trail effect: colored glow particles follow gems as they fall
- Screen shake + red camera flash on skull hit
- Slow-mo (0.3x) on final death before game over transition
- Floating "+1" score text that rises and fades on gem catch
- Heart pulse/shake animation on life lost
- Basket idle bob breathing animation
- Parallax scrolling star layers (near/far speeds)
- Shooting star ambient decoration (3-8s interval)
- Score count-up animation from 0 to final on game over screen
- "NEW BEST!" pulsing indicator on new high score
- Title slide-in animation on game over
- Ambient twinkling stars on game over screen background

All new values in Constants.js (PARTICLES, EFFECTS, BACKGROUND).
No gameplay mechanics altered.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-23 16:07:52 -05:00
rshtirmer f8a92c888d feat(assets): add pixel art sprites and starfield background for gem-catcher
Replace geometric shapes with pixel art for all entities:
- Basket: 20x14 woven pattern with idle/left/right tilt frames
- Gems: 4 types (diamond, emerald, ruby, sapphire) with sparkle animations
- Skull: menacing bone-white skull with red-eyed glow animation
- Background: gradient + tiled sky overlay + twinkling stars + nebula puffs

Increased entity sizes for visibility (6% screen width for gems/skulls,
14% for basket). Added PixelRenderer with renderPixelArt/renderSpriteSheet
utilities and DARK palette.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-23 15:56:02 -05:00
rshtirmer aede0989d2 feat(gem-catcher): scaffold gem-catcher game from phaser-2d template
Implement the complete Gem Catcher game with all core mechanics:
- Player basket moves horizontally at bottom of screen (arrow keys + touch)
- Gems rain from the sky; catch them for +1 score
- Skulls also fall (15% chance); catch one to lose a life
- 3 lives with heart indicator, game over at 0 lives
- Difficulty ramp: every 10 points increases fall speed and spawn rate
- Night sky gradient background theme
- GameState tracks lives, difficulty, isMuted
- EventBus wired with GEM_CAUGHT, SKULL_CAUGHT, LIFE_LOST, DIFFICULTY_UP
- render_game_to_text() includes lives, difficulty, gem/skull counts
- GameOverScene preserves createButton() pattern, uses gameState.reset()
- Touch input: left half = move left, right half = move right

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-23 15:41:49 -05:00
Ryan Shtirmer 4cd3113774 Merge pull request #3 from glitchtrend/remove-example-menu-scenes
Remove MenuScene from example games
2026-02-23 14:55:26 -05:00
rshtirmer 4b7f874946 fix: use gameState.reset() in restartGame, add keyboard null guard
- barn-defense LevelCompleteScene: call gameState.reset() instead of
  setLevel(0) so lives/corn/wave are cleared on restart
- vampire-survivors GameScene: add optional chaining on keyboard listener
  to prevent null reference when keyboard plugin isn't loaded

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 14:50:41 -05:00
rshtirmer 7ff6a7a2ed chore: move example-game and singularity-run into examples/
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 14:20:56 -05:00
glitchtrend 932c9dea61 Address CodeRabbit review: fix audio init ordering, UIScene launches, and stranded-player bug
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 01:10:00 -08:00
glitchtrend 42a10021f3 Remove MenuScene from example games
Examples contradicted the plugin's own instructions by including
MenuScene files. Games now boot directly into gameplay as intended.

Changes per example:
- Delete MenuScene.js
- BootScene transitions to GameScene (not MenuScene)
- GameOverScene restarts to GameScene (not MenuScene)
- GameScene handles audio init on first user interaction
- Tests updated to match new boot-into-gameplay flow
- Barn-defense: removed menu/level-select buttons from
  GameOverScene and LevelCompleteScene

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 07:15:51 -08:00
rshtirmer 99b4a9681f fix(labyrinth): improve gyroscope for portrait mobile play
- Invert Z axis (tilt forward now moves ball forward, not backward)
- Screen orientation handling (remap axes in landscape/rotated)
- Better tuning: deadzone 1° (was 2°), max tilt 18° (was 30°), smoothing 0.45 (was 0.25)
- Deadzone subtraction instead of threshold (smoother near-zero response)
- Reset smoothed output on recalibrate to prevent lurching
- Portrait orientation lock attempt on game start
- Landscape warning overlay for mobile users

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 00:31:06 -05:00
rshtirmer b6eee2c0fa feat(labyrinth): complete game with mobile input, visual polish, audio, and deploy
- Move labyrinth to examples/, set GH Pages base path
- Add gyroscope, virtual joystick, and unified analog input system
- Add visual effects (particles, trails, screen flash, level transitions)
- Add procedural floor/wall textures, clouds, gem/exit animations
- Add ambient BGM (Strudel.cc) and Web Audio SFX
- Update skills/templates/commands with mobile-first guidance

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 00:22:08 -05:00
rshtirmer f1bcfeaa9f feat(barn-defense): move to examples, add homepage link, set deploy base path
Moves barn-defense tower defense game into examples/ directory alongside
other example games. Adds game card to _site homepage. Sets Vite base
path for GitHub Pages deployment.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 17:20:51 -05:00
rshtirmer 197ef28c9d feat: add pixel art backgrounds, make assets default in 2D pipeline
- Add tiled pixel art background system to game-assets skill with
  ground tile variants, decorative elements, and design rules
- Replace vampire survivors' flat grid background with pixel art:
  3 ground tile variants (dark earth with speckle), 60 scattered
  decorations (gravestones, bone piles, dead trees, skulls, candles)
- Update make-game pipeline: pixel art is now the default for all
  2D games (no longer optional), includes backgrounds and entities
- New file: src/sprites/tiles.js with 3 ground variants + 5 decorations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 16:14:10 -05:00
rshtirmer 08a39ccc1c feat(vampire-survivors): replace geometric shapes with pixel art sprites
Add code-only pixel art system using 2D color index matrices rendered
to Canvas textures at runtime. Every entity now has a recognizable
visual identity instead of colored circles.

New files:
- src/core/PixelRenderer.js — renderPixelArt() + renderSpriteSheet()
- src/sprites/palette.js — 20-color dark gothic palette
- src/sprites/player.js — 4-frame walk cycle (16x16)
- src/sprites/enemies.js — 5 enemy types with 2-frame animations
- src/sprites/items.js — XP gems (small 8x8, big 10x10)
- src/sprites/projectiles.js — magic bolt (6x6) + fireball (8x8)

Updated entities:
- Player.js — spritesheet + walk animation
- Enemy.js — per-type spritesheet + animation
- XpGem.js — pixel art diamond gems
- WeaponSystem.js — pixel art projectiles for magic wand + fireball

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 16:01:11 -05:00
rshtirmer 57422f7f24 feat: add vampire survivors example, game-assets skill, and add-assets command
- Add complete vampire survivors game (5 enemy types, 4 weapons, XP/leveling,
  wave spawning, 5-minute survival timer) with Strudel BGM and Web Audio SFX
- Add game-assets skill for pixel art sprite generation — code-only 16x16
  pixel matrices rendered to Phaser textures via Canvas, with shared palettes,
  sprite archetypes (humanoid, flying, ground, item, projectile), and animation
- Add /add-assets command for upgrading existing games from geometric shapes
  to pixel art sprites
- Update make-game pipeline with optional Step 1.5 asset style choice
  (geometric shapes vs pixel art) and dev server startup after scaffolding
- Convert flappy-bird example from TypeScript back to JavaScript
- Add _site/ to .gitignore (deployed via gh-pages separately)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 15:50:39 -05:00
rshtirmer cae89cc59d feat(flappy-bird): convert all source files from JavaScript to TypeScript
Convert the entire Flappy Bird example from JS to TS with proper type
annotations. Add tsconfig.json with strict mode, rename vite.config to
.ts, update index.html entry point, and add typescript to devDependencies.
All function parameters, return types, and class properties are properly
typed using Phaser's built-in type definitions. Constants use `as const`
for immutable config objects. Audio files use @ts-ignore for untyped
@strudel/web imports.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-30 12:55:59 -05:00
rshtirmer f8ff690152 feat: add improve-game command, fix audio, and polish flappy bird 2D
- Add /improve-game slash command for iterative game improvement with
  8-dimension scoring, ranked improvement plans, and focus areas
- Fix async audio init in both 2D and 3D games (await initStrudel)
- Fix eventBus.clear() destroying AudioBridge listeners in 2D game
- Wire buttonClickSfx in both games
- Add fullscreen responsive layout with sky-gradient page background
- Add parallax depth layers (far mountains, near hills, scrolling ground)
- Add bird squash/stretch on flap and death spin animation
- Add difficulty progression (shrinking gaps, faster pipes, sunset sky)
- Add medal system (bronze/silver/gold/platinum) on game over screen
- Add title screen entrance animations (bounce, fly-in, fade)
- Update tests for two-tap audio init flow and new visual snapshots

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 16:07:19 -05:00
rshtirmer 1a0aec1e99 feat: add 3D flappy bird example and deploy step to make-game pipeline
New example game: flappy-bird-3d (Three.js) with bird physics, pipe
obstacles, particles, camera shake, Strudel audio, and 16 Playwright
tests. Added Step 6 (GitHub Pages deploy) to make-game command so the
full pipeline goes from empty folder to live URL.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:57:09 -05:00
rshtirmer 1a44fac3ac feat: add template-based make-game, flight simulator example, and improved audio skill
Replace /new-game with /make-game which copies runnable starter templates
(Phaser 2D and Three.js 3D) instead of generating files from scratch.

Add flight simulator as a second example game demonstrating the full
make-game pipeline: scaffold, visual design, audio, QA tests (16 Playwright),
and architecture review fixes.

Fix SFX looping bug in game-audio skill — SFX now use Web Audio API
directly instead of Strudel (which loops continuously). Update flappy-bird
example with the same fix.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 13:15:03 -05:00
rshtirmer bd6f5149d1 init 2026-01-28 18:29:15 -05:00