OPENFL bitmap movement JERKS on ANDROID

All Hello! I am from Russia (Big country).
I am trying to write an app for Android using Haxe + Openfl.
This is my Main Class:

import openfl.display.Sprite;
class PlayState extends Sprite 

I am create some BitmapData and Bitmap for my background, for example:

private var skyMap = Assets.getBitmapData ("assets/clouds.png");
private var sky:Bitmap = new Bitmap(skyMap); 

When I move this Bitmap in update method, on windows target its look nice and smooth, but on Android phone every 2-3 seconds i see a mini Jerk. If bitmap moves slowly, the jerks are not visible, but the faster it moves, the more pronounced are jerks. But in between jerks everything moves smoothly.

On the phone with a resolution 854x480 these jerks are present, On 480x360 almost no jerks!!!
I think that my problem is a large number of pixels on the screen 854x480.
My image is 1280x480 pixels, but if a use small images like 128x128 or even 64x64 and move it jerks are seen.

This is how i move bitmap, for example:

sky.x = sky.x + 3; // or +2, or another number

In the end I removed everything in my app except the background and only move it. Anyway were jerks.

Please tell me what could be the reason and sorry for my english :frowning:
I am trying to use things something like this:

var lastTick:float = 0;

function enterFrame(e:Event){
    var delta = Lib.getTimer() - lastTick;
    x += speed * delta;
    lastTick = Lib.getTimer();

but it work even worse …

This is how my app look:

Is it a scrolling game and you’re creating a new bitmap every time you reach the edge of the screen? If so, maybe that’s where the jerks are happening…

Yes, its scrolling game, but i dont create many bitmaps. This is part of my code:

class PlayState extends Sprite {
	private var skyMap = Assets.getBitmapData ("assets/clouds2.png");
	private var sky:Bitmap; 

	private function start (ev:Event) {
                sky = new Bitmap(skyMap); 
		sky.x = 0;

        function updateWorld(ev:Event):Void {
                 sky.x = sky.x + 3;
                 if (bla bla) sky.x  = 0; // it's not exactly a picture returns to the initial position and moves again

Just an idea but maybe it’s the sky.x = 0 that’s the problem.

As an example:

The highest you’ll let sky.x go is 300. It’s currently at 299. If you add 3 you should be at 302 but because of the logic you’ll end up at 0 which is the equivalent of 300. You’ve lost 2 pixels of movement. The faster you’re going, the more movement you lose.

Instead of sky.x = 0 try sky.x -= 300 or whatever values suit your game better.

No, this is not the exact code. My code is work fine on 480x360 devices! Problem maybe in size of textures or in something else

If I’m understanding this issue correctly, I am seeing the same sort of behavior via exporting to HTML (also with a scrolling background). I have many objects floating by (collectibles) and they all look fine except that every 3-5 seconds one or two out of a dozen will jerk a few pixels over while the rest remain in tact. It’s kind of noticeable but also kind of odd. My guess would be something in OpenFL. However I haven’t had time to do any thorough testing.

This could be when GC hits, do you handle deltaTime in your logic?

Not yet, but am planning too. Again calling out that if there are 20-something objects on screen scrolling by over the scrolling background, only 2-3 (random ones) will jerk. This sort of thing seems to occur every 5 seconds or so. If GC was the cause, wouldn’t the whole game jerk/ skip? But I certainly can report back after delta time is hooked up to see if that helped anything, Speaking of which (not to derail the topic), but is there any easy-to-use deltaTime var somewhere in openfl Lib? I know you track FPS, might be handy to track a DT variable.