I did this:
local physics = require( "physics" ) physics.start() -- display ball image local ball = display.newImage( "Icon.png" ) ball.x = 145; ball.y = 200 -- add physics to the ball physics.addBody ( ball, { friction=0.5, bounce=2 } ) local prevTime = system.getTimer() local fps = display.newText( "30", 30, 47, nil, 24 ) fps:setFillColor( 1 ) fps.prevTime = prevTime local function enterFrame( event ) local curTime = event.time local dt = curTime - prevTime prevTime = curTime if ( (curTime - fps.prevTime ) \> 100 ) then -- limit how often fps updates fps.text = string.format( '%.2f', 1000 / dt ) end end Runtime:addEventListener( "enterFrame", enterFrame )
And I’m getting normal 50-60 fps results.
Rob