Hello Guest

Author Topic: Mobile - Atlas size - 4096 x 4096  (Read 3192 times)


  • 2D Toolkit
  • Newbie
  • *
  • Posts: 27
    • View Profile
Mobile - Atlas size - 4096 x 4096
« on: July 06, 2013, 10:29:28 am »
Okay, I know it's absurd. But read me out.

I had a big parallax background. It fiiled a 1024x1024 texture. I've used that "diced render mesh (64 x 64)" to minimize the draw calls (it was what I've read at least).
The game is often being tested in my mobile device. It worked just fine.
But then I decided to add a new parallax background! I used the same collection (for ease of use) and I had to extend it to 2048 x 2048... then two more - 4096 x 4096.
And now my mobile can't play my game anymore. The background DISAPPEARED!
So I deleted those extra backgrounds and got my game running again.

But I NEED those backgrounds. And apparently, my mobile run VERY slow when I put those backgrounds again (even in different collections). I think that, they are so big that they can't be loaded at the same time. If that's the case, is there any way to load images and create sprite collections at runtime? Even if I'm using mobile?



  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Mobile - Atlas size - 4096 x 4096
« Reply #1 on: July 06, 2013, 11:42:51 am »
4096 isn't supported on some devices. Modern iOS devices (except iPad mini) support it, but a LOT of android ones dont.
If its just for a background, why don't you just use tk2d > Sprite From Texture, as its available in 2D Toolkit 2.0? You can simply import your background texture directly into it - you'll have to make it non power of two and disable mipmaps, but that should be it.

With performance, you're probably doing something that the GPU doesn't like, like drawign too many transparent layers on top of one another... If your background is solid, make sure to use a solid shader. tk2d/SolidVertexColor. That will help massively.