Note that there are some explanatory texts on larger screens.

plurals
  1. PONeed some help with pathfinding!
    text
    copied!<p>I´m making a puzzle game which needs some pathfinding to guide selected units to their destination. This is my first time dealing with any kind of pathfinding, so I´ve chosen the aStar method which was the easiest for me to understand. (thanks to this wonderfull page <a href="http://www.policyalmanac.org/games/aStarTutorial.htm" rel="nofollow">http://www.policyalmanac.org/games/aStarTutorial.htm</a>). I´ve come quite a way, further than I expected actually but there are still some minor problems.</p> <p>I could write a long explanation which no one would understand, but instead I uploaded my flash project so you can see: <a href="http://www.martinowullems.com/pigsplode/pigsplode%20flash.html" rel="nofollow">http://www.martinowullems.com/pigsplode/pigsplode%20flash.html</a></p> <p>Select a pig and then select a second tile to make it walk there (not the bottom tiles, they're bugged :P). The dark tiles are unwalkable.The red tiles are the ones that belong to the generated path. I seem to be on the right track, I get the feeling I ´m making just a minor mistake. I got the feeling something wrong with selecting the best node (findNextNode function).</p> <p>I've been staring at the code for way too long and am not making any progress. I've tried looking at other people's implementations, but I always have a hard time understanding other people's work.</p> <p>Any help would greatly be appreciated, want to move on with the project!</p> <p>I made a wonderfl version so you can check out and fiddle with the code: <a href="http://wonderfl.net/c/hRtO" rel="nofollow">http://wonderfl.net/c/hRtO</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload