objective c - [CCDirector sharedDirector].secondsPerFrame returns value of zero -
i’m looking way fetch fps rate, , found property secondsperframe in ccdirector, every cclog says [ccdirector shareddirector].secondsperframe
“0.000000″
if tailor code adjust drops in frame rate, game never run below 60fps, amazing.
if tailor code adjust drops in frame rate, game never run below 60fps, amazing.
if possible we'd find standard feature in render engines. alas, not.
to detect dropped frame implies frame has had dropped already. overhead of switching code paths, "high detail" version prohibitive well.
besides headaches of designing game visuals or algorithms may vary @ time.
plus player perception rather negative - consider streaming videos automatically adjust bandwidth , appear blocky few seconds.
it better limit game 30 fps if can't match 60 fps time, , design against steady 30 fps rather fluctuating 40 60 fps.
anyhow, if log secondsperframe
, 0.0000 maybe logged using wrong format specifier. try this:
nslog(@"spf: %f", [ccdirector shareddirector].secondsperframe);
keep in mind value may average on multiple frames , may not updated in release builds. check code #if/#ifdef.
Comments
Post a Comment