Sign in to follow this  

Fleet Simulation AI

This topic is 3037 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I have a space shooter game that's currently using a Finite State Machine type of logic. Every ship has a priority queue of nearby enemies. The ship grabs the closest one then tries to kill the target. The game is visually 3D however the game play is on a 2d plane. Each ship is steered using a crude newtonian physics model with force, mass, acceleration, turn speed. I have it currently set so that there's 4 modes. Evade, Shoot, Shoot+Chase, Chase They're all based on if the ship is within a certain angular range or distance away. I'm trying to enhance the model so it suits different types of ships like a bomber, or a warship. I want to be able have each ship know the weaknesses and strengths of it and some tactics. What would be a good way to do this? Also, more importantly, I want some group based thinking going on. So if a player was in charge of a certain group the AI will execute these moves. Also a planner AI for those groups without a player directing them. Any help is highly appreciated. Thanks!

Share this post


Link to post
Share on other sites
I've been thinking of a statistic based decision making AI for a while, haven't got chance to materialize it, and it's totally hypothetical.

So a bomber unit does not necessarily know its own strength, but rather knows from statistics that what kind of unit bomber units destroyed most, which is calculated by value of target * quality. The bomber can determine its weakness in the same way by reading what kind of units have destroyed bombers most.

So this bomber unit would assess all hostile units in range and get threat and vulnerability values of each hostile unit. When in a mixed unit squad, this value can be added up from different unit, then modified by importance of each unit to help determine squad priorities.

Share this post


Link to post
Share on other sites
I would recommend an easier method. In most situations, you know what ships should use what, so just set them to that kind of attack behavior.

Bombers- Hit and run tactics, attack large targets.

Fighters- Hit and run tactics, attack small targets

Warships- Fleet menuvers, keep target at a certain range, angle primary weapons. Possibly hit and run tactics at certain points. Only attack big ships. keep strongest shields/armor at enemy target.

Look at homeworld 2 for examples, seems to do a decent job, or you can overide and tell fighters to attack a battleship etc.


Share this post


Link to post
Share on other sites
Ahhh thanks for the input!

So what about for squad tactics and fleet strategy?

How do you think I should do those? I'm currently thinking of just coding that logic in. I've watched videos about self-learning AI's. Those seem very interesting but I don't know how to go about those.

Oh and my website is at http://students.washington.edu/wuwc/sfx/index.php if you want to check out the game :)

Share this post


Link to post
Share on other sites
Not to be rude, but if you are thinking of using self-learning techniques because you don't know how to do group tactics and strategy, you are starting on the wrong side of the table. That's kind of like saying I want to use calculus so I don't have to learn algebra. Put simply, until you know how to program AI, don't try to make AI that can program AI.

That being said, the best bet for tactics is to create an imaginary layer above the unit layer. This tactical manager decides on rudimentary goals (even randomly selected) and issues orders to the individual units. For example, the simple choice of "use flanking" would either select positions on opposing ends of the target and issue move commands to the units to go to those positions, or simply issue directional commands like "move left while attacking" and "move right while attacking". By having those coinciding commands, you are giving the illusion that the units are working together when, in reality, they are simply blindly obeying orders from a higher entity.

Share this post


Link to post
Share on other sites

This topic is 3037 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this