Screen Tearing and VSync.

I am developing an upward scrolling game. I achieve this by reseting the y-values of certain objects on every frame redraw. I am having problems with image tearing(The images aren’t being redrawn in sync). I’m also not sure the screens being refreshed often enough. What am I doing wrong?

local function moveCamera()  
 if( background.y \< background.height - display.contentHeight ) then  
 local old = background.y  
 background.y = background.height - display.contentHeight - eek.y - eek.height  
  
 leftBranch.y = leftBranch.y + background.y-old  
 treeTopLeft.y = treeTopLeft.y + background.y-old  
  
 rightBranch.y = rightBranch.y + background.y-old  
 treeTopRight.y = treeTopRight.y + background.y-old  
 end  
end  
  
Runtime:addEventListener( "enterFrame", moveCamera )  

Note: I have the FPS setting set to 30; changing it to 60 didn’t help. [import]uid: 60927 topic_id: 10736 reply_id: 310736[/import]

Corona doesn’t update the screen constantly like other rendering engines. That’s what EventListener’s are for. Without being able to see the rest of your code I’m not exactly sure what’s happening in your “moveCamera” function. EventListener’s will only run as fast as the function they are calling so if the scene that you are drawing to the screen is complex than your “moveCamera” function might be taking longer than 1/30th of a second to update the screen. Try setting up a very basic scene with a few small graphics and see if it runs any better. [import]uid: 27965 topic_id: 10736 reply_id: 38965[/import]