Author Topic: Outpost 2 Game Balancing  (Read 41517 times)

Offline Arklon

  • Administrator
  • Hero Member
  • *****
  • Posts: 1269
Re: Outpost 2 Game Balancing
« Reply #50 on: December 01, 2016, 03:06:14 PM »
So if we were to change a few small things what would be the best way of distributing test versions,tracking and testing?

Would it be worth adding a section to the OP2 page under the download section showing a test version and a list of instructions/changes?

EDIT => one more thought, would it be possible to depleting ore deposits? Or rather faster than is current or change it to be complete depletion?
I kinda like that, but then it'd make certain maps' resources being rebalanced even more of a requirement. Pie Chart would be totally unbalanced with this change because of resources along the outer edge being unpredictable/unreliable. Other maps like Axen's Home are pretty sparse on resources in general.

You could change mines.txt and set the final amount to 0 to create a mine type that will become depleted. You'd probably want to increase the number of truckloads before it reaches that point. Of course such a change affects the game globally, and I suspect trucks will continue to harvest but carry 0 ore. Might be worth testing.

Distributing stuff for testing is pretty ad-hoc right now. I have no advice to give, though I suspect Sirbomber or Arklon might have some insights.
An issue I can see with editing things in sheets.vol is it'll impact the campaign, etc. We'll need to figure out how to deal with that.

For distributing, I think making a mod of the /loadmod variety (like Renegades) is the way Sirbomber did it for Multitek2 so he could make it have its own sheets.vol.

Thank you, Sirbomber, for explaining the other side of it. I'm personally not a multiplayer veteran, not lately anyway, which is why I've been somewhat quiet on the subject. I had little to offer except for the single player and my biggest issue has been the terrible AI as you stated. Would be nice to have something a little more effective -- is that something the mission developer has to do or does the game provide this?
Eddy-B had a pretty good AI for Renegades, but he never released the source code for it like he had promised to.

Offline leeor_net

  • Administrator
  • Hero Member
  • *****
  • Posts: 2352
  • OPHD Lead Developer
    • LairWorks Entertainment
Re: Outpost 2 Game Balancing
« Reply #51 on: December 01, 2016, 03:10:28 PM »
So then we need to find Eddy-B and punish him.

I don't want to be one to end up eating my foot but I would think an AI shouldn't be that difficult to make. You don't need a super smart one and generally speaking it's just a state machine with varying behavior attributes.

Or is it more complicated than that?

Offline Vagabond

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1015
Re: Outpost 2 Game Balancing
« Reply #52 on: December 01, 2016, 05:08:53 PM »
I actually thought the AI in Outpost 2 was pretty good for 1997. Especially when you consider how good the unit path-finding was for its time and how highly configurable the AI is. With the ability to tell the AI how/where to build new bases, when to repair different buildings, etc.

I think a lot of the difficulties with a good AI is handling the multitude of edge cases and making it not boringly predictable. I think Outpost 2 pushed its limits for processing power back in the day, so they probably didn't have a lot of room for lengthy CPU calculations, a constraint we don't have to worry about as much anymore since technology has moved along so far.

Offline Arklon

  • Administrator
  • Hero Member
  • *****
  • Posts: 1269
Re: Outpost 2 Game Balancing
« Reply #53 on: December 01, 2016, 09:33:31 PM »
I actually thought the AI in Outpost 2 was pretty good for 1997. Especially when you consider how good the unit path-finding was for its time and how highly configurable the AI is. With the ability to tell the AI how/where to build new bases, when to repair different buildings, etc.

I think a lot of the difficulties with a good AI is handling the multitude of edge cases and making it not boringly predictable. I think Outpost 2 pushed its limits for processing power back in the day, so they probably didn't have a lot of room for lengthy CPU calculations, a constraint we don't have to worry about as much anymore since technology has moved along so far.
Uhh, I don't consider having to hardcode in how to build bases/etc. are good things. It's hardly "AI" at all, more like just plain A. Dynamix was pretty obviously rushing the game out the door to meet a deadline, since there was no mission editor that had been previously advertised, most of the AI functions are broken if not unimplemented altogether, there was no generic AI that could be dropped into any map like in pretty much every other RTS, the missions were all DLLs, etc. Other old RTSes like Age of Empires 2 and StarCraft were much better in the AI department, but even those were pretty easy.

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Re: Outpost 2 Game Balancing
« Reply #54 on: December 02, 2016, 03:02:52 AM »
So then we need to find Eddy-B and punish him.

[... Snip! ...]

Or is it more complicated than that?

;)

(That's how I read it while skimming through a second time).


AI functions are quite simplistic, which makes it rather difficult to implement something, and the results are usually kind of sad. AI is quite a difficult topic.


This thread has been getting kind of personal at times.

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Re: Outpost 2 Game Balancing
« Reply #55 on: December 02, 2016, 03:38:35 PM »
I have 500 lines of (buggy, incomplete, and most certainly inefficient) code dedicated solely to getting the AI to figure out what kind of structure it needs to build, call a ConVec to a Structure Factory, build a structure kit, load the kit into a ConVec, find a valid location for building, move the ConVec into position, and deploy the structure.  It has no concept of tubes, struggles with mines and smelters, and doesn't know not to build its Advanced Lab right next to its Command Center.

So yeah, it's probably more complicated than you think, Leeor. ;)
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline leeor_net

  • Administrator
  • Hero Member
  • *****
  • Posts: 2352
  • OPHD Lead Developer
    • LairWorks Entertainment
Re: Outpost 2 Game Balancing
« Reply #56 on: December 03, 2016, 09:11:11 AM »
Could just be that I'm thinking of AI in FPS type games, both for realistic human like bots and for basic bitch mobs. That code generally is straight forward. I've never attempted to implement it into an RTS... but what you're mentioning reminds me of the StarCraft post mortem which talks about their AI and pathing code and how it's a giant and monstrous mess of a state machine.

Offline lordpalandus

  • Banned
  • Hero Member
  • *****
  • Posts: 825
Re: Outpost 2 Game Balancing
« Reply #57 on: December 04, 2016, 12:46:18 PM »
@Hooman; "it is getting personal" that is an understatement.

@Vagabond; actually the AI is not very good for 1997. Dark Reign 1 released the same year, and was released before Outpost 2, but it had fully working AI that would actually build up its main base and build up secondary bases if the game dragged on for too long. It had a fairly competent AI, and like Outpost 2, it was a tiled, sprite-based, isometric game. Plus, Dark Reign 1 had a map editor out of the box, and allowed for text-file editing out of the box as well; one of the first games I modded and produced maps for (perhaps even the first!)

The issue with the base building AI code is "tubes". An AI could likely be programmed to find an optimal place to construct its structure, but as it requires tubes to connect to the command center, the building wouldn't function without a tube connection. Thus, everything has to be hard-coded. My thought on this is what if we allowed the AI to "cheat a little", and thus was magically able to instantly produce tubes to a structure the moment it is placed, so that it will connect to the command center or even waive the need for the AI to have tubes at all. Yes, it would be a bit unfair for the player who does need to do tubes, but at least then the AI might be made competent enough to think for itself rather than have to be hard-coded to build in X,Y location because the earthworker built tubes to that location. I'd say its the tubes as Dark Reign 1 didn't have tubes, and its AI had no issues with base building.

Heck, even Earth 2140 had better AI and base building code than Outpost 2 does for its AI. I wouldn't say its better than Dark Reign's, but it was still fairly competent and did build all of its required structures and in Earth 2140, you did have to build a Research Lab to unlock (albeit automatically over time... it was basically research tech 1, then once that is finished, automatically switched to tech 2, etc) new technologies. And it was also from 1997.

And then of course there was Warcraft 1 (1994), Warcraft 2 (1995), C&C RA (1996), and Age of Empires 1 (1996) all came out before Outpost 2 and had competent AIs (I've played each one for varying amounts of time... I think Warcraft 2: BNE I played the most). Though again, none of them had to deal with tubes... or have vehicles pathfind around lava. Though to be fair, Warcraft 2 and C&C RA1 both had naval units and naval transports that they had to pathfind through water and avoid hitting land, so its semi-similar.

@leeor; You'll see how bad StarCraft 1's AI is when you try to make a custom scenario for them and you'll see that the AI is actually quite dumb on its own (I had one AI build 5 spawning pools, for no real apparent reason at all, but to build 5 spawning pools) and the programmer has to put a lot of effort into building complex scripts to get it to do what they want it to do. I've tried multiple times to make custom scenarios in StarCraft 1, and its often a pain in the butt to get the AI to do precisely what you want them to do... and leaving their code to their own devices often doesn't work either... skirmish mode makes the AI look so simple to implement flawlessly, but it aint and you'll struggle to get the AI to do what you want in custom scenarios.
Currently working on Cataclysm of Chaos, Remade.
Link to OPU page = http://forum.outpost2.net/index.php/topic,6073.0.html

Offline Vagabond

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1015
Re: Outpost 2 Game Balancing
« Reply #58 on: December 04, 2016, 06:12:35 PM »
I see Arklon's point that Outpost 2 doesn't have a comprehensive AI in the sense that we cannot give the computer a small starting base and then see the computer play the rest of the game. It simply has parts of an overall AI such as fight groups, mining groups, construction groups, etc. And some of the implemented AI pieces have bugs or are incomplete.

I do believe Outpost 2 handled AI well considering how complex the game is. I don't think Outpost 2 can be compared to Starcraft or Warcraft in complexity of required colony management for a comprehensive AI. I haven't played Earth 2140, Warcraft 2, or Dark Realm, so I do not know about them.

Each of the games mentioned will likely have a couple of challenges not explored by Outpost 2 such as water transport, air units, and special unit abilities. But when you think about all of the following challenges, I don't see why there is any reason to think Outpost 2's AI isn't robust for when it was made and based on the challenge at hand for the designers:

Unique challenges of a comprehensive AI in Outpost 2:
 * Transporting construction kits from a structure factory to build site
 * Tubing between structures
 * Fixing tubing problems dynamically if part of base is destroyed
 * Structures that can explode and destroy part of the colony when damaged (as Sirbomber pointed out)
 * Colony power management including using vents and satellites as appropriate
 * Colony population management (not talking about how many units you can build)
 * Food level management
 * Tying up large portions of population to research topics as needed
 * Benefits of idling structures as needed to shift colony workforce and reduce damage taken by building and colonist death rate when destroyed
 * Distinction between colony members (children, workers, scientists) and what they do for the colony
 * Managing scientist levels through losing workers over chunks of time while they go to university
 * Having to survey mines before use
 * Having to build a mine before harvesting
 * Gaining knowledge of location of advanced resources partway through the game (and having to possibly rip up structures to survey and access it)
 * Dynamically blocking off large portions of the map over time (lava flows)
 * Handling colony morale, which is handled differently as new research is completed
 * Choosing between 35+ types of buildings to construct
 * Dealing with and using surprise tactics when day/night is on

I think the fact we haven't managed to reverse engineer what Dynamix did for their AI or managed to replace it in so many years means they probably did a decent job handling the difficult task. And I think it speaks a lot to the quality of the game overall that we all come back to play the game and mod it.

Offline Arklon

  • Administrator
  • Hero Member
  • *****
  • Posts: 1269
Re: Outpost 2 Game Balancing
« Reply #59 on: December 04, 2016, 06:15:48 PM »
I do believe Outpost 2 handled AI well considering how complex the game is. I don't think Outpost 2 can be compared to Starcraft or Warcraft in complexity of required colony management for a comprehensive AI. I haven't played Earth 2140, Warcraft 2, or Dark Realm, so I do not know about them.
OP2's AI cheats as far as population/morale management goes. It gets 8000 colonists and permanently steady morale. So no, not even from that angle does OP2 have good AI.

Offline leeor_net

  • Administrator
  • Hero Member
  • *****
  • Posts: 2352
  • OPHD Lead Developer
    • LairWorks Entertainment
Re: Outpost 2 Game Balancing
« Reply #60 on: December 04, 2016, 06:36:48 PM »
I was going to say, I assumed that the AI was cheating in OP2 based on 1) its behavior and 2) it's known poorly implemented 'intelligence'.

Offline lordpalandus

  • Banned
  • Hero Member
  • *****
  • Posts: 825
Re: Outpost 2 Game Balancing
« Reply #61 on: December 05, 2016, 03:59:37 AM »
Does the AI even research technologies or does it's AI have everything unlocked at the start and the programmer simply allows them access to higher tech at a certain "tick" point?
Currently working on Cataclysm of Chaos, Remade.
Link to OPU page = http://forum.outpost2.net/index.php/topic,6073.0.html

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4955
Re: Outpost 2 Game Balancing
« Reply #62 on: December 05, 2016, 04:05:21 AM »
More so the latter. I don't think the AIs labs ever do anything. And destroying them won't set the AI back, neither in terms of research, nor in terms of scientists that could have died while actively researching there, which they are not.

The AI cheats for people, morale, ore, research. What's available to the programmer is a fairly low level API, so it's not easy to work with. There's no real way to make the AI research, so it's just faked.

Offline leeor_net

  • Administrator
  • Hero Member
  • *****
  • Posts: 2352
  • OPHD Lead Developer
    • LairWorks Entertainment
Re: Outpost 2 Game Balancing
« Reply #63 on: December 06, 2016, 09:55:16 AM »
I think it's safe to say most AI's cheat. It's just a matter of how well the approximation of a human player they can manage.

That could be an interesting challenge and add-on library for the OP2 SDK when I think about it... building an AI class that actually... you know... plays well. I might have to think about this one a bit.

Offline dave_erald

  • Sr. Member
  • ****
  • Posts: 262
Re: Outpost 2 Game Balancing
« Reply #64 on: December 06, 2016, 03:20:23 PM »
Like SirBomber was saying there is hundreds of lines of code that have to be added to just get the AI to construct and maintain a base to say nothing about having it attack or defend itself.

There almost needs to be an agreed upon "footprint" as it were for AI bases i.e. there should be a minimum of this much open room (plot of land 30x30 or whatever) and a rudimentary base code and upkeep coding. Just enough to have the AI build units a few buildings and defend itself. Advanced characteristics and behaviour can be added on after. This could open up making it easier to build missions (multiplayer for instance) where you need or would want to fill in spots. I understand that if someone has spent years making a good AI that they wouldnt necessarily want to give out all of the code, but a small starter package would be nice.
-David R.V.

-GMT400 fan
-OPU Influencer