Post news RSS Planets and AI Improvements

A lot has changed since my last release. This article covers quite a bit.

Posted by on

Currently
My current goals have been to get BoS's AI able to actually play the game. In earlier videos, it merely build units which held still and waited for their unit-level AI to identify a nearby target.

Recently, I have added several improvements to the AI:

  • It can now identify a colony ship using the 'colony' ability tag in the unit file.
  • It can detect incoming enemy forces and rally units to defend its home base.
  • The AI can control its armies and focus fire on a target.
  • The AI can now construct any unit the player can.
  • Full support for custom units in the future with no additional scripting.

Custom Units
The custom units thing is a bit of a peeve of mine. I hate it when RTS programmers set their AIs up to run off of a static build script that cannot use custom units (and they typically make modifying the build script to include the unit difficult).

I solved this problem by realizing that ALL units are custom, I made them! So, instead of a traditional build script this AI uses a psuedorandom number generator to pick a unit to construct from the list of all available units. This guarantees an even spread (and thus usage) of all available units.

For units with specific roles, such as the colony ships, the AI looks for tags in the unit file that map that unit to the respective task. Basically, it can identify a ship with a colony tag and use it as a colony ship instead of blindly throwing it into combat.

Many games have an issue with this, one notable example is Supreme Commander in which the AI will construct units and not use them for their intended purpose (ex. constructing an air transport and sending it, empty, to attack an enemy base).

Planets
Up until approximately 36 hours ago, planets were nothing but scenery. Now, they can be conquered and actually have a meaningful impact on your game.

First you need to know how planets are generated. Black of Space does not use symetrical maps because all the properties of a map (from planet quantity/locations to population statistics) are randomly generated (and the odds of a symmetrical scenario emerging are quite low).

Take a look at this image. I have selected my home planet and we can see some basic stats (which were randomly generated at game start)


You can see the following statistics:

  • Population - Akin to planet health, this number will drop during sieges and grows during idle periods. If it drops below 100,000 there is a chance of rebellion.
  • Growth Trend - This indicates the growth rate of the population. It also determines how many recruits you get from this planet using a formula. The higher the population growth rate, the more your fleet count grows.
  • Loyalty - This increases during idle periods and drops due to many factors from orbital bombardment to your recruitment strategy.

Planetary Empire Building
Planets need to be useful if you are going to spend effort to capture them. So, you will be able to install planet-side facilities (think of it as "fitting" a planet). Here's what I have in mind:

  • SALs (Surface-Air Lasers) - Powerful lasers on the surface fired at enemy ships in orbit.
  • Expanded Residential Areas - Improves population growth rate.
  • Planetary Shields - Protects your planet from orbital bombardment until it collapses.

Others will be added as needed.

Colony Ships
What makes a colony ship a colony ship? In BoS, it is the ability=colony tag placed in the unit file. This allows the AI to locate custom colony ships and use them as such. In the vanilla release, this is the 'Conquistador'.


Colonizing a planet is as simple as navigating this guy to a neutral planet, it will land and the planet will be yours. Colonizing in BoS involves the sacrafice of the colony ship as well as the crew members invested it (after all, they landed on the planet to live there, they aren't coming back).

Attempting to use a colony ship on any non-neutral planet will not be possible, the ship won't even perform the colony function.

Current Goals
Here are my goals in order:

  1. Program the AI to identify neutral planets and send colony ships to them (it can already detect which ships are valid colony ships and construct them, but they sit there).
  2. Add the Planet Finder scanner used to locate planets.
  3. Add a bookmarking feature where you can save locations you care about (such as planets) as bookmarks and return to them.
  4. Add the ability for the player/AI to create and manage units by creating fleets.

Feedback
Have a suggestion? New feature idea? Send it to me, or I will never know you had this idea.

Comments
Silverfisk
Silverfisk

Shouldn't you be able to colonize a planet that there are already people on and they can start a war or something if they're at war. :)

Kind of a lot of programming, but still. ;)

Reply Good karma Bad karma+1 vote
somonels
somonels

Planetary take-overs happen by establishing cults, calling them religions, and getting 'politically involved'.
Examples: The Church of Jesus Christ of Latter-day Saints and Scientology.

Reply Good karma Bad karma+1 vote
Ichiman94
Ichiman94

gameplay is getting better and better :)

Reply Good karma Bad karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.