Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: FritsLyn on June 13, 2014, 08:31:19 AM
-
Finishing up my Android game made 100% in Playmaker I come across some unexpected - though rather natural issues:
So many things in Playmaker is / can easily be -- hooked up to 'Next frame' and 'Every frame'.
I always figures this was great, and wanted to hook as much as possible up to this, because I figured that then everything would be in sync with the 60 FPS on Android once I port the game..
But now I realize how this is not the case: For instance animating something simple to just keep spinning a little more 'every frame' and reducing space ship speed after power up 'every frame' etc..
is not in sync with
Animations, tweeners and other third party plugins.
So basically the whole timing of the game is falling apart! Oops!
I see how people who write script (not using Playmaker) are constantly using Time.deltaTime
But Playmaker refer to 'next frame' in so many ways..
I'll clean up my mess, not a (big) problem, but I'd like to hear from you guys, and I really wonder why I'm apparently the only one in the world with this issue? :D
Thanks!
-
Hi,
Indeed :)
Do you understand the concept of "deltaTime" to begin with?
some actions and tweening systems gives you the option to animate "per seconds", which is what you want.
Animating by a fixed value PER frame, means it's going to be dependant on the framrate.
By simply multipling this fixed value with the frame "deltatime", makes the animation totally frame rate INDEPENDANT, and that's what you want.
action "translate" as this build in when you check "Per seconds", for others actions, simply get the delta time ( action GetTimeInfo", multiply your value with that, and then use the result into the action animating your object or property.
Bye,
Jean