I read that frame rate is 30 or 60 in Corona Sdk. However in my piece of code, the numbers are written 33 times with enterframe listener. Can you explain the reason to me, please?
local start=os.time()
local function countDown(event)
if((os.time()-start)==3) then
Runtime: removeEventListener("enterFrame", countDown)
end
print(os.time()-start)
end
Runtime:addEventListener("enterFrame", countDown)
These two values 30 or 60 are the max limit that you want in your app but it depends on device hardware if it will be able to reach that limit.
From Corona site:
Frame rate control
By default, the frame rate is 30 fps. We now allow you to optionally set the frame rate to 60 fps by adding the fps key to config.lua
If you want to have higher fps rate you should optimize your code. Maybe you are drawing too many images.
Check this post:
http://forums.coronalabs.com/topic/32962-low-fps-on-android-hd-devices/
and this blog post (8. Conserve Texture Memory):
http://www.coronalabs.com/blog/2013/03/12/performance-optimizations/
For more info check this:
http://developer.coronalabs.com/content/configuring-projects
Here is a library to show on screen FPS and texture memory:
http://developer.coronalabs.com/code/output-fps-and-texture-memory-usage-your-app