Skip to main content
gamedev.net
🔒 Locked

Applet for really, really basic pathfinding?

Started by davepl Apr 12, 2007 at 1:32 PM 1 replies 1k views
Original Post
davepl
davepl
I need to do an entrance path for something I could best describe as a 3D Galaga. If you remember how the enemies entered the Galaga screen in swooping path, usually with a little run around a circle before hitting their position in the formation, its effectively that, but in 3D. I realize there are lots of papers on complicated pathfinding, but this is so basic I assume there's a shortcut. Ideally a little applet where I can draw a curve and it would spew out a table of X,Y,Z coords would be all I need. Before I write something myself, could anyone point me at an existing solution? Thanks! - Dave
Palidine
Palidine
Sure. Just do a parametric equation for a spline to get the current position. You can lay out a few different entrance splines and just choose randomly based on unit type for which path to follow.

Google around for splines and their equations. The math is pretty simple as such things go.

-me
davepl
davepl
After some reading in the interim, I'm thinking of using Catmul-Rom splines. You just define control points without the complexity of the Bezier extra parameters (handles) and it interpolates a path for you. Better yet, they are implemented in Direct3D already!

Unless someone thinks that's overkill or the wrong way to go, that's what I'm going to try...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.