to 1) Did that already. I ruled out everything that was creatinglike shadow Copies or String Concat. I re-implement my own FastList instead of any ArrayList oder Hashmap. To there is nearly nothing that is created intentionally. But the GC is anyway running every couple of seconds. Sometimes only 50 ms somtimes 500 ms. The thing might be, hat you can't tell the GC that he should hold on for some time. It's not in my hands, and since everything in 2d drawing and standard Android Libs is in the GC domain and will be interrupt the game for some ms.
2) i think i have about max 100-150 Objects moving around in my screen. + the "not moving" static objects. I tested it with 200 Objects but the only flaw i saw was the GC hiccups issue. 3)opengl has a hard learning curve. And since i develop Java for about 10 Years now i thought i could handle the graphic stuff via the canvas / draw architecture. Since this might be a KO Criteria I'm kind of afraid to rewrite my game to use the andengine. I've already read about it...and saw some examples...but I'm not sure if how long it will take to get me going with this engine. I would love to see a engine i could "plug in my app". I design my app that way, that i have 2 major methods called in my game loop upateGameData() and drawGameData() in the draw Method i iterate over all different gameObect Lists...like drawMonsters(c) drawMissels(c) drawStaticBlabla(c). UpdateGameData does the Math (e.g. positioning for animations )and is kind of unrelated with drawing besides some things the Update Methods have to know....like Resolution / Borders . everything that can be draw on a canvas has to implement a update(c) method where the object draws itself. Would be cool to replace the "c" for canvas with a OPenGL maybe Andengine Surface but i don't think that's gonna be the case. Would be to nice ^^ On 14 Sep., 15:39, Justin Giles <[email protected]> wrote: > Just a few moderately uninformed comments/questions... > > 1) Use DDMS and MAT to try to nail down any possible memory issues that you > might be overlooking. > > 2) Canvas 2D does have significant limitations compared to OpenGL when it > comes to a large number of sprites on the screen at once. Is this a > possible issue for you? > > 3) You might check out Andenginehttp://www.andengine.org(not affiliated > with them). It is a 2D opengl framework that is a whole heck of a lot > easier to get a 2D game up and running than using raw openGL (in my > opinion). > > Justin > > On Tue, Sep 14, 2010 at 7:44 AM, Andreas <[email protected]>wrote: > > > Hi Folks, > > > im currently playing around with a Game that architecture is basically > > like the example 2d Games like JetBoy / LunarLander and so on. But as > > things now running (and animating continuously) they have kind of > > "hiccups" when the GC is running. I have done all i can to allocate as > > much Objects in front. There is nearly nothing that is created "new" > > besindes some Strings that are used to set the Score and so on. > > (TextView doesn't take int's =( - > > > So do you have similar Problems that the GC is "lagging" your 2s > > game ? any solutions ? > > > Thanks for suggestions > > > -- > > 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]<android-developers%[email protected]> > > 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 [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

