FP.elapsed question [Solved]


(Bora Kasap) #1

Hi, i’was using a fixed time number like 0.0166666 for my game until this time, but now i’ve done implementing FP.elapsed, and it solved a big problem.

But now, i lost game performance lots. But, i’m not sure is it about FP.elapsed because i’ve made some other changes…

So, what is my question… Is FP.elapsed function gets and returns elapsed time when it is called, or it gets elapsed time in everyframe and returns it when called?


(Frazer Bennett Wilford) #2

As far as I’m aware … FP.elapsed is used to find the frame time. So how long it took to render that particular frame. It can be used to make things appear smoother, as you scale the change based on time elapsed per frame.

e.g sudden changes in FPS do not result in jerky movements


(Zachary Lewis) #3

elapsed property

public static var elapsed:Number

Time elapsed since the last frame (in seconds).

FlashPunk API Documentation


(Bora Kasap) #4

:S property… i’m so tired… sleepless… etc… sorry for that… thanks


(Ultima2876) #5