Yes. Copy/paste this full detailed prompt
You are an expert HTML5 game developer, retro platformer designer, pixel artist, chiptune composer, mobile web optimization engineer, and deployment engineer.
Build a complete, playable, mobile-friendly browser platformer game.
IMPORTANT:
Do not use the old game title. Create a new original title yourself, or use [GAME_TITLE] as a placeholder until the owner chooses a name.
The game must be an original late-NES cartoon platformer homage. It should capture the feel of a fast 1991 NES-style hop-and-bop platformer: responsive controls, bright cartoon pixel art, black outlines, cheerful energy, bottom HUD, tight jump physics, collectible carrots, balloons with items, hidden routes, helper characters, and pattern-based bosses.
Everything must be original:
- original game title
- original hero
- original helpers
- original enemies
- original bosses
- original levels
- original maps
- original sprites
- original music
- original sound effects
- original UI
- original story
Do NOT copy any existing copyrighted game, character, map, sprite, music, sound effect, logo, level layout, enemy design, boss design, or title.
The game can be inspired by the general feeling of late-NES cartoon platformers, but it must be legally distinct.
PROJECT GOAL:
Create a complete 5-world, 5-boss NES-style browser platformer that runs online as a static website, works on desktop and mobile, and feels like an authentic early-1990s console platformer rebuilt with modern web tools.
TECH STACK:
Use:
- TypeScript
- Vite
- HTML5 Canvas2D
- Web Audio API
- CSS for responsive layout
- No backend
- No database
- No login system
- No Unity
- No Godot
- No Phaser unless absolutely necessary
- No external image assets required
Prefer a custom small game engine using Canvas2D instead of a large framework. The game should use deterministic fixed-step physics, custom pixel rendering, generated sprites, generated tiles, and generated NES-style audio.
The project must run with:
npm install
npm run dev
npm run build
The final build must output a static dist/ folder that can be deployed to:
- Cloudflare Pages
- Cloudflare Workers static assets
- Netlify
- Vercel
- GitHub Pages
- any normal static web host
DELIVERABLES:
Create a complete runnable project with:
/package.json
/tsconfig.json
/index.html
/README.md
/src/config.ts
/src/types.ts
/src/main.ts
/src/utils/pixelTextureFactory.ts
/src/data/palettes.ts
/src/data/sprites.ts
/src/data/tiles.ts
/src/data/music.ts
/src/data/levels.ts
/src/systems/PhysicsTuning.ts
/src/systems/InputManager.ts
/src/systems/TouchControls.ts
/src/systems/SaveSystem.ts
/src/systems/LevelLoader.ts
/src/systems/AudioEngine.ts
/src/entities/Player.ts
/src/entities/Enemy.ts
/src/entities/Collectible.ts
/src/entities/Boss.ts
/src/scenes/SceneManager.ts
/src/scenes/TitleScene.ts
/src/scenes/MapScene.ts
/src/scenes/GameScene.ts
/src/scenes/EndingScene.ts
The project must be complete, not just a demo.
GAME FORMAT:
Use a NES-like screen format.
Internal resolution:
- 256x240 total
- 256x192 gameplay viewport
- 48px bottom HUD band
Rendering:
- Canvas must scale to fit the browser window
- Preserve 4:3 aspect ratio
- Use nearest-neighbor scaling
- Use image-rendering: pixelated
- Disable antialiasing
- No HD blur
- No modern glow effects
- No vector-looking art
- No smooth skeletal animation
- No shader effects
- Pixel art must look hand-made and readable
CSS:
- Full-screen black background
- Center the canvas
- Letterbox/pillarbox when needed
- Work on desktop and mobile
- Respect safe-area insets on phones
- Prevent page scroll/zoom while playing
VISUAL STYLE:
The game should look like a bright late-NES cartoon platformer.
Use:
- bold black outlines
- bright sky colors
- readable silhouettes
- chunky pixel shapes
- limited palettes
- 16x16 tiles
- 16x24-ish hero sprite
- 32x32 to 64x48 boss sprites
- simple but expressive animation frames
- colorful environments
- bottom HUD with pixel-font styling
Avoid:
- realistic art
- modern vector art
- over-detailed textures
- dark muddy palettes
- AI-photo-looking sprites
- gradients
- antialiased curves
- copyrighted-looking characters
ART GENERATION:
Generate all sprites and tiles in code using Canvas2D pixel drawing.
Use a pixel texture factory that:
- creates small offscreen canvases
- draws pixel rectangles
- scales them cleanly
- applies optional top-lit/bottom-shadow pixel shading
- creates mirrored versions of sprites
- creates tile and sprite variants
- avoids antialiasing
All game art should be generated at boot from code:
- hero
- helpers
- enemies
- bosses
- items
- balloons
- carrots
- terrain tiles
- trees
- bushes
- clouds
- water
- waterfalls
- HUD icons
- title logo letters
- particles
MAIN HERO:
Create one original small human platform hero.
Visual:
- fair skin
- short light-brown hair
- neat faded side cut
- black sleeveless shirt
- dark gray pants
- black shoes
- big readable head
- small athletic body
- serious/focused face
- cute but not childish
- original human character, not an animal, not copied from any existing game
Sprite:
- about 16x24 pixels
- strong black outline
- readable face
- visible hair block
- sleeveless arms
- dark outfit
- clear feet
- clear direction/facing
- must look good at 2x, 3x, and phone scale
Hero animations:
- idle
- blink idle
- walk/run
- jump
- fall
- skid
- duck/squat
- slide
- swim
- hurt
- victory
- small portrait for HUD
Important:
The duck/squat animation must make the hero visibly squat down. The knees should bend, the body should lower, and the arms should brace. Do not simply shrink the sprite vertically. It should look like a deliberate crouch.
Do not redraw the hero as a realistic person or portrait. Keep him as a simple readable NES-style pixel hero.
CORE GAMEPLAY:
Make a side-scrolling hop-and-bop platformer.
The player should:
- run through levels
- jump on enemies to defeat them
- collect carrots
- pop balloons to reveal items
- avoid pits
- avoid spikes
- swim in water levels
- slide down slopes
- duck under hazards
- enter hidden shop doors
- collect golden frames from bosses
- unlock the ending after all golden frames
Gameplay must feel fast, responsive, and fair.
The game should include:
- 5 worlds
- 3 acts per world
- 5 bosses
- helper selection
- save data
- options
- mobile controls
- gamepad support if feasible
- original music
- original sound effects
- full ending
CONTROLS:
Desktop keyboard:
- Arrow keys or WASD = move
- Down = duck
- Z / K / A = jump
- X / S / L = run or special
- Enter = start / pause
- Escape = pause
- F1 = debug overlay
Gamepad:
- D-pad or left stick = move
- South / east button = jump
- West / north button = run or special
- Start = pause
Mobile touch:
- D-pad on lower left
- A button on lower right for jump
- B button on lower right for run/special
- Pause button top right
- Buttons large enough for thumbs
- Multi-touch must work
- Player must be able to hold right and press jump at the same time
- Player must be able to hold run and jump at the same time
- Prevent page scrolling
- Prevent pinch zoom
- Prevent double-tap zoom
- In portrait mode, keep the game playable if possible, but landscape should be best
PHYSICS:
Use a fixed 60 FPS simulation step.
Do not move using variable frame delta directly.
Use an accumulator loop:
- fixed update at 1/60
- render once per animation frame
- if the app falls too far behind, drop excess steps to avoid spiral-of-death
Create a central TUNING object in src/systems/PhysicsTuning.ts.
Use these starting values:
gravity: 900
gravityFallMultiplier: 1.05
maxWalkSpeed: 82
maxRunSpeed: 128
groundAcceleration: 1500
airAcceleration: 850
groundFriction: 2200
airFriction: 80
jumpVelocity: -315
jumpHoldGravityMultiplier: 0.45
jumpHoldMaxMs: 160
shortHopCutVelocity: -145
coyoteTimeMs: 70
jumpBufferMs: 90
stompBounceVelocity: -255
stompHighBounceVelocity: -340
stompHighBounceRequiresJumpHeld: true
hurtInvulnMs: 1400
postStompInputLockMs: 40
slideInitialSpeed: 150
slideDurationMs: 420
slideFriction: 450
duckHitboxHeight: 14
normalHitboxWidth: 12
normalHitboxHeight: 20
enemyStompForgivenessPx: 7
terminalVelocity: 420
slopeSnapPx: 5
Water physics:
waterGravity: 220
waterSwimImpulse: -130
waterMaxSpeed: 60
waterTerminal: 90
waterExitJump: -280
Glider helper:
glideGravity: 160
glideMaxFall: 55
gliderRunSpeed: 118
gliderSwimImpulse: -165
gliderWaterMaxSpeed: 84
Spin helper:
spinDrainPerSec: 65
spinRechargePerSec: 30
spinRechargeDelayMs: 600
spinJumpVelocity: -285
spinWindupMs: 80
Climber helper:
wallSlideSpeed: 25
wallHopVelocity: -240
wallJumpVelocityY: -300
wallJumpVelocityX: 140
POW:
powMax: 100
Whirlpool:
whirlpoolCost: 25
whirlpoolSpeed: 140
whirlpoolLifeMs: 900
Player physics requirements:
- immediate jump on press
- variable jump height
- short hop on early release
- coyote time
- jump buffering
- strong ground friction
- light air control
- running
- ducking
- sliding
- downhill slide boost
- skidding effect when changing direction at speed
- stomp bounce
- higher stomp bounce when jump is held
- hurt invulnerability
- water swimming
- underwater jump/swim impulse
- water exit jump
- wall cling for climber
- glide for glider
- spin attack for spinner
- POW drain/recharge
Collision:
- tile-based collision
- resolve horizontal then vertical
- support solid tiles
- support cracked blocks
- support slopes
- support one-way platforms
- support spikes
- support water
- support pits/death below level
- support moving platforms if possible
Important slope fix:
When snapping to slopes, check rows [-1, 0, 1] around the player feet. If you only check current and lower rows, walking uphill can wedge the player into slope fill. Slope walking must work smoothly uphill and downhill.
Stomp detection:
Use the previous frame’s feet position plus a small forgiveness distance. Do not require pixel-perfect overlap. The player should be able to stomp enemies fairly even when moving fast.
HELPER SYSTEM:
At the start of each world/level, show a helper selection screen.
The player always begins as the main hero.
The selected helper is only activated after collecting a yellow Swap Star balloon hidden in the level.
Collecting another Swap Star toggles back to the main hero.
Do not allow free helper switching from pause.
Helper 1: Glider Kid
Role:
- easier platforming
- better water control
- safer long jumps
Abilities:
- hold jump while falling to slow fall
- lower fall gravity
- capped glide fall speed
- better swim impulse
- faster swim speed
Weakness:
- slightly lower run speed than main hero if needed
Helper 2: Spin Kid
Role:
- combat and destructible routes
Abilities:
- B button spin attack
- spin can defeat enemies from the side
- spin can break cracked blocks
- spin can deflect small projectiles if feasible
- uses POW meter
- POW drains while spinning
- POW recharges after delay
Weaknesses:
- cannot slide
- slightly shorter jump
Helper 3: Climber Kid
Role:
- vertical routes and hidden collectibles
Abilities:
- press toward wall while airborne to cling
- slowly slide down wall
- jump while clinging to hop upward
- opposite direction jump to wall-jump away
LEVEL FORMAT:
Use ASCII tile maps that are parsed into tile collision, objects, and enemies.
Tile symbols:
# = solid
* = cracked block
/ = slope rising right
\ = slope falling right
= = one-way platform
^ = spikes
~ = water
. = empty
Object symbols:
@ = player start
c = carrot
b = generic balloon
S = swap star balloon
h = heart balloon
t = timer balloon
1 = one-up balloon
P = POW refill balloon
k = checkpoint
D = hidden shop door
E = exit
m = moving platform
V = waterfall
Enemy symbols:
W = walker
O = hopper
F = flyer
C = charger
T = thrower
Q = water enemy
L = roller/walker variant
Parse these symbols into arrays of:
- tile grid
- objects
- enemies
- player start
Use a level builder DSL in src/data/levels.ts to create readable maps.
LEVELS:
Create 5 themed worlds. Each world has:
- Act A: main platforming
- Act B: harder variation or chase act
- Act C: boss arena
WORLD 1:
Theme:
Sunny meadow slopes.
Visuals:
- bright blue sky
- lumpy white clouds with black outlines
- green scalloped grass cap
- dark grass underline/fringe
- tan dirt interior
- dirt speckles and rocks
- large rounded trees
- smaller trees
- bushes
- flowers
- fences
- sloped ground
- cartoon meadow look
Mechanics:
- slopes
- slides
- carrots above jumps
- beginner enemies
- chase act in Act B
Boss:
Burrow Baron
Boss design:
- mole-like original boss
- miner helmet or digging theme
- pops from 3 holes
- throws pebble arcs
- charges across floor
- becomes tired/panting
- vulnerable while popped or tired
- 5 hits on normal difficulty
- must clearly telegraph hole before popping
WORLD 2:
Theme:
Bricktop rooftops.
Visuals:
- rooftops
- brick buildings
- chimneys
- pipes
- clotheslines
- city skyline
- rolling cans
- rooftop ledges
Mechanics:
- slide under pipes
- jump between rooftops
- clothesline platforms
- rolling hazards
- chase act in Act B
Boss:
Pigeon Don
Boss design:
- original cartoon pigeon boss
- perches on chimney
- swoops diagonally
- drops egg bombs
- can summon small minions once
- after attacking, drops low or becomes winded
- during winded state, he must be reachable by plain hero
- 6 hits on normal difficulty
- must be beatable without helper tricks
Important boss #2 fix:
Do not leave this boss hovering too high forever. After swoop/egg/drop patterns, force a ground-level winded state with a generous stomp window. On hit, put him into recovery and then perch return. Touching him during winded/recover should not punish unfairly.
WORLD 3:
Theme:
Crystal cave.
Visuals:
- dark cave walls
- bright crystals
- shafts
- spike pits
- cracked blocks
- glowing crystal clusters
Mechanics:
- vertical shafts
- cracked blocks
- hidden routes
- spikes
- careful jumps
- chase act in Act B
Boss:
Crystal Bat Maestro
Boss design:
- original bat conductor/maestro boss
- sine-wave flight
- drops crystal shards
- emits sonic rings
- swoops low
- hangs and becomes vulnerable
- 6 hits on normal difficulty
WORLD 4:
Theme:
Splash pier lagoon.
Visuals:
- water
- pier
- underwater maze
- bubbles
- waves
- beach/lagoon objects
- animated waterfall or water columns
- froth where water lands
Mechanics:
- swimming
- underwater maze
- whirlpool special
- water enemies
- surface jumps
- chase act in Act B if feasible
Boss:
Captain Crabclaw
Boss design:
- original crab boss
- walks side to side
- claw snap
- floor wave
- bubble dive
- rest/vulnerable state when claws drop
- whirlpool can stun him
Important boss #4 difficulty fix:
This boss must be easier to win.
Use:
- 5 hits on normal difficulty
- slower walking
- slower wave projectile
- fewer bubble projectiles
- slower bubble speed
- longer vulnerable rest window around 2.4 seconds
- touching him should not hurt while vulnerable or stunned
- after each successful stomp, if not defeated, return him to rest/vulnerable state instead of instantly punishing player
- make the pattern readable and fair
WORLD 5:
Theme:
Midnight studio mansion.
Visuals:
- mansion/studio
- stage props
- spotlights
- film reels
- dark but colorful background
- final-level energy
Mechanics:
- combines previous mechanics
- tougher platforming
- final chase
- final boss arena
Boss:
Director Rex Maxson or another original final boss name.
Boss design:
- original villain
- 3 phases
- 9 total hits
- phase 1: throws reels
- phase 2: spotlight sweeps
- phase 3: camera cart charges
- clear telegraphs
- vulnerable windows after each attack pattern
BOSS SYSTEM:
Implement all bosses as state machines.
Every boss must include:
- intro state
- telegraph before attack
- attack pattern
- vulnerable window
- hit flash
- invulnerability after hit
- death sequence
- boss health display
- original sprite
- sound effects
- screen shake on hit/defeat
Common boss rules:
- Player damages boss by stomping vulnerable area
- Spin/whirlpool may damage or stun if appropriate
- Player bounces after successful stomp
- Bosses should not rely on random unfair movement
- All bosses must be beatable as normal hero
- Helpers can make fights easier but must not be required
Boss HP on normal:
- World 1 boss: 5
- World 2 boss: 6
- World 3 boss: 6
- World 4 boss: 5
- World 5 boss: 9
Difficulty options:
Easy:
- 7 lives
- boss HP -1 except final boss can stay 9 if needed
- extra heart at act start
- coyote time 1.4x
Normal:
- 5 lives
- normal HP
- standard coyote time
Challenge:
- 3 lives
- normal HP
- coyote time 0.7x
ENEMIES:
Create original enemies with theme skins.
Enemy types:
1. Walker
- patrols
- turns at edges/walls
- stompable
2. Hopper
- jumps periodically
- stompable
3. Flyer
- flies in simple sine or patrol
- stompable if approached from above
4. Charger
- waits then charges
- telegraph before dash
5. Thrower
- throws small projectiles
- keeps distance if possible
6. Water enemy
- swims in water
- simple patrol or chase
7. Chaser
- used in Act B chase levels
- hounds the player but should be fair
Each enemy needs:
- sprite
- hitbox
- hurtbox
- health or one-stomp defeat
- stomp behavior
- side collision damage
- hurt flash
- death particles
- theme-specific skin if possible
ITEMS:
Implement:
Carrot:
- 100 score
- carrot counter
- max 99
Balloon:
- floating poppable container
- can contain heart, timer, one-up, POW refill, carrot burst, or Swap Star
Heart shield:
- absorbs one hit
- if already shielded, gives 1 life
Freeze timer:
- freezes enemies for about 5 seconds
- slows boss projectiles, but do not freeze bosses completely unless balanced
Swap Star:
- toggles selected helper mode
One-up:
- adds life
- max lives 9
POW refill:
- restores POW meter
Carrot burst:
- spawns several carrots
Checkpoint:
- respawn point after death
Hidden shop door:
- player presses Up near it
- spend 30 carrots for 1 life
- max lives 9
Golden frame:
- boss reward
- collect 5 to unlock ending
HUD:
Bottom HUD should feel like a NES platformer HUD.
Must show:
- POW label
- segmented POW meter
- hero face portrait
- lives count
- carrot count
- golden frame/key count
- score
- timer
- heart shield icon
HUD requirements:
- readable on mobile
- pixel font style
- black/cream panel look
- not too modern
- no tiny unreadable text
TITLE SCREEN:
Create a polished title screen.
Elements:
- original game title or [GAME_TITLE]
- chunky pixel logo
- bright cartoon background
- lumpy clouds
- trees/bushes
- hero shown near center
- carrot/item floating nearby
- “PRESS START / TAP”
- copyright-style line with original fake studio name, e.g. “2026 ORIGINAL HOMAGE GAMES”
- title music loop
Do not use the old game title. Use a new original title or placeholder.
MAP / HELPER SELECT SCREEN:
After start:
- show world selection/map or level select progression
- show helper selection before each level
- explain helpers briefly through icons/text
- keep it simple and NES-like
GAME SCENE:
Needs:
- camera following player horizontally
- small dead zone
- tile rendering
- decor rendering
- object rendering
- enemy updates
- collectible updates
- boss updates
- HUD rendering
- pause handling
- death/retry
- checkpoint respawn
- act exit
- boss reward
- transition to next act/world
CAMERA:
- follow horizontally
- do not make camera too smooth or floaty
- clamp to level bounds
- keep HUD fixed
- show enough space ahead of player
AUDIO:
Use Web Audio to create original chiptune-style audio.
Implement:
- Pulse 1 lead
- Pulse 2 harmony
- Triangle bass
- Noise drums
- SFX channel stealing
- music tracks in tiny tracker-like notation
- title music
- meadow music
- rooftop music
- cave music
- lagoon music
- mansion music
- chase music
- boss music
- ending music
- game over jingle
Sound effects:
- jump
- stomp
- high bounce
- collect carrot
- pop balloon
- item pickup
- hurt
- die
- boss hit
- boss defeat
- throw projectile
- splash
- freeze
- spin
- slide
- land
- menu select
Audio requirements:
- unlock audio on first user interaction
- pause audio when tab hidden
- resume safely
- volume controls for music and SFX
- underwater low-pass effect if possible
SAVE SYSTEM:
Use localStorage.
Save:
- completed worlds
- collected golden frames count
- best score per level
- best time per level
- options:
- music volume
- SFX volume
- touch opacity
- difficulty
- reduced flash
Use save key:
- choose a new key based on the new title
- do not reuse old title in key name
OPTIONS:
Include:
- difficulty: Easy / Normal / Challenge
- music volume
- SFX volume
- touch opacity
- reduced flash
LEVEL ART DETAILS:
Meadow:
- bright blue sky
- clouds with black pixel outline
- round trees
- bushes
- grass tufts
- flowers
- fences
- tan dirt
- dark root/grass underline
- sloped terrain with clean outline
Rooftop:
- brick textures
- chimneys
- pipes
- clotheslines
- city skyline
- rooftop ledges
- cans
Cave:
- rock walls
- crystals
- darker background
- spike pits
- cracked blocks
Lagoon:
- water animation
- bubbles
- pier wood
- beach/lagoon palette
- waterfalls
- froth
Mansion:
- dark studio/mansion palette
- spotlights
- curtains
- film reels
- props
- dramatic final stage mood
DECOR SYSTEM:
Create deterministic decor placement:
- trees
- bushes
- flowers
- fences
- crystals
- gravestones/props depending on theme
- water columns
- waterfall objects
Decor should not block gameplay unless intentionally part of collision.
Decor should not hide hazards unfairly.
PARTICLES:
Simple pixel particles only:
- dust on landing/skid/slide
- sparkle on item
- pop on balloon
- splash in water
- boss hit flash
- small debris on cracked block
No modern particle glow.
PROJECT FILE RESPONSIBILITIES:
config.ts:
- global constants: width, height, tile size, HUD height, fixed dt, save key, score values, difficulty definitions
types.ts:
- shared types for player states, enemy types, boss types, item types, level definitions, save data, rectangles
main.ts:
- boot canvas
- fixed-step game loop
- resize/scaling
- create scene manager
- expose debug hooks
pixelTextureFactory.ts:
- helper functions for generating pixel canvases
- palette drawing
- mirroring
- scaling
- auto-shading if useful
palettes.ts:
- global colors
- theme palettes
- hero/helper palettes
sprites.ts:
- generate all player/helper/enemy/boss/item/HUD sprites in code
tiles.ts:
- generate tiles and decor
- theme backdrops
- clouds
- trees
- bushes
- water
- waterfall visuals
music.ts:
- define tracker patterns and songs
PhysicsTuning.ts:
- all movement constants
InputManager.ts:
- keyboard input
- gamepad input
- pressed/held edge detection
- pause/debug handling
TouchControls.ts:
- mobile pointer controls
- multi-touch support
- safe-area handling
- opacity setting
SaveSystem.ts:
- load/save localStorage
- defaults
- options
LevelLoader.ts:
- parse ASCII maps
- collision queries
- water/spike checks
- slope floor calculations
AudioEngine.ts:
- Web Audio music/SFX
- channel stealing
- volume controls
- unlock on gesture
Player.ts:
- player state machine
- movement
- jump
- duck
- slide
- water
- helpers
- collision
- stomp bounce
- hurt/death
Enemy.ts:
- enemy behavior
- projectiles if needed
- stomp/hurt/death
Collectible.ts:
- carrots
- balloons
- pickups
- checkpoint
- shop door
- golden frame
Boss.ts:
- all 5 boss state machines
- boss factory
- boss HP based on difficulty
- vulnerable windows
- touch damage rules
SceneManager.ts:
- scene stack/change logic
TitleScene.ts:
- title screen
- press start
- options entry if included
MapScene.ts:
- world/helper selection
GameScene.ts:
- main gameplay
- act loading
- rendering
- collisions
- entities
- boss arenas
- HUD
- pause/shop/checkpoint/death/level clear
EndingScene.ts:
- ending after all golden frames
DEBUG HOOKS:
Add:
window.__MMCQ_FREEZE = true
window.__MMCQ.step(n)
If the title changes, the hook name can remain generic or be renamed, but include clear documentation.
Debug features:
- pause RAF loop if freeze is true
- manually step fixed simulation
- useful for headless tests
- optional debug overlay with player position, velocity, state, FPS, act, boss HP