Sunday, May 22, 2011

[android-developers] choppy game

I used a Java Timer object and a TimerTask like this for some game
physics

if (!timergoing)
{
PhysicsTask physicsTask = new PhysicsTask();

Timer tm = new Timer();
tm.scheduleAtFixedRate(physicsTask, 1000, (long) (1000.0f/
physicsFrameRate));
}

However, the physics was somewhat choppy to my surprise. Anyone know
what the deal is with this and how to make it better?

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate