Kronark Studio

Dev Diary

V1.0.7 Optimization Devlog #1

Two complaints came up more than any others: the game starts slowly, and it stutters now and then when you zoom out and pan the map. This patch is dedicated to those two; no new features, no bug fixes. We started by measuring, not guessing.

Measure first

Every change is measured the same way: the game opens in a hidden window, loads the same save and records its startup time; then the camera pans the map continuously at three zoom levels and logs every frame that takes longer than 50 milliseconds.

Our baseline:

  • Startup: 28–48 seconds warm, 57–73 seconds right after a reboot.
  • The biggest startup cost: the map background (147 MB). The main thread waited about 18 seconds while reading it.
  • Zoomed out and panning: at the farthest view, 124 frames over 50 ms in 30 seconds, the longest 387 ms. At medium distance, one 3.3-second freeze.

What we’re doing

  • Read order: background read-ahead and the game’s own reads were fighting over the same disk. We’re reorganising read-ahead during loading.
  • Background pack: we’re trying out packing the hundreds of small map background files into one file that is read in a single pass. It’s still being tested.
  • Map caches: pieces that were recalculated every frame while panning are now cached.
  • Loading screen: the FPS cap for an unfocused window no longer slows startup while loading.
  • Performance log: the game now writes long frames and startup time to logs/performance.txt. If you hit a stutter, sharing that file on Discord helps us a lot.

Is the patch out?

Not yet. The first part of the changes above is done and is being tested on our own machines. Loading is already measurably better, but we haven’t hit our targets: we want a warm start under 20 seconds and no remaining stutter when panning the map at the farthest zoom.

We’d rather not ship a half-finished patch and make you wait twice. So the optimization work will arrive as part of the next big update, together with the mobile version and multiplayer. Until then nothing changes in your game; when it lands, the launcher updates you automatically as usual.

Results

When the patch is out we’ll repeat the same measurements and add a before-and-after table here.