Hello everyone,
So I’ve been searching the forums/Google for days and I cannot seem to find a solution to this issue. Basically when there is an object parallaxing across the screen (on simulator or device) the object transitions do not appear to be smooth. They seem blurry around the edges and appear to have a ghosting effect. I have even implemented delta time and it does not solve the issue. The problem get’s worse as the speed is increased. I’ve read that it could be an issue with anti-aliasing, or the Corona SDK itself. If anyone knows of a fix for this or can provide input that would be awesome. Demo code is posted below. Just copy and paste it into a main.lua file. Thanks!
----------------------------------------------------------------------------------------- -- Initial setup ----------------------------------------------------------------------------------------- display.setStatusBar( display.HiddenStatusBar ) system.setIdleTimer( false ) local w,h = display.viewableContentWidth, display.viewableContentHeight; local column, wallpaper local tPrevious = system.getTimer() local runtime = 0 ----------------------------------------------------------------------------------------- --Functions ----------------------------------------------------------------------------------------- local function getDeltaTime() local temp = system.getTimer() --Get current game time in ms local dt = (temp-runtime) / (1000/30) --60fps or 30fps as base runtime = temp return dt end function moveColumn(event) local dt = getDeltaTime() column.x = column.x - (3\*dt) --Change this value if column.x \< -80 then column.x = w end end ----------------------------------------------------------------------------------------- --Display Objects ----------------------------------------------------------------------------------------- wallpaper = display.newRect(w/2, h/2, w, h ) wallpaper:setFillColor(0,0,0) wallpaper.x = w/2 wallpaper.y = h/2 column = display.newRect(w, h/2, 80, 1000 ) column.xScale = .8 column.yScale = .7 column.anchorX = 0 Runtime:addEventListener( "enterFrame", moveColumn)