All work

2026 · Design, engine, art

To Arms, Squire!

A browser RPG I built from scratch, with card-driven duels and bosses that learn your habits.

  • TypeScript
  • Next.js
  • React
  • Zustand
  • Supabase

To Arms, Squire! is a role-playing game that runs in the browser. I built everything in it from scratch: the combat engine, the boss AI, the world, the pixel art, and the tools I make them with. You play a squire whose knight rode out and never came back, and you set out to earn your own name. The road ends at the old seals under the realm. The longer you take, the harder the world gets, and when a run ends, the world is shuffled and dealt again.

You can play it right here, with no sign-up. The game saves as you play, tied to this browser.

A duel mid-bout: three cards committed, the foe's three still face down
A duel mid-bout. My three cards are on the table; the foe's are still face down.

The duel

Fights are played with cards. Each bout, you lay three action cards on the table in order, choosing from attack, block, dodge, catch your breath, and the stronger techniques your build has earned. The foe commits three of its own face down, though a boss shows you its first. Then the cards turn over one round at a time, and each pair resolves against the other.

Every fight runs on three bars. Health is how many mistakes you can afford. Stamina pays for your cards, and catching your breath buys it back; if you can't pay, you lose the round and stand open. Posture soaks up pressure, and when it hits zero, your stance breaks and you lose the next round. Most decisions come down to which bar you're willing to spend.

I designed the cards to read like playing cards. The price sits in the corner, and the payoff is the one big number in the middle: the damage it will do, the guard it raises, or your odds of dodging this foe's swing. The small print lists the odds and any other effects the card triggers. Rules text names a status once, and hovering the name anywhere shows its definition from one shared glossary.

How the bosses play

Common foes draw from a weighted hand of moves, and elites play the solver described below. Bosses and minibosses choose their cards in three steps each bout:

  1. Propose. The boss's script offers a few in-character lines. The Graven Warden holds his wall; in his second phase, he parries if you've been swinging at him and presses if you haven't.
  2. Score. A simulator runs each line through the real combat resolver against a model of what you tend to play, and drops any that score far below the best.
  3. Choose. A weighted shuffle picks among what's left, so the boss is never fully predictable.

I wanted boss fights to be something you can learn, so the AI only reacts to what has been revealed. It never peeks at your face-down cards, which is why the game can show you a boss's opening move before you commit. It can change its later cards mid-bout, but only in response to cards already turned over.

Sprites stored as text

Every sprite in the game is a small grid of characters in a TypeScript file. A dot is a clear pixel, o is the outline, and the letters A to H are color roles, like metal or wood, that each sprite maps to the palette. Recoloring a sprite is a one-line change, and a redrawn sprite shows up in a code diff like any other change. One shared renderer draws them all as crisp SVG. There are four libraries: the game's 12×12 interface icons, its fighters, its tarot art, and this site's own sprites, including the tree on the home page.

The figures below are drawn live from those grids.

The squire
Graven Warden
Adrix
Brother Ilm
Dark Beast
Ulgar
The squire and the five main bosses, drawn from the game's sprite data at a whole-number scale. The bosses are flipped to face the squire, as they are on the duel stage.

I draw and edit most of them in a sprite editor I built for the job, which saves straight back into those files.

Balance

Every number in the game affects the others, so I don't tune it by feel alone. A headless simulator plays the real combat engine with scripted players: thirteen builds, from heavy hitters to casters, each played twice, once with ideal gear and once with the gear a real run tends to find. One pass is thousands of fights against the five main bosses. I aim for the median build to win 20 to 40 percent of the time.

An integrity suite checks the content against its own rules. Every tarot card is accounted for, the price a dialog quotes is the price you pay, no description hard-codes a number its effect owns, and no text a player sees uses internal terms. It takes about ten seconds to run, so I run it all the time.

tarot cards
78
simulated builds
26
automated checks
600+

The arena

When a run ends, its knight can stand in the arena as a champion. Other players duel it, and the champion is played by the same boss AI, which already has a model of the challenger's habits. The server hands out the random seed with the opponent and only records a result after replaying the whole fight from that seed, so every recorded result is a fight the rules actually produced. Ratings use Glicko-2, so a new champion's rating settles as it fights.

What's next

Each of the tarot deck's twenty-two major arcana now has its own illustration and plays by a rule no other card shares. Next is a harder ladder for players who have won a run. It's built, and it opens after I playtest it myself.