Pathfinding: What are the chances... - Page 2

Pathfinding: What are the chances...

Requests for features in the spring code.

Moderator: Moderators

Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Pathfinding: What are the chances...

Post by Kloot »

Gota wrote: I mean why is it than when i have a line of units facing right and i stretch a move line at a location to the left of my units all my units will get criss crossed...

a\ / a
b \ b
c/ \ c
Because the direction of the line is opposite to that of the unit iteration order if you draw it from "left" to "right" and the units happen to be sorted "right" to "left" or vice versa. There is almost no criss-crossing for a given group of units when you always draw lines with one consistent orientation.

CustomFormations works similarly for small groups.
JAZCASH wrote: I'm sure Custom Formations is relevant in some way though. It orders each unit a move command individually, so each unit has it's set move order to go to, each unit should have the most optimal path in terms of time it would take to get there, compared to any of the other units using that same path.
When there are N units (and N goal positions), you would need N*N path computations to find the optimal solution. Which gets expensive quickly, so it isn't done.
zerver wrote: I agree the pathfinder has some issues
People say that a lot, yet never seem to be able to quantify them, hence why topics about Spring's PF usually aren't taken very seriously.

Also, the reactions to the FF algorithm on GPG's forums and elsewhere are far from universally positive, with insightful comments like
pathing is borderline broken
being no exception there either.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Pathfinding: What are the chances...

Post by Forboding Angel »

It is though!

Spring's pathfinding, whether it's better than other games or not doesn't matter, because it's still quite awful.

Everyone wants to advertise 500vs500 unit battles and blah blah blah, yeah we have it. We also have more units wrecking into each other than we have units shooting at one another. When the groups hit there is no orderly formation. It turns into one big snarl of chaos.

You don't see this happen often in commercial games for various reasons, but spring really needs some work done.

Anyone remember that game website's review of pure? Really liked the game but couldn't give it a decent score because of the pathfinder?

Or, we could just ignore it for another 5 years, I guess that option works too.

Edit: Btw that heat thing was showing some real promise from what I could tell. Any way of working that in to getting some more unit separation?
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: Pathfinding: What are the chances...

Post by Gota »

interesting...I just tested again and no matter how i drew the line i couldn't get them to criss cross...not sure how to recreate it but yesterday it did happen.
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Pathfinding: What are the chances...

Post by Jazcash »

Gota wrote:interesting...I just tested again and no matter how i drew the line i couldn't get them to criss cross...not sure how to recreate it but yesterday it did happen.
Yeh, as I said, it happened randomly.

http://springrts.com/phpbb/viewtopic.ph ... 42#p360242

Image
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Pathfinding: What are the chances...

Post by Jazcash »

There's also definitely something weird with the path system. I remember the first time I thought, "What the hell is this", was when I used to play SpeedMetal and when ordering units to go through the middle, they followed the edge of the circle which is a longer route than going straight through the centre.

Here, have another one of my wonderful diagrams:

Image
Last edited by Jazcash on 23 Mar 2010, 08:11, edited 1 time in total.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Pathfinding: What are the chances...

Post by Tobi »

I can't reproduce criss-crossing units with custom formations widgets (and also IIRC it happens only seldomly in-game for me)

I can reproduce it only with the built-in line order, but 1) there is custom formations widget and 2) it will keep having that problem as long as it is capable of making rectangles of units instead of only lines.

I can't reproduce that speedmetal thing either, units move in a (relatively) straight line for me. (In other words, include more information (mod/game, unit, etc.) as apparently you applied an incorrect generalisation...)
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Re: Pathfinding: What are the chances...

Post by BrainDamage »

customformations has multiple algos, that get toggled according to unit size and some profiling of the pc capability to handle load, that's why it happends seldomly

there's the optimum algo, that produces the good result ( right pic ), the near- optimum with medium load ( left pic ), and the random algo
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: Pathfinding: What are the chances...

Post by Gota »

I understand.thx for the explanations.
I tried using the engine's bare formation movement using the alt key and criss corssing happened over and over again.
SA is now using this movement so that sux but obviously does not warrant any work on the engine since ONLY SA uses it.
This formation movement might come in handy later on though,if someone decided to make a game that uses formations extensively(total war anyone?).

Would be cool if Custom formation somehow integrated alt movement and ctrl movement into itself with some options you can modify to decide what you want to be used.

Of course the flow field used in Supcom,or something similar would also be cool to have as an option since its probably a better solution for a game with even bigger numbers of units than the ones we have ATM.
Super Mario
Posts: 823
Joined: 21 Oct 2008, 02:54

Re: Pathfinding: What are the chances...

Post by Super Mario »

Forboding Angel wrote:Of spring ever getting a system like this?

http://www.youtube.com/watch?v=jA2epda-RkM
One in a thousand if spring progress like this.
User avatar
very_bad_soldier
Posts: 1397
Joined: 20 Feb 2007, 01:10

Re: Pathfinding: What are the chances...

Post by very_bad_soldier »

I get really sad when watching those supcom2 vids :cry:
User avatar
Tribulex
A.N.T.S. Developer
Posts: 1894
Joined: 26 Sep 2009, 21:26

Re: Pathfinding: What are the chances...

Post by Tribulex »

Crisscrossing has NOTHING to do with pathfinding. That is just a bug in whatever is giving the commands, whether its spring's sorting or customformations widget. Pathing is a completely different thing.
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: Pathfinding: What are the chances...

Post by Jazcash »

Tobi wrote:I can't reproduce criss-crossing units with custom formations widgets (and also IIRC it happens only seldomly in-game for me)

I can reproduce it only with the built-in line order, but 1) there is custom formations widget and 2) it will keep having that problem as long as it is capable of making rectangles of units instead of only lines.

I can't reproduce that speedmetal thing either, units move in a (relatively) straight line for me. (In other words, include more information (mod/game, unit, etc.) as apparently you applied an incorrect generalisation...)
Ah yeh sorry, the first pic is correct, the SM I labelled up wrong. Fixed it now.

The fail pathing happens randomly, it doesn't appear to depend upon how many units are being pathed, it sometimes happens with 2 units, sometimes 50. Most the time it works alright but every now and then a big hiccup occurs and I've got units flying all over the place.
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: Pathfinding: What are the chances...

Post by zerver »

Kloot wrote:
zerver wrote: I agree the pathfinder has some issues
People say that a lot, yet never seem to be able to quantify them, hence why topics about Spring's PF usually aren't taken very seriously.
This is not so strange. When you issue a move order and the pathfinder instantly fails, the replay will not help you prove your point.

Edit: or maybe it does? What happens to me is usually that I issue an order but the order is just silently ignored. Nothing happens, no move order seen when you hold shift. Network issues could probably cause the same thing, but I always tend to check my ping when something like this occurs and it is usually ok.
Post Reply

Return to “Feature Requests”