Jump to content
  • Advertisement
Sign in to follow this  
Saitei

How to smooth path by curve?

This topic is 699 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement

I'm not sure what you're looking for with this topic.  Exactly how you do it will depend on your engine (which you haven't mentioned), your tools (which you haven't mentioned), language choice, and more.

 

In general you'll build a locomotion system for your game. Part of that locomotion system will have a way to move objects of various sizes, including how to turn objects of various sizes.  You may want some things to be particularly nimble and cutting corners, other things to slow and lumbering.  

 

Perhaps you may have something like a fast insect race that can make tight corners at almost no cost. Perhaps you may have something like a battle armor tank that is extremely powerful and can move forward quickly, but is terrible at turning and must make square turns at a high cost.  Briefly thinking about it, it could be done with animation sequences of variable length, it could be done through procedural methods in your code written unique for each motion type, it could be done with tunable values provided to game designers for each type of locomotor. Likely you could think of more ways to do it in general.

Share this post


Link to post
Share on other sites

Im using this pathfinding method https://harablog.wordpress.com/2009/01/29/clearance-based-pathfinding/

 

The object sizes can be different. So, how can I smooth my path by curves without any artefacts? 

 

Turn based or real time?  Turn based, I'd probably just have some occasional artifacts, and use catmull-rom using the waypoints as inputs to the curve.  One way to do it without artifacts is to find the minimal turn radius required to get from one waypoint to the next, and then interpolate along that arc.  Not sure the best way to find that minimal turn radius offhand though, and that's the real killer.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!