Android Question acc. surface vs gameview vs libgdx

sorex

Expert
Licensed User
Longtime User
Hello,

I have been testing the behaviour of accelerated surface (@Informatix) , gameview (@Erel) and libgdx (@Informatix ) in function of this 60 fps meassurement google implemented to define good and bad games.

When I turn on the gpu indicator bars I have some strange results.

While all 3 of them use a fast method to (re)draw things only libgdx seems to be the one that is fully working in the opengl space or whatever you call it. So the bars don't indicate anything at all exept for the FPS updating (the chart moves only a few times per second, I disabled the fps update for the screenshot tho).

The other 2 accelerated methods still show bar graphs and already halfway or near the green mark.

Does this mean that only libgdx is the real opengl method and the others some kind of cheat?

Below are 3 images and here a brief description of it.

the red mark on the green line is the limit to reach 60fps so you should stay under it as much as possible.

libgdx: while you see some charts at the bottom of the screen those are static and not updating at all and they are from app start. the bar method can't capture real opengl.

accelerated gameview: seems to perform well with 50 sprite redraws

gameview: uses like 50% of this just to move 1 sprite around. I don't know if it will spike a lot when you change it to 100 sprites.

I know libGDX is the prefered method but the learning curve is quite high and for example gameview exists for both B4A & B4i which makes porting easier. with libGDX you're stuck at this point so it needs a full rewrite to b4i gameview or SpriteKit.

opengl.gif
 
Last edited:

sorex

Expert
Licensed User
Longtime User
I confirm that when using 50 smileys + the original moving background gameview still stays around the same chart values as the single smiley one.

sometime it goes above the green marker but for 95+% it's between 30-70% of the area below the green line.
less flat lined as in the screenshot above tho but I guess transparency checks from overlapping smileys is causing this.

gameview2.png
 
Upvote 0
Top