On Tue, Jul 3, 2012 at 5:55 PM, Kai Sterker <kai.ster...@gmail.com> wrote:
> having finally warmed up, I'll be looking into one of the remaining > issues needed for WE: making pathfinding aware of the 3rd dimension. > > So far it only works for ground level pathing, but Redwyne Inn will > have cellar, first and second floor at least, with NPCs walking around > on either (and sometimes between). Committed my first changes to the pathfinding code. It's basically some code cleanup, better test and a few small improvements to get it working with the test map. To see stuff in action, run ./path_test -g ../../adonthell/test/ path Press 'p' to assign a new goal to the NPC (out of a list of three). You should see the path drawn on top of everything and hopefully the NPC will reach the goal. I found one instance where the NPC will get stuck for no obvious reason. Not sure what happens there, haven't debugged yet. It's also possible for the player to get stuck under the higher level paths. Levels are exactly 80px above each other and the character is 80px tall. There seems to be certain positions where the collision detection will report a collision, even though things should just fit. Haven't debugged that either. Anyway, as you will see, the pathfinding code is now at least aware of heights other than 0, although currently paths are only found at the characters current z position. So the next steps will be fixing the issues above, then work can start on pathfinding across different heights. Kai _______________________________________________ Adonthell-devel mailing list Adonthell-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/adonthell-devel