Were your results of 95% achieved while you were really pushing the
GPU?  I've found that if I do absolutely nothing but sleep for 16ms
and return true, I STILL get massive slowdown.  It has nothing to do
with my architecture.  I'm pushing the GPU down to about 30FPS with a
6ms update and so it seems that the more CPU/GPU time my game needs,
the worse this problem is.  No problems on the Droid, of course.  Only
on 1.5 and 1.6 devices.

I've tried implementing the sleep in both onTouch and dispatch and
they seem to have the same result.

Any other ideas?

On Jan 1, 10:13 pm, "SoftwareForMe.com SoftwareForMe.com"
<softwareforme....@gmail.com> wrote:
> Hi,
>
> Just off the top of my head...
>
> * Research event propagation order and catch the event as early as possible
> (view before activity?)
> * Be sure to return true to stop propagation from your handler
> * Look into other methods to catch the event stream besides the onTouchEvent
> override
>
> My experimentation on 1.5/1.6 (many months ago) showed with a short pause
> (20 ms, if I recall correctly) brought frame rates to about 95% of what they
> were with no touch events. Thus, what your experiencing might be influenced
> by something else in your architecture, or perhaps one of the first bullets
> above.
>
> SoftwareForMe.com
>
> On Fri, Jan 1, 2010 at 5:10 PM, Robert Green <rbgrn....@gmail.com> wrote:
> > I just tried the thread priority hacks but they didn't seem to offer
> > any kind of big improvement.  Any other ideas?
>
> > On Dec 31 2009, 12:27 am, Robert Green <rbgrn....@gmail.com> wrote:
> > > Cool, I'll give it a shot.  I was thinking about bumping up my
> > > rendering thread.  I'll report the results I get.
>
> > > On Dec 30, 10:49 pm, "Dmitry.Skiba" <dmitry.sk...@gmail.com> wrote:
>
> > > > I can suggest something weird - to boost priority for the time of
> > > > rendering.
> > > > See how I did that in ToF:
> >http://code.google.com/p/tapsoffire/source/browse/trunk/src/org/tof/u...
> > > > (onBeforeRender/onAfterRender)
>
> > > > Dmitry
>
> > > > On 31 дек, 05:39, Robert Green <rbgrn....@gmail.com> wrote:
>
> > > > > I hate to bump it just to bump it but I'm really in need of some good
> > > > > suggestions here.
>
> > > > > Thanks to anyone who can offer anything new to try.
>
> > > > > On Dec 29, 3:13 pm, Robert Green <rbgrn....@gmail.com> wrote:
>
> > > > > > 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 thensleepfor 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 thesleep, of course), drops
> > > > > > my game from 30FPS to 20FPS.  It's really bad.  I bound some
> > keyboard
> > > > > > keys to the movement to replace thetouchcontrols 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, 50mssleepbefore returning
> > > > > > Activity.dispatchTouchEvent with a 16,20,32 and 50mssleep
> > > > > > Commented out all code except thesleepto 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 android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to