|
This thread is locked; no one can reply to it. |
1
2
|
Pathfinding: Filling a matrix with numbers |
Felix-The-Ghost
Member #9,729
April 2008
|
Oh gosh I recognize that first image. I made it, but I just made it in MSPaint as an illustration as I have no real idea how to efficiently do things like this. Although I quite suddenly thought of a way to do so, probably not efficient, so oh well. I might have messed up on it but I think it'd span out and if an adjacent square had a lower number it'd leave it alone. Note I don't know much about this. |
adam450
Member #5,460
January 2005
|
Thats a horrible example. I'm going to post this like just because its a better version of what your looking at, you can also download the thing to mess with. http://www.gamedev.net/reference/articles/article2003.asp At any rate, I'm not sure what those numbers are. My best guess is that they are the distance traveled from the start node. Hence a diagonal jump from 4 to 6. In a triangle, the hypotenuse(diagonal) is greater than the two sides. |
CGamesPlay
Member #2,559
July 2002
|
Quote: At any rate, I'm not sure what those numbers are. My best guess is that they are the distance traveled from the start node. Hence a diagonal jump from 4 to 6. In a triangle, the hypotenuse(diagonal) is greater than the two sides. You would know, if you looked at the example I posted -- Ryan Patterson - <http://cgamesplay.com/> |
Don Freeman
Member #5,110
October 2004
|
Here is a graphic that might help you understand A*: {"name":"597685","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/e\/eee99214ab9cde24c0c837264164ed89.gif","w":800,"h":505,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/e\/eee99214ab9cde24c0c837264164ed89"} -- |
|
1
2
|