Hey guys,

I'm really in a bind here.  I've got this new game engine that's
almost done but the input system is killing me.  I have a virtual
analog stick on the screen and it works great, especially on Android
2.0 (Droid) but on any 1.5/1.6 device, the touching is causing my game
to crawl.

I know all of the standard stuff - I pipe my input events into a queue
for my main game thread and then sleep for 16ms which should ensure
that no more than 60 motion events are dispatched per second.  That
works fine but even so, just touching the screen, even with my event
handling code commented out (except for the sleep, of course), drops
my game from 30FPS to 20FPS.  It's really bad.  I bound some keyboard
keys to the movement to replace the touch controls for testing and the
game maintained a great framerate.  That won't work because most
phones now only have touchscreens so I really need to figure this one
out.

"Wait for Android 2.0" is not a great answer, either.

So far I've tried;

Activity.onTouchEvent with a 16, 20, 32, 50ms sleep before returning
Activity.dispatchTouchEvent with a 16,20,32 and 50ms sleep
Commented out all code except the sleep to test - problem is still
there, so it's not my hander.

What else can I do?

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