Arcen Games

Games => AI War II => Topic started by: x4000 on July 11, 2018, 01:39:34 PM

Title: AI War 2 v0.749 Released! "Release The Hounds"
Post by: x4000 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 Actual Release

Okay, right: release notes here.

Where to even start?  This release is pretty sizeable.

...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).
Title: Re: AI War 2 v0.749 Released! "Release The Hounds"
Post by: BadgerBadger 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).
Title: Re: AI War 2 v0.749 Released! "Release The Hounds"
Post by: x4000 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.
Title: Re: AI War 2 v0.749 Released! "Release The Hounds"
Post by: zeusalmighty 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 ;)
Title: Re: AI War 2 v0.749 Released! "Release The Hounds"
Post by: BadgerBadger 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?
Title: Re: AI War 2 v0.749 Released! "Release The Hounds"
Post by: x4000 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?
Title: Re: AI War 2 v0.749 Released! "Release The Hounds"
Post by: BadgerBadger 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?
Title: Re: AI War 2 v0.749 Released! "Release The Hounds"
Post by: x4000 on July 11, 2018, 04:00:23 PM
It sounds like insanity.  (So, yes. :D)
Title: Re: AI War 2 v0.749 Released! "Release The Hounds"
Post by: BadgerBadger 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 ;-)
Title: Re: AI War 2 v0.749 Released! "Release The Hounds"
Post by: x4000 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.
Title: Re: AI War 2 v0.749 Released! "Release The Hounds"
Post by: BadgerBadger 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.
Title: Re: AI War 2 v0.749 Released! "Release The Hounds"
Post by: Ovalcircle1 on July 11, 2018, 05:09:18 PM
Friendly Marauders? My dreams are coming true!
Title: Re: AI War 2 v0.749 Released! "Release The Hounds"
Post by: x4000 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. ;)
Title: Re: AI War 2 v0.749 Released! "Release The Hounds"
Post by: BadgerBadger 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.
Title: Re: AI War 2 v0.749 Released! "Release The Hounds"
Post by: tadrinth 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. 
Title: Re: AI War 2 v0.749 Released! "Release The Hounds"
Post by: Draco18s on July 11, 2018, 06:01:26 PM
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).

I would only be ok with the AIP increase if the faction is player friendly.
Title: Re: AI War 2 v0.749 Released! "Release The Hounds"
Post by: BadgerBadger on July 11, 2018, 06:04:35 PM
My statement was
Quote
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).

So this would only be for player-allied marauders.
Title: Re: AI War 2 v0.749 Released! "Release The Hounds"
Post by: Draco18s on July 11, 2018, 08:07:32 PM
Ok, just making sure :)