Hello Guest

Author Topic: What problems? SpriteCollection w/ multiple atlases and TileMap.  (Read 5365 times)

GarthSmith

  • Newbie
  • *
  • Posts: 6
  • Games. Math. Code.
    • View Profile
    • Garth Smith's Website
Hello!

Thanks for making 2D Toolkit! It has saved us a ton of development time.

I have a SpriteCollection called "WayTooBigSpriteCollection". Under Settings -> Atlas Settings, if I check "Multiple Atlases" I get a warning:
"Sprite collections with multiple atlas spanning enabled cannot be used with the Static Sprite Batcher, Fonts, the TileMap Editor and doesn't support Sprite Dicing and material level optimizations."

All of our tiles cannot fit on a 1024x1024 atlas. So I made "WayTooBigSpriteCollection" which spans 5 atlases and ran some preliminary tests. I see no problems! I did not test the material level optimizations.

So my questions:
  • At first glance, the TileMap editor seems to support the "WayTooBigSpriteCollection" despite the warning. Is there some gotcha that'll come back to haunt me?
  • If I shouldn't use a multiple atlases SpriteCollection, is there a way to use more than one SpriteCollection in a tile map?
I'll think about material optimizations another day.

Thanks again for all your great work!
 - Garth


firmie

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: What problems? SpriteCollection w/ multiple atlases and TileMap.
« Reply #1 on: October 26, 2013, 07:37:24 pm »
These questions are popping up in my project as well. It also seems the bigger collection atlases are causing a performance hit on older devices. Though, I'm not entirely sure that is the main source of slowdown.

for my project i mostly replace tiles with prefabs, so i could potentially use multiple tilemaps and piece them together at runtime, but would be nicer not to have to.

Any feedback would be appreciated. Thanks.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: What problems? SpriteCollection w/ multiple atlases and TileMap.
« Reply #2 on: October 26, 2013, 08:33:43 pm »
If you use multiple atlases - you're likely to encounter slowdowns on older devices, draw calls will be way higher. I personally wouldn't use multi atlas spanning with tile maps, simply to keep things deterministic.

You can't use more than one sprite collection per tile map - its been in our todo, but not super high priority as it will be a substantial amount of work to implement that while keeping things as efficient as they are now. Its more or less the same problem as above. The simplest solution is to use multiple tile maps in the same scene.

The reason multiple materials are supported right now is for solid material optimizations only, every other use of this will make things quite a bit more inefficient.

If you mostly replace tiles with prefabs, again the same thing applies. Check your draw calls.


firmie

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: What problems? SpriteCollection w/ multiple atlases and TileMap.
« Reply #3 on: October 28, 2013, 01:21:21 am »
Sounds like either multiple tilemaps, or maybe breaking up my sprite collection into 2 separate for editor painting vs. game prefabs.

Thanks for the info.