Some noobish Android questions...

Hello, I’ve been learning droid game development this past week and I have some questions I cannot find answers using google. ;*(

First, I’ve developed my own OpenGL ES 1.x rendering layer by porting some of my old C++(also converted to LWJGL) spritebatching code after reading how to set up openGL from this site: obviam.net

DL(with source):
http://rel.phatcode.net/junk.php?id=141

The framework was slow at first (Samsung galaxy S 2.1) but after reading this:

http://www.badlogicgames.com/wiki/index.php/Direct_Bulk_FloatBuffer.put_is_slow

I achieved full speed with 1000 bullets on screen.

I also wasted time to convert my non-interleaved Spritebatcher to an Interleaved one because when the conversion was done, I only get a 1-2 FPS increase on ~1000 entities on screen. ;*(

So my questions…

  1. I’m updating entities from inside the onDraw() method. Is there a better way to update logic?
  2. Why does the engine cap at 55 FPS on my 1 ghz samsung and 60 FPS on my 800 mhz LG Optimus E400? It would still report 55 FPS if even if I only draw 1 entity.
  3. What is a good way to support multiple screen sizes?
  4. Is there a good Android specific forum I could ask questions aside from here?
  5. Can you guys test the apk included in the DL and report your phone model as well as the FPS?

Thanks a bunch!

I have a samsung gt-I8150T: FPS ~55 and and ~900±50 sprites

Thanks!

Anyone care to answer some of my questions?

@2 That is expected behavior imo… every android cellphone vsyncs and they have different fps. from 20 to 80 everything in tha hood.
@4 I doubt many people can help you here, everyone and their mom is using libgdx. Including me; we developed 3 Android games, also PC of course and never touched the android sdk directly.
@5 aah sure, S3 here, give me a moment
edit: stable 60. As expected from the S3

tl;dr: use libgdx

  1. I’m updating entities from inside the onDraw() method. Is there a better way to update logic?
    see answer 2

  2. Why does the engine cap at 55 FPS on my 1 ghz samsung and 60 FPS on my 800 mhz LG Optimus E400? It would still report 55 FPS if even if I only draw 1 entity.
    Because of frame limit to 60 fps (this is good thing) You don’t want to take full system resources and draw everything as fast as it can. However you could update Your logic faster if you want. However 60 fps limit is really good for newcomers.

  3. What is a good way to support multiple screen sizes?
    http://blog.gemserk.com/ everything you need about screen sizes

  4. Is there a good Android specific forum I could ask questions aside from here?
    don’t know

  5. Can you guys test the apk included in the DL and report your phone model as well as the FPS?
    sorry, my android device is dead at the moment

Thanks guys! So it’s safe to assume that onDraw() is the way to go?

Will use libGDX on my second game (I like to do things on my own the first try ;*) )

Yes it is the way to go.

Thanks buddy!!! Now for sound and input…