ID:1998783
 
(See the best response by Lummox JR.)
Currently if you want to have an object orbit (within the plane of the game) around another object you can do so by approximating a circle through a series of small linear movement animations. Here's an example of how this implimentation works


The problem becomes then that:

1.) You have to make a new animate() call at the end of every line segment.
2.) You have to continue to make animate calls even after the object makes a full rotation.

Essentially a game I work on is making liberal use of these orbits and when many objects on the screen are orbiting at once my rather old computer starts to strain under the demand of it. It's not just a personal problem, it's just that loads of animate() calls seem to punish some older computers rather hard. Almost certainly because every orbiting atom is calling animate() 5 times a second.

Is there any way you could implement something that just allows for these sorts of orbits natively in a way that doesn't force a million animate() calls?

The raw code that runs this sort of thing can be found here but I warn you, the documentation is pretty lacking.
Best response
Why not make an overlay that's translated out a certain distance, and use a rotating animation on the parent object?
That actually sounds infinitely more practical.
We didn't end up going for exactly what you suggested, but the general idea helped us develop a good looking orbit that only uses a finite number of animate() calls.

Came for the feature request, left with the developer help

You can close this one.