I'll build ROSEPATH — a flat 2D platformer level builder with a grass/dirt tileset, deadly spikes, one-way platforms, rose checkpoints (clear a level by activating 3), a full editor, and hand-crafted starter levels. Let me start with dependencies, fonts, and the design system.
Now the game core — grid constants, programmatic level builder (avoids hand-counting errors), the three campaign levels, validation, and persistence:
Now the retro synth SFX engine (pure WebAudio, no assets):
Now the heart of the visuals — the flat-art renderer (background, tiles, roses, player) shared by the game, editor, and thumbnails:
Now the playable game engine — physics, collision, checkpoints, particles, HUD. This is the biggest piece:
Quick fix — dust timer lives on game state, not the player:
Also fixing the rose-pop value passthrough in the world renderer:
Now the level editor — paint tools, palette with mini rendered icons, validation, save/test flows:
Two quick fixes — unused import and the optional rose-state argument:
Editor fixed. Now the menu screen, level select, and win modal — with an animated live-scene background:
Now the App orchestrator that wires menu, editor, play, win flow, and persistence together:
All components wired. Let me build and verify:
Build passes. Now some correctness hardening — the win handler shouldn't do side effects inside a state updater, restart shouldn't fire after winning, and a couple of polish tweaks:
I accidentally duplicated the screen state declaration. Let me inspect and fix:
Fixed. Now responsive polish for the editor palette and game HUD on smaller screens:
One flow bug: after finishing the last campaign level or a custom level, the win modal wouldn't close when navigating. Fixing:
Now rebuild to confirm everything compiles:
One last UX touch — visual confirmation when saving a custom level in the editor:
ROSEPATH is complete and building cleanly — a full flat-2D platformer builder with a hand-drawn canvas art style, built entirely in code (no image assets).
What's inside
The platformer engine (GameCanvas.tsx)
- Fixed-timestep physics with coyote time, jump buffering, and variable jump height (release to cut the jump)
- Grass/dirt tileset — solid blocks with auto-detecting grass tops, scalloped fringe, wildflowers
- Spikes — kill on contact with a fair, shrunken hurtbox, red-tipped sprites
- One-way planks — jump up through from below, land on top, press
S/↓ to drop through
- Roses — sleeping buds that pulse invitingly; touch one and it blooms golden with a petal burst, acting as your respawn checkpoint
- Game feel: squash & stretch, running dust, landing puffs, death scatter, screen shake, drifting clouds, birds, pollen, and a WebAudio synth soundtrack (jumps, deaths, rose chimes, victory fanfare)
Win rule — bloom 3 unique roses to clear a level; deaths respawn you at the last bloomed rose. HUD tracks roses, time, and deaths; clears and best times persist in localStorage.
The campaign — three hand-tuned starter meadows (First Bloom, Spike Hollow, Garden Rally), each with a "next meadow" flow and trophy tracking on the level-select dock.
The builder (LevelEditor.tsx)
- Click-and-drag painting on the same 32×18 grid, right-click erases, hotkeys
1–6
- Palette with live-rendered tile icons: Eraser, Ground, Spikes, Plank, Rose, Start flag (single-instance)
- Live validation (start flag + 3 roses required), name your meadow, Test it instantly, Save it to "My Meadows" (localStorage), then play/edit/delete your creations from the menu
The shell — an animated menu where the background is a live-rendered scene of a campaign level, falling petals, bobbing pixel-letter title, and chunky tactile UI with a film-grain finish throughout.
Files built: index.html, src/index.css, src/game/core.ts, src/game/audio.ts, src/game/draw.ts, src/components/GameCanvas.tsx, src/components/LevelEditor.tsx, src/components/Screens.tsx, src/App.tsx