Game Development Community

NEW FEATURE- Animation Speed Scaling!

by Warthog · in iTorque 2D · 04/18/2013 (7:59 am) · 2 replies

Hi to all that are still living in the 1.5 and 1.6 world,

I bring glad tidings and merriment, as animation speed scaling is implemented and working. I found a reference to Michael adding the ability to scale animation speed hidden 26 comments deep in a blog from when 1.5 was in development:

http://www.garagegames.com/community/forums/viewthread/127131/2#comment-815014

It isn't documented anywhere but there and it doesn't work, which made me sad.

BUT IT DOES!!! After searching through the source code, I found Michael changed the name of the command, so if you use this example instead:

// Get the current speed, which is 1 by default
%scale = %myAnimatedSprite.getSpeedFactor();

// Double the animation speed
%myAnimatedSprite.setSpeedFactor(%scale*2);

it works... great! This is a huge help toward making animations of moving objects look so much better. I mean, if the bird flies faster, his wings should flap faster, don't you think?

Thanks Michael for adding this. Next time don't be so shy about telling us about it. Are there other commands in the source, that aren't in the documentation, that we should know about?

#1
04/18/2013 (1:35 pm)
You could always search the source for ConsoleFunction and ConsoleMethod to find all implemented console functions and methods....
#2
04/18/2013 (1:42 pm)
That's a good idea, thanks!