I have been working on an Android game for the past 6 months or so, and have written several times here about various latency issues that I cannot get rid of.
I ended up grabbing the LunarLander example and splitting it into its main components to see if I can do anything at all that doesn't fall behind. All he really does is change the amount that the canvas translates every frame, and then draw a background on the canvas. EVEN THIS, about as simple as you can get for a surfaceView application - it stutters ...
My game is a scrolling game in which you are constantly moving around the screen (think of a flying game), but the way I am doing the background effect is constantly stuttering every second for about 50-100 ms. This is not a game, but it is very distracting and makes the game look as if it had been programmed with a complete moron (although I am beginning to suspect that this may be so).
No, this is not a garbage collector, no new objects are created at all during the game launch cycle, and GC almost never starts during my game.
I practically tear my hair away from disappointment. I spent more than 40 hours just trying to get the backlog of this simple example application in the last week, and it drives me crazy. How can an application just be related to what I have connected? You would not think that a scrolling background could become much easier ...
NOTE. This demo constantly gets about 60 frames per second on my phone (Motorola Milestone). Uncomment the FPS code in the example to see the FPS.
TL; DR: An unusually simple program, which is just a scrolling background, shows stuttering. Please take a look ...
Download link for a simple stutter example based on the LunarLander example: http://dl.dropbox.com/u/4972001/LunarLander.rar
Smills
source share