I'm working on a game and right now I'm using the Lunar Lander sample
app as a template. The problem I'm encountering is running the draw
method I have. In the Lunar Lander app they use this:

run(){
while (mRun)
synchronized(mHandler)
DoDraw();

There is a little more to the code that I can't remember but the
problem I'm having is that they don't seem to be doing anything to
throttle the DoDraw command and make it draw slower. I'm trying the
same thing but as soon as the Run() command is called the first time
my memory immediately fills up and my apps stops working.

I am running the Run() command from an OnTouchEvent from the UI
Activity, and TouchEvents also change variables used by a method ran
at the same time as the DoDraw() command.

Is there anyone that could tell my why the lunar lander doesn't suffer
the same issue as mine? I put in a 100 millisecond delay and it worked
well, though it looked choppy. Is there a better way to do this or am
I just doing it wrong?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to