At 3/3/13 11:21 AM, Rustygames wrote:
And what would that certain heuristic be? :)
I'm using Manhattan for the heuristic at the moment, which obviously only works if you are on the same level.
I wish I had the source here, I would just knock it up again but I'm busy on other stuff today :(
This will honestly have to wait until Tuesday because I'm thinking it difficult to explain without the swf/code examples to back it up
I think I understand your problem now. You want to pathfind to x,y,level, but the game will go to the x,y of the current level since that's closer than x,y of the next level? I'd say from the start, check if the tile is on the same level. If it's not on the same level, pathfind to the stairs then pathfind from the entry point of the next level to x,y or to the next set of stairs and so on. Push the second path after the first one or however your code works.
Any of you have experience with loading data with the NG api? I don't wanna addChild their savebrowser component (have a custom one), but I don't see how else to get the savefiles.