Build a polished, playable browser game: Spiderman. Make the core loop fun within the…
- User
Build a polished, playable browser game: Spiderman. Make the core loop fun within the first ten seconds, with tight controls for both keyboard and touch, and juicy feedback — screen shake, particle effects, and satisfying animations. Include a start screen, a score system, pause and game-over states with instant restart. Style it with a cohesive visual theme and make sure it runs smoothly at 60fps on desktop and mobile.
Assistant
I'll build a Spiderman web-swinging game — hold to shoot a web and swing, release to fly, chain swings for momentum, collect orbs, don't hit the street. Let me look at the project structure first.
Now the React shell with HUD and overlay screens:
Now update
index.html(title, font, mobile meta) andindex.css(theme font, animations):Web Slinger is built and ready to play. 🕸️
What you get
Core loop (fun in the first 10 seconds) — You spawn already flying forward with anchor points glowing right ahead. Hold (mouse, touch, or Space/W/↑) to fire a web and pendulum-swing, release at the top of the arc for a momentum boost and soar. The physics are a real rope constraint (fixed 120Hz timestep) with a swing "pump" so chaining swings feels tight and skill-based — release timing directly controls height and speed.
Juice everywhere:
- Screen shake on web attach, orb pickups, close calls, and a big slam on death
- Particles: web-hit sparks, expanding rings, golden orb bursts, a 70-piece death explosion, plus a red motion trail and speed lines at high velocity
- Slow-motion + red flash on death, glowing web rope, twinkling stars, blinking antenna lights
- WebAudio synth SFX: "thwip" on attach, whoosh on release, pitch-rising collect chimes that climb with your combo, and a bass crash on death
Score system — points for distance, orbs worth ×combo multipliers (up to ×10), and "CLOSE CALL +100" bonuses for skimming the deadly street glow. Best score persists in localStorage with a "NEW BEST" celebration.
Full state machine — Comic-style start screen with a swinging title, pause (P/Esc or touch button, auto-pauses on tab blur), and a "WASTED!" game-over screen with instant restart (tap anywhere, Space, or R).
Performance — Single canvas, devicePixelRatio capped at 2, deterministic hash-based infinite city (3 parallax layers, zero allocation for buildings), capped particle pool, and pruned off-screen entities — smooth 60fps on desktop and mobile, fully responsive with
touch-action: noneand no overscroll bounce.Theme — Cohesive dusk-city palette (deep indigo → sunset orange), Spidey red/blue hero with animated swing poses and mask eyes, and the Bangers comic font across all UI panels.
Files built:
src/game/engine.ts,src/App.tsx,index.html,src/index.css
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.