Questions tagged [sktextureatlas]

An SKTextureAtlas object is a collection of related texture objects created from a texture atlas stored inside the app bundle

SKTextureAtlas is only available in iOS7.0 or later.

Tag questions if your question address one of the following issues:

  • Converting code where sprites are drawn with different textures to using an Atlas
  • Creating a Texture Atlas
  • Creating a Texture from a Texture Atlas
  • Preloading Texture Atlas Data
  • Inspecting the Texture Atlas
  • Adding artwork to the .atlas folder

Apple developer documentation

75 questions
1
vote
3 answers

TextureAtlas tool not reading Texture atlas - SpriteKit Texture Atlas Generator Error

I am trying to make a node with a simple animation, so I created a animation with each individual frame as a .png file, I stuck them all in a folder, and named it stoneanimation2.atlas . This is the code I tried: SKTextureAtlas *atlas =…
user3386154
  • 99
  • 1
  • 10
1
vote
2 answers

ios Loading texture from atlas not working

I have an atlas with a bunch of tiles and i am trying to load them into memory using SKTexture and SKTextureAtlas but it is not working. I use the following code to load them: NSString *atlasName = [NSString…
Marcus
  • 97
  • 1
  • 13
1
vote
1 answer

SKTextureAtlas why not refresh when i make new ones?

i am making a little project with SpriteKit in iOS . using SKTextureAtlas , so i make a folder with foo.atlas , put all my png files in it , run , all working fine . but while i remove this folder , and add some pngs to it , and add drag this folder…
1
vote
1 answer

SpriteKit SKTextureAtlas, Terminated Due to Memory Pressure while loading texture

Similar to the SpriteKit Featured Game "Adventure" from WWDC, I am try to load my background image via tiles. I have created a Texture Atlas that contains 6,300 "tiles" that are each 100x100 pixels in size. The complete background image is a total…
0
votes
0 answers

How do I check whether an SKTextureAtlas exists?

I'm building a SpriteKit game which will have a lot of animated sprites. I am using TextureAtlases. SKTextureAtlas is written in ObjectiveC and wrapped in NS_ASSUME_NONNULL_BEGIN - meaning, if a textureAtlas with the appropriate name does not exist,…
green_knight
  • 1,319
  • 14
  • 26
0
votes
0 answers

Can you play a texture atlas in reverse in spritekit?

I have a couple texture atlas' that I need to play normally under certain circumstances and then in reverse under different circumstance. These atlas's do not loop. They play once through and stop. I would prefer to not have to create additional…
0
votes
1 answer

App's second sprite atlas 'cannot be found'

I have a SpriteKit game that uses a sprite atlas (extension .spriteatlas). It's located in my Assets.xcassets. This sprite atlas works just fine. I load the atlas like this: let atlas = SKTextureAtlas(named: "Atlas") Now, I'm trying to add a second…
West1
  • 1,430
  • 16
  • 27
0
votes
0 answers

My animated SKSprite nodes atlas won't change during touchBegan

I created a sprite with an animated texture atlas. I then want that animation to change based on the direction the sprite is heading. I try to do so with "self.player!.texture = firstFrametexture(ofatlas)" Here is where I build the player (put…
Mugs
  • 339
  • 3
  • 14
0
votes
2 answers

SKTextureAtlas staying in memory

I made a quick project to understand how SpriteKit frees atlases from memory. Every time the screen is tapped an atlas is created and is loaded into memory. The only reference to the atlas is what you see in the code below and I thought since the…
0
votes
1 answer

How do I load textures from Internet using TextureAtlas in IOS?

First I added textures to the project before compilation and SKTextureAtlas created a set of textures with correct size based on .atlasc folder. But when the number of textures grows it becomes not rational to store them in project so I started to…
0
votes
1 answer

Texture in texture atlas is available in Xcode in a scene but not in running app

Using Xcode 8, I have a texture atlas with a bunch of images in it in my project. In the scene editor, I can select a sprite and in the Texture field for thats sprite I can click and get a list of all textures (images) in the project, INCLUDING…
chadbag
  • 1,837
  • 2
  • 20
  • 34
0
votes
0 answers

SpriteKit huge performance drop when purging SKTextureAtlas

I have a very strange problem when purging a cached instance of SKTextureAtlas. In short, before the game starts I preload the SKTextureAtlas with textureAtlas.preload(completionHandler:) and in the completion handler I store a reference to the…
damirstuhec
  • 6,069
  • 1
  • 22
  • 39
0
votes
1 answer

How to change texture format to RGBA4444 for Sprite Atlas created in assets.xassets

So this is my first app and I am stuck and for almost a week I can't find a solution. I've created a lot of animations for different characters and found out that my game' memory usage is about 200 mb. Before I didn't worry about this because, as…
0
votes
1 answer

How to preload texture atlas (SKTextureAtlas) in Xamarin.iOS (in C#)?

Would anyone please show me a small code sample written in C# within the Xamarin.iOS framework that would preload texture atlases ? Xamarin website has this page: https://developer.xamarin.com/api/type/MonoTouch.SpriteKit.SKTextureAtlas/ On that…
Job_September_2020
  • 858
  • 2
  • 10
  • 25
0
votes
1 answer

"Template Rendering is not supported in texture atlases" SpriteKit and Xcode

I am making a game in SpriteKit and I am using a texture atlas for all of my textures. I am using the setting Scale Factors: Single Vector Xcode is giving me a warning for this TextureAtlas : Template rendering is not supported in texture…
AtomProgrammer
  • 327
  • 2
  • 13