Re: Path finding
Posted: 27 Mar 2015, 22:05
I would be happy to hear how unit movement could be fixed gameside. However, afaik it hasn't been touched for ages.
Open Source Realtime Strategy Game Engine
https://springrts.com/phpbb/
Purpose of heatmappingsmoth wrote:My biggest issue with pathfinder is how units always go to the most optimal route. Do we have control over that? where they can go, I will go in a straight line despite how much this terrain might slow me? because units can go way off course in order to maintain their time to arrival/speed(not sure which is the metric). This sometimes results in units doing dumb stuff like going into an enemy base. I am ok with obstacle avoidance but when you have a unit making all these twists and turns to avoid hills it can be problematic.
is there a way to address this? or is my description of the problem behavior unclear?
The metric is cumulative cost incurred from terrain affecting unit speed via the (movedef) slope- and depth-modifiers.smoth wrote: My biggest issue with pathfinder is how units always go to the most optimal route. Do we have control over that? where they can go, I will go in a straight line despite how much this terrain might slow me? because units can go way off course in order to maintain their time to arrival/speed(not sure which is the metric).
No.FLOZi wrote: Purpose of heatmapping
That is what I feared, I was playing with that before but I had hoped in my dated knowledge that something was added to allow us to more or less ignore slopes or at the very least allow a fudge value for certain ranges as long as they exclude the non-passable(nothing should ever see this as an available zone for travelKloot wrote:so if you want a unit to follow a straight line regardless of terrain, you need to change them such that slope and depth do not count as penalties. The flipside of this is that units will not slow down when going uphill or through water.
Quick question, how much money each month is required for you to quit your job and work on spring full time?Kloot wrote:Obviously the lack of complaints is due to there being no players left because, as we all know, Spring is dying.
if by that you mean giving higher slope tolerances to vehicles, i agree. I did that in my game too.Forboding Angel wrote:Why don't you simply fix unit movement? That would be much more simple. Your unit movement is so cruddy, it's no wonder that the pathfinder struggles with it.
It sounds like smoth wants to split the slope and depth modifers into two values. One value would be used by the pathfinder to find a path and the other would be used to make units slow down when on hills or water. Then he could set the pathfinder-related value such that the pathfinder does not incur any extra cost when looking steep pathable terrain. He would retain the slowdown on hills behaviour by not changing the speed modifier value.Kloot wrote:The metric is cumulative cost incurred from terrain affecting unit speed via the (movedef) slope- and depth-modifiers.smoth wrote: My biggest issue with pathfinder is how units always go to the most optimal route. Do we have control over that? where they can go, I will go in a straight line despite how much this terrain might slow me? because units can go way off course in order to maintain their time to arrival/speed(not sure which is the metric).
Depending on those modifiers, even a short path across a steep mountain ridge can be seen as a more costly route than one taking the long way around through a nice flat valley, so if you want a unit to follow a straight line regardless of terrain, you need to change them such that slope and depth do not count as penalties. The flipside of this is that units will not slow down when going uphill or through water.
No.FLOZi wrote: Purpose of heatmapping
Units getting stuck in factories is fixed in dev engine. You may have to modify your yardmaps a bit though.Jools wrote:I think units getting stuck in factories may be fixed in the latest development build of engine, but I can't say, we haven't tested it enough with real games . In 98.0 it happens frequently, once per game per player I would say.
The most common complaint isn't that pathfinding is stupid, it does its task quite well. But on some maps units are instructed to go into "red" terrain and get stuck.
it has certainly improved if you compare with engine 94 or 95. I tested it on the map Epic with giving constructors complex orders, and after 96.0 it works better. But it's still not as good as it was in say engine 0.78 or so. Maybe that had other problems or maybe we only remember the good stuff. Ultimately my memory is subjective.
I tried to grep this year's demos for the string _98 in the name and for "pathfinding" in content. 16 hits out of 905 demos. Not so many complaints. It's nice that zk uses the latest engine, but how many real games does zk have with the engines 94, 95, 96 and 98? I only ask that so I can know how much data there is to back up that hypothesis.
Ahaa, that's something I haven't heard. Modify how?Google_Frog wrote:
Units getting stuck in factories is fixed in dev engine. You may have to modify your yardmaps a bit though.
It's very common. Basically any map except a flat map. I'll take a screenshot next time it happens.Google_Frog wrote: Could you provide examples of maps and units that get stuck on "red" terrain? Also is "red" unpathable or just very steep?
kinda, if we could have something like "optifudge"(I don't care what you want to call it). As in, as long as the slope is passible, ## degrees variation would been within reason for a unit to path through. I want a tollerance, I am not sure how to explain it. Flat distance is a bad idea because that would potentially result in units going to places they cannot path through.Google_Frog wrote:It sounds like smoth wants to split the slope and depth modifers into two values. One value would be used by the pathfinder to find a path and the other would be used to make units slow down when on hills or water. Then he could set the pathfinder-related value such that the pathfinder does not incur any extra cost when looking steep pathable terrain. He would retain the slowdown on hills behaviour by not changing the speed modifier value.
These values would also let people find a middle ground where units avoid very steep terrain but still move in fairly straight lines over hills.