Posted January 13, 2020 by summitfever
#beta #boring #twbi
Hap-py New Year!
I've started the year off right-ish by fixing a couple significant memory leak bugs that I'd previously overlooked, along with some smaller bug fixes, optimizations, and enhancements. The memory leak fixes probably won't be noticeable to those with lots of RAM (except perhaps on long sessions), but players with lower end systems should notice a big improvement and no more 'out of memory' crashes. The enhancements are mostly quality-of-life changes for the main menus, and I've also created a new tutorial mission that covers weapons, grenades, cover, and evasion.
For anyone interested, the main memory leak was related to the battlefield redraw process in There Will Be Ink. Background: Because every unit, bullet, shell, blood spatter, and shot-off helmet is a separate object in TWBI, I needed a way to handle all the thousands of objects that pile up in a battle if I wanted them to remain for the duration of the battle. This was done by having a process that checks the framerate every 10 seconds (and alternately runs regardless once per minute) and calls a redraw process as needed. This redraw process takes all the shells, corpses, spatter, and helmets lying on the ground, draws them to the battlefield image, and then deletes the game objects to free up memory and processor cycles. The bug that I'd long overlooked was that the game wasn't freeing up the memory used by the old background image, so each redraw would eat into more RAM, eventually causing a crash. Since I fixed that issue, memory usage is much more lean, and such crashes should no longer occur (but, as always, please let me know of any issues). It's worth also noting that the "Persistent Battlefield" mentioned above can be turned off in the game options, which leads to objects slowly fading away instead of remaining on the battlefield.
I know, this is all pretty boring stuff, but I need to keep the foundation sturdy before piling on new content. Though, to be fair, I also get great enjoyment out of fixing bugs and picking up a few extra fps where I can.
Anyhow, below is a boring change log to go with this boring update! Next time around I should have some more exciting things to show you. Cheerio!
New Features & Content
Changes & Enhancements
Bug Fixes