Jump to content

Logo

Photo

Formation-Keeping

redesign

  • Please log in to reply
10 replies to this topic

#1 TonyE

TonyE

    Advanced Member

  • Staff Pukes
  • PipPipPip
  • 4,026 posts

Posted 19 December 2017 - 12:00 PM

2017.012 and newer obviously have serious issues with formation-keeping. I'm finally getting a better picture of what is happening code-wise.

In these builds I've tightened up how often various functons check and change paths (path following, station-keeping, close to attack, etc. That exposed the lack of a formal state machine telling units when to turn, when not to turn, etc. Now they just sit and fight each other. Ships trying to close to attack other ships have their intercept course set each second and over-ridden every 60 seconds when they try to follow their plotted path. It goes on and on like that. This is all without even broaching the topic of staying in your formation zone.

I'd like to explore what these state machines might look like, comments appreciated.

#2 TonyE

TonyE

    Advanced Member

  • Staff Pukes
  • PipPipPip
  • 4,026 posts

Posted 19 December 2017 - 12:05 PM

Formation Zones for surface and submarine units (air are treated by loadout/patrol type)
  • 0 - Main Body
    • Maintain position relative to group center
  • 1 - AAW Ring
    • Maintain position in assigned sector(s)
    • There is no value in assigning units to multiple sectors in the AAW ring
  • 2 - ASW Ring
    • Sprint and drift around the assigned sector(s)
  • 3 - Picket Ring #1
    • Meander around the assigned sector(s)
  • 4 - Picket Ring #2
    • Meander around the assigned sector(s)
  • 5 - Picket Ring #3
    • Meander around the assigned sector(s)
What to do when a unit is assigned to multiple rings (i.e. a sector in ASW and a sector in Picket #1)? The behavior of the inner-most ring in the selection will define the behavior. ASW + Picket #1 selected will result in Sprint & Drift.I think any cross-ring assignment should be treated as a picket, meandering around the combination of sectors.

Currently formation-keeping will not change the heading of a unit. This needs to change.

See also http://harpgamer.com...mations-part-1/

Edited by TonyE, 20 December 2017 - 11:21 AM.
input from CV32


#3 TonyE

TonyE

    Advanced Member

  • Staff Pukes
  • PipPipPip
  • 4,026 posts

Posted 19 December 2017 - 12:21 PM

Surface & Submarine navigation

Things that Groups do...
  • Follow a plotted course
  • Ignore a plotted course to...
    • Evade a threat
    • Intercept a target
    • Localize a target
  • Slow down to allow formation-keeping
  • Speed up to plotted speed


#4 CV32

CV32

    Administrator

  • Staff Pukes
  • PipPipPip
  • 9,667 posts

Posted 20 December 2017 - 08:24 AM

Formations and formation keeping is a critical foundation of HCE. It is one of the reasons I tackled the subject matter in Tactics 101.
 

What to do when a unit is assigned to multiple rings (i.e. a sector in ASW and a sector in Picket #1)? I think any cross-ring assignment should be treated as a picket, meandering around the combination of sectors.


I am fine with this approach.

 

That said, one alternative would be to have the outermost portions of multiple rings conform to the role/purpose of the innermost rings.

 

For example:

 

A unit assigned both a sector in the ASW ring and a sector in Picket #1 would perform as though it were in an ASW ring.

A unit assigned both a sector in the AAW ring and the ASW wing would perform as though it were in an AAW ring.

And so on.



#5 TonyE

TonyE

    Advanced Member

  • Staff Pukes
  • PipPipPip
  • 4,026 posts

Posted 20 December 2017 - 11:19 AM

Formations and formation keeping is a critical foundation of HCE. It is one of the reasons I tackled the subject matter in Tactics 101.
 

What to do when a unit is assigned to multiple rings (i.e. a sector in ASW and a sector in Picket #1)? I think any cross-ring assignment should be treated as a picket, meandering around the combination of sectors.


I am fine with this approach.
 
That said, one alternative would be to have the outermost portions of multiple rings conform to the role/purpose of the innermost rings.
 
For example:
 
A unit assigned both a sector in the ASW ring and a sector in Picket #1 would perform as though it were in an ASW ring.
A unit assigned both a sector in the AAW ring and the ASW wing would perform as though it were in an AAW ring.
And so on.


Thank you for the suggestion, I'm happy to switch to that approach as it brings more flexibility to the situation and extends the unique behaviors of the inner rings.

#6 CV32

CV32

    Administrator

  • Staff Pukes
  • PipPipPip
  • 9,667 posts

Posted 21 December 2017 - 07:51 AM

Thank you for the suggestion, I'm happy to switch to that approach as it brings more flexibility to the situation and extends the unique behaviors of the inner rings.


Great.

#7 TonyE

TonyE

    Advanced Member

  • Staff Pukes
  • PipPipPip
  • 4,026 posts

Posted 22 December 2017 - 02:51 PM

What was the last version where formation keeping, intercepts, and such worked generally correctly? I'm pondering going back to that codebase and porting in as many later fixes as possible.

Enrique's test scenario in http://harpgamer.com...-foe-detection/is a good first place to start to see if the AI will intercept the player.

#8 TonyE

TonyE

    Advanced Member

  • Staff Pukes
  • PipPipPip
  • 4,026 posts

Posted 22 December 2017 - 02:53 PM

This does not change my interest in making formations even better than they were before but I have a semi-realistic perspective that it'll be a long time before that vision can be implemented.

#9 donaldseadog

donaldseadog

    Advanced Member

  • Members
  • PipPipPip
  • 690 posts

Posted 10 January 2018 - 06:15 AM

and  I thought I was getting a sore head.

I like the approach of multi ring patrols behaving as per the inner most ring of its assignment.

perhaps surface vessel should also vary from course to avoid shallowing water?



#10 TonyE

TonyE

    Advanced Member

  • Staff Pukes
  • PipPipPip
  • 4,026 posts

Posted 10 January 2018 - 09:42 AM

and  I thought I was getting a sore head.

I like the approach of multi ring patrols behaving as per the inner most ring of its assignment.

perhaps surface vessel should also vary from course to avoid shallowing water?

Interestingly enough, when Bret was working on altitude/depth-based path-finding using global elevation and bathymetry maps he was also tinkering with squishing formations to get thru choke points.  The use-case was always the Strait of Hormuz.  His pathfinding code works quite well, a shame I haven't made it something the game can use (it is a series of separate experimental programs).

 

A little napkin state machine:

If no part of group will ground, continue on course.

If main body of group will ground, divert group course.  I use divert since there is a handy fDivert flag in the game engine code.

If main body will not ground but units in other rings will, squish the formation as needed.



#11 CV32

CV32

    Administrator

  • Staff Pukes
  • PipPipPip
  • 9,667 posts

Posted 11 January 2018 - 11:01 AM

That stuff was promising.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users