I got a bit of a shock today when I tried the game I’ve been working on with a proper device and found that my tiny game is running at about 20fps.
In-game, at the moment I’ve got 16 tiles, one sprite, 6 patches and 6 bitmap font draw calls. On an S4 I’d hope that’d be capable of hitting 60fps without breaking a sweat.
Simplifying it, my hacked main menu now just has 20 tiny buttons on it, which is each a single call to BitmapFont.draw and NinePatch.draw. This gets ~15fps.
I have a single libgdx Stage.draw() set to the full screen res, and a second SpriteBatch that’s just used to draw the fps text. The app is set to use GL2.0, but it doesn’t make a different to the fps either way. Just drawing the fps display gets me a solid 60fps.
Textures are only being loaded at startup. Fillrate doesn’t seem to be an issue since it occurs no matter how small I make the buttons.
DDMS’s frame time measurement says it’s taking 68ms to ‘Process’, whatever that covers, with ‘Draw’ at 9ms and ‘Execute’ at 0.7ms.
I’m fairly sure I must be doing something stupid here since I’m new to libgdx. Anyone have any pointers? Thanks.