Hi there,
I am currently developing a game where I need to render a lot of dynamic small tiles.
One tile is 6x6px targeting a resolution of 1024x768 resulting in a tile-count of 170x128=21760 tiles.
On the desktop I get a decent framerate of 400fps whereas on my test device (acer a500 tegra2) I only get about 20fps :/.
Keeping in mind that the gamelogic, ki, etc. is excluded in this test, I would be happy with a framerate of about 50fps on the tablet.
I am only! rendering tiles that are visible and there are no unnecessary texture binds involved.
Here is the code that is called for each tile:
@Override
public void renderTile(short tileId, int screenX, int screenY) {
batch.setColor(tileProvider.getTile(tileId).color);
batch.draw(tileTexture, screenX - tileMap.getTileSize(), screenHeight - screenY - tileMap.getTileSize());
}
Is there any chance to improve this?
Thanks in advance