Pathfinding – beginning of implementation

Hello everyone!

Great news, someone may actually play Prince when I finish coding it! 😉

If you understand Polish, you can check articles about my project on websites here:,,,,,,,,,

I finally edited and upload video of first location gameplay that I promised you in my previous post.

You can watch it here:


I’m aware of existing bugs in it, like:

  • hero talking animation sync (fix to match currently playing voice)
  • hero boredom animation timing (shouldn’t start randomly in time of dialog)
  • hero shouldn’t have dagger equipped from the beginning of a game
  • gravedigger’s last line before his runaway – “O w morde…” is not playing

And gameplay also lacks working pathfinding, so Prince is standing still whole time, but I’d like to tell you about my current progress with fixing it.

I spend this week trying to analyze, code and then fix most of path-making functions.

It was lots of lines to code and it still has some things that I have to fix but right now it looks like this:

Pathfinding – testing Path drawing #1
Pathfinding – testing Path drawing #2

If you look closely you can see white dotted lines that are drown temporary to display array of calculated path coordinates. I’m working on part that allows to find a correct, nearest place for destination when you click on place where hero can’t go.

Next step will be implementing scanDirections() function, that will allow to create array of directions for hero walk animation during the path and also updating showHero() function to fix some bugs that I mentioned before and allow hero to actually walk the path.