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
1
vote
0 answers

Isometric Depth Sorting With SpriteKit

I am making a relatively simple isometric map using SpriteKit. I've tried both using the editor as well as creating it through code, and each time, it seems to have some "weighting" between the various tiles even though they should overlap…
1
vote
1 answer

enableAutomapping and SKTileMapNode: Create shapes with edges programmatically?

I am trying to create a flexible dialog box programmatically for dialog text in an RPG style game. I've designed a simple box graphic, divided it into all of the correct parts, and added it to my tile set as an 8-way Adjacency Group. I can…
rikitikitavi
  • 139
  • 13
1
vote
2 answers

Having trouble writing an Algorithm to fill in a tile-map given the 4 corner positions

I'm building an algorithm to procedurally generate a dungeon using Swift 4 and SpriteKit. I have done the part to generate the rooms but now I need some help with carving out the rooms. let mapWidth = 225 let mapHeight = 150 var tileMap =…
E. Huckabee
  • 1,788
  • 1
  • 13
  • 29
1
vote
2 answers

Better way to write this comparison

I apologize for the useage of "Better" but thats seriously what I need. I am writing a "river" generating algorithm and I have a bunch of comparisons I need to make. I was wondering if there is a better way to write all of the comparisons I have to…
E. Huckabee
  • 1,788
  • 1
  • 13
  • 29
1
vote
2 answers

Connect Physicsbodies on TileMap in SpriteKit

I use the following function to append physicsbodies on tiles from a SKTileMapNode: static func addPhysicsBody(to tileMap: SKTileMapNode, and tileInfo: String){ let tileSize = tileMap.tileSize let halfWidth =…
Marcel
  • 472
  • 2
  • 6
  • 19
1
vote
0 answers

Why do my tile textures keep resampling/blurring?

I set up a tilemapnode in my gamescene.sks file and the tiles are 16px by 16px but are scaled up to 128 pixels. They look fine at first but if I start editing or adding new tiles later on the old tiles get resampled automatically and look extremely…
ItsSgtMarv
  • 105
  • 1
  • 11
1
vote
1 answer

SpriteKit tile map not loading tiles

I've been working this for days. I have created a tile map in the level editor. It loads in my code fine but when I iterate over the tiles, none of them show as having a definition. Not sure what I'm doing wrong. Everything runs fine but it won't…
1
vote
1 answer

How do I change a tile to another (or a blank) in SpriteKit?

So I'm trying to program a chess app in Xcode 8.3.3 using a tile map node, with an 8x8 tile map containing either a piece or a blank space per tile (made in GameScene.sks, not with code). What I want to do is change a tile. For example, if someone…
1
vote
1 answer

Moving SKNode by One Tile From Its Current Position

I'm playing with the tile editor, with which I've created a simple, somewhat large map like the following. The tile size is 64 x 64. And the map size is 58 x 32. And I want to know the current position of the game character. Let me call it…
El Tomato
  • 6,479
  • 6
  • 46
  • 75
1
vote
0 answers

Layered SKTileMapNodes

I am trying to make a Dungeons and Dragons app that has different editable layers of objects. The lowest layer should be the background, such as water, roads, etc. The second layer should be terrain objects such as trees and buildings. The third…
Sab.amb17
  • 113
  • 7
1
vote
2 answers

Sktilemapnode load tiles from one picture

I have over 1000 tiles that I need to use. In tiled I can use just one picture of all tiles but in Xcode I have to split the tilesheet in 1000 single tiles. Is there a way to make it possible to get the tiles from one picture like in tiled?
Lirf
  • 111
  • 12
1
vote
2 answers

cocos2d-x - ValueMap return bad value from TMX file

I try to load object in TMX File like this : // add player TMXObjectGroup *objectGroup = _tileMap->getObjectGroup("objects"); CCASSERT(NULL != objectGroup, "'objects' objectGroup not find !"); if(objectGroup == NULL){ …
Sologin
  • 11
  • 3
1
vote
1 answer

SKTileSet tile variant access in code

I currently have a TileSet with two variants: Poison and NotPoison. I want these variants to react differently to being clicked, and I also want to iterate over individual rows and columns of my TileMap to count the number of "Poison" tiles in that…
Taylor
  • 547
  • 2
  • 7
  • 16
1
vote
1 answer

SpriteKit - TileDefinition and userData being update for all tiles?

I thought I would create a tile map with the new Tile Map Nodes available in iOS 10. I have a tile which if you stand on it, it will crumble. So I though I would place a userData field called timer in the tileGroup definition. func…
JohnnieMac
  • 193
  • 7
0
votes
0 answers

How to make an isometric room in XCode

I was wondering if it was possible to make a room, like a home design app, using tile maps. It would require 3 grids: An isometric base (10x20) Two walls (6x20) & (10x6) I have attempted to use the Scene Editor to layout everything, but that isn't…