Author Topic: AI War 2 v0.749 Released! "Release The Hounds"  (Read 4676 times)

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
AI War 2 v0.749 Released! "Release The Hounds"
« on: July 11, 2018, 01:39:34 pm »
Are you a programmer interested in helping out on a multithreading issue?  Be sure to see the bottom (or this forum thread).

Case Study of Modding: Marauders

Before talking about the release or multithreading, this is a great time to talk about the power that our Modder #1 (and volunteer developer to boot), Badger, has been able to exert thus far.  He's made a ton of factions, but right now let's talk about Human Marauders, which were in the first game as well.

If you don't remember them from the first game, that's because they weren't too exciting; marauders were units that would periodically show up from the gravity well edge (not a wormhole) and cause some trouble. They were hostile to the player only, and were generally pretty insignificant.  It added a tiny bit of spice, but not much.

Enter Badger.

He started from scratch when implementing these in the new game.  His version of Marauders are hostile to everyone.  They will attack any system they deem "weak enough to take," then drop in from the edge of the gravity well.  If they destroy all the defenses, then they start building Outposts, turrets and additional ships. They're already starting to defend the planet as their own.  If you leave the planet alone, the Marauders will keep making outposts, and each outpost will get stronger (ie it will build stronger defensive ships and more turrets).

Once an outpost hits Max Rank, it starts to build Raiders (powerful starships). Once the Marauders have built enough Raiders, they will attack adjacent-through-wormhole systems that they think are "weak enough to take." If you leave outposts at Max Rank, the marauders will be able to attack more and more often -- their "Attack Budget" gets bonuses based on how many Max Rank Outposts there are. Also the Max Budget gets increased every time they capture a planet.
Fun fact: If you take out all the defenses on a swath of AI planets around your empire (but haven't actually captured or defended the planets) then the Marauders will rapidly take all of them over and potentially become a real threat.  To you... and the AI and other factions.


TLDR: Instead of just launching quick raids, these Marauders are here to take their own stab at conquering the galaxy.

People have been giving lots of balance feedback on the Marauders, as well as positive impressions for that faction on Discord.  This also illustrates two pretty key points:

  • The marauders are an example of what can be done with the modding tools of AIW2, but which was basically impossible for AIWC even for us as developers.  Gives a bit of context as to why making this sequel was important.

  • It's also a really good example of how a "Decent but not exciting" AIWC faction turned into something way cooler in AIW2, so buy AIW2 to get cooler stuff. ;)  There are a lot of factions like that (all-new ones and revised ones), even though we're pivoting the core mechanics to be more like AIWC.  For anyone worrying that this is just AIWC HD, please fear not!


The Actual Release

Okay, right: release notes here.

Where to even start?  This release is pretty sizeable.

  • There's been a bunch of balance to minor factions.

  • Mercenaries got some extra oomph.

  • AI Waves were previously capped at 100 units (cough, whoops), but now will gleefully flood your planets properly.

  • There are auto-build options for your convenience now available in the game settings.

  • The salvage and reprisal mechanics from the first game are added back in.

  • Golems are now available again -- five of them, anyway!


...and all of that stuff is just what Badger, a volunteer, has put in this release.  To say we're indebted to him is an increasingly sharp understatement with every week.  Holy smokes.

On my end of things, I upgraded the game to Unity 2018.2 and mono-.NET 4.6.  Some performance improvements were possible from this, and a lot more multithreading options.  A few boosts happened out of the gate, and I was able to explore (and then discard) the Lightweight Rendering Pipeline as an option.

I spent a fair bit of time on the multithreading problem, but at this point I've been hitting a wall where I can't get the performance any higher.  I'm sure with more time I could figure it out, but in the meantime there are bigger fish for me to fry in terms of performance blockers (namely the front-end vis layer's extreme performance hits, which I talked about two releases ago).

Multithreading Help Wanted

Last release I asked for some help on the multithreading problem, which was clarified here.  At this point, I've basically hit a wall in my ability to improve the threading without getting really excessive in my expenditure of time.  There are a variety of other things that really need my attention right now, so I'm having to put this on the back burner.

That said, I've open-sourced our multithreading code and our core sim loop, so if there are any kind souls who want to take a look at it and help more directly with revisions, that would be super appreciated.  I know folks were a bit hampered by being blind to the code before.

How to get at/test code:

  1. Make sure that Steam has updated you to the latest build of the game (0.749 or later).

  2. Inside the install folder for the game, open the AIWarExternalCode.  There you'll find a AIWarExternalCode.sln visual studio solution.

  3. You can open that with visual studio community edition 2015 or 2017, and then it should let you compile directly to the GameData/ModdableLogicDLLs folder.

  4. Running the game after having compiled a new version into that folder will run it with your changes in place.

  5. If you want to use a different IDE, or even no IDE and just compile manually, you can do so.  Badger has scripts for doing so on linux, for example.

  6. The actual scripts of relevance are in the AIWarExternalCode/src/Sim folder (and its subfolders), which has a variety of C# files that I've added comments to.  There are other files that call into and out of those files, but all of the multithreading bits and the main-thread-bits that call them are all there.

  7. I've made a mantis ticket on our bugtracker that has the savegame, plus instructions on how to see the issues.


Any help is appreciated!  And I'm happy to answer questions.  I have made a forum thread that is probably the best and easiest place for us to discuss this.

Right, Back To The Release

Anyway, that's enough out of me.  This new release is pretty cool.

Enjoy!

Chris

I again wanted to mention: we have a new Steam Developer Page.  If you go there and follow us, you'll be notified about other upcoming releases (including this one, of course).
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: AI War 2 v0.749 Released! "Release The Hounds"
« Reply #1 on: July 11, 2018, 02:20:20 pm »
Awww, thanks Chris! Also thanks to all the players who have given useful feedback (like the Marauders Are Hostile To All thing was a suggestion someone else made).

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: AI War 2 v0.749 Released! "Release The Hounds"
« Reply #2 on: July 11, 2018, 03:11:59 pm »
You bet, Badger. :)

And I think Marauders will really mess with my old playstyle in a good way. Basically I tended to strip nearby planets, and that no longer is viable. Assuming this faction is on, I mean. And assuming no defenses are left in situ. I look forward to seeing how they creates more dynamic situations on my borders, because I'm pretty positive it will.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline zeusalmighty

  • Full Member Mark II
  • ***
  • Posts: 151
Re: AI War 2 v0.749 Released! "Release The Hounds"
« Reply #3 on: July 11, 2018, 03:25:33 pm »
And I think Marauders will really mess with my old playstyle in a good way. Basically I tended to strip nearby planets, and that no longer is viable. Assuming this faction is on, I mean. And assuming no defenses are left in situ. I look forward to seeing how they creates more dynamic situations on my borders, because I'm pretty positive it will.

I can affirm that you will need to adapt accordingly. I routinely isolated a nice cluster of planets to be my economic powerhouses and left them practically defenseless--prime targets for marauders!

On the other hand, you can tag team with them by softening targets and letting the marauders do the rest. Just have to check them before they get too big for their britches ;)
« Last Edit: July 11, 2018, 05:21:23 pm by zeusalmighty »

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: AI War 2 v0.749 Released! "Release The Hounds"
« Reply #4 on: July 11, 2018, 03:37:11 pm »
Incidentally, it would be straightforward code-wise to make the Marauders your allies, which might make a really fun "Easy Mode" game. I'm sure some folks would enjoy shepherding the Marauder faction till it gets strong enough to beat the AI.

I'm trying to come up with plausible mechanics to let this happen. Maybe some sort of structure you could build that would change the Marauders allegiance, but kick off powerful Exogalactic Strikeforces against you?

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: AI War 2 v0.749 Released! "Release The Hounds"
« Reply #5 on: July 11, 2018, 03:43:56 pm »
Maybe just a faction option that is something like "Easy Mode Marauder Buddies?"  And doesn't have any downsides?
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: AI War 2 v0.749 Released! "Release The Hounds"
« Reply #6 on: July 11, 2018, 03:56:16 pm »
The obvious thing to do there would be to allow multiple Marauder factions, and give a "Allegiance" flag that could be set in the Game Lobby.

So imagine having 3 marauder factions enabled, one Hostile To All, one Hostile to Players Only, and one Hostile to AI only.

Does that sound like fun?

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: AI War 2 v0.749 Released! "Release The Hounds"
« Reply #7 on: July 11, 2018, 04:00:23 pm »
It sounds like insanity.  (So, yes. :D)
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: AI War 2 v0.749 Released! "Release The Hounds"
« Reply #8 on: July 11, 2018, 04:39:11 pm »
Okay, you can now have multiple Marauder factions, and specify the starting allegiance for each one.

Chris, you really need to get to that Game Lobby so people can actually try turning on more than 2 factions at a time ;-)

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: AI War 2 v0.749 Released! "Release The Hounds"
« Reply #9 on: July 11, 2018, 04:42:30 pm »
Awesome, that's super exciting!

And yeah, I'll get to the lobby right after I get through my DrawMeshInstanced stuff...

Wading through that right now, heh.
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: AI War 2 v0.749 Released! "Release The Hounds"
« Reply #10 on: July 11, 2018, 04:58:42 pm »
Yeah, friendly to player marauders are pretty OP. Since they will colonize the planets you own by default, they will rapidly send a host of Marauders across the galaxy.

I have two proposals. First, let them kill Command Stations and Warp Gates. This means they will drive the AIP up a lot. Second, give the AI Exo waves against you (with strength scaling on the Intensity).

Or we just say "Yeah, turning this on makes the game really easy". Which is okay (and will definitely be a fun way to blow off steam after getting crushed by the AI a few times), but it is probably less exciting long term.

Offline Ovalcircle

  • Full Member
  • ***
  • Posts: 133
  • Meh
Re: AI War 2 v0.749 Released! "Release The Hounds"
« Reply #11 on: July 11, 2018, 05:09:18 pm »
Friendly Marauders? My dreams are coming true!
Winning a game of AI War provides me with a sense of pride and accomplishment.

 THE TRUE POWER OF THE AI

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
Re: AI War 2 v0.749 Released! "Release The Hounds"
« Reply #12 on: July 11, 2018, 05:09:45 pm »
Probably making either an option is the best approach, in the end.  I can see people playing with friendly marauders as a form of "partner player" and then cranking up the difficulty in other ways.  You know there will be those people. ;)
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline BadgerBadger

  • Arcen Volunteer
  • Hero Member Mark III
  • *****
  • Posts: 1,229
  • BadgerBadgerBadgerBadger
Re: AI War 2 v0.749 Released! "Release The Hounds"
« Reply #13 on: July 11, 2018, 05:14:33 pm »
Lets leave it where it is for now, and lets see what happens once I get some feedback with friendly marauders.

Offline tadrinth

  • Hero Member
  • *****
  • Posts: 507
Re: AI War 2 v0.749 Released! "Release The Hounds"
« Reply #14 on: July 11, 2018, 05:28:36 pm »
I would suggest making Marauders not get production from outposts on planets that are controlled by other players, even allies.  That way, human-friendly marauders give you an interesting choice of whether to take the planet yourself, or let the marauders take it to boost them.