1. AI War 2
  2. News

AI War 2 News

Beta 3.505 Long-Term-Thread Efficiency

New daily beta! https://wiki.arcengames.com/index.php?title=AI_War_2:Finalizing_Multiplayer#Beta_3.505_Long-Term-Thread_Efficiency

1. Okay, there has been so much code review today, and for the longest time I didn't really find all that many things of concern. Yes I was able to make some improvements to correctness after pooling in some areas, but it was nothing that would explain the sorts of errors that Zweihand and Setsuna were reporting seeing intermittently. Which was a surprise, because I figured it would be in the external data for factions.

2. After working on verifying that was all okay and fixing up the parts that were not, Badger and I got to talking about the Zenith Trader case in particular. The Zenith Trader uses a data structure for its movement that most of the newer factions didn't use. That data structure was basically a copy of parts the main game data, for purposes of use on the "long term planning" AI/NPC threads. I had mentally flagged that category of data as being potentially problematic when I was making things pooled a bit ago, but a problem with it wasn't obvious.

3. Rather than start testing and debugging that long-term data copy, I decided to strip it entirely out instead. This isn't used by more recent factions for a reason. Essentially, as I've further developed my thinking on ways to speed up multi-threaded simulations (once you take perfect determinism off the table), it was clear that the long-term-data copy was a relic of the old deterministic way of thinking. This had been on my radar for at least a year as something I wished I could kill, but the game was working fine and so there was no sense rocking the boat. Well... now the game was NOT working fine, so it was the perfect time to strip that out.

So what was the result? Well... it's hard to say. Those behaviors that were observed were already really intermittent. This may have been the part of the code that was causing them, or this may have been utterly unrelated to the bug I was ostensibly chasing. But I do know one thing: this data and the way it was generated was one of the biggest slowdowns for the game, on the main sim-coordinating thread. I have wondered for years where the "performance leak as planet counts climb" was, and I think that as I was stripping this stuff out I got my answer. The amount of time spent calculating this stuff was staggering, and also completely unneeded. It's an excellent showcase of why my newer method for multithreading is so superior in the first place.

I'm running on a really beefy CPU these days, so I don't notice a huge difference since I already had full sim speed, but it does seem a little snappier to load the savegames at the very least, or maybe that's my imagination. I'll be curious to hear if there's a noticeable speed boost for anyone playing a more extreme game setup, or with a lower-spec machine.

----

This did, naturally, break all the code mods again. The Arcen-maintained ones and AMU are updated, but I didn't give SirLimbo any warning or any time to update his actual faction mods. Hey, this is a beta after all.

There is some more data along the lines of this long-term data (it's data for short-range planning, in this case), and I may look into stripping that out as well, thus breaking all mods AGAIN.

My final ideas for some of the problems seen in multiplayer are also something I plan on implementing soon, and those are going to require reworking all the notifications and intel tab entries and a lot of unit tooltip addenders, which faction mods also tend to have in abundance. It's a bit of a rough time to be modding via code here!

But the result is going to be a leaner simulation for singleplayer, and a vastly more performant and accurate situation in multiplayer, too. I'm not thrilled with how this is hitting my schedule, but hopefully some of these simplifications also remove the bugs that are lingering at the moment.

More to come soon.
Enjoy!

Beta 3.504 Multiplayer Achievements

New daily beta build! https://wiki.arcengames.com/index.php?title=AI_War_2:Finalizing_Multiplayer#Beta_3.504_Multiplayer_Achievements

So what's new?

1. All relating to Zenith Onslaught, 44 more achievements have been added to Steam.

2. Achievements should now work vastly better on multiplayer clients, and this paves the way toward a few other MP data changes that should benefit the MP experience soon.

3. You can no longer click outside of the gravity well to give funky invalid orders to your ships that also then cause save errors. Additionally, the cursor now follows you smoothly around the edge of the gravity well when you are out of bounds.

4. Unit rotations are remembered when you save and load, and units can be set to spin, or to face the target they are firing at, and a variety of things like that. The effect with all turrets is not perfect, but that's because of a baked in offset on them. The xml tools exist for anyone to fix the effect so that it's perfect, but I won't have time to do that one myself. Lots going on!

5. Huge amount of rework on the systems attached to units. There have been ongoing problems with them since we started pooling units in the last week or so. Those problems should all be solved now, knock on wood.

6. Some multi-threading things have been made so they work better and an accidental modder trap has been removed (after I found a Badger caught in there; I didn't even mean to arm the thing).

7. A bug in recent builds made it so that Humanity Ascendant was the only mode you could play, but now you can play Challenger or Expert or Deathwish or Sandbox properly again.

8. There's one very strange bug related to the "fake unit" that we are still chasing, and it's demonstrably not fixed but should give me much more informative error messages so that I can fix it tomorrow.

More to come soon.
Enjoy!

P.S. - It's my goal at this point to really get multiplayer that final bit done so that it's not in a beta state anymore. My hope is over the next couple of weeks for that to happen.

P.P.S. That way it's plenty in advance of the October DLC, which will be the final DLC for the game, paired with an AI War 2 Complete Edition. I'll still have some pretty frequent releases into November as I wrap up the last of the kickstarter items, and anything else that needs bugfixing. My plan is then do do light occasional features and fixes after that point, and to keep mod updates that people do getting pushed out to the full audience, but that will mark the end of the main era of AI War 2 development. For financial and family health reasons, I need to make a change, and I'm also really looking forward to working on new projects -- as well as ending this one on a really super high note, since the game has had something of a renaissance lately. (Those volunteers and such who know more about this situation should feel free to speak freely except on the health matters, for anyone who has questions.)

Beta 3.503 Multiplayer Sound

New build! https://wiki.arcengames.com/index.php?title=AI_War_2:Finalizing_Multiplayer#Beta_3.503_Multiplayer_Sound

This one is pretty much all about the bugfixes, and it absolutely SLAYS in that regard. Summarizing the high points:

1. There were still some async calls being made to unity asset bundles, which meant it could still deadlock. That now is not the case. So maybe no more deadlock?

2. Where we used to load around a thousand individual tiny icons from asset bundles, we now load eight larger dictionaries. This has a notable performance boost to the UI sidebars for things like the planet view, and it also loads faster, and it also is less likely to deadlock on load (lots of small calls tend to be the cause of that).

3. Several systematic reviews of unit-related code pooling variables have been done, and a number of omissions were found. These were responsible for a number of pooling-related bugs from the last three builds, and are now fixed. But saves from those builds may still have errors built in.

4. The lobby now behaves like you would expect regarding the camera, home planet selection, etc.

5. Drones work reliably again! And drone producers use less CPU to do their work, too.

6. There was a major bug in the delayed sound playback (which is not super frequently used, but is some for voice and such) that has been there since April 2018. People have been suspicious that it was hanging onto some sounds way too long and playing them late, etc. I found that bug -- possibly two contributors to it, anyway -- and slew them both. There is also now an indicator in the escape menu to tell you how many queued sounds there are, if you're feeling suspicious in the future of delays with sound playback. The core bug here was an embarrassingly basic logic inversion.

7. Multiplayer has had a lot of general bugfixes, as has solo play, but also it now has a whole new subsystem (not yet tested, ran out of time and this is beta) for the host to generate certain kinds of sounds (voice clips, etc) and propagate them to the client. This is helpful, because the client was sometimes incorrectly playing them or missing playing them. I plan to make some more changes in this area to lean on the host a bit more and reduce client data load and processing even further.

At the moment, all of the really major issues from the last month that I'm aware of are fixed. Now on to the reports of things that I am NOT aware of yet. ;) It is... inevitable. It is my destiny. /Palpatine.

More to come soon.
Enjoy!

Beta 3.502 Input Salve

New build! https://wiki.arcengames.com/index.php?title=AI_War_2:Finalizing_Multiplayer#Beta_3.502_Input_Salve

Still in the beta branch for right now.

This one fixes a ton of bugs, including almost all the ones that I mentioned in the last release (not the mis-centering in the galaxy map, which is a minor cosmetic thing really).

1. It also has come to my attention that the game hangs sometimes on start for some people, across OSes, on the latest betas. A lot of investigation went into that today (you can see it on discord if you want in chris-talks-code-gameplay), and the end result is that unity is definitely having a bug where sometimes it will just take its ball and go home during loading from asset bundles. It's some sort of cross-threading thing, and I've done a bunch to mitigate that, but there's still some other things I can do. I haven't seen any mention of this on unity's issue tracker in recent builds, so this is either a regression on their part or it is resources.load() conflicting with asset bundle loading. Either way, I'd rather not wait for them to fix it, and reproducing it is spotty at best. Anyhow, so that's improved, but may not be gone entirely.

2. Input handling, on the other hand, is VASTLY improved compared to the last half month. I made a number of changes in July that were attempting to help with some unusual control schemes that one user wanted to do, and it wound up fouling up things for everyone. Today I've revised that code further and it now works better than ever (knock on wood, so far as I can tell), although the one use case that individual wanted isn't possible anymore. But the code is a lot more brief and clear and functional than it was prior to the foulup, so that's nice. And our new double-click handling improvements are still all here.

3. Fixed an exception popup in the last build if you didn't have DLC3 installed, and that was preventing random factions from working. Those now work!

4. Tooltips now work flawlessly again, versus being strange like they have been for the last half month or so in the beta branches.

5. Some more metal and energy consumption fixes, this time provided by NR SirLimbo.

6. Mod updates by SirLimbo, and also cml added support for random factions to his mod.

7. Plus just more random exception fixes relating to recent changes on the beta branch.

More to come soon.
Enjoy!

Beta 3.501 Shot Compression And Bugsmashing

New build! https://wiki.arcengames.com/index.php?title=AI_War_2:Finalizing_Multiplayer#3.501_Shot_Compression_And_Bugsmashing

This one has a major new feature in it that NR SirLimbo has been wanting to put in for a while, and he was waiting for the next big beta period (that's now!) to do it. It's called "shot compression," and it's basically like stacking for shots. In a lot of respects, it lets stacks of ships with multi-shot abilities work a lot more like they do when they are not stacked, replacing a number of more ad-hoc types of approximation that I had put in over the years instead. I like this solution a lot, but SirLimbo notes that it definitely does need more testing by folks.

This build also adds the major feature of RANDOM FACTIONS to the base game! That was a cool feature that Badger cooked up, and it was going to be in DLC3 for a while, but instead it's free to everybody. We'll properly announce that as a marquee new feature when we come out of the beta branch, but for now folks willing to deal with this beta period can go nuts. :)

In other news, since the release of that last build there were certainly a number of bugs that folks have reported, and some of those are fixed while others are still a work in progress. It's coming fairly quickly so far, knock on wood, and hopefully a release tomorrow will affect the last really large things.

1. Fixed a whole mess of exceptions and errors that could happen, many of which predated the beta period, at least for multiplayer.

2. The ability to use HDR displays apparently was causing certain displays to be very dark. At least I hope that's what it was. There's no good reason for this game to use HDR displays, to be honest, so I just turned that back off.

3. Fixed some super longstanding Astro Train bugs, so now they work properly.

4. Fixed some even MORE longstanding bugs relating to energy and metal displays per planet, and things like that. There were a number of them that were showing correctly in one spot (and calculating correctly for the actual bonuses), but then showing incorrectly on a variety of screens. That's all consolidated now and shows correctly everywhere now.

5. Notifications at the top of the screen don't flicker anymore (that was a regression in the last version).

6. Galaxy map icons now react visibly to being hover-over, like icons in the planet view do. This makes things feel so much more responsive! Also, the underlays behind planets react like their planet itself, which is also really helpful when you're using the search tool in particular.

Major bugs still known:

- Hovering over units and planets on the galaxy map DOES always highlight them (so the hovering is working perfectly), but the actual tooltip does NOT always show up. There are some other places in which the tooltip also does not always show up correctly.

- Double-clicking and a few other mouse items are acting a bit funky. I need to read those reports in more detail.

- Going into the lobby the first time is still mis-centered.

- Some various other exceptions that folks have run into and reported.

I'm hoping to have those things wrapped up tomorrow, and then we'll see what new things folks run into as it gets more and more stable here. It is annoying to have a bunch of code regressions, but that's part of the territory when making such large changes. These should hopefully pass quickly, and in general things just feel so much more smooth!

More to come soon.
Enjoy!