Build a polished, playable browser game: Remake of super mario bros. Make the core loop…
- User
Build a polished, playable browser game: Remake of super mario bros. 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, and a local high-score table. Style it with a cohesive visual theme and make sure it runs smoothly at 60fps on desktop and mobile.。。。。。
Assistant
I'll build a polished Super Mario Bros-style platformer. Let me first explore the project structure.
Now let me build the game. I'll start with the HTML title and CSS, then create the game engine and React UI.
Now let me add the pixel font to the HTML head.
Now the core game engine. This is the main file with all physics, rendering, and juice.
Let me fix the lint errors.
Two errors remain. Let me find the remaining
jumpingreference and the unusedctx.The engine is clean now. Let me build the React UI with all the states, HUD, touch controls, and high-score table.
Now let me build to verify everything compiles.
The build succeeds. Let me improve the win sequence so the celebration animation plays before the result overlay appears.
I need to reset
winningon restart. Let me add that.Let me improve the canvas scaling to letterbox properly across all screen sizes.
Let me add a level-progress indicator to the HUD for extra polish.
I spotted a real bug: the flag
Fcharacters sit at different columns across rows (due to uneven row lengths), which would make the goal column and pole inconsistent. Let me fix the flag handling to build a clean pole at a fixed column.The game is complete and building successfully. Let me add a subtle CRT scanline overlay for extra retro cohesion.
I've built Super Pixel Bros, a complete, polished Super Mario Bros-style platformer. Here's what it delivers:
Core gameplay (fun in the first 10 seconds)
- A hand-crafted, camera-scrolling level with ground gaps, floating platforms, coins, question blocks, breakable bricks, and patrolling goombas — with a stompable enemy and coins right near the spawn.
- Tight controls: acceleration/friction movement, variable-height jumping, coyote time and jump buffering so jumps always feel responsive, plus a run modifier for extra speed.
- Reach the animated flag pole to win, with a time bonus applied to your score.
Juicy feedback (60fps)
- Fixed-timestep 60fps engine with an accumulator (no physics drift, smooth on desktop and mobile).
- Screen shake on stomps, brick breaks, and death.
- Particle systems: dust on jumps/landings, star bursts on coins/stomps, brick debris.
- Squash-and-stretch on the hero, block bump animations, spinning coins, floating score popups, waving flag, parallax hills and clouds.
Controls
- Keyboard: Arrows/WASD to move, Space/↑/Z to jump, Shift/X to run, Esc/P to pause, Enter to start/restart.
- Touch: on-screen D-pad + A/B buttons with pointer capture, sized for thumbs.
States & systems
- Start screen with animated title, controls legend, and high-score preview.
- Score system (points for coins, stomps, blocks, time bonus), coin counter, lives (extra life every 100 coins), and countdown timer.
- Pause (resume/restart) and Game Over / Win screens with instant restart.
- Local high-score table (top 8, persisted in
localStorage) with a name-entry prompt when you place. - A live progress bar to the flag.
Theme
- Cohesive 8-bit look: "Press Start 2P" pixel font, chunky pixel-art tiles/sprites drawn procedurally on canvas, retro palette, and a CRT scanline + vignette overlay.
The project builds cleanly with
npm run build.Files built:
index.html,src/index.css,src/game/engine.ts,src/App.tsx
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.