So I experimented with pathfinding

A spot for all things TestTube
User avatar
wtg62
Posts: 173
Joined: Mon Jan 27, 2014 11:30 pm
Location: Texas, United States

So I experimented with pathfinding

Postby wtg62 » Sat Jun 20, 2015 1:54 am

And... I'm very happy with the results!
https://dl.dropboxusercontent.com/u/556 ... star2.html

Now I understand the A* algorithm!
This message has been brought to you by wtg62, duh!

User avatar
testtubegames
Site Admin
Posts: 1007
Joined: Mon Nov 19, 2012 7:54 pm

Re: So I experimented with pathfinding

Postby testtubegames » Tue Jun 23, 2015 11:18 am

Nice! That works great. I'm especially a fan of the 'go to mouse' setting. It's like I'm being chased by someone unrelenting.

User avatar
wtg62
Posts: 173
Joined: Mon Jan 27, 2014 11:30 pm
Location: Texas, United States

Re: So I experimented with pathfinding

Postby wtg62 » Wed Jun 24, 2015 1:43 am

Thanks!

I'm a fan of using Math.random() as a heuristic. :P
Not because it's efficient, but it looks cool.
This message has been brought to you by wtg62, duh!

User avatar
testtubegames
Site Admin
Posts: 1007
Joined: Mon Nov 19, 2012 7:54 pm

Re: So I experimented with pathfinding

Postby testtubegames » Thu Jun 25, 2015 11:28 am

Whoa - thanks for pointing me in the direction of Math.random(). I wasn't too familiar with pathfinding - and it sent me down the rabbit-hole of reading about heuristics. (For instance, at first I was expecting this to be a random walk, which clearly it wasn't... quite.)

Interesting stuff. And I like how your tool helps me investigate the differences really easily. aka: "Huh, would Manhattan vs. Actual Distance be all that different? Let me run it and find the distance each takes."

User avatar
wtg62
Posts: 173
Joined: Mon Jan 27, 2014 11:30 pm
Location: Texas, United States

Re: So I experimented with pathfinding

Postby wtg62 » Thu Jul 02, 2015 10:26 pm

testtubegames wrote:Interesting stuff. And I like how your tool helps me investigate the differences really easily. aka: "Huh, would Manhattan vs. Actual Distance be all that different? Let me run it and find the distance each takes."

Yeah, and I learned that a whole lot of times, Manhattan and Actual are very similar in move cost!
Pretty cool, huh? :P
This message has been brought to you by wtg62, duh!


Return to “General Chat”

Who is online

Users browsing this forum: No registered users and 1 guest