🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

A fleet is one ship idea

Started by
9 comments, last by Wavinator 22 years, 11 months ago
I''ve coded fairly simple but playable AI for old school 2D arcade spaceship combat before. Though not brilliant, they could give players a run partly because they could rely on faster "reflexes" backed by hardcoded hints for tactics and such. Lately I''ve been looking into what''s involved for AI for RTS games and fleets of ships. I don''t know if this idea would work, but one thought I had was that a fleet might be thought of as a single ship, conceptually. I should first say that my main factors are things like facing direction, hull strength, defenses, turning rate, and ship speed. A fleet would be some kind of amalgam of all of these factors, and would be treated as if it were a super-ship. Implementation-wise, fleets would be lead by an abstract, unkillable unit that used the same AI for planning as a single ship, with a few exceptions. A fleet unit would be able to subdivide and recombine with other fleets, for example, and could trade ships with allies. During the assessment phase of each AI loop, a "supership" would pit itself either against a single target (where it could weigh target value vs. damage damage over time) or an arbitrary collection of targets in a single area whose values have been summed. The goal ultimately would be to cut down on individual unit AI cycles, and promote smarter group behavior. (One of the things that really seems to kill enemy AI in RTS games is lack of unit coordination, with units often trickling to their doom or not attacking en masse). Decisions on individual movement and unit to unit combat would still be the domain of a single unit (mostly), but target choices and rule of engagement would be the domain of the fleet "supership." Does this seem sound? What, if anything, am I flat out missing? -------------------- Just waiting for the mothership...
--------------------Just waiting for the mothership...
Advertisement
quote: Original post by Wavinator

I don''t know if this idea would work, but one thought I had was that a fleet might be thought of as a single ship, conceptually. I should first say that my main factors are things like facing direction, hull strength, defenses, turning rate, and ship speed. A fleet would be some kind of amalgam of all of these factors, and would be treated as if it were a super-ship.



If you have not yet read about flocking, then you may find http://www.red3d.com/cwr/boids/ to be interesting.

Using flocking techniques to control fleets, or other groups of units, seems to be popular these days.

Good luck,

Eric
Hey Eric,

What is the status of Steven?
(Sorry for changing the subject.)
It sounds like a really good idea, except for this:

quote: Original post by Wavinator
fleets would be lead by an abstract, unkillable unit that used the same AI for planning as a single ship


I think it would be much more interesting if the fleet could be "killed" in the sense that the AI controlling it could die but the individual ships remain. So you could cause chaos by using tactics which could destroy this central AI .
quote: Original post by Gorky
Hey Eric,

What is the status of Steven?
(Sorry for changing the subject.)


I saw Steve a week ago Tuesday night. He''s lost alot of weight, but he has high
spirits and is back to work (or going to be shortly). He is also now the moderator of
this forum now, so everyone should be on their best behavior.

Oh, and he probably won''t mention this, but check out the FEATURE article in
this month''s Game Developer Magazine . It is called Game AI: State of the
Industry 2000-2001, It''s not just an Art, it''s Engineering
written by none other
than our own Ferretman. (and once again, he failed to mention my name, despite all
the tips and data I give him .... sheesh)

Eric
Great.

I hadn''t heard anything since someone said he was in the hospital.


I saw the article, but I haven''t read it yet.

(You might consider some AI revenge via an easter egg.
Call it the FerretManOwesMe easter egg cheat!
Then use it against him in a game.)
You might want to think in terms of a centralized command. This top level command analyzes the broad situation and then sends ''fleet'' type commands out, which pertain to the whole fleet as opposed to separate units. Typical fleet type commands might be:

1) Maintain defnesive posture
2) Move with heading X
3) Switch to offense
4) Send out scout
5) Subdivide
6) Unite
7) Switch to formation Y
8) Send explicit command to ship Z

Each of these commands trickle down to the units. They are then responsible for interpreting any parameters that are not explicit as they see fit. Additionally, each unit could communicate between sister units to cooridnate certain elements.


_______________________________
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in Think Harmony With Horses
ALU - SHRDLU - WORDNET - CYC - SWALE - AM - CD - J.M. - K.S. | CAA - BCHA - AQHA - APHA - R.H. - T.D. | 395 - SPS - GORDIE - SCMA - R.M. - G.R. - V.C. - C.F.
A Formic-esque Motherbrain kind of thing would be cool, but you're still going to have problems with flocking or grouping without a meta unit. Think over the attachable CommandPawn idea again. These could be autonomous, or agent-like, or anything you want, because all I would do is devise the pathing (or use A*, etc) and let the UnitPawn do the movement. If the UnitPawn has a CommandPawn hooked to it, then it is also a shepherd.

The pathing algo calculates long paths for shepherds, and the sheep actually pre- or post-chase this, with aberrant behaviors such that forward units could stray a bit too far ahead, or peripheral units could scatter among debris fields and enemy groups. Similar in concept to the Tactics options in HW, you can set tight or loose chasing (I hesitate to call this a flocking problem, instead it is a pathing one) with respect to the shepherd.

Again, this should lead to a very Bugger-like procession, generally spherical in nature (unless you wanted to add discrete formations, too), and enough jitter can be added to give it uncertainty.

-------------------
-WarMage
...I'm really thinking about starting Snowball Fight with Satan Studios just to have the name trademarked!

Edited by - WarMage on July 18, 2001 6:16:58 PM
quote: Original post by Geta

I saw Steve a week ago Tuesday night. He''s lost alot of weight, but he has high
spirits and is back to work (or going to be shortly).



Didn''t even know he was sick. Hope you''re feeling better soon Steve.

BTW: Eric and Steve, you might remember a month or two ago I agreed (in comp.ai.games) to produce a demo of my classifier system for learning Unit control in a RTS strategy game... well, it''s not done yet, but I finally got off my butt and started coding recently. I''ll offer up some progress reports soon when I get some first results. No deadline promises yet... I''m also coding the last sections of my PhD research so who knows!!!

Tim
I''ve tried to implement flocking behaviour, but there are some problems with situations, such as: one unit has to go around another, unit has to go around an obstacle. Moreover, units tend to overlap each other and to do a lot of turnings. This is not good and I think that flocking behaviour has to be combined with some other algorithms.
Do anyone have ideas how to move units'' along their path? I didn''t see any good articles related with this issue.

I would be glad to receive any good URLs also .


This topic is closed to new replies.

Advertisement