Today: some fun bug-hunting stories.
In preparation for the launch on Monday I’ve been working through the bug backlog, making the game as stable and smooth as possible before lots of new people try it out. If something kills you, I want it to be on purpose!
The thing is, when you’ve been fixing the obvious bugs in a codebase for several years, any bugs that are still around have to be pretty weird. All the obvious stuff has been tested a million times and works fine, so problems only happen in massive co-incidences involving several rare things at once. That means the game-breaking bugs and crashes I’m fixing now are happening in situations like:
- Equipping a Thorns buff (e.g. Holy Armour), then using Restless Blade to charge at an enemy with very low health so that it attacks you first, killing itself, immediately before Restless Blade hits and kills it again
- Playing an Alchemist and shooting the final boss for its last few HP with a Pistol shot that knocks you backwards into a pit, killing you instantly while winning the game
- Playing the Pugilist on Act 1, buying the Knockback talent and then punching a Lieutenant through the right half of the only double door in the game. Yes, the left half worked fine.
The toughest bug I’ve had lately wasn’t gameplay-related at all, though.
Sometimes, on desktop builds, the screen would go black after a few minutes. This would happen at random. It didn’t happen on my computer; it only happened to other people. I asked for a few details, and they all had really nice nVidia graphics cards. Could it be an obscure driver bug? How would I even start tracking that down?
Then it got weirder. When I sent them a debug build to find out more, the problem went away. That meant no debugging at all, even remotely.
I ended up logging loads of rendering data and adding shortcuts to fix things up that might have become invalid. As it turned out, the graphics card didn’t mean anything, and it wasn’t uninitialised memory. Instead, the very fast CPUs they had (alongside their nice graphics cards!) could technically process some game frames in zero milliseconds. So these zero-length frames? Each would cause a divide-by-zero in camera code from 2013 and replace half the camera data with NaNs. Cthulu numbers, figures so horribly wrong they break everything that looks at them.
With the bug backlog almost clear it’s starting to look solid now, at last. Tomorrow I’ll be adding the last few touches on Steam (like trading cards!), we’ll do a little more testing and I’ll write up the differences between the Steam and F2P versions so it’s as clear as possible.
Until then. 🙂