Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3949040
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:26:47+00:00 2026-05-20T01:26:47+00:00

I have been working on an Android game for the past 6 months or

  • 0

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.

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…

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).

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.

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…

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

TL;DR: Extraordinarily simple program that is just a scrolling background shows stuttering. Please have a look…

Link to download simple stuttering example based off the LunarLander example:
http://dl.dropbox.com/u/4972001/LunarLander.rar

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T01:26:48+00:00Added an answer on May 20, 2026 at 1:26 am

    I have downloaded the RAR file with your scrolling background (looks like a grassy field), and installed it on my Motorolla Droid.

    I can perceive no stuttering as it scrolls, I’ve watched it for well over a minute.

    Based on your description I’d wager the Milestone hardware/platform has some weird video drawing/timing issue.

    Perhaps the explanation is something along the lines of this: The Milestone’s diplay refreshes at 60 Hz (just picking a number here, I don’t know what it really is), and your frame rate is just slightly off that – say 63 or 57 Hz … is it not conceivable that approx once a second the timing of your draw, and the timing of the hardware display update mismatch just enough that the background doesn’t get a re-draw that one time, and has to wait until your next frame? And that occasionally the timing lines up just enough that you might miss the timing of two or three draws in a row (depending upon how far off your frame-cycle is from the actual screen refresh cycle).

    EDIT: Actually, I watched it for another minute I did did see one very short (just perceivable) stutter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working on android for about 4 months, i am working on
I have been working in android for past few months. The problem for me
I have been working on learning the Android NDK the past few days, but
I have been working on android for the last 6 months. I wonder why
I'm working on an android game and have been considering my main game loop.
I have been working with eclipse and android for a few months now and
I have a been working on a game for Android and debugging it on
I have been working on android from 6 months. So I have basic idea
From the past few days, I have been working on an Android code to
I have been working on Android for a few months. Now i want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.