Jump to content

  • Log In with Google      Sign In   
  • Create Account

Path planning with a minimal turn radius


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 ferrous   Members   -  Reputation: 2013

Like
1Likes
Like

Posted 03 January 2014 - 12:41 AM

So this is a small prototype I have made for calculating a path with a minimum turn radius.  I should make the radius a slider, but haven't yet.

 

 
I haven't actually optimized it much yet at all.  For example, my checks for whether the path is over a tile are laughably terrible, I haven't swapped to Xu's Circle algorithm yet, or bresenham/Xu's line. 
 
Also, camera controls are basic RTS style, wasd or arrow keys to move, mouse wheel zoom in/out.

The big obvious known bugs:
1. Weird loopty loops are sometimes chosen as best path (floating point error?)
2. the line check is wonky, and should do width as well, so right now you can pass between two diagonal blocking tiles (xu's line should fix)
3. I got lazy and don't animate the tank moving on the path.
4. Occasionally you can drag the arrow/facing to a place and it chuuugs.  But doesn't enter an endless loop, at least.

Edited by ferrous, 03 January 2014 - 01:10 PM.


Sponsor:

#2 Mussi   Crossbones+   -  Reputation: 1970

Like
0Likes
Like

Posted 03 January 2014 - 06:06 AM

You forgot a colon after http in your link. Looks good so far :), any particular feedback that you're looking for?



#3 ferrous   Members   -  Reputation: 2013

Like
0Likes
Like

Posted 03 January 2014 - 02:33 PM

Oops, link should work now.

 

Partially I was just excited to get it working, and wanted to make sure it wasn't too confusing as a test app.  

 

I think I'll need to add the ability to add waypoints, as the path can radically change as the distance gets farther.  On the bright side that will also make the path finding faster, as then when the user drags the destination around, I only have to recalculate from the last waypoint.






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS