kozie [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=9452 Pathfinding test <p> <table><tr><td> <a href="/bbs/?pid=15035#p"> <img src="/bbs/thumbs/pico15112.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=15035#p"> Pathfinding 1.2</a><br><br> by <a href="/bbs/?uid=9452"> kozie</a> <br><br><br> <a href="/bbs/?pid=15035#p"> [Click to Play]</a> </td></tr></table> </p> <p> <table><tr><td> <a href="/bbs/?pid=15035#p"> <img src="/bbs/thumbs/pico15044.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=15035#p"> Pathfinding test 1.1 1.1</a><br><br> by <a href="/bbs/?uid=9452"> kozie</a> <br><br><br> <a href="/bbs/?pid=15035#p"> [Click to Play]</a> </td></tr></table> </p> <p> <table><tr><td> <a href="/bbs/?pid=15035#p"> <img src="/bbs/thumbs/pico15034.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=15035#p"> Pathfinding test 1</a><br><br> by <a href="/bbs/?uid=9452"> kozie</a> <br><br><br> <a href="/bbs/?pid=15035#p"> [Click to Play]</a> </td></tr></table> </p> <h1>==============<br /> <strong>Arrow keys</strong>: move cursor<br /> <strong>Z</strong>: move player to cursor</h1> <p>Hi! </p> <p>I did like to share a simple test with a simple pathfinding mechanism which i learned mostly from <a href="http://www.redblobgames.com/pathfinding/a-star/introduction.html">this website (Red Blob Games).</a></p> <p>When opening the code, one could set the <em>flooddebug</em> var to true to be able to <strong>see</strong> how the pathfinding finds its route.</p> <p>What i did like to know is the following: When choosing a path further away from the 'player' it takes quite some time to eventually finish the pathfinding. Is this some limitation tied to PICO-8, is it bad coding or a combination of both?</p> <p>Thanks in advance and have fun.</p> <p>Cheers!</p> <p><strong>Update</strong><br /> It seems the speed is just fine. Tho, turning on the flooddebug makes it slow again. I guess while developing the pico instance got i little bit slow.. or the computer i used (at work) is just weird.</p> <p>Anyways, i updated the cart (to 1.1) with a target indicator :)</p> <p><strong>Update 2</strong><br /> Back at work now, reran the 1.1 version again. The speed seems indeed just fine. I'm not quite sure why it was slow yesterday, even with the flooddebug turned off. I guess it was just a process or memory bug/thing. Well, whatever :)</p> <p><strong>Update 3</strong><br /> Added v1.2 which has some more fancyness, like animating background, indicator and sound.</p> https://www.lexaloffle.com/bbs/?tid=2570 https://www.lexaloffle.com/bbs/?tid=2570 Tue, 06 Oct 2015 09:31:15 UTC