kaastleBetaA LITTLE PRACTICE. A LEGENDARY DEFENSE.
How to play↗

Performance

Sixty frames on an ordinary laptop

Why a learning game has to stay smooth, and how three weeks of work took a crowded battle from about 42 to a steady 60 frames a second.

Written in retrospectCovers: 17 September – 6 October 2026

Roman legionaries, archers and cataphracts meet Song swordsmen, Chinese archers and Qing horse archers on an open steppe.
About seventy soldiers on The Steppe. This is the crowd size we measure against.

Kaastle asks you to do two things at once: find a note on your fretboard, and keep an eye on a battle. If the battle stutters, your eye gets pulled away from the fretboard at the wrong moment, and a stutter just as you play feels like the game missed your note. So smoothness is not polish for us. It is part of what makes the practice work.

We set ourselves a simple target: 60 frames a second on an ordinary laptop, with a full battle on screen, and a home page that opens quickly on a phone. This post is the story of the first three weeks of chasing it.

Counting the right thing

The first step was to stop guessing. We added a small ⏱ Perf overlay to the battle screen; you can open it yourself while watching an AI Battle. It shows frames per second, how long each frame takes, how many separate drawing jobs the graphics card is asked to do (we call them draw calls), how many triangles are on screen, and how much memory the page holds.

The battle screen with the Perf overlay open in the corner, over an AI battle at Red Cliffs.
The ⏱ Perf overlay: frame time, draw calls, triangles and memory, live during a battle.

Draw calls turned out to be the number that mattered most. A graphics card is fast at drawing many triangles in one go and slow at being told, again and again, "now draw this little thing". Our soldiers were built from blocks, a block for each forearm and shin, and every block was its own job. Seventy soldiers meant thousands of tiny jobs.

Three weeks, step by step

  • 24 September. The battle's thinking got faster: route finding now keeps its open list in a heap, and many small calculations are worked out once and kept. One step of the battle ran about fifteen times faster, and the one-second hitches that sometimes froze a big fight were gone.
  • 27 September. Soft round shadows under each soldier replaced real cast shadows, cutting draw calls by about 40% with seventy units on the field. The same day we baked each soldier's joints together into fewer pieces, cutting draw calls by a half to two thirds. A crowded battle went from about 42 to 60 frames a second.
  • 3 October. A Performance mode for older machines: fewer pixels, no edge smoothing, no shadows or gore, and the fallen fade away after two seconds. If your first battle runs below 30 frames a second, the game turns it on for you.
  • 4 October. Low, Medium and High presets, picked from your device and stepped down after a slow battle. The home page stopped loading the whole 3D engine before you had asked for a battle: its first download fell from 2.6 MB to 0.46 MB. The piano samples now come from our own server, with a built-in synthesiser as a fallback if they are slow to arrive.
  • 6 October. Skinned soldiers became the default (the visual side of that change is in Small soldiers, real weight). Each soldier is now one bending mesh, and a whole army of them can be drawn together.

What skinning bought

Skinned soldiers look better, but we only switched them on once they were also cheaper. We ran the same battles both ways:

Draw calls per frame (fewer is better) rigid (before) skinned (now) Medium battle 509 356 Large battle 502 349 Crowded (53 units) 1,217 636 Stress (101 units) 1,905 908 Measured 6 October 2026 on our test laptop, same battles both ways.
Skinned soldiers cut draw calls by 30–50%. In the 101-unit stress test the frame rate rose from 53 to 58 a second.

Nothing comes free. Skinned soldiers carry 1–2% more triangles and take a few more megabytes of memory, and the first time a new kind of soldier appears there is a short hitch of about 45 thousandths of a second while the graphics card prepares it. We judged that worth it for a battle that holds 60 frames when it is busiest.

Faster for us, too

Speed also matters behind the scenes. Every change to the game is checked by an automatic test run before it reaches you. On 27 September that run took 54 seconds; we cut it to under 7. It crept up again as the game grew, and by 5 October we had brought it from 37 seconds back down to 12. Fast checks mean we check more often, and fewer broken battles slip through.

Still to try

Some well-known tricks are still on our list rather than in the game: drawing far-off soldiers in less detail, skipping soldiers the camera cannot see, running the battle's thinking on a separate thread so it never competes with drawing, and a careful hunt for memory that is never given back on long sessions. If your device struggles, tell us. The numbers from the Perf overlay help us more than anything.