Plugging the Memories
Hey Folks! Hope everyone had a good weekend. I decidedly had a bad weekend. Or, at least a bad Sunday. It consisted of fever chills, aching skin, coughing, and swallowing my own mucous for almost 24 hours. Rochelle, too. Our daughter had it Friday, so it was sort of foretold. Still a bit achy and chilly today, and coughing more, but I feel a full human's worth better.
Last week's NEO Scavenger desktop patch seems to be an (almost) success! Kaaven and Lin report that the autosave issues have been relegated to a visual glitch that saving/reloading will fix, and so far, no corrupt saves. Woohoo! Plus, they were able to direct me to repro steps for the glitch, so there's even a chance I can fix that. I plan to give that a shot later. But first: mobile work.
It's been weeks since I've done much more than open the code editor for mobile, and I was starting to feel guilty about not being able to help Tiago. A few of the remaining issues are minor in the grand scheme, but really weird or hard to pin down. Plus, memory leaking is still an issue.
That said, I did (finally!) make some headway on memory today. It turned out that the encounter system was adding one extra creature to the game each time it added a creature to the game. Now, that doesn't actually happen often (think dogman at cryo, or Merga Wraith if amulet is removed), but the cryo encounter automatically adds Yezinka, and possibly a dogman, so that can add-up after multiple play sessions.
Also, it turns out that spawning creatures as a result of scavenging and other random events would sometimes generate creatures that never got used. Primarily, when the faction limit was reached. The game should've been disposing of them if the limit was reached, but instead just ignored them. Again, not a smoking gun, but this all adds-up over time.
I did a bit more testing after these fixes, and I'm still seeing some strange numbers for objects in memory. When a 5-10 minute game quits to the main menu, there were ~1300 item instances and 750 encounters. Considering there are only ~700 types of objects in the game, I'm wondering what these leftover items are. And those encounters? Are they the basic loaded data, or are there copies of that data, too?
Finally, I'm seeing loads of conditions called "Camp benefits" stuck in memory after quitting. This isn't entirely unexpected, since each camp (multiple per explored hex) has a unique camp condition for its stats. But I would expect these to be removed when the game quits, and I'm suspicious more are being generated than used.
Anyway, I'll look more into this tomorrow. But not a bad start to the week!