Display Circle "Shaking" in Program

Hi! I’m fairly new to this language (I started learning it just a couple days ago) but I have been experiencing a problem with animating a display circle in Corona SDK. It occurs with the sample code below:

– Other cool stuff up here like background, etc

local circ = display.newCircle(100, 200, 20)

local function draw()

circ.y= circ.y + 3

end

Runtime:addEventListener( “enterFrame”, draw )

The circle will move smoothly for a few frames, then stop for a frame or two, and then make a jump to where it should be and continue down the screen. This occurs multiple times before it leaves the screen. Why is this happening? Please let me know. Thanks!

Hi @conradclee123,

Welcome to Corona. Is the code that you show basically your entire program? If so, how are you testing it, in the Corona Simulator or on a real device? If on the Simulator, what OS/version/hardware are you running on? If on a real device, which device and OS? These details will help us figure out the issue.

Thanks,

Brent

@Brent Sorrentino Yes, this is basically all of my program. I was testing out animation when I saw this.

I’m testing this on the simulator. I don’t have Xcode or any of that, and the program is really simple, so I saw it unnecessary to look at it on a device just yet. It’s a Mac mini with OS X Yosemite version 10.10.5.

Hi @conradclee123,

Can you test out one of our sample projects and see if the issue duplicates? There are two projects located in your local application folder here:

CoronaSDK-XXXX > SampleCode > GettingStarted > FrameAnimation1 (or FrameAnimation2)

Please test these and report back if the “skipping” occurs.

Best regards,

Brent

@Brent Sorrentino Both work a little bit better than the one that I have right now The second one is a bit worse. I forgot to mention that my program is running at 60 FPS. At 30 FPS there is less jumping but it really isn’t as smooth and graceful.

Hi @conradclee123,

Welcome to Corona. Is the code that you show basically your entire program? If so, how are you testing it, in the Corona Simulator or on a real device? If on the Simulator, what OS/version/hardware are you running on? If on a real device, which device and OS? These details will help us figure out the issue.

Thanks,

Brent

@Brent Sorrentino Yes, this is basically all of my program. I was testing out animation when I saw this.

I’m testing this on the simulator. I don’t have Xcode or any of that, and the program is really simple, so I saw it unnecessary to look at it on a device just yet. It’s a Mac mini with OS X Yosemite version 10.10.5.

Hi @conradclee123,

Can you test out one of our sample projects and see if the issue duplicates? There are two projects located in your local application folder here:

CoronaSDK-XXXX > SampleCode > GettingStarted > FrameAnimation1 (or FrameAnimation2)

Please test these and report back if the “skipping” occurs.

Best regards,

Brent

@Brent Sorrentino Both work a little bit better than the one that I have right now The second one is a bit worse. I forgot to mention that my program is running at 60 FPS. At 30 FPS there is less jumping but it really isn’t as smooth and graceful.