I'll build a polished slime-crushing game. Let me start by exploring the project structure.
Now let me build the game. Starting with the audio engine and storage utilities.
Now the core game engine — the biggest piece.
Now the HUD component with direct DOM updates for 60fps performance.
Now the main App component tying everything together, plus the theme CSS.
Let me refine a few gameplay details — armored slimes, pause freeze, and spawn pacing.
Adding a camera zoom-punch for extra impact:
Adding a fading in-game hint for first-time players:
The build is clean. Let me do a final verification of the touch controls and overall structure:
The game is complete and building cleanly. Here's what I built:
🟢 SLIME STOMP
Core loop (fun in ~3 seconds): Three slimes are already surfacing the moment you hit PLAY. Walk over one and it explodes into goo with a screen-shake, freeze-frame, zoom-punch, and rising score popup. Chain squishes within 2.3s to build a multiplier up to ×9.
Architecture
| File | Role |
|---|
src/game/engine.ts | Canvas 2.5D engine — projection, physics, spawning, particles, all rendering |
src/game/audio.ts | Procedural WebAudio synth (squish, slam, gold jingle, hurt) — zero assets |
src/game/storage.ts | localStorage top-8 high-score table |
src/components/Hud.tsx | Ref-driven HUD (writes DOM directly, no React re-renders during play) |
src/components/Screens.tsx | Start / Pause / Game-over overlays + score table |
src/components/TouchControls.tsx | Dynamic thumbstick + slam zone |
Gameplay
- 5 slime types: Blob (10), Zippy (20), Armored (40, shell shrugs off a single step and knocks you back), Golden (120 +3s), and Spiky — step on it and you lose a heart, so you must ground-slam it instead.
- Slimes telegraph with cracking ground, emerge from real holes, wobble on a spring, eye-track the player, then sink back if missed (combo break).
- Ground slam (Space / tap right / mouse click) hops and crashes down, sending a shockwave that kills in a staggered ripple outward from you.
- 60s timer, 3 hearts, 12 difficulty levels with rising spawn rate and nastier mixes; gold and 10-chains buy back time.
Juice
Trauma-based screen shake with rotation, camera zoom-punch, hit-stop freezes, gooey particles that bounce once and leave fading floor stains, expanding shock rings, sparks, run dust, colored full-screen flashes, hurt vignette, red heartbeat pulse under 10s, squash-and-stretch on both player and slimes, and a trailing scarf on the character.
Controls & states
WASD/arrows + Space + P/Esc pause + R/Enter instant restart; on mobile a dynamic left-thumb joystick and a SLAM button, with auto-pause when the tab loses focus. All rendering is one canvas with a pre-rendered floor layer and pooled/compacted arrays to hold 60fps on phones.
Files built: src/game/audio.ts, src/game/storage.ts, src/game/engine.ts, src/components/Hud.tsx, src/components/Screens.tsx, src/components/TouchControls.tsx, src/App.tsx, src/index.css, index.html