@Ralf

i started testing on my gf's htc hero today and am getting some
strange results now as well concerning touch. First of all, the game
i'm working on will have the player constantly touch the screen more
or less (as oposed to for example replica island). As it is good
practice i insert a Thread.sleep(16) in my onTouch method when an
MotionEvent.ACTION_MOVE is triggered. This does absolutely not solve
the flooding issues of MotionEvents. Additionally as new MotionEvents
are generated permanently as long as the finger is on the screen the
garbage collector kicks in. This is on the latest HTC Hero ROM which
is Android 1.5 afaik. I had a look at the MotionEvent implementation
and it pretty much explains the memory leak (see MotionEvent.obtain
()). The trick with recycle gets rid of the garbage collector calls
but wrecks havok with the event queue as Dianne stated.

There doesn't seem to be an obvious solution and a lot of googling was
rather inconclusive. Robert has the same problems on G1 level hardware
with Android < 2.0. I notice the same effect in other twitch games
like Radiant. I guess that forces me to go all >= 2.0 for the next
game. I don't want angry players shouting at me calling me incompetent
when it's really a problem with the Android framework (not that i
implement everything perfectly, far from it :). In short Android is
awesome i just wished it was more game dev friendly).

On Jan 28, 4:24 pm, Mario Zechner <badlogicga...@gmail.com> wrote:
> @mrchaz
>
> I check for "MB200"/"MB220"/"Behold". I use String.contains() for the
> behold. This is only a list for the dext/clique and behold. There
> might be other devices that have the same problem. Maybe Robert could
> share his settings.
>
> On 28 Jan., 15:15, MrChaz <mrchazmob...@googlemail.com> wrote:
>
> > @Mario
> > Could you do me a favour and paste in the strings you're checking when
> > using android.os.Build.Model?  I don't have access to any phones other
> > than the G1.
> > It would be willing to bet that the couple of comments of missing
> > objects I've had are related to the VBO issue you mention.
>
> > Maybe the things I've produced just aren't cpu intensive for me to
> > notice the dip in frame-rate.  That said I've not kept a close eye on
> > it after I got to where it was smooth to me.
>
> > On Jan 26, 9:28 pm, Mario Zechner <badlogicga...@gmail.com> wrote:
>
> > > @robert, i'd be more than willing to contribute to such a best
> > > practices/common pitfalls site for opengl and game development on
> > > android. I will also send you the code for the racer, boiled down to
> > > just rendering the racer itself so you can see and test the effect. In
> > > light racer 3d this effect is not noticeable, the same is true for
> > > first person games like toon warz. I'll check out light racer 2d.
> > > Expect an email soon :)
>
> > > @mrchaz you can detect on which device you are running by checking via
> > > the android.os.build.Build.Model String (writing this from the top of
> > > my head, just google for android build). I use the
> > > SimpleEglConfigChoser and don't react on specific devices apart for
> > > blur/dext/samsung behold 2 which seem to share a common bug. They
> > > report the VBO extension but throw errors when using any of the VBO
> > > related functions. Apart from that I wouldn't open that can of worms,
> > > coding up paths for individual devices that is. Also, the Pixelflinger
> > > OpebGL software renderer used in the emulator and on cyanogen mods
> > > doesn't like deleting VBO buffers and will crash (take that for your
> > > site robert :))
>
> > > I will try to finish translating my android game dev tutorial to
> > > english this week (I'm pretty busy with my day to day job and
> > > releasing the full version of Newton in the moment). Maybe you,
> > > Robert, could share that on your site too.
>
> > > Awesome discussion so far. Keep it up
>
> > > On 26 Jan., 21:41, MrChaz <mrchazmob...@googlemail.com> wrote:
>
> > > > Am I right in thinking that the Galaxy likes a depth of 16?
> > > > I guess this might also be a good to place to ask how I'd find out the
> > > > type of phone the game or whatever is running on so that I can start
> > > > accounting for this stuff?
>
> > > > On Jan 26, 1:00 am, Ralf Schneider <li...@gestaltgeber.com> wrote:
>
> > > > > I have just started playing around with OpenGL ES on the Nexus One.
> > > > > But this thread might be intresting for your problem:
>
> > > > >http://groups.google.com/group/android-developers/browse_thread/threa...
>
> > > > > The most important part might be this:
>
> > > > > It seems that DEPTH_SIZE of 24 is optimum on the Droid. I was kind
> > > > > thrown back a bit when I picked an EGLConfig with DEPTH_SIZE of 0 or
> > > > > another value (16, etc.) and rendering of a simple cube was at 40FPS.
> > > > > With an EGLConfig that has a DEPTH_SIZE of 24 the cube was rendering
> > > > > at 60FPS.
>
> > > > > Regards,
> > > > > Ralf
>
>

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