So how about that pathfinder?

So how about that pathfinder?

Requests for features in the spring code.

Moderator: Moderators

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

So how about that pathfinder?

Post by Forboding Angel »

GameNewsDaily wrote: The major downside to P.U.R.E. is the absolutely abysmal AI and pathfinding. Just about every RTS has had pathfinding issues, but P.U.R.E. is especially bad. Units will go the wrong way, slow down and stop for no discernible reason, making coordination almost impossible. Not only that, but units have awful AI, often responding slowly or attacking a target that poses less threat to it than something two feet away.
I think this paragraph sums things up nicely (It's a quote from back in last October, but it's still true to today).

And qft.

Now, is anyone ever going to work on the pathfinder? It's not exactly glorious work, but there are plenty of guys here with virgin sisters willing to offer them upon the alter of proper pathfinding.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: So how about that pathfinder?

Post by imbaczek »

pathfinder requires a strong code-fu, replacing it with something better is a summer-of-code-sized project for somebody who really knows what he's doing.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: So how about that pathfinder?

Post by smoth »

funny, when I google pure I get atv game shit.. called it.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: So how about that pathfinder?

Post by Kloot »

It would be nice if people could at least try to get their facts straight and learn what they are talking about before criticizing one of the better-engineered parts of Spring, because the pathFINDER is just fine. The problems only come when units begin pathFOLLOWING (the distinction is not subtle). If you're going to offer up one of your virgin sisters, do it at the right altar.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: So how about that pathfinder?

Post by Beherith »

Kloot wrote:It would be nice if people could at least try to get their facts straight and learn what they are talking about before criticizing one of the better-engineered parts of Spring, because the pathFINDER is just fine. The problems only come when units begin pathFOLLOWING (the distinction is not subtle). If you're going to offer up one of your virgin sisters, do it at the right altar.
I have a map where units consitently go back and forth without ever reaching their destination, because there are two paths to reach that point, and they flip-flop in minimum cost.
Which would you file this one under?
Image
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: So how about that pathfinder?

Post by Kloot »

The PF is designed so units are not given full-resolution calculated paths in advance, which makes it inadmissable but fast(er). I'm sure you don't want to change that, sir.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: So how about that pathfinder?

Post by imbaczek »

if i were to change the pathfinder, i'd drop the grid altogether because there's not much you can improve on. imho a navigation mesh would give significant improvement in unit behavior, but dynamic adaptation to heightmap changes scares me.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: So how about that pathfinder?

Post by Pxtl »

Well, the behaviour that is most obvious to the casual observer is twofold
1) Obvious grid-following. Units are often moving in 45-degree turns, which is kinda fugly.
2) Traffic jams. Large hordes of units don't spread out even if there is room to do so. Also, rather than slowing down, units always must start/stop abruptly, and so they behave terribly in congestion.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: So how about that pathfinder?

Post by Kloot »

Some behavior improvements are possible within grid-based finders if you take group size and layout into account when planning paths, but one important requirement is that the group be modelled as a constrained particle system. Ex. from a demo project I once did:

http://www.youtube.com/watch?v=Mxf2oOqmGlI

Spring already has some similar logic to avoid collisions and jams, it just doesn't work very well (and, of course, most units aren't particles).
User avatar
Rafal99
Posts: 162
Joined: 14 Jan 2006, 04:09

Re: So how about that pathfinder?

Post by Rafal99 »

Imho what is the biggest problem is the strange movement code.
Units pushing each other, and being pushed / moved in every possible direction. Without any acceleration / deceleration in it - they are simply moved.
Because of it, movement of single units in a group looks VERY fugly and unrealistically.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: So how about that pathfinder?

Post by Forboding Angel »

Kloot, regardless of what it is, it is fugly and REALLY REALLY needs to be fixed. Like I siad, I know that working on the pathfinder is a /brainfuck /boringfest but at the same time, the pathfinder is one of the most important parts of an RTS.

No one will take spring very seriously with what we have now. We're used to it, but compared to just about any other rts is almost /facepalmable :-/

I'd happily give up ground deformation for a good pathfinder
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: So how about that pathfinder?

Post by Neddie »

I don't think we should give up deformation. I do think the pathfinder can be improved but doing so is a major endeavour I don't have the skill to attempt nor the presumption to demand.
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: So how about that pathfinder?

Post by Gota »

I demand :D.
jk...
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: So how about that pathfinder?

Post by Forboding Angel »

If it came down to a choice between pathfinding that looks like it should and ground deformation, pathfinder wins hands down. Deformation is a neat gimmick, but for the most part it is a useless feature (except in the case of CA, but even that looks kinda noobish really).

I'm not really trying to incite a riot here, but It would be neato to see it actually get some attention from the devs and acknowledgement (sp?) for being ugly atm, instead of "Our pathfinder is one of the 9 wonders of the world, second only to BA, it's fine!" Orly? Have we been playing on the same engine?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: So how about that pathfinder?

Post by smoth »

Forboding Angel wrote:I'd happily give up ground deformation for a good pathfinder
-1
zerver
Spring Developer
Posts: 1358
Joined: 16 Dec 2006, 20:59

Re: So how about that pathfinder?

Post by zerver »

I think we have a decent pathfinder. It is much better than that of Cavedog TA at least.

The best thing is that units behave fairly OK in large groups/congestion.

Most annoying is the occasional "Cannot reach destination" nonsense and this "pushing" when there is a slower unit in front.
User avatar
Gota
Posts: 7151
Joined: 11 Jan 2008, 16:55

Re: So how about that pathfinder?

Post by Gota »

also the way units can suddenly bump into eachother in large groups and start flying all over the map..
That's not cool..
What most annoys me though is how a weasel for example will bump into a slower unit and wont think to take enough distance from it to pass it.
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: So how about that pathfinder?

Post by Neddie »

Well, if I recall, units perceive others as dots with no understanding of their movement or velocity. A logical improvement would be to have them treated as vectors with direction and velocity, thus functionally "lines" or "rectangles" of probable impassibility before the next update.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: So how about that pathfinder?

Post by Kloot »

... which is already in the engine, except that
Kloot wrote: it just doesn't work very well
zerver wrote: The best thing is that units behave fairly OK in large groups/congestion.
IMO not really, and that's what this thread is primarily about. In large groups the pushing code can actually cause units to get stuck inside one another and become immobile, etc. The default stop-go behavior of ground units doesn't help much either.
Forboding Angel wrote:It would be neato to see it actually get some attention from the devs and acknowledgement (sp?) for being ugly atm, instead of "Our pathfinder is one of the 9 wonders of the world, second only to BA, it's fine!"
You won't get your acknowledgement by consistently assigning blame to the wrong engine system (hint: the path*finder* only *finds* paths, and does not have much to do with units trying and failing to *follow* them), nor by grossly misrepresenting dev opinions of it.
Last edited by Kloot on 21 May 2009, 01:49, edited 1 time in total.
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: So how about that pathfinder?

Post by Neddie »

Sorry, I kinda skimmed the rest of the thread and assumed that since it didn't work it wasn't appreciably present. Further apologies to Smoth and BD for replicating an earlier mistake in discussion.

What is the stumbling block there?
Post Reply

Return to “Feature Requests”