← all kitsgenre kit

topdown

zelda-like rooms and items

Zelda-like action-adventures (original IP only) built from layered ASCII tile maps + JSON content. The kit owns the hero (8-direction movement with corner sliding, sword, items, knockback, i-frames, hearts in half-heart steps), enemies and bosses from data, items/abilities that gate areas (bombs break cracked walls, hookshot crosses pits, boots pass rough ground, any item can pass/break tile tags), small keys + locked doors and a boss key, plates/blocks/switches/gates/shutters, rooms with a room-locked camera + slide transitions, warps (overworld ↔ dungeons), NPC dialog/shops (engine ui.dialog/ui.choice), chests, pickups, a minimap and save. An area scene needs ~3 lines of Luau.

Built on the foundation kits (enabled automatically): core (content registry, core.bag owned items, core.wallet "rupees", core.flags story flags, core.save section "topdown", core.dialog trees), ai ("behaviour": "ai" enemies), juice (shake, particles, sfx). Quests/achievements can count the kit's facts: core.emit enemy_defeated {enemy, area}, boss_defeated {boss, area}, talked {npc} (+ core's item_gained, currency_changed, flag_changed).

Collision is the kit's own deterministic box-vs-tile code (no physics): the hero/enemies are Node2D/Sprite2D; tile behaviour comes from tileset tags. Positions are the hero's *feet box* (10×10); the sprite sits above.

Setup

kits = ["topdown"]
orientation = "portrait"
-- scripts/shared/game.luau
local kit = require("@kit/topdown").setup()   -- reads data/items|enemies|bosses|npcs/*.json + data/warps.json
return kit                                    -- (tests may pass tables: setup({ items = {...}, ... }))

-- scripts/client/area.luau (attached to the objects TileMap2D of every area scene)
local kit = require("../shared/game")
local area = kit.area.start({ id = "overworld", room = { 15, 13 }, art = ART, sounds = SOUNDS, anims = { down = "down", up = "up", side = "side" } })
area.events:on("bossDefeated", function(b) kit.progress.setFlag("dungeon1_done") end)

| tag | behaviour | |---|---| | solid wall | block | | water gap | block walking; flying enemies, hookshot cross them | | cracked | blocks; bombs (breaks) destroy the whole connected wall (saved) | | locked | small key door (keys are per dungeon); bump to open, connected cells open together (saved) | | boss_locked | boss key door | | rough (any tag) | blocks unless an owned item passes it (boots) | | bush | blocks; the sword cuts it (random drops) | | hook hookable | hookshot targets (post in a wall; the cell in front must be floor) | | block | pushable (push 0.3 s; stays in its room) | | plate (floor layer) | pressed by a block or the hero; all plates in a room pressed → its gates open | | switch | hit with sword/arrow → room gates open for good (saved) | | gate | closed bars; open via plates/switches, or when the room's enemies are dead if it has neither | | shutter | open until you enter a room with enemies; closes during the fight | | sign + <npc id> | readable tile | | rupee heart key boss_key heart_container item + <item id> | pickups (keys/containers/items saved) | | hazard | hurts and returns the hero to the room entry point | | warp + <warp id> | load data/warps.json[id] (must step off the arrival warp first) |

Example game

Tamsin of Wickhollow running on the Dreamsy engine

Tamsin of Wickhollow

Talk to Granny Wick, delve the Mirewell Grotto and beat the Mire Warden.

topdowntop-down

Full reference on GitHub