I just write
if event.deltaTime > 0.020 then
print(event.deltaTime)
end
in onEnterFrame in the EMPTY project, launch it on device player (or make single TextField and build apk) and see often numbers like:
0.020235005998984
0.035525714978576
0.032229512988124
0.021761026000604
0.023531206999905
0.026308559987228
0.021211659011897
0.029055393999442
0.084022584022023
0.024782542022876
0.038730352011044
35 ms, 84 ms, ?
Is it normal? Without if condition I can see numbers below 16.7 (like 2ms)
Tested on HTC One and Moto Razr. On desktop emulator I see good numbers (not more than 0.072) but simple things still lagging)
I was trying to write simple game and it was always lagging. Then I discovered this.
Any thoughts?
Comments
Do not worry, it is normal. Remove all calls to print before to publish.
I can do it without print function, just updating TextField and see the same. Updating single TextField causes drops to 55 fps, is it normal too?
I only get lag on older devices if use several effects generated with TNTParticle engine.
I have image (size as screen) that moving 5px/frame. Thats constantly shuttering, 1 time in few seconds, even if I calculate delta (deltaTime/(1/60)) and multiply it to 5px to make image move smooth.
https://play.google.com/store/apps/details?id=com.jenots.dummytown
it all was working quite ok for me
enter frame is not a stable tick like event and it's delta may really vary (we even wanted to provide separate event with fixed frame, that would be dispatched constantly without any interuption), but it was never something that could be noticed by the eye
It would be nice if you do this because it's a great problem, not even in Gideros, but in Corona too. I found yesterday 20+ threads on their forum talking the same. And there is no fix for it.