Hello All,
This is kind of lazy of me, but it does not hurt to ask....
I need too write a path finding algorithm in javascript. Anyone out there want to take a shot at it for me? Just for fits and giggles???
I've got the following functions that you can use:
getMapWidth() --returns map width
getMapHeight() -- returns map height
isWalkable(x,y) -- returns Y if the tile can be walked upon
movementCost(x,y) -- returns a decimal value of how much it cost to move _through_ that "tile"
//should return a string delimit set of locations, which make up the path.
// if the path can not be found, return a blank string
//for example: getShortestPath(0,0,3,3) => "0,0:1,1:2,2:3,3"
//for example: getShortestPath(0,0,1000,1000) => ""
function getShortestPath(startX, startY, destX, destY)
{
...your code here
}
Again....I'm trying to save myself time here...eventually I will get to this. (I swear!)
FYI: The Isometric Game Engine is coming along very nicely!!