Android — smooth canvas translational scrolling based on the movement of an asynchronous object?

Your problem is that your frame rate is too low. In my experience Canvas isn't well-equipped to do real-time games at a good frame rate. You'll see a big performance gain if you switch to rendering with OpenGL.

And so the adventure begins. – farm ostrich Apr 28 at 1:35.

I have an android game where a ball moves based on the accelerometer. The ball moves at a variable speed. The game has levels much larger than a smartphone screen, and so I translate the canvas as the ball nears the edge of the screen to accomodate the large levels.

The scrolling works, the trouble is smoothly scrolling based on the ball. Here's an attempt that shifts based on some constant. For lower shiftFactor values, it smoothly scrolls, but the ball can easily 'outrun' the scrolling.

For larger shiftFactors, the scrolling gets incrementally choppier.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions