Play Now Login Create Account
illyriad
  New Posts New Posts RSS Feed - Pathfinding - how hard is it?
  FAQ FAQ  Forum Search   Register Register  Login Login

Topic ClosedPathfinding - how hard is it?

 Post Reply Post Reply Page  123 5>
Author
 Rating: Topic Rating: 1 Votes, Average 5.00  Topic Search Topic Search  Topic Options Topic Options
Thexion View Drop Down
Forum Warrior
Forum Warrior
Avatar

Joined: 17 Apr 2010
Status: Offline
Points: 258
Direct Link To This Post Topic: Pathfinding - how hard is it?
    Posted: 27 Jan 2012 at 12:40
Just to mix this convo a bit.. I'm just thinking what are important aspects for the game play in pathfinding. And how these could be simplified to creas horror.

Main reason of pathfinding is that there are impassable squares in the map. No point for boats if units can fly over water. So you need at least "find your path" through rivers and lakes pass crossings and such. 

- This is hard to simplify but if units could make rafts and move very slowly cross water if there is no alternative.. hardly a realistic or satisfying solution but if there is no bridges or ferries to some places.. also it would simplify the pathfinding.  

Second reason is that different passable square types that give different moving speed.  

-One option to simplify is that in areas of terrain speed is generalized instead of counting each square.  

Third reason of pathfinding is that the caravans and troops would be on the map also physically in some square and so could be intercepted.  

-How this could be simplified is that only units that are set to intercept in certain areas would. And only when unit is near some intercepting unit it exact location would be decided. 

Also one question is that what will happen if the path that is pre-calculated would be blocked.. Would troops return home, set a camp, try to find a alternative way on its own?

One issue is fog of war if it is introduced what does caravan know.. would it know automatically that all the bridges to certain place are blocked? And if it is trying to use the safest way how it would decide what is safest?

Anyhow I have full trust in TC:s magics and all the goodness that is going to be better than it should be and is coming soon(TM) I hope.


Edited by Thexion - 27 Jan 2012 at 13:11
Back to Top
Nesse View Drop Down
Forum Warrior
Forum Warrior
Avatar

Joined: 03 Oct 2010
Location: England
Status: Offline
Points: 406
Direct Link To This Post Posted: 27 Jan 2012 at 09:32
Creature, look at my "Example 4".
I do want pathfinding, I just don't want to wait for it to be perfect before I get it.
Back to Top
Kumomoto View Drop Down
Postmaster General
Postmaster General


Joined: 19 Oct 2009
Status: Offline
Points: 2224
Direct Link To This Post Posted: 26 Jan 2012 at 16:07
Originally posted by Createure Createure wrote:

Secondly, in medieval times would the caravan have spent 2 weeks climbing directly over mount doom and across the chasm of death, then swimming across a shark infested pond, rather that simply walking around?


What are you talking about, Creat? You know full well that we at H? always climb directly over Mount Doom (the volcanic ash has a marvelous exfoliating quality) and that treatment is always best followed by a quick dip in the fishy pond. Those cute and cuddly Carcharadons have a marvelous ability to remove dead skin (like those spas in Japan where fish nibble your feet)... ;)
Back to Top
Createure View Drop Down
Postmaster General
Postmaster General
Avatar

Joined: 07 Apr 2010
Location: uk
Status: Offline
Points: 1191
Direct Link To This Post Posted: 26 Jan 2012 at 14:53
I don't think we misunderstood you Nesse, I just don't think it is a good idea.

It is basically exactly the same as what we currently have with a few small differences.

1) There are waypoints.

2) Instead of moving in an 'as the bird flies' manner like we do currently people are restricted to only moving in the Cardinal+Ordinal directions. (I.e. you move across adjacent tiles).

These are both aspects that will be in path-finding when it arrives - great.

But you are saying that we then don't need path-finding? We need no automated system for calculating routes?

Personally I do not want to spend a hour hand picking a route around all the hundreads of obstacles across thousands of squares every time I send units across the Illy world map.

This is a thread for the discussion of the implementation of path-finding - not for the discussion of whether or not we should have it at all. The fact is the dev team have already said we are having path-finding: you must be one of a very small number of people who actually think this is somehow a bad idea.
Back to Top
Nesse View Drop Down
Forum Warrior
Forum Warrior
Avatar

Joined: 03 Oct 2010
Location: England
Status: Offline
Points: 406
Direct Link To This Post Posted: 26 Jan 2012 at 12:02
Originally posted by GM Stormcrow GM Stormcrow wrote:

 
Whilst also being a better solution (I'm not quite sure what lesser/quicker/simpler approximations without terrain cost of movement etc actually bring to the gameplay end of Illy...?), there's also the commercial reality that work performed on the more difficult 'intractable' end of the underlying problem qualify for R&D HMRC Tax Credits for Illy Corp Big smile

SC

You still misunderstand my post, Stormcrow!
What I say is to start by introducing, as you put it "terrain cost of movement", but WITHOUT the hazzle of optimal paths. Just make it straight-line movement, in lines defined by the players. My suggestion was to restrict it further to only allow 8 directions. Actually, the choice between any combination of directions would not be necessary if you require the player to set a waypoint - then you only need to check if the waypoint is on a gridline from the starting point.

Example 1: 
I want to move from (0,0) to (60,34), having researched "axis movement" and one waypoint.
Setting the waypoint anywhere but (0,34) or (60,0) would give me an error message, using any of those two points would give the calculated travel time and a "confirm" button.

Example 2:
I want to move from (0,0) to (60,34), having researched "axis and diagonal movement" and one waypoint.
I would now have between 8 and 12 options depending on whether the diagonals work, but the computational effort would still be limited to checking if the move is allowed and adding the movement costs of the involved squares.

Example 3:
I want to move from (0,0) to (60,34), having researched "axis and diagonal movement" and two waypoints.
Choosing the first waypoint would be checked only by ascertaining if it is on an allowed line going out from the origin, while checking the second point would be as per example 2. Calculation of distance is still only summing terrain costs for traversed hexes.

Example 4:
I want to move from (0,0) to (60,34), having researched "Thundercats wonderful shortest path avoiding all dangers".
I just select the target square, looks at the travel time, checks accept and off the caravan goes, calculations proceeding in a less than 2n!/(n!)^2 complexity that I will not notice except as a smooth and safe movement of my caravan.

Straight lines, rather than restricted grid directions might be simple enough to calculate costs for to not motivate the rather artificial limitation of using only grid directions. But I think player defined waypoints is actually quite as good as automatic shortest distances. (Obviously, that opinion is disputed.)

Back to Top
Createure View Drop Down
Postmaster General
Postmaster General
Avatar

Joined: 07 Apr 2010
Location: uk
Status: Offline
Points: 1191
Direct Link To This Post Posted: 26 Jan 2012 at 10:48
Originally posted by Ander Ander wrote:

Originally posted by Createure Createure wrote:

Originally posted by Nesse Nesse wrote:

No, you misunderstand me, Creature and Stormcrow!

What I am saying is NEVER MIND finding the closest, fastest or most direct route.


Ahh but this is Illy - we aren't happy with the crude approach!


That is not really a crude approach.
Really? How exactly is simple straight lines NOT crude in comparison to intricate path-finding algorithms?

Quote The game can have it's own method for the fastest and cheapest route for King Sigurd's convoys to travel, but the default paths available to the players could be variant paths based on a straight line from the starting point to the destination.

This is what the player before suggested I think (roughly) - citing "this is more like what they would do in medieval times" as justification - in response to that guy: firstly I don't want Illy to be like anything else, I want it to be original and excellent on it's own merits, not an imitation. Secondly, in medieval times would the caravan have spent 2 weeks climbing directly over mount doom and across the chasm of death, then swimming across a shark infested pond, rather that simply walking around? No I don't think so. Straight lines is clearly NOT an intelligent or a fun way to have movement of our in-game units.

Quote
The better routes are best left for the players to find out based on their experience and situation. If the system is to present all the best possible paths, what is in it for players?
As SC mentioned before, the element of player choice will come in a wide variety of factors - i.e. shortest path, fastest path, paths that avoid certain areas of have waypoints through other areas, or players affecting the topography themselves (someone mentioned bridges/crossing points?) etc. etc. or fusion routes accounting for several of these factors? I mean if you take this approach and always pick the 'shortest path' option you will invariably get the 'straight line' approach that you seem keen on so you could swing across that chasm of death anyway if you really wanted to.


Edited by Createure - 26 Jan 2012 at 10:51
Back to Top
Ander View Drop Down
Postmaster General
Postmaster General
Avatar

Joined: 24 Apr 2011
Status: Offline
Points: 1269
Direct Link To This Post Posted: 26 Jan 2012 at 07:56
Originally posted by Rill Rill wrote:

 
And if we were a bit more forward-looking, this fabulous company could be based in the United States ...

someone would patent snuggling and our chat could get banned! Shocked
Back to Top
Ander View Drop Down
Postmaster General
Postmaster General
Avatar

Joined: 24 Apr 2011
Status: Offline
Points: 1269
Direct Link To This Post Posted: 26 Jan 2012 at 07:52
Originally posted by Createure Createure wrote:

Originally posted by Nesse Nesse wrote:

No, you misunderstand me, Creature and Stormcrow!

What I am saying is NEVER MIND finding the closest, fastest or most direct route.


Ahh but this is Illy - we aren't happy with the crude approach!


That is not really a crude approach.

The game can have it's own method for the fastest and cheapest route for King Sigurd's convoys to travel, but the default paths available to the players could be variant paths based on a straight line from the starting point to the destination. 

The better routes are best left for the players to find out based on their experience and situation. If the system is to present all the best possible paths, what is in it for players?
Back to Top
Rill View Drop Down
Postmaster General
Postmaster General
Avatar
Player Council - Geographer

Joined: 17 Jun 2011
Location: California
Status: Offline
Points: 6903
Direct Link To This Post Posted: 26 Jan 2012 at 03:31
Originally posted by GM Stormcrow GM Stormcrow wrote:

 
Whilst also being a better solution (I'm not quite sure what lesser/quicker/simpler approximations without terrain cost of movement etc actually bring to the gameplay end of Illy...?), there's also the commercial reality that work performed on the more difficult 'intractable' end of the underlying problem qualify for R&D HMRC Tax Credits for Illy Corp Big smile

SC

And if we were a bit more forward-looking, this fabulous company could be based in the United States ...
Back to Top
GM Stormcrow View Drop Down
Moderator Group
Moderator Group
Avatar
GM

Joined: 23 Feb 2010
Location: Illyria
Status: Offline
Points: 3820
Direct Link To This Post Posted: 26 Jan 2012 at 03:16
Originally posted by Createure Createure wrote:

 
We want cutting-edge approaches to the design from our devs and intricate gaming strategy and community interaction in our MMORTS so that ThunderCrow and StormCat can become buried under a heap of gold-plated game designers' awards and we can all become more deadly-efficient gaming veloci-raptors!
Whilst also being a better solution (I'm not quite sure what lesser/quicker/simpler approximations without terrain cost of movement etc actually bring to the gameplay end of Illy...?), there's also the commercial reality that work performed on the more difficult 'intractable' end of the underlying problem qualify for R&D HMRC Tax Credits for Illy Corp Big smile

SC
Back to Top
 Post Reply Post Reply Page  123 5>
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.