AI Game Dev Search

Make it feel alive: effects and sound in two prompts

Two prompts gave every jump, landing, spring, block, orb and death an on-screen reaction and a sound made in code, with gameplay identical. Play before and after, and press every sound.

Tested with Phaser 3.80.1 · Claude Code · Opus 5.5

This is the real result. Click it and play. Open full screen

What we asked“The game is silent. Add sound effects for everything that happens: jumps, landings, springs, crumbling blocks, orbs, deaths, doors and the finish, with a way to mute them. Don't change how anything plays.”

What happened

You
The chapter plays well but feels flat. Make it feel alive: every jump, landing, bounce, crumbling block, orb, death and door should react on screen. Don't change how anything plays.
  • Used the game-juice skill
  • Went through the game event by event
  • Made the physics box invisible and drew the hero as a separate picture that follows it
  • Put every size and time in one JUICE object with a switch per effect
  • Recorded the hero's position for 17,280 frames across all 24 rooms and compared with the original file
Claude
Your chapter now reacts to every event, and gameplay is unchanged: I compared position logs frame by frame against your original file and they're identical. No effect touches the hitbox, speed, timers or controls. Squash is anchored at the feet so the hero never sinks into the floor. Spikes, springs, orbs and coins are drawn above the particles. If the system is set to reduce motion, there is no shake and no flashes. One caveat: Phaser's tweens run on real time, not the game's frame clock, so under the frame-stepped test clock the squash and ring animations freeze. I took the final screenshots in real time.
You
The game is silent. Add sound effects for everything that happens: jumps, landings, springs, crumbling blocks, orbs, deaths, doors and the finish, with a way to mute them. Don't change how anything plays.
  • Used the game-sound skill
  • Wrote a recipe for each sound with the browser's audio engine: no files
  • Varied the pitch a little on jumps, landings, coins and cracks
  • Wrote tests/sound.mjs: 37 checks
  • Fixed a very quick tap of M not registering
Claude
The game has sound now: every event plays its own sound, and you can mute it. Gameplay is unchanged: the frame-exact gameplay test gives byte-identical output before and after. I couldn't listen to the sounds here, so I checked them by measuring instead. Every sound plays at an audible level without distorting, and even every sound playing three times at once doesn't distort. When muted, nothing plays.

Part 3 ended with a game that plays well and feels flat. “Juice” is the small answers a game gives to what you do: a squash when you land, a puff of dust, a bump of the camera. It adds no rules. We added two layers, each from one prompt, and each loaded its own skill: game-juice, then game-sound.

Step 7a: effects

The chapter plays well but feels flat. Make it feel alive: every jump, landing, bounce, crumbling block, orb, death and door should react on screen. Don't change how anything plays.

It took 13 minutes and $1.66. Claude went through the game event by event. Times are in milliseconds, sizes in pixels:

EventWhat happens on screen
JumpStretch to 0.8 x 1.2 and back over 150 ms; 10 dust puffs
Double jumpOne full spin in 0.26 s and a white ring in the air
LandingSquash up to 1.3 x 0.7, deeper the further you fell, and dust thrown sideways; a big drop adds a 2 px shake
SpringStretch, pink sparks, and a 3 px dip of the view
Crumbling blockCrumbs while it shakes; chunks and a 2 px shake when it falls
OrbGreen sparks and a ring; a 60 ms white flash on the hero to show the double jump is back
DeathA 70 ms freeze, then 22 pieces and a 5 px shake, and the hero pops back in
Flag40 pieces of confetti and a waving flag

Everything lives in one JUICE object at the top of the file with a switch for each kind. The key J toggles all of it while you play, ?juice=0 starts the game with it off, and if your system is set to reduce motion there is no shake or flash at all.

The proof that it changed nothing: Claude recorded the hero’s position every frame for 17,280 frames of scripted play across all 24 rooms (52 deaths, 21 spring bounces, 32 coins) and compared it with the original file. The logs are identical. One design detail made that possible: the physics box is now invisible and the hero you see is a separate picture that follows it, so squashing the picture never changes the hitbox.

Before: the chapter after part 3. Jump, land, die. Nothing reacts. Starts at Boing; the rest of the game is ahead of you if you want it.

After: the same rooms with effects and sound. Press J to turn the effects off and on, M to mute. The hero moves exactly the same either way. Starts at Boing; the rest of the game is ahead of you if you want it.

Step 7b: sound

The game is silent. Add sound effects for everything that happens: jumps, landings, springs, crumbling blocks, orbs, deaths, doors and the finish, with a way to mute them. Don't change how anything plays.

It took 9 minutes and $1.13. Every sound is made in code with the browser’s audio engine, so there are no files to download or license:

EventSound
JumpA square-wave blip rising 300 to 600 Hz in 0.12 s
Double jumpThe same, higher and shorter (450 to 900 Hz) so you can tell them apart
LandingA soft thud, louder the further you fell; tiny hops are silent
SpringA wobbly “boing”, 200 to 900 Hz
Coin and orbTwo rising notes for a coin, a brighter three-note chime for an orb
Crumbling blockA quiet crack every 0.09 s while it shakes, a rumble when it breaks
DeathA tone falling 400 to 80 Hz plus noise; the loudest everyday sound
Final flagFour rising notes, then a held, wavering high note

Jumps, landings and coins change pitch a little each time so repeats don’t sound identical, and only three copies of one sound can play at once. M or a button in the corner mutes everything, and the game remembers it. Sound starts on your first key press or click, because browsers block it before that.

Press each button to hear the game’s own recipes. They are the same code the game runs, played here without the game around it.

A soundboard we built for this page, with the game's own sound code. Turn your volume down before you press the first one.

The frame-exact mechanics test (48 checks) gives byte-identical output before and after. A new sound test passes 37 of 37: each action plays exactly its own sound, running on flat ground stays quiet, and no sound clips even with three copies at once.

What to take from this

  • “Don’t change how anything plays” is a real instruction. Both sessions turned it into a check they could run, not a promise.
  • Make every effect switchable. The J key is not a gimmick: it is how you and your players judge whether the effects help.
  • Claude couldn’t hear the sounds. Whether they sound good is yours to judge, so play it with sound on.

Get the skill: game-juice and game-sound. Next: pixel art and a hero that moves.

The skill that made it work

It tells Claude to answer every event with a small visual reaction, drawn on top, with a switch for each kind, so the game plays exactly the same.

game-juice
  1. Go through the game event by event, and give each one a squash, a puff, a flash or a shake.
  2. Put every size and time in one settings object, with a switch for each kind of effect.
  3. Never touch the hitbox, speed, timers or controls: the hero you see is a separate picture that follows the physics box.

Save it as .claude/skills/game-juice/SKILL.md in your project.

Was this useful?

Part 4 of Make a complete platformer with AI

Next in Make a complete platformer with AIPixel art and a hero that moves: from orange squares to an autumn forest
Open →