Hi. I'm making a vertical scrolling game, the gameplay is like whenever you're touching the screen, the character moves up and each 3-4 seconds an enemy shows up at the top of the screen, they move right to left and you should not collide with them.
The way I programmed the movement of character is that it actually goes up (I don't move the background to make an illusion of moving) so the game should create who things: background and enemies (there are 13 kinds of enemies in total).
And I have all my enemies in the game layout and I destroy them 1 second after start of layout (I did it to avoid jank).Also there are a couple of things the game does at start of layout, ir checks for an item in local storage (high score item), it sets position of an object, it sets two variables and there's a lite tween gesture that starts in the start of layout (it's basically resizing an object). Image memory usage in my phone (Xperia XA1) is about 36 mbs and cpu usage is about 70 at start of layout but after 7-8 seconds decreases to 35-40. Framerate at start is about 45 but after 2-3 seconds increases to 60.
The problem is I still experience janks! There are no frame rate drops but I experience lag and janks and I have no idea what to do anymore.