I'm developing a game in Java for Android, using LibGDX. I'm using Nexus 5 to test my game most of the time and it works great (Minimum FPS it gets is 57 out of 60).
Recently I ran my game in Galaxy S2 and found out the FPS gets to 45-55 most of the time. I started checking what causes it using PerformanceCounter and I couldn't find the reasons that cause this slowness.
Later on I decided I'll disable everything in the game's render() and check one by one what could create this problem. I managed to get to a very minimal code in the render() and still the FPS can get to low values.
This is my render() in it's minimal form:
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); camera.update(); batch.setProjectionMatrix(camera.combined); batch.begin(); font.draw(batch, "FPS: " + Gdx.graphics.getFramesPerSecond(), 10, Rules.System.HEIGHT_TARGET_RESOLUTION - 100); batch.end();
I didn't give much attention to the create() because it only happens once in the beginning so I guess it's not supposed to affect.
I downloaded other games from the Play Store to my Galaxy S2 and they seem to work fine, no noticeable lags (So the device is not that bad).
BTW, I also tested my game in Galaxy S3 and it worked better but still had some lags (not as much as in the S2).
Am I missing something? Maybe you have some tips for me on this? I checked every where for documentation about performance in LibGDX but there aren't much.