• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Tablet thread help

Hi. I'm developing a game and it works great on my phone, but on a friends motorola xoom, the thread is running a little slower, totally messing up the speed of game. Anybody have any ideas of how I can program it to be at the same speed on any device? Thanks for help ahead of time!
 
What does the thread do exactly?

Java doesn't really "guarantee" anything can be run at any specific times, but there are numerous ways of looping through code and try to run things at specific times...

The Handler.post methods are one, a Timer is another... while loops in threads with sleep() calls or System.currentTimeMilliseconds() calls etc...

If you're updating the positioning of a bunch of objects or something, you could approach the problem by using logic that checks how much time has passed since the last update, and sets the positions accordingly.

I dunno really though, these are all just wild guesses at what you're trying to accomplish without seeing your code.
 
Hey alostpacket. I actually figured it out before your reply. Took a lot of thought. And the funny thing is that I did a lot of what you just suggested. Thanks for the reply!!
 
Back
Top Bottom