Thanx Stoyan for your input. I have read that post long ago and helped
me understand.

Just a quick question..
Is 100ms of sleep okay,
even if you want to do something like move objects in your game by
touch and drag action on the screen ?


On Feb 13, 1:21 pm, Stoyan Damov <[email protected]> wrote:
> On Fri, Feb 13, 2009 at 1:42 AM, Jon Colverson <[email protected]> wrote:
>
> > On Feb 12, 2:50 pm, quakeboy <[email protected]> wrote:
> >> I don't think OpenGL ES 1.0 is so incapable that it can't give me
> >> atleast 25-30 fps with just 12 triangles which you one 256x256 texture
> >> and one 64x64 textures (used by 5 quads)
>
> > My game does a very similar amount of drawing and I get ~60 fps if
> > sound is disabled and the touchscreen is not in use.
>
> Jon, search my posts (I have a few on this list) for "touch screen" -
> Dianne explained pretty well why touch slows the game, and a
> workaround for that. In short, you need to put your main thread to
> sleep after you handle a touch event, otherwise Android will keep
> pushing touch events to it and the thread simply steals CPU from your
> game thread. In my game I sleep the main thread 100ms after a touch is
> handled, taking as much as 10 touch events/sec (which is quite
> enough). This has completely wiped out the touch handling in
> traceview's profiling output. I also override dispatchTouchEvent,
> which short-circuits a bit more Android code.
>
> Cheers,
> Stoyan
--~--~---------~--~----~------------~-------~--~----~
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