Game Design, Programming and running a one-man games business…

Campaign AI stuff

I am working on the various chunks of code that determine the strength of AI opponents in the GSB campaign game (currently being developed). The game takes existing challenge fleets, as well as other players campaign-fleets to use as the enemy, in massively-singleplayer style. However, it needs to select an appropriate fleet, in terms of strength, to fight against you, either as a defending fleet when you attack, or an attack on one of your systems.

The simplest method is just to assign a fleet size value to each planet, and let that be the strength there. Simple, but dumb, because nothing prevents the player sitting back and building up a larger fleet. A refinement would be to gradually ramp up a scalar for the enemy fleet sizes over the game, but that would mean it could spiral into insane difficulty, and doesn’t allow for different skill levels.

A system I’m working on is a ‘reactive-arms-race’ style approach. The nearby enemy worlds have their fixed starting values of fleet strength. When battle is joined, the Ai will start to build up larger fleets in nearby systems when it loses, and not bother if it wins. There will be some lag here, to represent building times.

The idea is that once you think you have a slight fleet-size advantage, you need to get all expansionist and start conquering, before the enemy realsies how mighty your fleets are, and builds it’s own countermeasures. If you just sit back and build up, the enemy will be doing the same. I may introduce an additional ‘anti-turtling’ scalar that starts ramping the enemy fleets up even faster if you have gone a long period without expanding your empire.

All this takes ages to code and test, and you never notice it’s effects on the surface. It is important to get this stuff right though (more important than adding more shiny or features) because it’s what drives long term playability.

10 thoughts on Campaign AI stuff

  1. Cliff I think this one post has made my mind up for me. I got the demo last week and have played it a bit and thought; ‘This is fun I may just have to shell out for the game on payday’.
    But adding a campaign mode?
    That’s just hit my sweet spot, I look forward to it with bated breath. Well that and the aforementioned payday.

  2. The picture on the blog just made my day as it looks like the campaign is getting even closer to completion.

  3. My only concern would be if it’s possible for the enemy fleet strength to scale over yours to an unbeatable extent, and keep on being heavier than your fleet.

  4. That’s good news! I’ve tried the demo and enjoyed the game, but as I’ve mentioned on your poll about not buying, I’m in quite a dry period financially.

    With a campaign option, though, the urge to buy gets stronger every day!

    Good idea to countermeasure against turtling, too. Maybe the question sounds silly, but will it be turn-based? That’s the feeling I get by trying the game and I’d prefer it this way to be honest.

  5. Please make things like anti-turtling optional. I may be the only one, but I don’t like strategy games that make me feel rushed, whether it is chess with a timer or an RTS. GSB is unique and special in that it lets you sit back and play at a slow pace if you wish.

  6. Looking at your screenshot, one thing you could do to reduce the ability to turtle would be to increase the number of connections between systems, with the aim of reducing in number (or even totally eliminating) bottleneck systems. This stops the player from being able to sit back and build up a massive fleet on a few key systems, making it impossible to find a route into their empire, because the enemy can easily bypass such heavy blockades and attack the soft underbelly.

  7. This sounds like a great extension!

    If I may make a small request? Please don’t use the same random name generator for your system names that the AI Wars guy used.

Comments are currently closed.