Wow, good lookin product (the video). Anyways, about the stuttering…
One factor could be that it looks like you’re using enterFrame and (based on your sample) the timing appears to be based on enterFrame being called 30 (or 60) times per second.
However, I believe this is NOT guaranteed ( can CoronaLabs weigh in on this?) If you’re app is set for 30 fps, it might only get called 26 times (if your app/sdk does a lot of processing on 3-4 of the loops, and runs over through the next frame - it will be skipped).
This will affect your rate of movement across those 3-4 frames, and appear as a “stutter”. It’s of course most noticeable in your case on long vertical lines (building sides) since your side scrolling (horizontal lines if vertical scrolling).
The transition library tries to smooth these out by averaging the movement out across frames, but still - if there is a lot of processing going on in a frame (during enterFrame especially) it can completely cancel an entire screen update - it just gets skipped (again, can coronaLabs verify that setting to 30 fps does NOT guarantee 30 enterframe events per second / 30 screen updates? It can be defeated by coding issues?)
Anyways, I tried this on your test case, and with both the enterFrame method and the transition method, both looked the same. BUT… I don’t think this test case really represents your app… If it’s like the Thief Job, there’s at least 4 layers of depth with a lot going on during the enterFrame I would think, and perhaps during just a few of them (per second), it runs over into the next frame
[lua]
– replace above demo code from the enterFrame onward…
–Runtime:addEventListener(“enterFrame”, enterFrameListener)
local function resetBuilding()
_buildingObject1.x = _W
transition.to( _buildingObject1, { x=-_buildingObject1.width, time = 5000, onComplete = resetBuilding } )
end
resetBuilding()
[/lua]
This code does about the same thing. You might notice some interesting artifacts if you change the time period (5000). As it sits right now, it doesn’t look like the stuttering to me.
The test case looks more like the left edge pixel “crawls” back and forth, just a little, as the building moves. I don’t think it’s the stutter - but a mathematical artifact in this case – of the screen width (640) which is the movement distance, divided by the number of frames (5 seconds * 30 frames) = 4.266
This means for each enterFrame, for the movement to look perfectly smooth, the image should move exactly 4.266 pixels. But there aren’t fractions of pixels of course. So one obvious solution for the sdk is to average the xcoordinate out (which leaves it shifting 1 pixel every few calculations – the onscreen wiggle of the left edge we see). There’s only certain things you can do to battle the math at this level… Fuzzy edges can hide it for example, or using scroll rates that factor well…
Anyways, take it all with a grain of salt of course, but there may be an idea in there that provides a lead for you… Based on the video, you’re kickin some butt!
NOTE: There is a little weirdness in the sim with my changed code… If you set it to(30*640), 30*320), etc… You might be able to pin something down etc… But it could just be a sim/mac issue, don’t have time to test on a device…