Big Bugs and Small Tweaks
Today was mostly filled with playtesting and bug fixing. And as it turns out, that latter part was a much-needed step. There were some pretty glaring bugs in the code.
Some very big fixes were due to a bug reported on Desura. Namely, the game crashed after a long session (4+ hours) was saved and later loaded. Understandably frustrated, the player contacted me about the issue, and we got to talking about the symptoms. A few remembered clues and screenshots later, and I was staring at a nest of interrelated bugs.
Specifically, there was a bug in the way save games were loaded, which sometimes caused player stats to be doubly-penalized for certain conditions (poisoning being one of them).
Additionally, there was a bug such that loading a save file where the player is unconscious causes the game to enter "sleep mode" before it finishes loading the save file, getting stuck with a black screen.
And on top of that, some code I added recently to make conditions with multiple outcomes independent of each other was broken, causing a null pointer error when advancing (again, in cases like poisoning).
So if your character had poison, cholera, or any of a number of other issues during a save/load, there were some pretty bad errors flying around. Between that and the unconsciousness issue, I wonder how many game crashes and lost saves were the result of this trio. I'm not sure if any of this could've caused the "endless turn" bug, but they certainly didn't help.
There was also a minor bug occurring when loading a save file that contained nested, stacked items. But only sometimes. I just ran into it by accident, and plugged the hole. Similarly, there was an issue when dragging an item in the items screen and trying to exit the screen, which caused all items to disappear temporarily. And worse, if the player rolled over one of these disappearing items, the game would throw an error. This, too, was fixed.
And finally, I fixed the bug that caused item components like string and screws to be partially-degraded if spawned in a "weathered" treasure. This should prevent cases where a degraded screw or string causes an otherwise good-condition crafting item to appear broken.
I also made a few tweaks and improvements, based on both feedback and playtesting.
I changed combat item access so that it should be possible to access items when under fire by ranged weapons, as long as the player is behind cover. Previously, being within range of any weapon prevented item access, making many firefights very short.
I added a cheap-o memory stick item to the game to allow software to exist outside of computers. It uses the same art as the security footage memory stick, and has minimal value when empty. My main reason for doing this was to remove hacking software from hardware found "in the wild." Hacking software is now something one must buy specially in the junk market. And in order to appear in the junk market (e.g. the ground slot), software needed some sort of container. Hence, the cheap-o memory stick. Regular software (e.g. lamp, GPS) can be both found and bought, however.
Also, I finally changed the message window to only expand/collapse when the user clicks inside it, instead of when rolling over it. Many people accidentally roll over it when aiming for shoes or items low on the screen, and it can be annoying. Now, there's a button to open/close it, but the user can actually click anywhere in that area to make it expand/collapse. The button is just a hint that one can click there.
The point of playtesting today, of course, was to get a sense for how the combat feels. Despite all the bugs found and fixed, I got a healthy-sized play session in. I decided to bump-up the hardware spawn rates a bit more, and after two days of frequent scavenging, I found my first laptop!
I was actually pretty excited about it, which is hopefully what other players will feel. I couldn't wait to see what was on disk, so I opened it up, and...no charge in the battery. Bummer.
As luck would have it, I stumbled upon a smartphone in an abandoned office tower a bit later. And it had charges! I switched it on and...locked. Damn. I tried transferring charge from its battery to the laptop, and switched that on instead. Also locked. And me with no hacking skill nor software.
On the bright side, I had a decent amount of charge to plop into my empty flashlight, and dusk was coming soon.
Overall, it felt about right. Like caches of info treasure waiting to be cracked open, if I had the skills and tools.
I'll likely do some more testing tomorrow, and with any luck, things will run a bit smoother. Have a good night, all!