Jump to content

How to solve pathfinding problems that plague SF2 demo


Recommended Posts

I have been witnessing all kinds of irrational panic behavior in the SF2 demo Wilcox scenario, where panicking pixeltruppen run towards the enemy rather than away. I am in the process of uploading three examples to Youtube that conclusively prove that this is the case. Generally, others in the forum have agreed that there is a pathfinding "problem" with the SF2 demo. 

If we are to accept that there is a problem when panicking units commonly run towards the enemy, how can this be solved by changing the code? I have never seen any suggestions by the developers as to how this might be improved. 

I have a suggestion that I thought I'd share, perhaps it has been recommended before: another movement command option called "Flee" (or something like that). What it would allow you to do is to plot a point to where a squad or fire team is to run if they panic. It seems like the obvious solution. When the squad/fire team panics, it will run to the panic waypoint, no matter what. If the squad/fire team does not end up panicking during the turn, the "Panic" waypoint will not take effect. 

My guess is that this sort of feature is not possible given how the game is coded. 

Thoughts?

Link to comment
Share on other sites

30 minutes ago, Pericles said:

I don't see that button. Please explain.

<snipped>

The manual refers to it as the "Evade" button in the command panel. 

Instant Commands - allow one click change in unit behavior. The left button tells the unit to HALT and retain its Commands. Clicking on the button again tells the unit to RESUME. The middle button instructs the unit to CANCEL all its Commands and to do nothing for the moment. The right button tells the unit to EVADE by abandoning its current Commands, seeking immediate cover and perhaps popping smoke. Although units can Evade on their own initiative, sometimes they try too hard to stick to their Commands and need to be redirected without further delay. Instant Commands work in both Real-Time and We-Go styles of play.

image.png.32ff22d12c3aefa2ae9131ec43ba1eab.png

Link to comment
Share on other sites

Maybe "rout zones" could be set by the scenario designer, similar to the way setup zones are painted on the map during the scenario design process.  So, when units are shaken or panicked they will retreat toward the nearest rout zone.

I have seen the path finding behavior that you describe across all of the CM games.  It is not exclusive to the CMSF 2 demo.

This brings up another point, which is the original CMSF 1 had routing instead of surrender. Troops would rout, and an icon would be shown, and then they would disappear from the map.  I think that routing should be brought back to the game, without the disappearing act until they get to a rout zone (which could be a map edge).  The game should have both surrender and routing.

Link to comment
Share on other sites

12 minutes ago, Badger73 said:

The manual refers to it as the "Evade" button in the command panel. 

Instant Commands - allow one click change in unit behavior. The left button tells the unit to HALT and retain its Commands. Clicking on the button again tells the unit to RESUME. The middle button instructs the unit to CANCEL all its Commands and to do nothing for the moment. The right button tells the unit to EVADE by abandoning its current Commands, seeking immediate cover and perhaps popping smoke. Although units can Evade on their own initiative, sometimes they try too hard to stick to their Commands and need to be redirected without further delay. Instant Commands work in both Real-Time and We-Go styles of play.

image.png.32ff22d12c3aefa2ae9131ec43ba1eab.png

Beat me to it, saved me some time posting that, thx.  Just to add, page 62 of the CM game manual.

Edited by Blazing 88's
Link to comment
Share on other sites

The "Evade" button (and related buttons) in the command panel might only solve the identified problem in Turn-based mode if the unit panics shortly before the end of the turn:

p.62 of Game Engine Manual Version 4.00 states: "Instant Commands can be used both in Real-Time mode as well as Turn-based mode. In Real-time mode they are executed immediately, in Turn-based mode they are executed immediately after the start of the next turn." 

In all the examples I give in the thread below (in Turn-based mode), the "Evade" button and other buttons would do nothing to stop the unrealistic behavior of running towards enemies after panicking, because the panicking does not occur near the end of the turn. 

 

Link to comment
Share on other sites

On 10/25/2018 at 1:23 AM, Pericles said:

I have been witnessing all kinds of irrational panic behavior in the SF2 demo Wilcox scenario, where panicking pixeltruppen run towards the enemy rather than away. I am in the process of uploading three examples to Youtube that conclusively prove that this is the case.

I don't think you need to upload any videos, it's a pretty well known problem. And it's not just in SF2 - all the games share the same code base, so it's intrinsic to the series. I've just seen it happen in one of the PBEM games I'm currently playing.

I'm patiently waiting for the 4.0 patch that will hopefully address this issue....

On 10/25/2018 at 1:23 AM, Pericles said:

If we are to accept that there is a problem when panicking units commonly run towards the enemy, how can this be solved by changing the code?

Very simple: By making the game check that it makes the flee move order towards the friendly map edge. Or, a bit more advanced: By making the troops flee in the direction with least known enemy contacts (maybe even weighted by distance, type, and how recent they are).

And while they're at it: By making the game check that there's good or at least decent cover at the destination. I've just witnessed my assault troops run out of a church, towards enemy lines, and into a graveyard completely devoid of cover. In effect digging their own graves.

 

Link to comment
Share on other sites

On 10/25/2018 at 2:52 AM, Pericles said:

The "Evade" button (and related buttons) in the command panel might only solve the identified problem in Turn-based mode if the unit panics shortly before the end of the turn:

p.62 of Game Engine Manual Version 4.00 states: "Instant Commands can be used both in Real-Time mode as well as Turn-based mode. In Real-time mode they are executed immediately, in Turn-based mode they are executed immediately after the start of the next turn." 

This is all a red herring, because all the evade button does is to automatically place a fast move order. It's only useful in real-time play - in turn-based you get the same result by manually making a "fast" move order backwards, with a facing command at the end.

Also, when troops are in panic, they don't accept any orders, not even "evade". Because in effect, they are already making their own evade command. Panic is basically the unit pressing evade and you can't change or cancel the order.

Link to comment
Share on other sites

35 minutes ago, Bulletpoint said:

Very simple: By making the game check that it makes the flee move order towards the friendly map edge. Or, a bit more advanced: By making the troops flee in the direction with least known enemy contacts (maybe even weighted by distance, type, and how recent they are).

The WinSP game series does the route toward friendly map edge and it is not a solution.  It is worst in scenarios where you have units on two sides of the map for a rescue type situation but it pops up often in straight up fights too - units routing into the enemy that got around them.  The routing from known contacts may work.  Or not routing toward a known contact ever, surrendering if out in the open with no way to rout without breaking that rule.

Link to comment
Share on other sites

21 minutes ago, Dynaman216 said:

The WinSP game series does the route toward friendly map edge and it is not a solution.  It is worst in scenarios where you have units on two sides of the map for a rescue type situation but it pops up often in straight up fights too - units routing into the enemy that got around them.  The routing from known contacts may work.  Or not routing toward a known contact ever, surrendering if out in the open with no way to rout without breaking that rule.

If you read further up in this thread, my idea of "Rout Zones" may help.  However, in Pericles' second Bug 2 video there are also other issues with the TacAI for troops negotiating areas with walls, doors/gates, buildings.  In the second video, real troops would have obviously gone around the side of the building, while staying covered by the compounds walls, and through the side gate toward the south.

Link to comment
Share on other sites

8 hours ago, Bulletpoint said:

Very simple: By making the game check that it makes the flee move order towards the friendly map edge. Or, a bit more advanced: By making the troops flee in the direction with least known enemy contacts (maybe even weighted by distance, type, and how recent they are).

And while they're at it: By making the game check that there's good or at least decent cover at the destination. I've just witnessed my assault troops run out of a church, towards enemy lines, and into a graveyard completely devoid of cover. In effect digging their own graves.

  

These are very good suggestions.

Link to comment
Share on other sites

7 hours ago, Dynaman216 said:

The WinSP game series does the route toward friendly map edge and it is not a solution.  It is worst in scenarios where you have units on two sides of the map for a rescue type situation but it pops up often in straight up fights too - units routing into the enemy that got around them.  The routing from known contacts may work.  Or not routing toward a known contact ever, surrendering if out in the open with no way to rout without breaking that rule.

Indeed, we need something a little more advanced for these corner cases. @Bulletpoint proposal of "Making the troops flee in the direction with least known enemy contacts" is the best option. But, is it not too much data for the engine to handle?

Edited by ncc1701e
Link to comment
Share on other sites

10 hours ago, Bulletpoint said:

This is all a red herring, because all the evade button does is to automatically place a fast move order. It's only useful in real-time play - in turn-based you get the same result by manually making a "fast" move order backwards, with a facing command at the end.

Also, when troops are in panic, they don't accept any orders, not even "evade". Because in effect, they are already making their own evade command. Panic is basically the unit pressing evade and you can't change or cancel the order.

On 10/24/2018 at 7:52 PM, Pericles said:

The "Evade" button (and related buttons) in the command panel might only solve the identified problem in Turn-based mode if the unit panics shortly before the end of the turn:

p.62 of Game Engine Manual Version 4.00 states: "Instant Commands can be used both in Real-Time mode as well as Turn-based mode. In Real-time mode they are executed immediately, in Turn-based mode they are executed immediately after the start of the next turn." 

In all the examples I give in the thread below (in Turn-based mode), the "Evade" button and other buttons would do nothing to stop the unrealistic behavior of running towards enemies after panicking, because the panicking does not occur near the end of the turn. 

 

Check this thread out, very informative in regards to the EVADE command (different from Fast command): 

 

Edited by Blazing 88's
Link to comment
Share on other sites

12 hours ago, ncc1701e said:

Indeed, we need something a little more advanced for these corner cases. @Bulletpoint proposal of "Making the troops flee in the direction with least known enemy contacts" is the best option. But, is it not too much data for the engine to handle?

Only Battlefront knows for sure.

The secret to innovation is to have a varied team where some people come up with all kinds of ambitious ideas, then have someone more pragmatic minded vet the ideas from a business perspective and then someone with the right skills turn the right ideas into reality. If the creative people start curbing themselves because they are probably not possible anyway, then the business goes nowhere new.

This forum serves as a kind of free creative consultancy, and there's no harm in making wild suggestions and ideas. Good ideas are  a dime a dozen, but if you pick the right ones, they can be worth much more than a dime.

Link to comment
Share on other sites

10 hours ago, Blazing 88's said:

Check this thread out, very informative in regards to the EVADE command (different from Fast command): 

 

I'm not sure I'm convinced the evade command is any different from the normal fast command.

He says he did some quick tests, but often this game tricks you into believing something that isn't true. For example, many people still believe that vehicles bog less when going slow than when going fast. And that has been tested extensively and proven not to be the case.

So, "some quick tests" that are not explained are not enough in this case. I haven't personally noticed any difference between evade and a normal fast move. Would be happy to change my mind though, if someone can tell me about a situation where I can try it and notice the difference.

Link to comment
Share on other sites

4 hours ago, Bulletpoint said:

So, "some quick tests" that are not explained are not enough in this case. I haven't personally noticed any difference between evade and a normal fast move. Would be happy to change my mind though, if someone can tell me about a situation where I can try it and notice the difference.

The following are from notes I took after doing some experiments with the Instant Command Evade in June 2015: 

The Evade command will generate a waypoint to move pinned troops who will not otherwise move. The waypoint location and movement type are changeable. The UI will allow other movement orders to be given to pinned troops but the orders will be ignored. 

This command is initially a Fast waypoint.  The difference between a normal Fast waypoint and an Evade waypoint is that the AI will actually attempt to execute the Evade waypoint.  The AI will ignore the normal Fast waypoint or any normal waypoint as long as it is pinned.  If the pin is lifted in a timely manner the AI might then follow the normal waypoint movement.   

The following is how I most often use Evade:  A fire team (generally scouts on point duty) becomes pinned.  The overwatch teams send suppression fire down range.  I may give the scouts Evade.  This results in a Fast waypoint.  I usually change the Fast Evade waypoint to a Slow waypoint and move it to a more appropriate location.  So instead of being KIA in the fetal cowering position they are KIA while crawling to safety.  :D :lol:.   

Link to comment
Share on other sites

31 minutes ago, MOS:96B2P said:

The following are from notes I took after doing some experiments with the Instant Command Evade in June 2015: 

The Evade command will generate a waypoint to move pinned troops who will not otherwise move.

Did you try it again after 4.0? It seems to me that pinned troops will automatically try to fall back (using the evade option?). I'm not really seeing anyone pinned down - as in: 'under fire and unable to move' any more.

Link to comment
Share on other sites

18 minutes ago, Bulletpoint said:

Did you try it again after 4.0? It seems to me that pinned troops will automatically try to fall back (using the evade option?). I'm not really seeing anyone pinned down - as in: 'under fire and unable to move' any more.

Hmmm, I've used Evade in games since 4.0.  However I've not watched the behavior again under controlled conditions.  The UI will allow you to give pinned troops a movement order making you think they will respond to orders.  However after the big red button is hit they ignore the order (as long as the pinned is maintained).  But you might be saying the pinned troops would have run away even if I didn't give them Evade under 4.0.  I guess this might be true especially with the 4.0 artillery run off bug.............  After the patch I guess some things will need to be tested again.      

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...