Hello Guest

Author Topic: Mobile game - Too many atlases?  (Read 2601 times)

cloudcamaleoniv

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 27
    • View Profile
Mobile game - Too many atlases?
« on: August 09, 2013, 07:50:47 am »
Hello. I'm making a mobile game, but I'm not sure what to do with SO many textures.

First - There are 8 HUGE parallax backgrounds. If I do not put each one in a single atlas, it won't fit (at least not within the mobile limits)
Second - I have textures for : Player (many clips, each clip has tons of textures), Obstacles (each obstacle explodes, has lots of animation), Background, Enemies, and so on.

So, for more readability, maintainability, etc I keep tons of atlases

1 for the player and it's animations
1 for all the obstacles
3 for all the enemies
1 for each UI Screen
1 for each background parallax, and so on.


Is this "healthy" for my mobile CPU / GPU? Will it destroy the performance? Or is it better that I live with the insanity of editing every little texture in one huge atlas?

Thanks.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Mobile game - Too many atlases?
« Reply #1 on: August 09, 2013, 10:04:29 am »
The parallax backgrounds - either create an atlas for each or use Sprite From Texture (http://unikronsoftware.com/2dtoolkit/doc/2.10/reference/sprite_from_selected_texture.html)

Otherwise that looks pretty sensible.

GarthSmith

  • Newbie
  • *
  • Posts: 6
  • Games. Math. Code.
    • View Profile
    • Garth Smith's Website
Re: Mobile game - Too many atlases?
« Reply #2 on: August 12, 2013, 10:24:35 pm »
What devices are you targeting? This sounds similar to one of the first platformers I programmed.

We needed to run on the iPad 1 which has 256 MB(!) of memory and an old graphics chip. I quickly found out that full screen textures and full screen transparencies completely killed performance on the iPad 1, if it didn't crash from being out of memory first. We had no problems with the iPad 2 in comparison.

This was before I was using 2D toolkit and we ended up having to have a high quality and low quality version of all sprites in the game, and we redid our backgrounds to use meshes instead of a transparent shader.