Showing posts with label swarm. Show all posts
Showing posts with label swarm. Show all posts

Saturday, 19 March 2011

General Progress Update

This is just a general update, alas without any particularly exciting images.  I should have some updated screenshots soon, though. 

Control/AI Improvement

After spending a few hours remembering how to do control theory and Laplace Transforms, I did some significant upgrades to the Proportional + Differential controllers that are used to determine the rotational behaviour of the player and enemy ships. The parameters for the controllers are now calculated appropriately for each ship, thus leading to much better behaviour when rotating to the current target direction (less overshoot and faster damping).

I've also started to do a bit of preliminary work on the swarm mechanics.  One of the main issues here is how to efficiently identify the neighbouring Scourge ships when you could have around 2000 in play simultaneously (leading to around 2000000 naive distance calculations to calculate all neighbours).  I'm currently considering some kind of dynamic histogram-based binning method.

GUI work

I've also been doing a lot of work on some of the required (and slightly non-exciting) GUI aspects of the game.  The most important in-game GUI is the Ship Editor, where you can upgrade existing ship components and add new ones that you've scavenged.  This allows your ship to grow and improve over the course of the game (which is the main RPG aspect) as you add better shields/power generators/weapons etc.   Over the entire game, you will progress from being terrified of facing a single Scourge ship to being able to fend off a swarm of hundreds or thousands.

Thursday, 10 March 2011

Updates to environment complexity and some AI.

Although I'm probably making life more difficult for myself than is strictly necessary, I decided I wanted to do a good job on the AI of the Scourge and make them an enemy you had to outwit as well as outgun.  Each one of them counts as its own 2D dynamics object, and applies a couple of thrusters in order to navigate around the world.  Coupled with the first implementation of the navigational node system, this produces a result something like this:

The Scourge on a circular patrol route using their basic untuned P+D controller and singularly failing to navigate around some of the new flair objects.



Although this at least validates a lot of the underlying ideas, there's still a good amount of work to do.

1) Each of the individual enemies does not interact in any way with its neighbours, meaning that although there is some impression of a swarm simply due to numbers they don't really exhibit any swarm behaviour.  I have plans to upgrade this to so that they will dynamically track those in front of them, leading to much more realistic swarming.
2) At the moment the swarms stay much too bunched up, which is a combination of the fact that they have no knowledge of/collision detection with other members of the swarm, and also because they still aim squarely for the centre of navigation nodes at the moment, rather than exploiting their full radius.

Ideally, I would like an attacking swarm to be able to peel off automatically into subswarms that will attempt to attack the player from multiple angles using a variety of tactics.  For example, against weapons with a large spread it may be better to bunch up and rush the player, whereas for weapons with a single large beam scattering and attacking individually may be superior.