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
0
votes
2 answers

Add tile variants to SKTileGroup

how can I add a tile variant (e.g. I want a normal grass tile, then a grass tile with a flower on it, and another one with a red flower etc.) to my SKTileGroup? here is my SKTileGroup declaration let grass = SKTileDefinition(texture:…
E. Huckabee
  • 1,788
  • 1
  • 13
  • 29
0
votes
1 answer

SpriteKit tiles showing in editor but not in simulator

I'm trying to setup an SKTileMap and, in the editor, it's working fine, as you can see here: However when I run this in the simulator, this happens: I've tried removing the app from the simulator and cleaning the project (As I've read that…
Nick
  • 2,803
  • 1
  • 39
  • 59
0
votes
0 answers

Using ColorBlendFactor with white/black textures in spritekit

I'm making a 2d platformer game for iOS with spritekit. It is mainly a entity/component model. I use a lot of SKTilemapnodes for my platforms in the game. In these tilemaps I use white/black images for my tiles, so that I can change the…
Discoveringmypath
  • 1,049
  • 9
  • 23
0
votes
0 answers

SKTileMapNode animation not working well in real devices

I used multiple textures in SKTileDefinition to produce animations in SKTileMapNode. Its fine in simulator, however, it looks shaky in real devices. How can I fix it? iOS version: 11.1 testing devices: iPhone 7plus, iPad Pro 10.5, iPad Air 2 the…
Kelvin
  • 1,082
  • 2
  • 12
  • 23
0
votes
0 answers

white borders around physicsbody of tiles in tileMapNode

I have a tileMapNode in which I want to assign a physics body to some tiles. I use the following function: static func addPhysicsBody(to tileMap: SKTileMapNode, and tileInfo: String){ let tileSize = tileMap.tileSize let halfWidth =…
Marcel
  • 472
  • 2
  • 6
  • 19
0
votes
1 answer

change zPosition of tiles

I want to change the zPosition of some tiles in my tile map. I use the following function to achieve this: static func setZPosition(to tileMap: SKTileMapNode, and tileInfo: String){ let tileSize = tileMap.tileSize let halfWidth =…
Marcel
  • 472
  • 2
  • 6
  • 19
0
votes
1 answer

Spritekit Hexagonal map: tile detection in end SKAction.

I ask this question because i didn't found any solution for this kind of issues. In fact Hex map support are not very popular. I'am making a game with the SpriteKit Framework. I use SktileMapNode with an Hexagonal map, with 1 set of 4 groups…
0
votes
1 answer

1 large sktilemapnode or smaller sktilemapnode

I'm going to be using sktilemapnodes for my 2d iOS platformer. What is better or more efficient? Using a single size sktilemapnode that is the entire level or breaking the area up into multiple sktilemap nodes. Example: I have 3 layers of…
Discoveringmypath
  • 1,049
  • 9
  • 23
0
votes
2 answers

Pathfinding on Tilemap with GameplayKit

I am using SKTilemapNode. How I can use the Pathfinding with GameplayKit properly? Some Info: Walls are all tiles and no tiles are 'ways'
Lirf
  • 111
  • 12
0
votes
1 answer

Xcode - Swift SpriteKit: SKTileMapNode with a "physics gap"

I am playing around with SpriteKit and the TileMapNode and i've got an annoying problem. That's how it should look like. That's how its actually looking in the simulator/device. The white spaces are terrible and i have no idea, how to get rid of…
0
votes
1 answer

Create/Load SKTilemapnode without using SKS/Scene files

I create my sprite kit games programmatically and the sks files end up just confusing me. Is there a way to load or create a tile map node without having to use the sks/scene file?
Negora
  • 281
  • 4
  • 13
0
votes
1 answer

Get TileDefinition by its name in Swift using SpriteKit

I have a TileSet defined in a file called CountTiles.sks. In that I have a tile group rule that has several variants. In my GameScene.swift file I want to fill a tileMapNode will specific variants, so I thought I'd use the setTileGroup method that…
Taylor
  • 547
  • 2
  • 7
  • 16
-1
votes
1 answer

SKTileMapNode disappears when off-camera, does not reappear

I have a SpriteKit platformer that uses a tile map for a background. The background in question is positioned 1 screen-height above the main content (it's positioned off-screen), acting as a forest canopy above the player. I accomplish that…
West1
  • 1,430
  • 16
  • 27
1 2 3 4
5