Return to “Suggestions”

Post

Mechanics of formations / following / escorting

#1
Also see: Escorting Ships
JoshParnell wrote:
Grumblesaur wrote:Differently-sized ships could have different cruise speeds, but could we have ships sync up with the slowest if they move into a formation?
Yeah that sounds good.
It also raises far more questions than it answers. =)
  • If you tell your autopilot to "follow" a ship, do you automatically fly in formation with it?
    This would look a lot cooler than simply trailing behind it!
    Also useful when escorting something. When the convoy runs into something nasty, it would be a bad idea to have the escorts far behind the escortees.
  • Do you only fly in formation with "your own" ships, but trail behind other ships?
  • The reason for the 2 previous bullet points:

    Yes, it makes sense for ships flying in formation to adjust their speed to that of the slowest ship.

    It would also be good if the formation flew with maybe 50% of this speed until every ship has reached it's place in the formation.
    The ships not in formation use their full top speed to reach their spot.
    That would take care of the straggler, who can't catch up, or a large formation turning to a new heading.

    But... what about fighters attacking in formation? You wouldn't want them to drastically slow down all the time.
    Suggest:
    The formation speed does not snap to "50% of slowest ship" instantly. Formation speed gradually decreases while ships are out of formation.
    If a straggler is far away, that would allow it to catch up eventually.
    Highly mobile fighters on an attack run will have very little trouble keeping their place in formation if the formation slows down only a tiny bit.
    "A bit" of "very fast" can cover a lot of ground.

    Additional benefit of the (gradual or not) slowdown: If escorts break away from the escortees to intercept enemies, the convoy doesn't just run off, leaving the escorts in the dust.
    Instead, the ships that remain in formation slow down so the escorts can catch up easily once their work is done.


    But... what if I tell a slowpoke freighter to "follow" an enemy formation?
    Would that formation slow down to a crawl for the forseeable future?
    What determines if these ships want to slow down for a particular ship?
    Hostility status?
    Something like an escort mission / contract?
  • If you follow a ship, can you control the distance at which your autopilot will follow it?
    Maybe you have a small, stealthy scout and only want to shadow something at the edge of it's sensor range.
  • Are formations 2D or 3D?
  • Are there different formation patterns?
    For fighters, wedge formation is a classic. Line or line abreast can also have it's uses.
    A large carrier's screening elements would likely fly in a box formation. (2D or 3D...)
    Box could be something simple as ships being added in front / back / left / right / up / down positions, then starting over with front.
  • What is the spacing of ships in a formation?
    To look good, there would have to be different rules for different formations.
    For wedge, the distance between Ship and Previous Ship in the line-up would be extended to accommodate their sizes.
    For box, the distance between Ship and Formation Leader would be extended until
  • When you tell a ship (yours or AI) to follow something, it will automatically join the existing formation, formation type being determined by the lead ship.

    Then there could be a second follow command that lets you determine where the ship will fly in relation of another ship. For instance, tell a fighter to fly in a position 5 km in front of my own carrier.
  • Do ships keep "their" place in the formation when the ship before them leaves the formation (or is destroyed) or does every ship start elbowing it's place to the now free position in the queue?
  • Do ships automatically leave the formation when under attack?
    In X3 they do that so every fight automatically disintegrates into a chaotic furball.
    Depending on gun ranges in the game, it may be necessary for ships to leave formation so that a formations can't simply be chipped away from the outside, one ship at a time.

    Having all escorts leave the convoy is practically never a good idea.
    I think it would be a better idea to assign this as a flag to individual ships ingame. For instance, you tell your carrier to stay in formation ahead of the escortees but smaller capital ships and fighters intercept enemies before they reach the escortees.
  • The player could be allowed to create formations.
    I imagine having a Formations.txt file like...

    formation; Convoy Escort;
    freighter; 0; 0; 0;
    freighter; -1; -1; 0;
    freighter; 1; -1; 0;
    freighter; -1; 0; -1;
    freighter; -1; 0; 1;
    capital; 0; 1500; 0;
    capital; 1500; 1000; 0;
    capital; -1500; 1000; 0;
    fighter; 0; 4000; 0;

    In this example, the leading ship is a freighter. Other freighters fly a close formation around it. Capital ships form a wedge in front of the leading freighter.
    The numbers would be x (left), y (front), z (up).
    Scale is distance from the leader in meters, automatically increased based on the intended positions and sizes of all previous ships in the formation. Can't be so close that ships can't maneuver any more.
    1 would be the minimum safe distance and the formation would auto-scale.
    Ship type is simply so you can assign different roles in a formation. Capital ships screening freighters or carriers, fighters scouting ahead.



    This way you only have to write one generic system and can let players figure out all the cool formations they think they need. Most aren't that useful in a space game but do look great in videos and screenshots. =)
There is no "I" in Tea. That would be gross.
Post

Re: Mechanics of formations / following

#2
Gazz wrote:Formation speed gradually decreases while ships are out of formation.
If a straggler is far away, that would allow it to catch up eventually.
Highly mobile fighters on an attack run will have very little trouble keeping their place in formation if the formation slows down only a tiny bit.
+1 for this.
Gazz wrote:But... what if I tell a slowpoke freighter to "follow" an enemy formation?
Follow and Formation are surely two different commands. You can enter formation with your own ships and others that give consent, but you can follow any ship at any time without them necessarily knowing about it. Perhaps attempting to enter formation triggers a request to join to the formation leader. If the leader is a cargo ship requesting escort or an ally about to enter battle, they will accept. If the leader of the formation is a hostile then they will surely refuse, and you'll have alerted them to your presence with your foolishness. ;)

How about a Claw/Enclosure formation? It's a forward thrusting, modified X. Very nice for fighters because it means almost the entire formation comes within firing range simultaneously, and can engage with a massive barrage of fire. Also prevents the point-man from being an almost certain casualty in the first wave.
Last edited by Zero Gravitas on Wed Dec 26, 2012 2:30 pm, edited 1 time in total.
Experiencing a significant gravitas shortfall
Post

Re: Mechanics of formations / following

#3
As usual Gazz comes with a well thought through and fleshed out suggestion, these are always a pleasure to read.

I think it makes the most sense to split the "follow" and "fly in formation" commands, and restrict flying in formation to your current fleet. Formation building could probably be nicely integrated into the RTS interface, I'd much rather have a intuitive interface in-game for it than having to edit a text file out of game every time I want to try out a new formation.
Image FAQ | Kickstarter | IRC | Common Suggestions
Post

Re: Mechanics of formations / following

#4
.
If something is important enough to do, it's probably important enough to do it right. =)

Zero Gravitas wrote:You can enter formation with your own ships and others that give consent, but you can follow any ship at any time without them necessarily knowing about it. Perhaps attempting to enter formation triggers a request to join to the formation leader. If the leader is a cargo ship requesting escort or an ally about to enter battle, they will accept. If the leader of the formation is a hostile then they will surely refuse, and you'll have alerted them to your presence with your foolishness. ;)
I agree in principle but the mechanics / UI of a game must not be too fiddly. This is where X3 fails big time.
Come up with some elegant or intelligent default way and we're in business. =)
Imagine you show up with 20 ships to escort a trader. Then you may have to initiate 20 individual requests to get them all into the formation!
Of course that's a worst case scenario but this is what happens when such questions are not answered before a feature is coded - or worse - if they aren't even asked.


Bele wrote:Formation building could probably be nicely integrated into the RTS interface, I'd much rather have a intuitive interface in-game for it than having to edit a text file out of game every time I want to try out a new formation.
Well, I'm a modder at heart and if it's a text file, it can be shared between players.
Not everyone enjoys tinkering with that kind of stuff.
Also, Josh could pick some "good looking" formations from the ones that are shared on the forum and include them into the vanilla game, getting pretty and polished formations for free. =)
There is no "I" in Tea. That would be gross.
Post

Re: Mechanics of formations / following

#5
Gazz, like your explanations as usual, and as usual I'm tossing in my $0.02.

When it comes to behaviour of the convoy when escorting, I liked the ideas of Gambits (stolen from FF12).

A quick run-down for those who do not know of FF12's gambit system;

You only control one character, and other characters act according to their instructions. The gambits are arranged in a list, and they process down that list until the first 'match' they have is taken. So, you can build a character's commands with gambits like
  • Ally:Any - Pheonix Down
  • Ally:HP < 50% - Cure
  • Foe:Party Target's Leader - Attack
What this means is that first, the character will see if anyone needs to be raised, and will use a pheonix down accordingly. Next, they will check to see if anyone is less than 50% hp and heal them. Last, if none of the above are needed, then they will attack whoever the party is attacking. These aren't processed in order, and once an action is taken, it starts over back at the top. In other words, if you put the last command first, all they would ever do is attack and then restart (as long as there is an enemy). This is very rough overview though. It is also similar to how GPP works if you're a sysadmin for a server 2008 r2 or 2012 box.

Now, how this applies;

When it comes to behaviours from formations to convoys, gambits can be utilized the same way. For example;
  • Convoy Distance: > 2000m - Wait for escort
  • Convoy Distance: > 1000m - Slow to 50% of speed
This way if you get further than 2km from the convoy, they stop, and if you're between 2km and 1km, they slow down. This can be adapted for other variables as well. Just process them like once every 10-15 seconds so that the CPU isn't hogged constantly checking the system. To also prevent problems with large convoys, allow the entire convoy to be treated as a single entity.

Then, let players create these and modify them (max out like at 4-6 so that it doesn't get too complicated for the engine to handle). That way, maybe players want the convoy to stay closer, so they want different numbers. Maybe they want the convoy to change formation if they get attacked, and then change back when the 'All Clear' is sounded. Maybe they want the ships to slow down or speed up when an enemy is engaged to clear them from the battlefield or allow you to lure them away from the ships. Etc.

This can also be adapted to wingman if you're flying with an AI ship. Maybe you're with 6 ships, and you want to make sure that when engaging an enemy, you always have someone watching your tail, or if there are few enemies (Foe Enemy Count < Ally Enemy Count | Foe Enemy Type : Fighters ) to completely break formation and let it be a free-for-all.

Now, for formations.

I'm of the opinion that formations should be entirely customizeable. Have a subscreen you can enter where you can basically drag-and-drop ships into formation and then 'save' it for use later. Have some generic formations as well. Wedge, line, etc. Then, when you get into a convoy, you can either select a pre-made one (line) or you can use one you already made (fighter surround), or you can even enter into the subscreen (pause the game in the meantime) and tailor a formation very specific to the exact ships you have. Maybe even have an 'export' button to save to a file, or just automatically keep updating a 'formation' file of the different types.

However, I know some people will not want to re-create their formations each time they have new wingman. Simply make it so when you create a formation, it is a generalized one. I.E. Designate an area for fighters to be in front of and behind the convoy if it is a line, and set a split 80/20 for percentage of fighter escort to be in front/behind the line. This way, if you have a scout or two in your convoy, you can set the scout to patrol at a decent spot ahead to be able to radio in case of trouble.

Combine the two, and you can easily set behaviours for whether your allies break formation to attack, or when they should (if they do at all). As well, add in all the variables from Gazz's notes, and there you go.

I'm the type that will pre-plan these things and would like to go into battle or a mission holding as many cards as possible. I don't like surprises, but I don't like not being prepared for them more.
Image
Early Spring - 1055: Well, I made it to Boatmurdered, and my initial impressions can be set forth in three words: What. The. F*ck.
Post

Re: Mechanics of formations / following

#6
Gazz wrote:Come up with some elegant or intelligent default way and we're in business. =)
Challenge accepted. :D How about this:

1) The player becomes the leader of any formation they join. This is player-centric but it ensures the player does not end up as the flunky of a braindead AI making tactical errors.
2) If the player is in formation A and requests to join formation B, he speaks for everyone in formation A. If the request is granted by the leader of B, the formations will merge.
3) AI may leave a formation at any time if they aren't happy, e.g you just merged formations with one of their sworn enemies, or they are taking heavy damage, or they receive a better offer etc.
4) Initially creating a formation is done either by simply approaching a single ship and requesting formation, or by broadcasting a request similar to the way a cargo ship might request escort from friendlies. You broadcast a request for volunteers and the willing respond. Broadcast could be limited to your own ships in the system, friendlies in the system, neutrals, or everyone (this last option means you would alert hostiles that you might be trying to mount an attack, but if the price is right they might switch sides!)

With these rules the formation UI is reduced to four items:
1) Request formation with another ship (ad hoc)
2) Broadcast request for formation (my ships, friendlies, neutrals, all)
3) Accept/Reject formation request (someone just asked to join you)
4) Disband formation.*

*Even though the player seems to be getting a lot of power here, the AI can still have their own ideas and take unilateral action without you. Let's say you join a formation with a cargo ship requesting escort and, upon being accepted, you immediately disband the formation with the idea that you'll attack the cargo ship once the formation disbands. You've caused a bit of mischief but the cargo ship will just immediately re-request an escort, the members of the just disbanded formation will rejoin and if you try to rejoin you won't be accepted because you've proved you are a troublemaker.

As for breaking formation, perhaps something as simple as settings for strict/loose and offensive/defensive that the leader can issue. Strict formations won't break even under fire, and defensive formations are less likely to break for opportunistic kills.

EDIT: And of course, this solves the problem of how you, the player, stay in formation with others without becoming locked into autopilot or expected to stick like glue to an AI leader. Problem solved, it's always your formation and it's their job to follow you.
Experiencing a significant gravitas shortfall
Post

Re: Mechanics of formations / following

#7
If the formations are based on fractal trees, laid out in selectable overall shapes (boxes, circles, deltas, etc.), then they can be extended ad infinitum as ships join. That would also simplify the joining options, as the next available positions could be shown. The formation leader would define the 'zero' (or root) node from which the tree extends.

For example, an arrowpoint formation could have the leader at the tip, 2 behind side-by-side, the next row would have 4, etc. Other variants could have 1-2-3-4- row layouts.

If the player joining becomes the leader, the erstwhile leader would shuffle out to one of the next available positions.
Post

Re: Mechanics of formations / following

#9
This is an excellent thread, thank you for the detail Gazz, as usual :D

I would very much like to build an in-game formation editor that would work similarly to what Gazz is describing in the .txt file. I.e., you specify 3D placement of a group of ships relative to a leader. Then, in-game, you would tell whichever ships you like to form up on a leader in a certain formation.

Thankfully, I think many of the questions raised will actually disappear quite naturally with a clean/general implementation of a formation system (as usual, the goal is to dispel complexity by solving it in the right way).

At any rate, I'll be more active on this thread when I start working on implementation, which should be relatively soon, considering this is one of the few areas of that game that will need to be solidified for the prototype.

@DWMagnus, I'd like to mention that the "gambit" system you described actually fits effortlessly into the high-level AI model that I'm building right now. Almost too effortlessly! This kind of system would take very little work to build in, so I imagine you'll be able to achieve that level of control :)
jawdan wrote:
the player will be no different in capability from any of the NPCs!
Does that negate this?
Can you elaborate?
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Mechanics of formations / following

#10
Sorry, yes.

If a player willy-nilly becomes the leader of any formation that they join, it does become player-centric. It would need limitations - a green recruit new to the game with nothing on his resume should not become the formation leader to half a dozen fighters and a couple of battleships. It doesn't make sense.

Whether or not the player should be under the command of a NPC really depends on the intelligence of the NPC. Also on the ability of the NPC giving orders that have the clarity for the player to be able to follow through on them.
“The impact of space activities is nothing less than the galvanizing of hope and imagination for human life continuum into a future of infinite possibility.”
Post

Re: Mechanics of formations / following

#11
jawdan wrote:a green recruit new to the game with nothing on his resume should not become the formation leader to half a dozen fighters and a couple of battleships. It doesn't make sense.
A fair point but it could prove rather difficult for the player to follow the AI leader, unless Josh adds specialised HUD features to assist the player in staying in position and on vector when in formation. Remember that depending on ship type and choice of formation, the player might often not be able to eyeball any other members of his group. Trying to hold formation could easily become an excercise in frustration.
Experiencing a significant gravitas shortfall
Post

Re: Mechanics of formations / following

#12
Zero Gravitas wrote:
jawdan wrote:a green recruit new to the game with nothing on his resume should not become the formation leader to half a dozen fighters and a couple of battleships. It doesn't make sense.
A fair point but it could prove rather difficult for the player to follow the AI leader, unless Josh adds specialised HUD features to assist the player in staying in position and on vector when in formation. Remember that depending on ship type and choice of formation, the player might often not be able to eyeball any other members of his group. Trying to hold formation could easily become an excercise in frustration.
In Freespace, you had an Auto-Speed toggle. Add a toggle for Auto-Formation where your ship's auto-pilot takes over. Any movement on the controls breaks this (so that if you get attacked you don't need to worry about fighting the autopilot).
Image
Early Spring - 1055: Well, I made it to Boatmurdered, and my initial impressions can be set forth in three words: What. The. F*ck.
Post

Re: Mechanics of formations / following

#14
Well, if you take into consideration some of the other stuff in this thread and some stuff that Josh has said, you may not be able to make a cup of tea.

Josh stated that if you're flying an escort, it is because the convoy needs an escort, or has a very good reason to need one. Next, the only time you really need an Auto-Formation toggle is if you're not the lead ship, and you're trying to stay on the wing of an NPC. I don't expect the player to stay in formation when a battle happens, but more for between the battles.

I know it might sound a bit too much kick-up-your-feet-and-read-a-good-book, but I know if I'm escorting a convoy for a decent length where there is no pirates, I don't really want to have worry too much about my heading.

Besides, I'm only recommending this because it would be easy to implement--all things considered.
Image
Early Spring - 1055: Well, I made it to Boatmurdered, and my initial impressions can be set forth in three words: What. The. F*ck.

Online Now

Users browsing this forum: No registered users and 1 guest

cron