Ho. Le. Mo. Le. Wheeew, new build: https://wiki.arcengames.com/index.php?title=AI_War_2:The_Great_Refactor#Beta_3.750_Smooth_Simulator
This one rips up the entire threading model that we’ve been evolving for the game since 2016, and replaces it with something more modern, as well as fixing a number of threading-related bugs and other issues. The TLDR is that it’s faster than ever, especially on older computers, and it works REALLY well and is way easier for myself and others to debug, too.
The game was downright unplayable for the last few weeks in terms of things like stalled threads and a bunch of cross-threading issues. I’ve been really tearing my hair out, trying to figure out what on earth was going on, and simplifying code, simplifying it further, and lots of experimenting. Daniexpert really gets MVP once again for truly excellent help with bugtesting and reporting in this arena.
Special thanks also to tom.prince, who had lots of great ideas and commentary on the threading model and things that we’d have to consider. There were several cases where I was going to do one thing, and chatting with tom on discord let me skip a few steps of pain and jump to a better solution.
There’s also a bunch of other improvements in here, and various features for DLC3. I am extremely weary, though, so I’m not going to enumerate all of them. I thought I’d be done with this threading thing days ago, and then I started wondering when on earth I’d be done with it at all. Very happy to say it seems to work well now, and if there are remaining problems, they will be much easier for me to debug.
Tomorrow, it will be time to move on and work on other bugs and features that have been delayed by this whole mess. I think this was first on my radar on October 27th, maybe a bit before, so this was QUITE a diversion. The release notes have pretty much the whole story, and the chris-talks-code-gameplay discord subchannel has the rest of it, if you’re curious.
More to come soon.
Enjoy!