Spellbox

A pixel-art roguelite where your spellbook is a set of runes. Pair a delivery with an effect, cast what you've made, and fight down ten procedurally generated floors to the Archon at the bottom. When you fall, you wake up at home with gold to spend, ready to try again.

A fight with a goblin: Fireball, then Frost Nova, then a critical Frost Beam that leaves it chilled.

What is Spellbox?

Spellbox is a top-down roguelite with turn-based battles. You play a wizard who lives in a small house at the edge of a hub town, and every run starts the same way: set up your runes at the workbench, walk out the front door, and step through the portal at the south edge of town. The game asks "Begin a run?", and you're in.

Exploring happens in real time. Fights don't: when you walk into enemies you switch to a separate battle screen, where turn order, mana, and the spell you put together decide the outcome. Every run is different, because each floor is generated fresh and the cards you're offered change every time.

Spellbox was built without a game engine. The world is drawn on a plain HTML canvas, and every menu and HUD panel is a real web component layered on top. It runs in the browser on desktop, and it needs a keyboard and mouse.

Home, sweet home

Your house is where the long game happens. Each room has a station:

  • The workbench, where you choose the five runes you take into a run.
  • The cauldron, where the gold you bring home buys permanent enchantments: Vitality, Reservoir, Focus, and Empowerment.
  • The wardrobe, with outfits like the Tall Hat, Mystic Metal, and the Lunar Layer.
  • The item chest, the bed, and the bulletin board, which shows the leaderboard.

Beyond the house you'll find a merchant selling consumables, such as the Healing Flask (25 gold) and the Reviving Potion (150 gold), and a library with its resident Scribe.

How a run plays

  1. Explore the floor. Each floor is a procedurally generated town. Enemy packs hide in tall grass and under trees.
  2. Fight or flee. Walk into a pack and you choose to fight or flee. Fleeing costs mana. Zombies don't give you the choice.
  3. Battle. Turn order comes from an initiative clock, so faster fighters act more often. On your turn you pick runes to build a spell, pay its mana cost, and cast.
  4. Pick a card. After each fight you choose one of three cards, with one reroll. Cards are how a build comes together.
  5. Clear the floor. The exit portal offers another card, with three rerolls this time, and restores half your health and mana.
  6. Face the Archon. Floor 10 ends in a boss fight with the Archon, who has 800 health.

Win or lose, you wake up back home, and the gold from the run goes toward permanent upgrades. Every attempt makes the next one a little stronger.

The rune system

Every spell is two runes: a delivery, which decides how the spell travels, and an effect, which decides what it does when it lands. Seven of each make 49 named spells.

DeliveriesEffects
ProjectileFire
BurstFrost
BeamForce
ChainVoid
MineMend
ShotgunPoison
SelfLightning

A Projectile of Fire is a Fireball, a Burst of Frost is Frost Nova, and a Beam of Frost is Frost Beam. Others are less obvious: Arc Chain, Disintegrate, Null Zone, Healing Well, Ember Cloak, Countershell, and Scatter Flame are all in there. Mines are the odd ones out: they sit for three turns, then go off across a 3×3 area.

Battles have a little luck in them. Around 8% of attacks miss, around 12% are critical hits for 1.5× damage, and damage rolls vary by 15% either way. So a plan that almost works will sometimes work anyway, and sometimes it won't.

Cards and builds

There are 67 cards: 9 common, 32 uncommon, 17 rare, and 9 mythic. They're how a build comes together over a run. Mythic cards are the ones people chase: Solar Lance, Permafrost, Gravity Well, and Void Sovereign can each carry a whole run.

Companions

You don't have to fight alone. Some beasts can be tamed mid-fight, and some people can be hired for gold. Your party holds up to five, and each companion has a passive that changes how you play:

  • Frog: Bog Kin
  • Jebediah: Ironfist Oath
  • Bunny: Snowdrift
  • Ipsaleth: Last Rite
  • Zyntripetal: Astral Discipline

On the overworld, your party trails behind you in a line. It's very cute, and nobody can convince us otherwise.

Modes and enemies

Standard runs are ten floors with the Archon at the end. Forever mode keeps going, with a boss every ten floors (10, 20, 30, and on), and each mode has its own leaderboard tab. Along the way you'll meet Shamblers, the Undead, Goblins, and Hexers.

Accounts are optional. Signing in saves your run history and personal compendium and puts your runs on the global leaderboard, which is scored on the server so it stays honest.

Controls

ActionKeys
MoveWASD or the arrow keys, or right-click where you want to go
Choose runes1 to 5
CastSpace or left-click
Confirm, cancelEnter, Esc
Reroll a card offerR
Open the menuTab
Skip the radio track`

Spellbox doesn't support touch screens yet, so play on a computer.

Tips for reaching the Archon

  • Mana is your other health bar. Spells cost it, and so does fleeing. Don't start a fight you can't afford to cast your way out of.
  • Spend the rerolls. The floor-exit portal gives you three. A card that fits your runes is worth far more than one that's merely rare.
  • Bring a Reviving Potion once you can afford one. 150 gold is a lot, but cheaper than losing a run on floor 9.
  • Go home richer. Even a failed run pays out. Enchantments from the cauldron last forever.
  • Read the log. The battle log under the arena shows every hit, crit, and status effect, so you can see why a fight went wrong.

How it's made

Spellbox is written in TypeScript with no engine. A fixed 60 Hz simulation runs on an entity-component-system design, and rendering interpolates between steps so motion stays smooth on any screen. The game draws at a 1600×900 logical resolution and letterboxes to fit your window. Floors are generated from simplex noise and a seeded random number generator, so any floor can be reproduced exactly from its seed.

Every sound effect is synthesized live with the Web Audio API, using a small open-source synthesis library we've built on, and the pixel art comes from an in-house editor. Accounts and the leaderboard run on Cloudflare Workers, with D1 and KV for storage.

The in-game radio has 34 synthwave and darkwave tracks. 29 of them are by Karl Casey at White Bat Audio, from the album OBLIVION, including "Neuromancer", "Night Ride", and "Outrun the Reaper".

Screenshots