Questions tagged [sktilemapnode]

A SpriteKit node used to render a 2D map of textured sprite tiles. Supported tile types include rectangular, hexagonal and isometric.

73 questions
2
votes
1 answer

Custom group in TileMap set does not select the proper tile

I made a custom group with every possible combination of surrounding tiles. I use it with the automapping mode enabled on my TileMap, and here is the result: As you can see, there are several errors: I tried it both programmatically and in the…
Steve G.
  • 589
  • 5
  • 13
2
votes
1 answer

SpriteKit Memory leaks changing Scenes containing SKTileMapNodes

I am trying to create a simple 2d platform game using Swift, SpriteKit, and SKTileMaps. But every time i change between scenes containing SKTileMaps I see a lot of memory leaks in the Xcode Instruments. I have recreated the problem as simple as I…
2
votes
0 answers

Easy way to figure out what is drawing in SpriteKit draw count

I have the showdrawcount showing 20 draws at times and I'm trying to figure out what is causing the count to be so high, as I have all textures in atlas folders. Is there an easy way to figure out what is causing each draw without removing nodes…
Discoveringmypath
  • 1,049
  • 9
  • 23
2
votes
1 answer

Programmatically creating an SKTileDefinition

I've been beating my head against a wall for hours now. I am trying to modify a texture inside my app using a CIFilter and then use that new texture as a part of a new SKTileDefinition to recolor tiles on my map. The function bellow finds tiles that…
Aleksandr
  • 533
  • 1
  • 4
  • 12
2
votes
0 answers

Understanding the Hexagonal AutoMapping in SKTileMaps

I've read Ray Wenderliche's tutorial on SKTileMaps and I've been interested in creating something hex based. I've been messing around with some simple graphics for a tile set, but I've been unable to figure out what the auto-mapping for Hex's means.…
Aleksandr
  • 533
  • 1
  • 4
  • 12
2
votes
1 answer

Generating random terrain in SpriteKit

First of all I want to mention that I have no deep knowledge about games or SpriteKit framework (however, I have good programming skills). I want to create a 2D game for iPhone and iPads. So far, I know that I have to use SpriteKit. However, the…
Alec
  • 414
  • 6
  • 21
2
votes
1 answer

Troubles with performance issues in SpriteKit platformer game

I'm experiencing some lag for the first time in developing a platformer game for iOS. I'm relatively new to development, so I'm assuming I'm already making mistakes that can slow my game down. I just have a few questions that I'm confused…
Discoveringmypath
  • 1,049
  • 9
  • 23
2
votes
1 answer

SKTileMapNode Pixel to Pixel Aligning

I am working on a tilemap game with Apple's newish SKTileMapNode. The pixels on my tiles do not match up with the pixels on the phone display. My scale mode is set to .resizeFill. My tile's sizes are correctly labeled as 64x64 and each tile's…
Alec O
  • 1,697
  • 1
  • 18
  • 31
2
votes
0 answers

How to properly copy SKTileMapNode in swift

When I run loop on node everything works fine, node moving correct. But when i run loop on next action interrupts when next reaches left border of the screen (halfway). I assume something wrong with copy. Thanks! func moveBackground (name: String,…
acidbeast
  • 43
  • 8
2
votes
1 answer

getting GKObstacleGraph to work with SKTileMapNode

I'm currently working in Xcode 8, using Swift 3 and the new SKTileMapNode from SpritKit to make a 2D dungeon crawler type of game. I'm have trouble getting GKObstacleGraph to work with the tilemap. Please help! I tried to loop through all the tiles…
Bob
  • 155
  • 1
  • 8
2
votes
2 answers

Use image as tileset in Spritekit

I don't find a way to use this sort of images as tile set for my games. Is there a way to do it, or should I add all object I want one by one ? I tried to add a new Grid Tile Set then a Single Tile Group, but if I try to use this in a Tile Map…
Marsgames
  • 113
  • 9
2
votes
1 answer

Make a Defender-like "world" with SKTileMapNode

Defender is an ancient game that presents a virtual world, a horizontal scroller, in a loop. The camera view only portrays a portion of the world at any given time. The player can fly in both directions around this world, continuously. How could…
Confused
  • 6,048
  • 6
  • 34
  • 75
1
vote
0 answers

Adding physics bodies to all tiles on an SKTileMapNode

I'm trying to make a simple game in the latest version of Xcode. I use a TileMap that is pretty simple. I'm trying to figure out how to add a physics body to each and every tile. I'm stuck at getting the position of each tile and adding an SKNode…
1
vote
0 answers

Is Tile Map Node better than manually adding SKShapeNodes in terms of performance?

I recently read this raywenderlich article about using tile map node: https://www.raywenderlich.com/1079-what-s-new-in-spritekit-on-ios-10-a-look-at-tile-maps In my own project, I have coded the tiles myself using SKShapeNode. Works great, but…
Mark Tornej
  • 165
  • 9
1
vote
1 answer

Higher column and row index than number of column and row in SKTileMapNode

I want to create a scene where I have buttons to move a cursor from tile to tile inside a SKTileMapNode. I created a 10x8 SKTileMapNode in an extern .sks file in the Spritekit Scene Editor. To set the cursors position exactly on the same as a tile,…
T. Yueksel
  • 69
  • 1
  • 10