Page 1 of 2
So how about that pathfinder?
Posted: 19 May 2009, 10:21
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.
Re: So how about that pathfinder?
Posted: 19 May 2009, 10:26
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.
Re: So how about that pathfinder?
Posted: 19 May 2009, 11:31
by smoth
funny, when I google pure I get atv game shit.. called it.
Re: So how about that pathfinder?
Posted: 19 May 2009, 12:47
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.
Re: So how about that pathfinder?
Posted: 19 May 2009, 13:02
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?

Re: So how about that pathfinder?
Posted: 19 May 2009, 13:12
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.
Re: So how about that pathfinder?
Posted: 19 May 2009, 15:20
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.
Re: So how about that pathfinder?
Posted: 19 May 2009, 15:34
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.
Re: So how about that pathfinder?
Posted: 19 May 2009, 16:30
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).
Re: So how about that pathfinder?
Posted: 19 May 2009, 18:04
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.
Re: So how about that pathfinder?
Posted: 20 May 2009, 09:04
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
Re: So how about that pathfinder?
Posted: 20 May 2009, 11:01
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.
Re: So how about that pathfinder?
Posted: 20 May 2009, 11:40
by Gota
I demand :D.
jk...
Re: So how about that pathfinder?
Posted: 20 May 2009, 22:53
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?
Re: So how about that pathfinder?
Posted: 20 May 2009, 22:55
by smoth
Forboding Angel wrote:I'd happily give up ground deformation for a good pathfinder
-1
Re: So how about that pathfinder?
Posted: 21 May 2009, 00:56
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.
Re: So how about that pathfinder?
Posted: 21 May 2009, 01:13
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.
Re: So how about that pathfinder?
Posted: 21 May 2009, 01:33
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.
Re: So how about that pathfinder?
Posted: 21 May 2009, 01:39
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.
Re: So how about that pathfinder?
Posted: 21 May 2009, 01:48
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?