Forby's guide to making the pathfinder like you

Forby's guide to making the pathfinder like you

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

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

Forby's guide to making the pathfinder like you

Post by Forboding Angel »

Now, there is always an upside and a downside to everything. In this case, the downside is that it doesn't look very realistic. The upside is that unit movement is frigging fantastic.

There are a bunch of different variations that you can use on this, so it's up to you.

With units can turn in place set to true
Set acceleration to 1
Set brakerate to anything you like (Using 0.1 will cause a nice looking glide to stop motion, and is surprisingly not irritating).
Set turnrate to 1000 (this enables the unit to get out of just about any situation)

Obviously this method depends upon you setting good maxvelocity values for your units, otherwise balance might be impacted (probably not, or rather, probably not noticeably).


With units can turn in place set to false
Set acceleration to 1 (for best results, however if need be going down to 0.5 should be ok-ish, but it will cause the pathfinder intermittent issues and you'll see units getting stuck more often)
Set brakerate to whatever you want
Set turnrate to 500 or higher (max 2250)
Set turn in place speed limit to exactly half of max velocity (any more than this and you'll have issues with units getting stuck in tight places)

Variations
In my testing the above values caused the best results, but that doesn't mean you can't do variations and even a mixture of the two types.

MAKE SURE THAT HEATMAPPING IS TURNED ON FOR SMALL, FAST UNITS
Turn heatmapping off for large, clunky units

This will have the effect of smaller, faster units spending less time clumping and causing traffic jams, which in turn will help pathing of everything else.

Edit/update: I should note that in Evolution RTS I have turned off heatmapping altogether, as it is still somewhat unreliable. In some ways it helps, in other ways it causes trouble. Overall I have decided that I prefer the behavior of heatmapping being off.

**************************************************

I did pretty extensive testing to come to these conclusions, and unit pathing in evo is even better because of it. If you want to have good unit movement, you have to play to it's strengths and avoid it's weaknesses. Additionally, you need to utilize the tools given to you to help the pathfinder do it's job properly.
Last edited by Forboding Angel on 21 Mar 2012, 04:16, edited 2 times in total.
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Forby's guide to making the pathfinder like you

Post by Anarchid »

Does this mean that units with slow turnspeed are by default godawful and should be one-in-an-army pieces that player can micro by their puny human self?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Forby's guide to making the pathfinder like you

Post by Forboding Angel »

Not sure how to answer that.

Let me put it this way. For a very long time I have used turnrate and max velocity to define units. It worked really well for a while, and still does really, but I still run into times when my units are doing stupid junk. This was mitigated by the fact that my units had reasonably high acceleration rates, but it didn't change the fact that in some situations, the movement was irritating. Low turnrates and low acceleration combine to cause the pathfinder to do extra work because the speed is fluctuating wildly. In cases of super low acceleration and super low brakerate (Example, Some BA units), this makes the pathfinder work overtime because not often are these units at their full speed; they tend to be in a constant state of fluctuating speed.

So I set out on a mission to figure out what makes the pathfinder happy, and came to the conclusion in the OP.

You can do whatever you like with your units. I am simply explaining how to make them work the best with the pathfinder. It's a guide, not a rulebook :-)
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10452
Joined: 24 Jan 2006, 21:12

Re: Forby's guide to making the pathfinder like you

Post by PicassoCT »

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

Re: Forby's guide to making the pathfinder like you

Post by Kloot »

The (obvious?) reason why this works: a typical path contains sharp corners, so higher acc/deceleration and turnrate values allow units that don't turn in place to follow it better (ie. stay closer to the line connecting all waypoints) at higher speeds. In the extreme, you get StarcraftII-style inertialess unit movement.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Forby's guide to making the pathfinder like you

Post by Forboding Angel »

On an interesting note, the maps that caused the worst problems with pathing are these ramp style maps.

In my case I did most testing on new iammas because it has the worst pathing of all the evo maps.

Net gain is that now, pathing is great on all maps. I thought that my units being able to turn away so quickly would largely impact balance, but it really doesn't. It does make controlling your army in a fight much easier, for obvious reasons. With the added benefit of making it so that controlling my large assault units is actually fun now instead of a chore (because they don't do completely retarded stuff like getting lolstuck in the dumbest places).
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Forby's guide to making the pathfinder like you

Post by Google_Frog »

It's interesting to see that SCII pathing can be done. I'll have to test evo to see how good it is.

Edit:

Tested 722 and I can't see the difference. Is it in that version?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Forby's guide to making the pathfinder like you

Post by Forboding Angel »

722?

... No. Current test revision is 222.

722 would have been from back when the svn was on the evo server, which would be what... almost 2 years ago? O_o

was the 7 a mistype? If you want to compare a bit, grab revision 215 (the original movement) and compare.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Forby's guide to making the pathfinder like you

Post by Google_Frog »

Oops it was 776. This stuff is still available on rapid and I assumed the highest number was the latest. You should really clean it out.

I can't download 222 from rapid.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Forby's guide to making the pathfinder like you

Post by Forboding Angel »

Try re-pinning evo:test, that should grab 222. I didn't know all that old junk was still on rapid :-/

Revision numbers started over when I switched everything over to google code.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Forby's guide to making the pathfinder like you

Post by Google_Frog »

By can't I meant the download fails mid way though.
luckywaldo7
Posts: 1398
Joined: 17 Sep 2008, 04:36

Re: Forby's guide to making the pathfinder like you

Post by luckywaldo7 »

Well, for completely starcraft micro your units would need to have instant turnrate also. I'm not complaining though because I think instant turning looks stupid. :D

Your evo units micro pretty beautifully Forb. I especially love the raiders now. Out of curiosity, was there a particular reason you didn't like the heatmapping on larger units?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Forby's guide to making the pathfinder like you

Post by Forboding Angel »

Heatmapping on larger units doesn't work as well because the heatmapping also affects smaller faster, more maneuverable units.

So essentially what you have is big bulky units trying to vie for position with smaller faster units. The end result of which is a big snarl where the bulky units just get in the way of the smaller units. This way, the big units will go where you tell them, and the smaller units have a bigger aversion to clumping which causes the larger units to have fewer issues.

Kinda backwards logic but it works. I can't remember who it was that clued me in to how to do the heatmapping stuff. Maybe it was kloot.

@ froggeh :-/ Dunno, poke det mebbie?
Post Reply

Return to “Game Development”