Quantcast
Channel: Adobe Community : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 238792

Sudden framerate drop

$
0
0

I am developing AIR game for Android and iOS but while developing I am testing it on Windows.

It stably produced 60 fps, just like should. But one moment fps reduced to stably 19! After all I found out that:



private function enterFrame(e:Event):void


{



currentUpdateTime = new Date().time;



var elapsed:Number = currentUpdateTime - lastUpdateTime;



if (elapsed > 30) elapsed = 30;



elapsed /= 1000;







trace(elapsed);



var bool:Boolean = false;



if (false)



{




return;




inGame.update(elapsed);



}







lastUpdateTime = currentUpdateTime;


}

works Ok (60 fps), while:



private function enterFrame(e:Event):void


{



currentUpdateTime = new Date().time;



var elapsed:Number = currentUpdateTime - lastUpdateTime;



if (elapsed > 30) elapsed = 30;



elapsed /= 1000;








trace(elapsed);



var bool:Boolean = false;



if (bool)



{




return;




inGame.update(elapsed);



}








lastUpdateTime = currentUpdateTime;


}

works awful - stable 19 fps (not 18, not 20)

I am in perplexity. What is going on???


Viewing all articles
Browse latest Browse all 238792

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>