Hitting a bit of a roadblock with my game's development and I'm just looking for some outside advice.

I'm trying to render a tilemap for my mobile game (Android) and I'm using LibGDX.

Now, here's the issue. Using my simplified version of LibGDX's own native OrthogonalTiledMapRenderer gives me:

  • 60fps on desktop
  • ~40fps on my Nexus 10 tablet
  • ~20fps on my Nexus S phone

Here's my renderer for reference, it's very simple as to keep performance up. The function renderTileLayer() is called every frame to render the tiles in the viewport's range.

Now, this is with all tiles in a single TextureAtlas, blending disabled, and actively culling the tiles. Since this is the beginning stages of the game, anything below 60fps is only going to result in horrid performance later on, so I need to get this fixed.

I don't understand how people are able to render tile maps on mobile devices in their finished games if I seem to be having so much trouble with rendering my own simple 1 layer map with no other objects or lighting effects or particles, etc...

The code for rendering the tiles is as straightforward as possible and results in only 1 render call to the SpriteBatch (no Texture swapping).

Any help/input appreciated!

  • \$\begingroup\$ Perhaps you need to benchmark your code? Add time measurements here and there and see where is the biggest bottleneck in your code. \$\endgroup\$
    – Lasse
    Oct 6, 2013 at 16:30
  • \$\begingroup\$ What is the size of each tile texture? \$\endgroup\$
    – you786
    Oct 31, 2013 at 4:21


You must log in to answer this question.

Browse other questions tagged .