Dark Bit Factory & Gravity
PROGRAMMING => General coding questions => Topic started by: PhotonStorm on July 20, 2011
-
Hey guys,
This is more for game dev really, but I was just curious what you use (if anything!) to handle sprite movement paths?
For example the sweeping motion of ships in a shoot-em-up.
I'm aware most of the older games would have just used basic math. But I'm hoping to either find (or if needs be, create) something more visual to package into the AS3 game library (http://www.photonstorm.com/flixel-power-tools) I work on. If nothing exists I'm happy to write one, but this must have been encountered by pretty much every game dev ever, so I'm hopeful to not have to re-invent wheels here!
Cheers,
Rich
-
Hi PhotonStorm,
You'll probably want to look into splines.
Catmuls are ideal because you can guarantee that the sprites will pass through the control points.
Relsoft posted a nice example;
http://www.dbfinteractive.com/forum/index.php?topic=3878.msg52294#msg52294 (http://www.dbfinteractive.com/forum/index.php?topic=3878.msg52294#msg52294)