SpriteKit ios9 beta 5 texture atlas

I've been using the XCode 7 beta since beta 1 and have had a suspision that texture atlas's are not working as intended because I have had serious performance issues. Unfortunately I was never able to confirm it because draw and node counts were broken and not displaying on screen. With the recent release of beta 5 I can now see draw and node counts.


I made a test project to test texture atlas's and put 11 images in a folder with a .spriteatlas extension in my asset catalog. I then placed each sprite on the screen. My understanding is that I should have 11 nodes and 1 draw count because all sprites in the atlas should be drawn in a single pass. However, I have 11 nodes and 11 draws.


Am I missing something or can someone else confirm this is an issue with the beta?

I am getting weird results as well. I'm using iOS 9 beta 5, and in iOS8 I see 9 nodes and 4 draws. The 4 draws is correct because 6 of the 9 nodes are from 1 texture atlas, so 4 draws is absolutely correct.


But in iOS 9 beta 5 it's showing 14 nodes and 5 draws, which makes no sense!! I have no idea why it thinks there are 14 nodes, when there are clearly only 9 of them. I also don't know why it's reporting an extra draw....

Just to confirm, I've observed this happening also: it affects 1 tile out of 10 in my texture atlas - Xcode 7 beta 5 just draws a black tile (not even the usual white box with a cross in when an expected asset is missing). However, if I open and run the same project in Xcode 6.4, the tiles draw fine and appear correctly.

Each of you should file bug reports about this problem providing your own perspective.

Just filed one. Mine is causing a crash since I'm attempting to create a physics body from the size of the graphic that should have been created from the .atlas file. 🙂

You should comment on the familiarity (or otherwise) Apple has with this issue, and its frequency and likelihood of occurence, along with any other information you have about this particularly vexing issue.


It's not as though the automatic texture packing hasn't been heavily pimped.


It's not as though it's always worked flawlessly, either.


This kind of consideration for users expereiencing a nightmare might help generate empathy for the effort required to absorb your curt instruction.

Using the XCode 7 GM and iOS9.0 GM:


The big issue I am seeing is a huge performance degradation if you store your texture atlas in the asset catalog, something that is a new capability in XCode 7 (you used to have to store them simply as .atlas folders).


[SKTextureAtlas atlasNamed fooName] and [fooAtlas textureNamed] are what I use to create my SKTextureAtlas and array of SKTexture. This is the part that is now much slower.

A bit later, I preload the SKTexture atlas with [fooAtlas preloadWithCompletionHandler:..] but the preloading is not noticeably slower.

[Edit] I am also seeing bogus node counts and bogus draw counts in iOS9.0 GM. I had submitted a bug for this but Apple did not fix it for the GM release...

Have you test with not universal assets? I had submitted a bug for this because I use the same textures like Demobots for characters, two for iPhones and two for iPads. But including in this GM version, when you drag & drop in a SpriteKit Secene, Xcode choose the ~ipad texture and when you Run always says error SKTexture. I don't understand. If I change the name manually, images makes smaller (uses @2x for iPhone) and in iPhone 6 appears but in iPad only a white boxes. This thing made me crazy. Did you know anything about the things I told you?


Thanks in advance.

SpriteKit ios9 beta 5 texture atlas
 
 
Q