Log inGet started
World

The Undercroft: A Co-op Roguelite Dungeon Crawler

Branchmain
Branchesmain
Commite8883d9c1a

README.md

  • 1.1.17: a run with no exit, and click-to-walk that gets round wall corners. Arpg.newRun({ exit = false, objective = "Defeat the Hollow Abbot" }) keeps the floor's exit sealed when every room is cleared (the game decides when the floor is won, for a boss floor) and puts its own line in the tracker instead of "The exit is open: reach the portal!"; both are synced game fields (exitSealed, objective) set again by every newRun. Walking by click or tap plans paths with the character controller's radius plus 0.2 m (was a fixed 0.35 m, 5 cm wider than the hero), passes a corner waypoint at 0.3 m (was 0.6 m, which let the straight line to the next waypoint cut the corner), and a hero held in place on a path for 0.3 s replans and steps along the wall to the open side.

arpgKit 1.1.15: Action RPG Kit (Diablo / Torchlight style)

Make a Diablo- or Torchlight-style action RPG in Zero: click where to walk, fight crowds of monsters in a seeded dungeon, pick up the loot they drop and put on gear that makes your hero stronger. One install, one line in your scene, and you have a playable, multiplayer dungeon crawler that runs on desktop, in the browser and on phones.

arpgKit holds only what makes a game an action RPG. Everything else comes from published kits it installs with it: procLevelKit (dungeons), aiKit and navKit (monster brains and paths), SecondWind and Lifeline (health), weaponsKit (every class weapon: sword, bow, staff, dagger), comboKit (the warrior's combos), abilitiesKit (skills, stats, ability bar), inventoryKit (bag, equipment, items on the ground), gearStatsKit (item stats that apply when equipped, compare cards), controlsKit (keyboard, gamepad and touch, its arpg scheme), barsKit, markersKit, juiceKit, saveKit and styleKit look blocks.

Quick start: a playable dungeon in five minutes

Measured with arpgKit 1.0.17 on 2026-11-11 (native desktop app): a brand-new world to a playable six-room dungeon in 4 minutes by following only this README, 2 minutes 51 seconds of it the install, with no load errors from arpgKit or gearStatsKit.

  1. Install arpgKit from ZeroMind into /source (search "action RPG kit" or "arpgKit"; or zero zeromind installAsset 9f2f87a5-e9bf-4037-a424-11f9cb6c298c in the shell). The install brings every kit above; give it a minute or two.
  2. Write the scene. Replace /source/scenes/main.scene/build.luau with:
local Arpg = require("arpgKit.api")

function content()
	Arpg.place({ theme = "crypt", heroClass = "warrior", hud = "classic", rooms = 6 })
end
  1. Prepare the scene (once, in edit mode). A brand-new world arrives either with Zero's empty-world template (a default player and its spawn point, ground, sun, sky, lamp posts and a crate: left in, the engine spawns you as that default player instead of the hero) or with no scene loaded at all. One console line handles both: it makes the main scene if there is none (keeping the build.luau above), deletes the template, and sets the scene to give every joining player a hero:
require("arpgKit.setup").prepare()

If something is still in the way, the game warns in the log while playing: [arpgKit] this scene has another player spawn. 4. Press Play. Pick a class, press Enter the dungeon.

  • Click the ground to walk (hold to keep following the cursor); click a monster to walk up and attack it.
  • WASD or a gamepad stick runs camera-relative; on a phone, tap the ground or use the stick.
  • Space / pad X / the Attack button: basic attack (the warrior chains a three-hit combo, the archer looses arrows you see fly). 1-4 (or Q, E, R, F; pad A, B, Y, RB): skills. Z: potion. I or Tab: bag. C: stats. Wheel: zoom. F3: frame time.
  • Walk over drops to pick them up; a compare card shows ground gear against what you wear. Equip in the bag and watch the stats panel change.
  • Clear all six rooms; the red seal over the exit disappears. Walk into the portal for the win screen.

What is in it

PartWhat it does
ArpgGameOne run, the same for every player: builds the dungeon from the seed on every peer; the host wakes each room's monsters as heroes approach, rolls loot on deaths, tracks rooms, opens the exit, ends the run, starts the next (new seed, or one depth deeper).
ArpgHeroOn the player body: click/hold-to-move along real paths, click-to-attack, stick/WASD movement, tap-to-move, class attacks and skills aimed at the cursor or the nearest monster, potions, starting gear, gold, XP.
ArpgCameraCamera behaviour: angled follow camera with soft lag, look-ahead and zoom.
ArpgHudSkill bar, room tracker, messages, class picker, death screen, win screen, F3 frame time.
classes4 hero classes: warrior, archer, mage, rogue.
enemies7 monster types: grunt, brute, archer, caster, swarmling, elite, boss; each notices, chases, attacks, and walks home past its leash.
themes6 dungeon looks: crypt, ice, ruins, scifi, cartoon, pixel (tiles, look blocks, monster palette, HUD/inventory/gear skins).
skins4 HUD layouts: classic (Diablo globes), modern (hotbar), minimal, mobile (auto on phones).
loot4 loot tiers that get better deeper in: shallow, middle, deep, vault.
roomsSeeded room order (start first, exit last) and the monster plan per room.
abilitiesThe ARPG's own attacks for abilitiesKit: the warrior's comboKit moves (light string, heavy, whirlwind, leap), stab, arrow, arcane bolt, war cry, volley. Area skills grow with gearStatsKit's area size.
combatHow the heroes fight: every class weapon is a weaponsKit weapon in the hero's hand, fired at the picked monster and checked by the host; the warrior runs comboKit's arpg move set on its 60 fps machine; gearStatsKit's stats scale every hit (weapon and elemental damage, crits, attack speed) and add life on hit, life steal, thorns, resistances, health regen and max mana.
bagPadThe open bag on a gamepad: a cursor on the stick or the whole d-pad (one nudge, one slot, however busy the game), A equips, takes off or uses, Y drops.
progressXP from kills, levels through saveKit; every level adds health, damage and armour.
inputThe hero's controls through controlsKit's arpg scheme.
setupOne-time authoring help: prepare() readies a new world's scene in one console line, whether it arrived with Zero's empty-world template or with no scene at all (makes the main scene if missing, deletes the template, turns on a player per joining user). clearStarter() does the template part alone.
lookEach look's light on every machine: dark ambient, warm flickering torches, the hero's circle of light, black past the walls, fog, bloom and a colour grade; the world drains of colour behind the death screen and warms behind the win screen. A theme overrides any of it with a light table.
feelHit, kill, loot and pickup feedback through juiceKit and soundstage: a sound and sparks on every hit, the red hurt flash when the hero is struck, drops that land with a pop and stand under a beam of their rarity's colour (rare and better), pickup sounds, and music that turns to combat when a fight starts.

Controls

Mouse and keyboardGamepadPhone
Moveclick / hold the ground, or WASDleft stick (camera-relative)tap the ground, or the floating stick bottom left
AttackSpace or right mouse: walks up to and hits the monster under the cursor, else the one you clicked, else the nearest within 10 m; click a monster to chase and hit itX, right trigger (same target choice)Attack slot bottom right (nearest monster)
Skills 1-41-4 or Q E R F (aimed at the monster nearest the cursor)A, B, Y, right bumperthe four skill slots around Attack
PotionZ or Hleft bumper, d-pad downPotion button above the skills
BagI or Tab (a quick tap opens and closes it); drag an item onto its slot, or double-clickSelect opens, left stick or d-pad moves the cursor one slot per nudge, A equips (or takes off, or drinks), Y drops, B closesBag button, top corner; tap an item to see its compare card, tap where it goes
Zoomwheelnot usedpinch

The fight on screen. The camera leans toward the monsters around the hero (up to 4.5 m, within 16 m) and pulls back when they spread out, so an archer shooting from the edge of the room stays in view (ArpgCamera.threatRange, threatLean). The first rooms are gentle: a small pack in the start room, a modest fight next door with no brutes or elites, elites from room 4 on.

Phone layout. Any screen that is portrait, or whose short side is phone-sized, uses the phone HUD: the move stick bottom left, Bag and pause top right, the engine's Menu button (on a real touch screen), health and mana bars (top centre in landscape, under the Stats button in portrait), the room chip on the left, potion and the skill arc bottom right. While the bag is open the move stick stands down, so every bag, hotbar and equipment slot takes a tap (tap an item, then tap where it goes; a tap on the chest slot equips a chestplate). Back on a desktop-sized window with mouse and keyboard, the desktop HUD returns and the touch controls hide. To see it on a desktop, run one of these in the console (edit or play):

require("arpgKit.setup").previewPhone("portrait")   -- 390 x 844
require("arpgKit.setup").previewPhone("landscape")  -- 844 x 390
require("arpgKit.setup").previewPhone("off")        -- back to the size you had

The choices

Hero classes (heroClass; players also pick on the start screen)

idclassplays like
warriorWarriorSword fighter on comboKit's action RPG move set: attack presses chain Light I, II and III; Heavy ends a string as the Heavy Finisher; Whirlwind cuts all around; Leap Strike lands on runners. Every swing is weaponsKit's longsword.
archerArcherBow hunter. Looses glowing weaponsKit arrows you watch fly, pins packs with poison darts, shoves brutes back and dashes out of trouble.
mageMageSpellcaster. Arcane bolts from the staff (weaponsKit) at range, fireballs that set crowds burning, a frost nova that freezes everything close, and a blink to get away.
rogueRogueQuick dagger fighter (weaponsKit dagger). Fast stabs, dashes through enemies, vanishes from sight and bleeds what she strikes.

Monsters (enemyMix, boss)

idmonsterbehaviour
gruntGruntThe rank and file: walks up, swings, dies in a few hits.
bruteBruteBig and slow: lumbers after you and hits like a falling door. Kite it.
archerArcherKeeps its distance and shoots; backs away when you close in.
casterCasterHangs back, hurls slow bolts in volleys and patches up its friends.
swarmlingSwarmlingSmall, fast and many. Comes in packs that share what any of them sees.
eliteEliteA champion: tougher, faster, glows, and always drops something good.
bossRoom BossThe keeper of the deepest room. Brawls, then shoots, then goes berserk and slams the floor.

Every monster notices you when you come close, chases and attacks, and walks home when you run past its leash.

Dungeon looks (theme)

idlook
cryptStone Crypt: torch-lit catacombs of old grey stone, bones and banners; cold blue shadows against warm flame.
iceIce Cave: a frozen cavern of blue ice and frost-rimed rock, lit by pale crystals.
ruinsOvergrown Ruins: sunken temple halls swallowed by moss, roots and creepers, with shafts of green light.
scifiSci-Fi Station: steel decking, hazard stripes and humming cyan light panels; the monsters are machines.
cartoonCartoon Keep: a bright, chunky toy castle with bold ink outlines and candy colours.
pixelPixel Dungeon: a retro 8-bit dungeon with chunky pixels, a tight palette and blocky stone.

Each look swaps the tiles, the look-block stack, the monster palette and the HUD, bag and gear-card skins together.

HUD layouts (hud)

idlayout
classicDiablo style: a health globe left, a resource globe right, skills between, the room tracker top left.
modernA wide hotbar with health and resource bars under it, an objective banner at the top.
minimalSlim recharge pills and a one-line tracker; the dungeon fills the screen.
mobilePhone first: big round skill slots bottom right, the move stick bottom left, a compact tracker clear of the notch and the Stats button. Chosen by itself on a phone.

Loot tiers (picked by room depth, then by run depth)

idwheredrops
shallowrooms near the startsome gold, the odd potion, mostly common gear
middlethe middle roomsmore gold, uncommon and rare gear
deepthe rooms before the bossrare and epic gear, higher item levels
vaultthe boss rooma guaranteed piece, epic and legendary odds, a pile of gold

Gear comes from gearStatsKit (Forge of Fortune world): five rarities (common, uncommon, rare, epic, legendary), 26 affixes over 25 stats (weapon damage, attack speed, crit chance and damage, health and regen, armour, move speed, mana, cooldowns, life steal, thorns, fire, frost and lightning damage and resistances, gold find, magic find, XP and area size), 8 fixed-stat uniques and 3 sets whose bonuses switch on at 2, 3 and 4 pieces worn. The shallow tier drops no uniques or set pieces; each deeper tier raises the chance. Every stat applies on equip and comes off exactly on unequip. Walk near a dropped item to see its card against what you wear, with the stat-by-stat difference and an UPGRADE or DOWNGRADE verdict. Each dungeon look picks a matching gear look (the theme's gearLook: parchment in the crypt and ruins, clean minimal in the ice cave, holo in the station, cartoon and pixel in theirs); setLook below overrides it.

Item cards and stats panel (one line in the console or your own script, live for everyone looking)

settingchoices
require("gearStatsKit.api").setCardStyle(id)classic, sideBySide, compact, hero, diff, mobile (the full list with descriptions: cardStyles())
require("gearStatsKit.api").setLook(id)fantasy, scifi, pixel, cartoon, minimal, horror

Change it with one word

Arpg.place({ ... }) options, also fields on the ArpgRun entity's ArpgGame component (live in the inspector):

  • theme: crypt, ice, ruins, scifi, cartoon, pixel
  • heroClass: warrior, archer, mage, rogue (players can pick on the start screen)
  • hud: classic, modern, minimal, mobile
  • enemyMix: any of grunt,brute,archer,caster,swarmling,elite; boss: any type
  • rooms (default 6), difficulty (0.5-2), seed, newSeedEachRun

Live: Arpg.setTheme("ice"), Arpg.setHud("modern"), Arpg.setClass("mage"), Arpg.newRun({ deeper = true }). Add your own with Arpg.defineClass, Arpg.defineEnemy, Arpg.defineTheme, Arpg.defineHud, Arpg.defineLootTier. Arpg.catalogue() lists everything.

Guides

Two guides ship inside the package (Docs panel, or zero guides read <name>):

  • How to make an action RPG like Diablo with click-to-move, loot and dungeons (how-to-make-an-action-rpg-like-diablo-with-click-to-move-loot-and-dungeons): what is in the kit, how the parts fit, what to do first, every one-word switch, loot tiers, your own classes, monsters and looks, multiplayer, phones.
  • Example: build an ice cave dungeon crawler with an archer from an empty world (example-build-an-ice-cave-dungeon-crawler-with-an-archer-from-an-empty-world): a second dungeon with a different look, class, HUD and monsters, including a monster of your own.

API (local Arpg = require("arpgKit.api"))

  • Catalogue: classes(), class(id), enemies(), enemy(id), themes(), theme(id), huds(), lootTiers(), catalogue(), define*, rollLoot(tier, level, seed, rolls?, bonus?), measureLoot(tier, level, n?), planRooms(level), planSpawns(level, rooms, seed, mix).
  • Scene: place(opts) inside a build's content().
  • Running game: game() (synced fields: seed, theme, rooms, depth, depthLabel, phase, cleared, alive, exitOpen, exitSealed, objective, kills, startedAt, endedAt), level(), rooms(), hero(), progress(), setTheme, setHud, setClass, newRun(opts), setDepthLabel(label), depthLabel(), setMenuProbe(fn), setHeroStats(player?, mods), clearHeroStats(player?, source), heroStats(), on(event, fn) with events levelBuilt, theme, kill, loot, roomCleared, exitOpen, levelUp, heroDied, heroRevived, classChanged, hudChanged, gold, cast, castRefused, won, hit, heroDamaged, heroDowned, partyDown, heroStats, dodged. See Using arpgKit in a roguelite.

Using arpgKit in a roguelite

Everything here is opt-in: a game that sets none of it plays exactly as 1.0.18 did. A run loop (runLoopKit, a floor map, a permadeath ladder) places the dungeon once and then drives it floor by floor.

local Arpg = require("arpgKit.api")
-- in the scene build's content():
Arpg.place({ endScreens = false, classPicker = false, revive = "ally", bleedOut = 30 })
-- the run loop, on any peer (the host decides; another peer's call is sent to the host):
Arpg.newRun({ seed = 48213, depth = 3, theme = "ice", rooms = 7, difficulty = 1.4,
	enemyMix = { grunt = 3, archer = 2, caster = 1 }, boss = "boss" })
Arpg.on("won", function(e) print("floor done", e.depth, e.kills, e.time) end)
Arpg.on("partyDown", function() print("everyone is down: the run is over") end)
Arpg.setHeroStats(nil, { source = "relic.emberHeart", damage = 15, crit = 5, dodge = 8 })

Place options (Arpg.place(opts)):

OptionDefaultWhat it does
endScreenstruefalse: the kit draws no death screen (whose free Rise again would break permadeath) and no win screen; it only emits the events below. Also the ArpgHud field endScreens.
classPickertruefalse: no class picker when a player joins (the ArpgHud field showStart); the hero starts as the game's heroClass.
revive"rise""ally": a hero at 0 HP goes down where they fell instead of dying (no respawn, cannot move or act, a red bleed-out ring shrinks round them). A living partner who stands within 2.5 m and holds Interact for 3 seconds stands them up at 40% health. Also the ArpgGame field revive.
bleedOut30With revive = "ally": seconds a downed hero lasts. Bled out, they are dead until the next newRun (with endScreens on, the death screen still offers Rise again).

Ally revive controls. Interact is controlsKit's arpg scheme action: G or X on a keyboard, LT or d-pad up on a pad (its prompt glyph is drawn for the device in hand); on a phone a round Revive button appears when you stand by a downed friend, held with a finger. The partner's screen shows "Hold to revive <name>" with a progress bar; the downed player's screen shows YOU ARE DOWN, the bleed-out timer and "<name> is picking you up" with the same progress; every player sees the green revive ring fill round the downed hero. The revive is SecondWind's downed model with reviveHold on (SecondWind 1.4.15): the peer that owns the downed hero's health counts the progress, and only a partner whose reviving is on (set by their own peer while Interact is held) fills it, so two players never disagree on it.

Arpg.newRun(opts) sets each of these exactly for the new run and starts it: seed (whole number, kept even when newSeedEachRun is on), depth (whole number, 1 or more), theme (a theme id), rooms (2 or more), difficulty (above 0), enemyMix (a list of enemy ids, or a map of id = weight), boss (an enemy id); deeper = true and sameSeed = true work as before. Answers true on the host, true, "requested" on another peer (sent on the existing arpg:request message), false, why for an option it refuses (unknown option, unknown theme or enemy, a seed that is not a whole number).

Events (Arpg.on(name, fn); heroDied and heroRevived with an empty payload on respawn stay as before):

EventPayloadWhere it fires
won{ depth, kills, time } (time in seconds)every peer, once per run, when a hero reaches the open exit
hit{ by, target, amount, crit, kind }every peer, for damage a hero deals (by is the hero's body id, or the player key a weapon names; kind is the damage type); damage over time is left out
heroDamaged{ amount, source }the hurt hero's own peer
heroDowned{ by, player } (player is the hero's body id)every peer, when a hero reaches 0 HP (downed with revive = "ally", dead otherwise)
heroRevived{ by, player }every peer, when a partner stands a downed hero up
partyDown{}every peer, once each time every hero in the room is down or dead while the run plays
heroStats{ source, mods }the local peer, after setHeroStats
dodged{ amount, source }the hero's peer, a hit the hero's dodge stat avoided

Hiding the HUD. Arpg.setHudVisible(false) hides every arpgKit HUD screen on this peer (the main HUD, the skill bar and touch slots, the start, death and win screens, the revive prompt) for a camp, a floor map or a menu of your own, and keeps them hidden across redraws; Arpg.setHudVisible(true) brings back exactly what would show now. It answers how many HUDs it reached; the ArpgHud field is visible. gearStatsKit's ground compare card ("On the ground · walk over to pick up"), its stats panel and its Stats button go with it. The same happens on its own while a menu screen is open over the game on this peer: menusKit's (pause, settings, game over, victory) is found by its screen name, so a game needs no code for it; a game with menus of its own says when one is open with Arpg.setMenuProbe(function() return myMenuOpen end). Other kits' screens (inventoryKit's bag, markersKit's damage numbers, controlsKit's touch stick) are theirs to hide.

Placing the controls hint. The keyboard and mouse hint ("Click to move · click a monster to attack · ...") sits in the bottom left corner by default, wrapped beside the skill bar, so a game's own strip across the top (a run strip, a banner, a minimap) never covers it. Arpg.setControlsHint(on, at?, offset?) hides it, brings it back and says where it sits: at is "auto" (bottom left), "bottomLeft", "bottomRight", "topLeft" or "topRight", and offset is points from that top or bottom edge (-1 = auto); it answers how many HUDs it reached. Arpg.place({ controlsHint = false, controlsHintAt = "topRight" }) sets the same at placement (ArpgHud fields showHelp, hintAt, hintOffset). Phones and touch play never show it.

What the depth is called. The HUD says "Depth N" (the tracker, the death screen and the win screen). A game whose floors are not arpgKit's depths says what it reads instead, in either of two ways:

  • Arpg.newRun({ depth = 2, depthLabel = "Floor 2 / 4" }): the host sets the run's label with the run. It is a synced field of the game (game().depthLabel), so every peer and a player who joins mid-run read the same words, and every newRun states it again (a run that names none goes back to "Depth N"). At most 80 bytes.
  • Arpg.setDepthLabel(label) on every peer (game code runs on each): a string ("The Ossuary Nave"), or a function of the game's synced fields read on every redraw (Arpg.setDepthLabel(function(g) return "Floor " .. myFloor() .. " / 4" end)), so it follows the run by itself; nil goes back to the run's label or "Depth N". It wins over the run's label. Returns (true) or (false, why).

Arpg.depthLabel() answers what the HUD shows now on this peer.

Heroes on a new floor. Arpg.newRun needs no help to place the party: when the new level is built, every peer's own hero walks onto the new start pad, a downed or dead hero is stood up, and every hero is healed to full.

Hero stats from other kits. Arpg.setHeroStats(player?, mods) puts modifiers on the local hero under mods.source, replacing what that source put on before; Arpg.clearHeroStats(player?, source) (or a mods with only source) takes them off; Arpg.heroStats() lists them by source. player is nil (the local hero) or that hero's body: only the hero's owner changes its stats. Stats and units: maxHealth, armor flat; damage, moveSpeed, attackSpeed, cooldown percent (10 = +10%); crit, critDamage percentage points; attackRange metres added to the hero's reach for targeting and walking up to a monster (a melee weapon's swing keeps its own reach); dodge percent chance that a direct hit does nothing (at most 90). All but attackRange and dodge are abilitiesKit modifiers, so they stack with gearStatsKit gear and hero levels.

Installed parts and versions

Installing arpgKit brings these, each from its own world at the version it was tested with in arpgKit 1.1.0. How well each one fit is rated in REUSE_REVIEW.md.

PartVersionUsed for
procLevelKit1.0.4seeded six-room dungeons, the six tile sets, start pad and exit portal
aiKit1.2.6monster brains: notice, chase, attack, leash home, boss phases
navKit1.4.4monster paths and the hero's click-to-move paths
SecondWind (with Lifeline 1.0.6, MatchFlow 1.6.1)1.4.21health, damage, teams, deaths, revive (hold-to-revive for the ally revive, the cross-peer down state behind it)
abilitiesKit1.1.3attacks, skills, cooldowns, mana, character stats, the ability bars and touch slots
inventoryKit1.0.23bag, equipment, drops on the ground with one winner, per-player saves
gearStatsKit1.0.3item stats on equip: 26 affixes, 5 rarities, 8 uniques, 3 sets with set bonuses, compare card in 6 styles and 6 looks, all in one list (Gear.styles()), switched with Gear.useStyle(id) (Forge of Fortune world)
weaponsKit1.3.11every class weapon: longsword, longbow with arrows in flight, staff bolt, dagger; host-checked hits every player sees (Loadout world)
comboKit1.1.9the warrior's arpg move set: three-hit light string, Heavy Finisher, Charged Heavy, Whirlwind, Leap Strike, on its 60 fps machine with input buffer and cancel windows (Combo Dojo world)
controlsKit1.3.1 (upstream content, no deprecated canvas require)keyboard, gamepad and touch (arpg scheme; arpgKit adds arpgPhone), the Interact prompt glyph
barsKit1.4.6monster health bars, health and mana globes
markersKit2.2.4floating damage numbers in each dungeon look's style (Arpg.place adds its Feedback with the crosshair off)
juiceKit1.2.10hit stop, screen shake and hit flashes
saveKit1.3.9XP, levels, the XP bar, per-player save
pickupsKit2.3.10the one-winner grab behind loot pickup (through inventoryKit)
styleKit + lookbookKit1.5.1 + 1.0.40each theme's look-block stack
starterBlocks, toonBlocks1.0.38, 1.3.1the look blocks (vignette, grain, toon bands, ink, pixels)
material librariesstone 1.2.1, masonry 2.0.0, ground 1.0.8, organic 1.0.7, woods 1.0.1, scifi 1.0.3, toon 1.0.10, retro 1.0.2, fantasy 1.0.4, glass and liquids 1.0.2, animated 1.0.16, materialLibraryKit 1.4.3dungeon tile surfaces (through procLevelKit)
soundstage2.1.3hit sounds and the dungeon music
spawnerKit, gridKit, menusKit1.1.8, 1.0.13, 1.3.11brought by procLevelKit and saveKit; not used by arpgKit directly

One copy of each: the world holds one SecondWind (on one Lifeline), one controlsKit, one weaponsKit and one comboKit. REUSE_REVIEW.md rates every kit and counts the reuse (95.2% of the code the game runs comes from these kits).

Multiplayer

The room host owns the run (monsters, deaths, drops, rooms, the exit); everyone sees the same dungeon, monsters and drops. Each player's bag and equipment are their own and saved per profile; a drop goes to whoever touches it first. Gear stats live in the item id, so the same item has the same numbers everywhere. Tested with two players in one room: same seed and rooms, same monster counts, identical drop ids, a pickup by one player landing in their bag only and vanishing for both.

Performance

Only rooms near a hero have live monsters (a room wakes when a hero comes within about 16 m of it), so a six-room dungeon costs what the fight in front of you costs. F3 shows the frame time in game, on desktop and in the browser alike.

Desktop (native Zero desktop app on Linux, stone crypt, warrior fighting in the first room):

Where it ranMedian frame90th percentileWhat the frame is made of
arpgKit 1.0.16, inside the full editor with its side panels open (2026-11-11)159 ms260 msthe editor's own panels 141 ms; the game's scripts 32 ms; drawing the scene 6.5 ms
arpgKit 1.0.4, an editor client with no side panels, sharing the machine26 ms37 msmostly the monsters' scripts; the look itself costs about 0.1 ms

So the game itself costs about 38 ms a frame on this machine (scripts plus drawing); the rest of the 159 ms is the editor window around it. Three rooms awake at once (30 monsters) measured 43 ms in the second setup.

Browser: not measured. Tried: the shell has no browser (chromium, firefox not found), sub-clients run only as native desktop engines (zero client create takes the editor profile only), no tool starts a browser build, and the world's analytics record boot times but not frame times. Press F3 in the browser build to read it there.

Tests

zero tests run arpgKitTests (edit mode, no player; 29 tests): the roguelite hooks (newRun sets every field exactly and refuses bad options; hit, heroDamaged and heroDowned payloads from real SecondWind hits; the ally revive needs a partner holding within 2.5 m for 3 s and comes back at 40%, and works across two peers (the partner finds a downed hero from its owner's snapshot when the synced fields say up, and the downed owner counts a watched partner's held revive); won once per run and partyDown when every hero is down; endScreens and classPicker off; setHeroStats adds, swaps and removes modifiers by source; setHudVisible hides every screen until shown again; the depth label follows the run and the host game; the HUD and gearStatsKit's loot card step aside while a menu is open or the HUD is hidden; setControlsHint hides the hint line; no file requires a removed engine module), catalogue counts, every class's abilities exist, every enemy type becomes an aiKit preset under every theme and every theme tints its monsters visibly (the crypt with at least 5 distinct body colours), every theme's tiles and look blocks are installed, seed 7 gives the same six rooms (start first, exit last) and monsters every time with the boss last, drops are deterministic and real items, deeper tiers drop better gear, every hit effect an ability asks for exists and every look has its light, a new world's starter scene is cleared and the example's code runs as written, and version, README and guides agree.

Known limits

  • A new world made from the empty-world template carries the @cloudburst and @tidewater libraries, with old materialLibraryKit copies that lack Sync; arpgKit's install holds materialLibraryKit 1.4.3 only as a version-pinned copy, so the material showcase and clock components (animatedMaterials, retroMaterials, woods, masonry, fantasy, glass, ground) resolve the library's old copy and log "module '.Sync' / '.Materials' not found". The dungeon itself plays. Uninstall those two libraries if the world does not use them.
  • Monsters use aiKit's procedural bodies (shape, head and gear by type, tinted by theme), not skinned models.
  • A room's monsters only exist once it wakes; Arpg.game().alive counts planned monsters for rooms not yet woken.
  • Gear picked up in one world travels with the player's saveKit profile into other arpgKit worlds that use the same profile namespace.

Changes

  • 1.1.15: One SecondWind for every arpgKit file and for the kits beside it. arpgKit 1.1.14 pinned SecondWind 1.4.19 for its weaponsKit and comboKit side and shipped an older SecondWind api copy beside it, so a game that installed it ran SecondWind as two copies: monsters carried one copy's Vitals and class kits that look up health by component type (classKit's arpgBridge) asked for a version the game did not hold, and their attacks did no damage. Every SecondWind pin is now 1.4.21 as released, weaponsKit is 1.3.11 (game-defined weapons fire in an install world) and barsKit 1.5.3. No arpgKit code changed beyond Arpg.VERSION.

  • 1.1.14: every class walks at its own speed again, a pad and a touch screen play the whole game, and the keyboard hint is never covered. The hero now walks at its moveSpeed stat as abilitiesKit totals it (class, levels, gear, relics, Arpg.setHeroStats), handed to SecondWind as the base speed so a chill or a down still slows it, instead of trusting the CharacterController field, which an older SecondWind copy kept writing back to 2.5 (measured with real keys: warrior 5.2, archer 5.6, mage 5.0, rogue 6.4 m/s; with a +30% relic warrior 6.8, rogue 8.4). The controlsKit this kit ships is 1.4.14 exactly as released (1.1.12 and 1.1.13 carried an edited 1.4.10 base), so a game holding the current controlsKit runs one copy and one set of controls: with two copies the touch overlay showed the other copy's default Dash and Bomb buttons instead of the kit's attack and skill arc, Potion and Interact. With a pad or a touch screen the attack seeks the nearest monster across the room (18 m) and walks up to it, and holding it keeps the path instead of replanning every frame. The keyboard hint moved to the bottom left (Arpg.setControlsHint(on, at, offset) places it). Two new tests (34).

  • 1.1.13: arpgKit now brings SecondWind 1.4.20 exactly as released. 1.1.12 shipped an older SecondWind copy (edited in place in this world, without HK.view and HK.downedNear), so a game that installed arpgKit next to a current SecondWind ran two copies of SecondWind: the ally revive could not see a partner's down state across machines ("downedNear: attempt to call a nil value"), a class's walking speed was overwritten by the old copy, and SecondWind's own tests failed in the game. No arpgKit code changed; the cross-peer revive test now passes in a new world too.

  • 1.1.12: Touch controls follow the hand in use, every phone button press shows, and other HUDs keep off the phone buttons (found in The Undercroft on a phone and a tablet). Keyboard: on a phone-sized screen the move stick, Bag, skill arc, Potion and Interact stayed up after the player pressed a key, because the phone layout was picked from the screen size alone and told controlsKit to show its controls always. A key or pad press now puts the desktop HUD up and the touch controls away (controlsKit back to showing only while touching); the next touch brings the phone layout back. Input.usingKeys() and Input.setUsingKeys(on) read and set it. Press feedback: every skill slot, Potion and Interact press flashes a ring out of the button (Interact glows while held); a potion plays the green heal on the hero (from any device), and Interact a magic burst at the hero even with nothing to use in reach. Regions: the skill arc, Potion and Interact are stated with ui.setControlRegions("arpgSkills", rects) while shown (cleared when hidden), so a minimap or any HUD that reads ui.safeArea().controls keeps off them. SecondWind: ArpgGame reads a monster through HK.view only where the SecondWind copy has it (a host world could resolve arpgKit's reference to a copy without it, a checker error and a failing revive test there), and every arpgKit file's SecondWind reference is pinned to the current SecondWind. 2 new tests (31).

  • 1.1.11: The HUD's depth agrees with the game's floors. A co-op player saw "Depth 4" in arpgKit's tracker while the game's run strip said "Floor 1 / 3": arpgKit counts its own depths, which a game with floors of its own does not use. Now Arpg.newRun({ depthLabel = "Floor 1 / 4" }) sets the run's label as a synced game field (every peer and a late joiner read it, and every newRun states it again), Arpg.setDepthLabel(string or function) sets this peer's own, and the tracker, the death screen and the win screen read it (see What the depth is called). gearStatsKit's ground loot card ("On the ground · walk over to pick up") stayed drawn over a victory screen: arpgKit now turns gearStatsKit's compare card, stats panel and Stats button off whenever its HUD is hidden (setHudVisible(false)) or a menu screen is open (menusKit's found by name, or Arpg.setMenuProbe(fn)), and the HUD's own screens step aside under an open menu too. Two new tests (29).

  • 1.1.10: The tests pass wherever the kit is installed, a game's own content beside it included. The catalogue test checks that the kit's own classes, enemy types, themes, HUD layouts and loot tiers are present instead of exact counts, so a game's Arpg.defineEnemy or Arpg.defineClass no longer fails it; the per-class, per-enemy and per-theme tests run over the kit's own entries; the theme test checks each tile set against procLevelKit's own tile sets (a check 1.1.9 never ran) and skips a look block the host world does not install (the game already loads the blocks it finds and skips the rest); setHeroStats measures attackRange and dodge from the totals the host already holds. No game code changed; every dependency pin is as in 1.1.9.

  • 1.1.9: Every package arpgKit requires is pinned at a published release this world holds, so a game installing or updating it gets one copy of each and can update the kits beside it: SecondWind 1.4.19 (the speed fix of 1.4.18: each class walks at its own speed), controlsKit 1.4.12, saveKit 1.3.24, weaponsKit 1.3.10, comboKit 1.1.14, inventoryKit 1.0.29, pickupsKit 2.3.15, abilitiesKit, aiKit, gearStatsKit and procLevelKit at their newest. 1.1.6 to 1.1.8 recorded weaponsKit, comboKit, inventoryKit and styleKit versions no published commit held, so updating a dependency they placed failed. No code change beyond Arpg.VERSION.

  • 1.1.8: the 1.1.7 changes with Arpg.VERSION reading 1.1.8 (1.1.7 shipped with Arpg.VERSION still at 1.1.6, which failed the version test).

  • 1.1.7: Every kill a hero causes pays that hero, and rooms count the monsters really standing. Kill credit (arpgKit.rogue.creditBody) tries, in order: a hero the death names; a hero above what it names (a projectile or summon parented to its caster); the hero who last hit the monster, now also read from Lifeline's damaged events, which every SecondWind copy and every other damage source goes through (a trap or boss kit with its own health copy, a bleed or burn tick); and the only hero of a solo party when nothing names anyone. A death SecondWind's copy here never announced (dealt through another copy) still frees the room: Lifeline's died is a backup, and a monster at 0 health is taken as dead after 1.5 s. A room's count is worked out every second from the monsters there (liveCounts: gone or at 0 health no longer holds a room open; rooms not woken keep their planned count). A monster under the floor or more than its room's radius + 24 m from the room (knocked, pushed, stuck past its leash) is brought back to its room. A peer that becomes host mid-run (the host left) takes over the monsters already standing instead of spawning the first rooms again. Two new tests (27).

  • 1.1.6 (the work first numbered 1.1.5, a number an earlier refused publish had already claimed): Floors can be cleared again, and kills pay. The cause: arpgKit 1.1.1's install put two extra SecondWind copies beside a game's own (its api at one release, its Vitals at another), so one copy knew only the hero and another only the monsters; the room-wake loop asked the monsters' copy for players near a room, never found the hero, and rooms 3 and on never spawned (no error). Now: this world pins one SecondWind (1.4.18) for every arpgKit file, with abilitiesKit, aiKit, comboKit, inventoryKit, gearStatsKit, markersKit, controlsKit, menusKit, pickupsKit, weaponsKit and the material kits at their newest; rooms wake from the room's player list (layers.active.players), not from a health kit's registry (arpgKit.rogue: playerBodies, roomsToWake); every kill event carries the killer's body id (killerBody turns an entity proxy or a weapon's player key into the hero's body, and the last hero to hit a monster is credited when a death names nobody). SecondWind 1.4.18 also keeps the game's walking speed (older releases forced every class to 2.5 m/s). Solo with revive = "ally": alone in the room, going down ends in death at once (no 30 s bleed-out with nobody to revive); with two or more players the ally revive and bleed-out are as configured. A stale hero proxy no longer throws ArpgHero.gold ... was despawned from a pickup after the body was replaced (listeners disconnect properly and the write is guarded). Phone: an Interact button beside Potion (held, it holds controlsKit's interact action, the same as G / X and the pad's left trigger, so levers, chests, secret walls and ally revive work on touch); in landscape the health and energy bars sit 84 points down, clear of a game's own top strip (ArpgHud vitalsTop moves them); the phone controls drop their pause button, which doubled the engine's Menu button in the top right. Also kept from the earlier 1.1.5 work: HK.isPlayer guarded, the default avatar resolved by literal name under strict play, setHudVisible, controlsHint / setControlsHint, a distinct crypt colour per monster type, guarded cross-peer revive reads. Four new tests (25): rooms wake from the player list, kill credit, the Interact touch button, and the cross-peer revive read from the owner's snapshot (restored now that SecondWind 1.4.18 is installed).

  • 1.1.4 (the work first numbered 1.1.2 and 1.1.3, numbers refused publishes had already claimed): Arpg.setHudVisible(on) and the ArpgHud field visible: hide every arpgKit HUD screen on this peer and keep it hidden across redraws (one new test, 19). The SecondWind with hold-to-revive is numbered 1.4.15 (SecondWind's own world had moved on to 1.4.14 meanwhile; the change is a pull request there); this world's SecondWind, controlsKit and comboKit are their upstream content plus the pull requests sent (controlsKit's upstream no longer requires the removed deprecated canvas). Arpg.place resolves the default avatar and its camera behaviour by literal name, so play and publishing no longer refuse it under strict checking (resolve.dynamic_on_gameplay_path); the avatar option now takes an avatar asset (asset.resolve("...", "avatar")), not a name. Ally revive works across two real peers: the partner's search for a downed ally, the bleed-out and revive rings and the partyDown watcher read SecondWind 1.4.16's cross-peer answer (HK.downedNear, HK.view, HK.isDowned) instead of the synced Vitals fields, which on another peer could read up for seconds while the hero bled out (so Interact did nothing and a wiped party never ended the run). Needs SecondWind 1.4.16 (release 8fc2b2e, installed from its world). Crypt monsters were near white: one pale bone tint (0.78, 0.74, 0.66) covered five of the seven types and washed out under the crypt torches and grade; the crypt now gives each type its own colour (aged bone with rust, a ghoul-green brute, a hooded archer, a purple necromancer caster, an iron grave knight with gold), with a test that no theme tints a monster near-white. Arpg.place({ controlsHint = false }) and Arpg.setControlsHint(on) hide the top-centre controls hint for a run-loop strip. Three new tests (22).

  • 1.1.1: The how-to guide gains Use it in a roguelite (the five hooks in order: end screens off, exact floors, events, ally revive, stats from your own kits). Tested with comboKit's anim.module returning nil instead of false from a string? function (the type error that stopped Play under strict checking), sent to comboKit's world. No arpgKit code change.

  • 1.1.0: Roguelite hooks, all opt-in (see Using arpgKit in a roguelite): Arpg.place options endScreens = false, classPicker = false, revive = "ally" and bleedOut; Arpg.newRun sets seed, depth, theme, rooms, difficulty, enemyMix and boss exactly and answers whether it did; new events won (now emitted on every peer), hit, heroDamaged, heroDowned, heroRevived { by, player } and partyDown; co-op ally revive (downed where you fall, a partner holds Interact for 3 s within 2.5 m, back at 40%, with a bleed-out ring, a revive ring, prompts on both screens and a Revive button on phones) on SecondWind 1.4.15's new reviveHold; Arpg.setHeroStats / clearHeroStats / heroStats for class and relic kits; new modules arpgKit.rogue and arpgKit.heroStats. Fixes: the world is on the current @builtin, and controlsKit's prompts, overlay, gallery and controls no longer require the removed deprecated zui canvas widget module (they build the canvas widget themselves), which had stopped ArpgCamera, ArpgHud, ArpgHero and ArpgGame from loading and broke installs elsewhere; the world entrypoint loads its theme with ui.loadTheme. Seven new tests (18).

  • 1.0.18: The quick start states the fresh-install time measured with 1.0.17 in a brand-new world: 4 minutes to a playable six-room dungeon, no load errors. No code changes.

  • 1.0.17: Device fixes from a play test on mouse, pad and phone. Phone: tapping a slot in the open bag picks the item and tapping where it goes equips it (inventoryKit 1.0.23 reads a finger's tap on a slot itself, and the move stick stands down while the bag is open); health and stamina bars show in landscape as well as portrait; one Bag button instead of two (arpgKit no longer asks inventoryKit for its own touch Bag button beside controlsKit's). Desktop: after a touch session the desktop HUD comes back with the mouse; the compare card is drawn above the Character window and fully readable (gearStatsKit 1.0.3); class descriptions wrap inside their cards. Pad: d-pad left and right move the bag cursor, and one nudge moves one slot even when the game is busy.

  • 1.0.16: The classes fight through the combat kits. Every class weapon is a weaponsKit 1.3.0 weapon in the hero's hand (longsword, longbow with glowing arrows you watch fly, staff bolt, dagger), fired at the monster you picked and checked by the room host; the warrior runs comboKit 1.1.9's arpg move set (Light I, II, III, Heavy Finisher, Charged Heavy, Whirlwind, Leap Strike). Every gearStatsKit stat now changes the fight: life on hit, life steal, thorns, resistances, health regen, max mana, area size, gold find, magic find and experience bonus join damage, crits, attack speed, armour and move speed. Gamepad bag: a cursor on the stick or d-pad, A equips. The first kill of a run always drops gear. Brighter crypt (more ambient and torch light). Archer monsters kite less so melee heroes can catch them. The death screen names the monster that really killed you. One copy of each health and controls kit (aiKit 1.2.6, weaponsKit 1.3.0 and comboKit 1.1.9 released in their own worlds). gearStatsKit 1.0.2: every look and card style in one list.

  • 1.0.15: Gear now comes from gearStatsKit 1.0.0 (Forge of Fortune world), which replaces gearKit: 26 affixes, 5 rarities, 8 fixed-stat uniques, 3 sets with 2, 3 and 4-piece bonuses, six looks including horror, and six compare card styles switched live with setCardStyle. Same API, so the switch is a rename; equip and unequip still move stats by exactly the item's lines. Floating damage numbers are back and styled per dungeon look: Arpg.place adds markersKit's Feedback (crosshair off), and markersKit is now a listed dependency (in 1.0.14 the showcase only had numbers through an unused kit). In portrait the health and mana bars and the room chip sit under the Stats button at any screen size. New reuse review for the shipped versions, with the measured reuse share (94.1%).

  • 1.0.14: Phone preview and layout fixes. setup.previewPhone() now sizes the game view itself to 844 x 390 or 390 x 844 (in the editor the game view is only part of the window, so 1.0.13 gave a much smaller screen) and "off" restores the size you had. In portrait the health and mana bars sit under the Stats button, clear of Bag and pause, and the camera leans less toward monsters so the hero stays above the move stick. Showcase: removed an unused fighting-game kit whose old weaponsKit dependency left extra SecondWind and controlsKit copies.

  • 1.0.13: Fighting that works by just playing. Space (pad X) walks up to and hits the monster under the cursor, else the one you clicked, else the nearest within 10 m; it used to swing at the empty ground under the cursor. Skills aim at the monster nearest the cursor. The camera leans toward the monsters around the hero and pulls back when they spread, so archers stay on screen. Gentler opening rooms: a small start pack, no brutes or elites in the first fight room, elites from room 4. A quick tap of I or Tab opens and closes the bag (a tap that went down and up between two frames was missed). Phone layout complete in portrait and landscape: health and mana bars, the move stick and the Bag and pause buttons show at once (not only after the first touch), and any phone-sized screen picks the phone HUD; setup.previewPhone() shows it on a desktop. Engine pin upgraded. No long dashes in text.

  • 1.0.12: When a scene made this session will not save its player setting (an engine fault, reported as 01M7570BKMRCN72FCQQMQ94Z6P: the live scene says "spawns" while every save writes "none"), setup.prepare() runs a quick Play/stop round trip itself. That reloads the scene from its file, and the setting then saves. 1.0.11's explicit save and reload did not get past it.

  • 1.0.11: setup.prepare() saves the scene outright after setting its player setting, and reloads it and sets the setting again if the save still does not hold it. A scene made in the same session kept the setting live without writing it, even once settled, so 1.0.10 still stopped there.

  • 1.0.10: setup.prepare() sets the scene's player setting only once the new scene has finished saving its build. Set any earlier, the setting reached the live scene but not the saved one, and every later attempt changed nothing, so 1.0.9's retries could not recover it. Monster presets are registered again when aiKit has reloaded and forgotten them, instead of being trusted from arpgKit's own cache.

  • 1.0.9: setup.prepare() checks that the saved scene keeps its player setting and sets it again until it does. Set while the scene was still saving a rebuild, it could be dropped, and the hero never spawned.

  • 1.0.8: setup.prepare() retries the scene build when the first one fails. In a world with no scene, the build can race the save of the scene prepare has just made, and nothing reruns it on its own.

  • 1.0.7: Fresh-install fixes, found by installing into two brand-new worlds and following only the README and the example guide. A new world arrives in one of two states, and both broke the quick start. With Zero's empty-world template, the template's player spawn won over the hero's (the engine spawns from the first spawn it finds) and its sun and ambient light doubled the dungeon's. With no scene loaded, the build.luau the quick start writes was never a loaded scene, and a blank scene gives joining users no player. New setup.prepare() handles both in one console line, and the quick start and example guide use it.

  • 1.0.6: setup.clearStarter() removes the empty-world template; ArpgGame warns in play when another player spawn is in the scene. The example guide loaded its monster with a relative require that does not resolve from a scene; it now uses require("frostbite.monsters"). Both name the kit's real guid. One new test (10).

  • 1.0.5: Fixes. A level-up no longer fails (saveKit hands the level over as an event table; the stat bonus for a new level now applies). Loot beams stand for every rare, epic and legendary drop (a drop was sometimes read before its item was filled in, or lost track of on a later frame). The look and feel modules start clean in every play session.

  • 1.0.4: Polish. Each dungeon look now lights itself (look): the stone crypt is dark with warm flickering torches, the hero carries a circle of light, the void past the walls is black, with fog, bloom and a colour grade per look. Hit feedback on every attack (feel): the warrior's Cleave and the mage's Arcane Bolt asked for a juiceKit effect that does not exist and so had none; they now use arpgHitMedium, and force push, frost nova and nova get one too. Sounds for hits, kills, casts, drops and pickups, the hero's red hurt flash, loot beams for rare and better drops, combat music. New death screen (who killed you, rooms cleared, kills, gold, level, the world drained of colour) and win screen (time, kills, gold, level, best gear in its rarity's colour, turning rays of light). Measured frame times in this README. One new test (9).

  • 1.0.3: Packaging. The README gains a controls table for mouse, pad and phone, every class, monster, look, HUD layout and loot tier described, and the installed parts with their versions; the reuse review rates every installed part at its current version; the how-to guide covers the phone and gamepad controls.

  • 1.0.2: Gamepad and phone pass. Gamepad: the stick moves the hero (the pad was reported as pad and never counted, and a hero revived after a death stayed frozen until a respawn), X or right trigger attacks the nearest monster, A B Y RB cast skills 1-4, LB or d-pad down drinks a potion, Select opens and closes the bag and B closes it; inventoryKit's own pad and number keys are switched off (its controls = false, inventoryKit 1.0.18) so nothing fires twice. Phone: one set of fight buttons, abilitiesKit's touch slots with icons and cooldowns bottom right, aimed through the hero, plus a Potion button; controlsKit's arpgPhone scheme (registered by the kit) keeps the floating stick, tap-to-walk, Bag and Pause; everything keeps clear of the engine's Menu button and of each other in portrait and landscape; the tracker sits below the Stats button. Needs inventoryKit 1.0.21 and SecondWind 1.4.6.

  • 1.0.1: The HUD redraws at most about eight times a second while messages show (it redrew every frame, about 8 ms of UI work).

  • 1.0.0: First release: 4 classes, 7 monster types, 6 dungeon looks, 4 HUD layouts, 4 loot tiers, click/hold/tap/stick movement, angled follow camera, seeded six-room runs with room clears and a sealed exit, loot for everyone, gear stats through gearKit, XP and levels, start, death and win screens, room-by-room monster waking, tests and two guides.