The Legend of Zelda: A Link to the Past Clone

The Legend of Zelda: A Link to the Past clone · Action RPG game · built by the Vibecode team

The Legend of Zelda: A Link to the Past Clone rebuilds the SNES classic with its real name, wordmark, HUD and words in its 16-bit pixel look. Wake up in Wren's house, get the sword, shield and Lamp, then explore a green overworld with a village, a shop, a riddle-telling sage, cuttable grass and bushes, liftable pots and roaming monsters. The Eastern Palace has seven rooms with a small key, key doors, torches to light, a bombable wall, a Big Chest with the Bow and the Stone Warden boss, who drops a Heart Container and the Pendant of Courage. There is a pause menu with items, equipment and maps, three save files with name entry, GAME OVER, an ending, and a SNES-style touch pad. The hero, people and monsters are our own characters, and every sprite, tune and sound is made in code.

  • Web app
  • Hand-built
  • Free to remix
The Legend of Zelda: A Link to the Past Clone, action rpg game built with Vibecode
Remix this template

Remix copies the working app into your account for free, exactly as we built it. It runs in your browser.

The prompt that builds it

We wrote The Legend of Zelda: A Link to the Past Clone by hand. This prompt describes the finished app: paste it into a new app to build your own version, or change it first.

Prompt · 1,133 words

Build a polished web clone of The Legend of Zelda: A Link to the Past, the 1991 SNES top-down action adventure: wake up at home, get a sword and the Lamp, explore a green overworld, talk to villagers, then clear a palace dungeon and beat its stone boss for a pendant. Draw everything in code on one HTML canvas (no image or sound files) at the SNES's 224 px height with 16 px tiles, scaled up with crisp nearest-neighbour pixels; wider windows see more of the world (256 to 400 px wide).

It is A Link to the Past on screen: its name, a red "ZELDA" wordmark with a gold rim under "THE LEGEND OF" and over "A LINK TO THE PAST", and its own words ("LIFE", "Rupees", "PLAYER SELECT", "REGISTER YOUR NAME", "ERASE PLAYER", "You got the ...!", "Small Key", "Big Key", "Big Chest", "Dungeon Map", "Piece of Heart", "Heart Container", "Pendant of Courage", "Eastern Palace", "Save and Continue", "Save and Quit", "Continue", "GAME OVER"). Copy the mechanics, HUD and look, but every character is ORIGINAL, drawn as text pixel maps with palettes: the hero "Wren" (auburn hair, blue tunic, yellow scarf, red shield with a gold rim, no green cap), Old Maro (white beard), Hana, Tib, Pell the shopkeeper, Mira, the hooded Old Sage, a friendly guard; monsters Gloop (hopping slime), Pebblemouth (purple rock spitter), Sentry (teal armoured guard with a spear), Rattler (skeleton that throws bones), Flit (bat) and the Stone Warden boss (a stone knight with one red eye). The kingdom is "Aldora", the village "Willowmere". No Nintendo sprites, music, sounds, Link, Zelda or Triforce: the crest is an original sun-and-sword.

SHELL
One full-window canvas that opens on the title (sword drops in, golden glow, PRESS START). Keyboard: arrows/WASD move, Z sword (hold to charge a Spin Attack), X use the Y item, Space lift/throw/talk/read/open, Enter menu, M map, Shift save, N mute. Touch screens get a SNES pad (d-pad, B sword, Y item, A action, X map, START, SOUND): under the game in portrait, see-through in landscape.

SCREENS
1. Title, then PLAYER SELECT: three save files on a blue diamond pattern with a fairy cursor (name, mini hero, hearts, pendant), ERASE PLAYER. An empty file opens REGISTER YOUR NAME: a letter grid with DEL and END, typing works too, WREN pre-filled.
2. Play: HUD over the picture like the SNES: green MAGIC meter in a white frame, the Y item in a gold box, Rupee/Bomb/Arrow (and Key in dungeons) counters with icons, "- LIFE -" with red hearts (halves, 10 per row). Message box: dark navy with a double white border (gold for item gets), white proportional text typed out, 3 lines, a blinking arrow for more, and a yellow ">" cursor for choices.
3. Light World (64 x 48 tiles): Willowmere in the south-west (Wren's red-roof house, the green-roof shop with a Rupee sign, the elder's blue-roof house, a well, fences, dirt paths with grass overhang), a river with a wooden bridge and a lake, tall grass, bush rings and clumps, grey rocks, wiggling white flowers, big round trees, a ragged forest border, the Old Sage's cave in a rocky cliff, and the Eastern Palace (pale green stone, towers, owl statues) on a cliff plateau up stone stairs. Monsters wander the fields.
4. Interiors: Wren's house (bed, shelves, table, rug, pots, Lamp chest; Old Maro wakes you, asks "I'll go." / "Tell me more." and gives the sword and shield), the shop (Bombs 30, Arrows 30, heart 10: stand in front, buy with a Yes/No choice), the elder's house (rest to refill hearts), the cave (Boomerang chest; the Sage asks a riddle with three answers and gives a Piece of Heart).
5. Eastern Palace, seven rooms on a 3 x 3 grid with bevelled walls and slide transitions: entrance; west room (beat every monster, a chest appears with a Small Key); key door north; torch room (light both braziers with the Lamp: the Big Key chest appears; a cracked east wall you bomb open to a secret room with a Piece of Heart and 50 Rupees); Big Chest room with spikes (the Bow); boss door (Big Key) to the Stone Warden: it stalks, leaps and stomps (screen shake, a ring of shock orbs), then sits with its red eye open: only then sword (1), arrows (2) and bombs (2) hurt it. It crumbles into a Heart Container, then the Pendant of Courage, the ending text and a credits screen (time, deaths, hearts, Rupees), then you keep exploring.
6. Pause menu (pulls down over the game): Y ITEMS grid with a yellow cursor (Bow and Bombs show counts), PENDANTS, a 4-piece heart, EQUIPMENT (sword, shield, Big Key, map), name, time, Rupees, Small Keys. Map: the overworld picture with a blinking hero dot and a palace marker; in the palace a room grid (visited rooms, current room, boss room). Save prompt: Save and Continue / Save and Quit.
7. GAME OVER: the world flashes red, fades to black, the letters drop in, then Save and Continue / Save and Quit / Continue.

RULES
Fixed 60 steps a second. Walk 1.5 px/frame with the SNES corner nudge. Sword swing in three poses (side, diagonal, front), hold it to charge (sparkle on the tip), release for a 360 Spin Attack (2 damage). Cutting bushes and tall grass and lifting pots/bushes drops Rupees (green 1, blue 5, red 20), hearts, magic, bombs or arrows from a weighted table; pickups bounce, blink and vanish. Lift with the action button, carry overhead, throw (shatters on walls and monsters). Knockback, half-heart damage and blink on hits; the shield blocks rocks and bones from the front; low-health beeping. Y items: Bow, Boomerang (stuns monsters, fetches pickups, comes back), Bombs (blast cuts bushes, hurts everyone, opens cracked walls), Lamp (fire uses magic, lights torches, burns bushes). Keys: push into a locked door to use one. Four Pieces of Heart make a Heart Container. Three save files in localStorage, autosave on every door, mute saved. Original sound effects and seven original 3-voice chiptunes (title, overworld, village, house, dungeon, boss, victory) synthesised with Web Audio; the music ducks under item fanfares.

REMIX-READY
brand.ts holds the names, colours, hero palette, rules and prices; words.ts every line, choice and item message; the overworld is built with a small grid builder (fill, put("bb/bb"), scatter); interiors and palace rooms are text rows framed by a helper, with doors, goals and chests as data; hero, people and monsters are text pixel maps; logic (hero, enemies, boss, shots, items, rooms, menu, dialog, script, flow, save) and rendering (world, sprites, HUD, dialog, menu, screens, touch layout) live in small files. ?at=village|palace|boss... jumps in with a test kit, ?demo=1 lets a bot play (pathfinding, fighting, chests, boss) for recordings, ?screen=files|name|menu|map|gameover|ending opens a screen. README.md maps it all.
All templates