Strategy game formations
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play
"Reducing the world to mathematical equations!"
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play
"Reducing the world to mathematical equations!"
Quote: Original post by InnocuousFox
Can the fast units NOT move at their maximum speed? Identify the units that will be taking place in the assault and proceed at the speed of the slowest.
They can. I need to readjust my AI to keep them in line.
Just a thought.
Military units get orders to operate in certain space restrictions and in a certain way (offensive, defensive, hit-and-run etc.).
By graining your military down to heterogenous units formed by homogenous "individuals", and imposing a chain of responsibility, you can apply rules of engagement which in the end will result in your military units organizing themselves autonomously inside the formation - by obeying their space restrictions, and rules of engagement.
(Space restrictions can be absolute, like "position x,y,z", and relative like "left to unit 2./34 in a distance of d", always applying to space volumes, not points only; this way, the units will always try to stay at their ordered position, and you only need to do the pathfinding and movement calculations for one unit, which will be either one random "flag ship" or the abstract higher-order unit, like a wing, squadron, flotille, fleet or whatever)
Quote: Original post by lucem
Attack formations and movement formations can be done by implementing a simulated command chain, meaning organizing your military "units" in military units. (See the quotes?)
Military units get orders to operate in certain space restrictions and in a certain way (offensive, defensive, hit-and-run etc.).
By graining your military down to heterogenous units formed by homogenous "individuals", and imposing a chain of responsibility, you can apply rules of engagement which in the end will result in your military units organizing themselves autonomously inside the formation - by obeying their space restrictions, and rules of engagement.
(Space restrictions can be absolute, like "position x,y,z", and relative like "left to unit 2./34 in a distance of d", always applying to space volumes, not points only; this way, the units will always try to stay at their ordered position, and you only need to do the pathfinding and movement calculations for one unit, which will be either one random "flag ship" or the abstract higher-order unit, like a wing, squadron, flotille, fleet or whatever)
One reason why approaches like this (which are great in principle) don't make it into games is the sheer volume of computation needed at each iteration to work out what units should be doing. This is why game AI often involves simpler explicit descriptions of state and behaviour.
Re-computations don't have to be done every frame, and mimicking real command structures can be very efficient - in this case, AI decisions fall down the tree automatically, and get concretized on the go.
Inside the various stages, existing technology like state machines etc. can be used, and as orders usually stay valid for longer periods than a couple of frames, it can be both elegant and efficient.
I'll probably go the bigger route when I start working on more global strategies involving multiple armies or decisions such as development, attacks on other cities and so forth.