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
0
votes
1 answer

UImage loads entire SKTextureAtlas instead of just SKTexture

I need texture with 'trueName' to load into my myImageViewOutlet.image. The result I am getting is the entire atlas rendering into it. My code is as follows let myTextureAtlas = SKTextureAtlas.init(named: "myGameTextures") // let texture =…
John Masiello
  • 149
  • 1
  • 4
0
votes
1 answer

during Spritenode animation and movement appear red large x

Here is problem in which I add zoombie sprite to the scene every one second. When I add another sub animated zoombie to the zoombie node, sometimes it loads animated texture, and other times appear red large X. func addMonster() { let…
Imran Khan
  • 9
  • 1
  • 2
0
votes
0 answers

How to change the texture atlas of a node in an SKAction sequence?

I'm making a game with SpriteKit where I have a node that is repeatedly moving back and forth from the left to the right side of the screen using this SKAction sequence: func move(){ let recursive = SKAction.sequence([ …
NickyNick321
  • 213
  • 1
  • 4
  • 12
0
votes
1 answer

How to use .xscale that runs depending on which way node is moving?

I'm making a game with SpriteKit where I have a node that is repeatedly moving back and forth from the left to the right side of the screen using this SKAction sequence: func move(){ let recursive = SKAction.sequence([ …
NickyNick321
  • 213
  • 1
  • 4
  • 12
0
votes
1 answer

How can I optimise drawing from large SKTextureAtlas files with preloading?

I have a game with 4 Texture Atlases. Each atlas is 4096 x 4096 and contains roughly 300 sprites, all ~ 15kb - 50kb. Unoptimised in Texture Packer, they're around 2 - 4MB each, and about half that when optimised. They contain assets to draw…
Smikey
  • 8,106
  • 3
  • 46
  • 74
0
votes
0 answers

how to create atlas files for Sprite Kit?

I've just been toying with SpriteKit, and Ive noticed that the Apple examples use SpriteKit with "atlas" extensions. As they don't use them in Xcode, what I've dome is use |"Asset files"| and renamed them to ".atlas" Is this the correct way to go…
Adrian Sluyters
  • 2,186
  • 1
  • 16
  • 21
0
votes
1 answer

Creating a texture altas in SpriteKit from an existing texture atlas jpg

I am trying to create a texture atlas using existing assets from a previous image asset that was created outside of Xcode/my machine. Importing the image into Xcode does not "split" it, and I am unsure how to tell Xcode / SpriteKit where the "atlas"…
Antonio Ciolino
  • 546
  • 5
  • 16
0
votes
0 answers

Preloading SKTextureAtlases causes memory problems and crash

I'm making an adventure type game. While making this game I experienced memory leaks, so I decided to create a preloader, which I called SKPreloader. In my GameViewController: _preloader = [[SKPreloader alloc]init]; [_preloader…
Cas
  • 162
  • 1
  • 13
0
votes
1 answer

Unable to filter textures from texture atlases in SpriteKit

I am having a very annoying issue... I have a game with pixel-based art, so the textures used are 8x8 and then scaled up to 128x128 or whatever is needed. To do this, all I need to do is say texture.filteringMode = SKTextureFilteringNearest Now that…
IAmTheAg
  • 351
  • 3
  • 11
0
votes
1 answer

sprite kit texture atlas remains in memory?

Currently I am working on a shooter type game on a tile map using sprite kit. The "enemies" are loaded from a set of texture atlases that I store all their animation frames in. So far the textures on the map along with all the enemies and player…
melz2012
  • 5
  • 1
0
votes
1 answer

Mac SpriteKit - Can't create texture atlas at compile time

I've been using SpriteKit for a while in iOS; now I'm developing an app for the Mac. I've setup a texture atlas as usual: Enable texture atlas generation for both the Project and the Target (I started from the "Document Based Application"…
Nicolas Miari
  • 16,006
  • 8
  • 81
  • 189
0
votes
1 answer

SKTextureAtlas Filtering Nearest Neighbour

I have a SKTextureAtlas which contains a list of SKTextures, but the problem is that whenever I load the SKTexture from it and state that the filtering on it is SKTextureFilteringNearest, it filters it Linear! I have that problem only on iOS lower…
enisdenjo
  • 706
  • 9
  • 21
0
votes
1 answer

Exceeded SKTextureAtlas image size?

Whilst adding image files to an existing atlas today SKTextureAtlas gave a warning saying that I had "exceeded the atlas image size" and that the atlas would be split in two (presumably at compile time as it looks just the same in the editor). After…
fuzzygoat
  • 26,573
  • 48
  • 165
  • 294
0
votes
1 answer

SpriteKit crash on run action on other SKScene

I have a crash in interesting form. I setUp SKAction like -(id)initWithSize:(CGSize)size { if (self = [super initWithSize:size]) { self.backgroundColor = [SKColor colorWithWhite:255 alpha:1]; [self createNinja]; …
Roman
  • 366
  • 5
  • 19
0
votes
1 answer

SKTextureAtlas: More than one atlas confusing

I have issue when use more than one atlas. For example I have main_menu.atlas and game.atlas with images for these scenes. Before main menu scene appears I prepare atlas for it ( [SKTextureAtlas atlasNamed:@"main_menu"] ) and all works fine. But…
1 2 3 4
5