Author Topic: Potential Feature Concept: Customized Formations  (Read 6056 times)

0 Members and 1 Guest are viewing this topic.

Offline Trivial Psychic

  • 212
  • Snoop Junkie
Potential Feature Concept: Customized Formations
After reading of formation headaches in THIS thread, it occurred to me that perhaps there might be a way to override the hard-coded formation behavior with a table file.  First of all, if implemented, I could foresee the ability to customize a formation using ship radii as an expandable distance so it can scale up depending on the size of the craft involved.  I could also foresee it calculating the distance based on the size of the craft and the one next to it, so in theory you could mix together ships of quite varying size without them running into each other.  There would also be a figure indicating what the maximum number of ships that can be arranged in this particular formation.  Then the radii system would be used to indicate lateral separation, aft or fore of the lead, and vertical separation.  The lateral separation would use positive or negative values indicating whether its left or right of the lead.  Then the figures would be in order for position 2, 3, etc.  You could have lead, 2 and 3 on the right side and 4, 5, and 6 on the left.  I know that the default formation is alternating from side to side, but not being restricted to this could give us considerable flexibility.  We could make a completely line-abreast formation, single file, or echelon.

The next set of options could include overriding restrictions of not using afterburner during waypoints, (which may have already been added to ai_profiles), or whether the formation should fly parallel while flying waypoints, as formations often crowd together when approaching a waypoint.  I'm sure there are other options that modders might like to have incorporate into this.

The final issue is implementation.  The first and most obvious location is in the wing editor in the same way we select ai classes.  The second would be as part of the ai-form-on-wing sexp.  This would add options for what formation to use, with the option for default, followed by perhaps what position in the formation the craft would take.  Another option (though it would require changes to the ship selection interface screen) would be to give the player the choice of what formation to chose from a list of what the FREDder has allotted.  The final option would be to allow the player to select the formation in mission when they make the "form on my wing" command.  It would require another level within the comms menu.

So, is this feasible, desirable, too hard to impliment?
The Trivial Psychic Strikes Again!

 

Offline procdrone

  • Formerly TheHound
  • 29
  • Balance breaker! Thats me!
    • Steam
Re: Potential Feature Concept: Customized Formations
Is this possible? I would love to see custom formations for wings...
--Did it! It's RELEASED! VeniceMirror Thread--

  

Offline Lepanto

  • 210
  • Believes in Truth
    • Skype
Re: Potential Feature Concept: Customized Formations
TBH, I don't think that wing formations are important enough to be worth the time and effort spent making them customizable. The player probably won't notice how the formations look, and they won't have much gameplay impact in most scenarios.
"We have now reached the point where every goon with a grievance, every bitter bigot, merely has to place the prefix, 'I know this is not politically correct, but...' in front of the usual string of insults in order to be not just safe from criticism, but actually a card, a lad, even a hero. Conversely, to talk about poverty and inequality, to draw attention to the reality that discrimination and injustice are still facts of life, is to commit the sin of political correctness. Anti-PC has become the latest cover for creeps. It is a godsend for every curmudgeon and crank, from fascists to the merely smug."
Finian O'Toole, The Irish Times, 5 May 1994

Blue Planet: The Battle Captains: Missions starring the Admirals of BP: WiH
Frontlines 2334+2335: T-V War campaign
GVB Ammit: Vasudan strike bomber
Player-Controlled Capship Modding Tutorial

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Potential Feature Concept: Customized Formations
We can already permit afterburner usage while waypointing. Other than that I don't think this is substantially useful.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Potential Feature Concept: Customized Formations
Writing the code to parse a new table file is easy.  Writing the code to instruct the AI how to fly a new formation is hard.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
Re: Potential Feature Concept: Customized Formations
I think it would be a useful feature, it would be nice if we could get ships  to fly in something other than a 2d V. don't let the nay sayers get you down, get coding.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Potential Feature Concept: Customized Formations
I think it would be a useful feature, it would be nice if we could get ships  to fly in something other than a 2d V. don't let the nay sayers get you down, get coding.

Do you actually play or make content for this game though  :p

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Re: Potential Feature Concept: Customized Formations
I started writing such a mod-wide ai_profiles.tbl formation override for FotG several years ago but never finished it. It's not actually a particularly complicated thing to do AI-wise because the AI code isn't hardwired to fly a particular formation; there's simply a function or two for calculating the position a ship should take relative to the wing leader. The hard part, I found, is to come up with a simple but flexible syntax.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Potential Feature Concept: Customized Formations
While we're on that topic, is the code that makes them do that glitchy looking jumpiness to assume/stay in formation in that same area of code?  Making them do formation flying more fluidly could benefit the overall atmosphere pretty much across the board.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline zookeeper

  • *knock knock* Who's there? Poe. Poe who?
  • 210
Re: Potential Feature Concept: Customized Formations
While we're on that topic, is the code that makes them do that glitchy looking jumpiness to assume/stay in formation in that same area of code?  Making them do formation flying more fluidly could benefit the overall atmosphere pretty much across the board.

Can't say I recall seeing any particular glitchiness. AFAIK they just use some standard fly-to-location code to fly towards their position in the formation, which I suppose can result in some weirdness in some situations.

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Potential Feature Concept: Customized Formations
The glitchiness is a result of fighters attempting to turn around when they are too close to the lead fighter, instead of just cutting their engines and drifting.

 
Re: Potential Feature Concept: Customized Formations
As I coded the afterburner feature for pretty much everything where ai didn't use them yet (waypoints, to position, formations) I have a pretty good idea how this code works. Besides that I scripted formation flying for my RTS mod.

In the end it boils down to the problem that there are dozens of hardcoded values that specify how the ai flies to a point or how it keeps formation. Both functions are similar in how they work. Making these values accessible via a table and modifying them is probably sufficient to remove most if not all of the glitchiness some people experience.

If you want other formations that can't be reached by simply modifying the values in the current code I would recommend scripting with dynamic waypoints. Catching any orders given (like form-on-my-wing) is simple in scripting and they can be replaced with waypoint orders on the fly. It's not very simple but at least keeps the game code free of all the mess that may come with advanced formation features.
Here goes scripting and copy paste coding
Freespace RTS Mod
Checkpoint/Shipsaveload script

 

Offline procdrone

  • Formerly TheHound
  • 29
  • Balance breaker! Thats me!
    • Steam
Re: Potential Feature Concept: Customized Formations
The player probably won't notice how the formations look, and they won't have much gameplay impact in most scenarios.

I think it would be really useful for cutscene purposes.
--Did it! It's RELEASED! VeniceMirror Thread--

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Potential Feature Concept: Customized Formations
Cutscenes are tightly scripted so you can manually position and move the ships.

 

Offline procdrone

  • Formerly TheHound
  • 29
  • Balance breaker! Thats me!
    • Steam
Re: Potential Feature Concept: Customized Formations
That is correct, but yet, with such thing implemented that could be easier.

But since this feature would be a pain for coders, that don't really matter too much.
--Did it! It's RELEASED! VeniceMirror Thread--

 

Offline Dragon

  • Citation needed
  • 212
  • The sky is the limit.
Re: Potential Feature Concept: Customized Formations
Well, the problem with AI code in general is that a whole lot of values are hardcoded and impossible to customize. That's a bigger problem than different formations. Some sort of general AI overhaul would definitely be nice, with all this hardcoded stuff properly exposed, capship AI improved and future feature implementation made easier.

 

Offline Ace

  • Truth of Babel
  • 212
    • http://www.lordofrigel.com
Re: Potential Feature Concept: Customized Formations
If formations were expanded to include some of the options in Homeworld 1, it'd open up a lot of FRED options. Things such as sphere and wall formations instead of the default V for large wings or groups.
Ace
Self-plagiarism is style.
-Alfred Hitchcock

 

Offline General Battuta

  • Poe's Law In Action
  • 214
  • i wonder when my postcount will exceed my iq
Re: Potential Feature Concept: Customized Formations
I'm not sure I see the options opened up. For fighters this is strictly a non-combat formation, so you're coming up with new fancy ways to parade. Most non-fighter combatants probably shouldn't be in a wing anyway.

 

Offline swashmebuckle

  • 210
  • Das Lied von der Turd
    • The Perfect Band
Re: Potential Feature Concept: Customized Formations
Flight demonstration squadron campaign:
  • Fly exactly down this path and keep you job
  • Release patriotic colored gas trail
  • Waggle those wings
  • Your tax dollars at work

 
Re: Potential Feature Concept: Customized Formations
I'm not sure I see the options opened up. For fighters this is strictly a non-combat formation, so you're coming up with new fancy ways to parade. Most non-fighter combatants probably shouldn't be in a wing anyway.
Unless we also implement a way to get groups of ship to follow some sort of formation without being in a wing.
I think this kind of feature would be pretty neat. Making big ships fly in formation is a bit of a pain right now. But yeah, again, AI code...