Is it impossible to make an Android game stutter-free? I am going crazy here
<p>I have been working on an Android game for the past 6 months or so, and have posted on here several times about various lag issues that I cannot get rid of.</p>

<p>I ended up grabbing the LunarLander example and stripping it down to its very core components to see if I could make anything at all that doesn't lag. All it really does is change the amount the canvas is translated each frame, and then draw a background onto the canvas. EVEN THIS, about as simple as you can get for a surfaceView application - stutters...</p>

<p>My game is a scrolling game where you continuously move up the screen (think of a flying game), but the way I am currently doing the background results in constant stuttering every second or so for about 50-100ms. This isn't game breaking, but it is very distracting and makes the game seem as if it was programmed by a complete moron (though I am starting to suspect this might be the case). </p>

<p>No, it is not the garbage collector, there are no new objects being created at all during the game's run loop, and the GC barely ever runs while my game is running.</p>

<p>I am practically tearing my hair out with frustration. I have spent over 40 hours just trying to get rid of the lag on this simple application example over the past week alone and it is driving me crazy. How can an application as simple as the one I have linked possibly have lag issues? You wouldn't think a scrolling background could get much simpler than that...</p>

<p>NOTE: This demonstration constantly gets about 60fps on my phone (A Motorola Milestone). Uncomment the FPS code in the example to see the FPS.</p>

<p>TL;DR: Extraordinarily simple program that is just a scrolling background shows stuttering. Please have a look...</p>

<p>Link to download simple stuttering example based off the LunarLander example:
<a href="http://dl.dropbox.com/u/4972001/LunarLander.rar" rel="nofollow">http://dl.dropbox.com/u/4972001/LunarLander.rar</a></p>
