Questions tagged [jstilemap]

47 questions
1
vote
1 answer

Remove old tileMap - SpriteKit - Objective C

this code loads a map1.tmx tileMap when player reaches the "door". When the player enters the door it loads a new map2.tmx file. Problem is when the new map2.tmx file is loaded, the old map1.tmx is running behind map.2.tmx and using all of map.1.tmx…
user3078406
  • 511
  • 1
  • 9
  • 26
1
vote
2 answers

EXC_BAD_ACCESS on JSTileMap

I'm trying to add a tmx file in my scene but I get EXC_BAD_ACCESS please help me
Vishnu
  • 56
  • 1
  • 12
1
vote
1 answer

Number of nodes are high after loading a TMX file in SpriteKit using JSTileMap

I'm trying to load a 32x22 map with tile size of H:32px W:32px created using Tiled. After following answers here and tutorials on how to load .tmx files using JSTileMap in SpriteKit, I attempted my own: var worldNode: SKNode! var tileMap:…
sinbad2k
  • 11
  • 2
1
vote
1 answer

How to get nearest tile from touch with JSTileMap swift

I have just made a function that creates an object at the user's touch location but I want it to be auto aligned with the center of the tiles according to my tiled map. Right now, I'm only able to place objects at my touch location instead of auto…
Wraithseeker
  • 1,884
  • 2
  • 19
  • 34
1
vote
1 answer

SpriteKit and JSTileMap

I am having difficulties to understand how JSTileMap works with SpriteKit and Tiled. The problem is related to pixels and points, and also to loading apropriate tileset using JSTileMap based on screen scale factor. File structure in project In my…
Whirlwind
  • 14,286
  • 11
  • 68
  • 157
1
vote
1 answer

JSTileMap How to Convert polygon points

I am trying to turn a polygon object in my tiled map into a physics body. I can't figure out how to read the following line and turn it into 3 CGPoint values: I am using JSTileMap to parse the TMX map but…
TazmanNZL
  • 372
  • 3
  • 16
1
vote
0 answers

Update jstilemap tilemap in spritekit/swift

I'm still pretty new with spritekit/jstilemap/programming in general. I'm building a racing game with two tilemaps that scroll vertically with parralax. I was wondering if it's possible to update the tilemap without having to remove the current…
meganegora
  • 11
  • 3
1
vote
3 answers

Tilemap changing size when landscape

I'm working on a little App, where I load a tilemap ( JSTilemap ) into sprite kit. This all works fine except that the tile map looks normal and fine in portrait but when I flip to landscape it seems to blow up. I have not added any code just…
Janita
  • 87
  • 1
  • 6
0
votes
0 answers

Collision blocks not rendering on tilemap

First off, sorry if this is a basic question as I am still pretty new to the Javascript language. I used the 'Tiled' software to develop a Tilemap for a scrolling 2D platformer (this was done following a tutorial). In the tutorial, the collision…
0
votes
3 answers

How can I have collision detection on a tilemap in javascript?

I've been looking for some time now how to detect collisions on a tilemap between my player and the box specified in my table, but all I found are advanced tutorials, I'm trying to do this as simply as possible so that I can understand how it works…
Karloux
  • 11
  • 4
0
votes
1 answer

Loading a tile map with better performance

So, I'm trying to create a game using javascript and canvas 2d api (without any external libraries/frameworks). I plan to keep it simple for now. However, while creating it, I realized that I don't understand some concepts and especially how to load…
anathrax
  • 91
  • 1
  • 1
  • 11
0
votes
0 answers

Why is my player coliding with the entire tile y and not only with the y tiles 258 and 282?

I'm starting on colisions on Javascript, and they're working, the problem is that i think my player is not coliding with the tiles. He is coliding with the entire x and y that i do on colision function. I'm using the switch/case after the cicle…
synco
  • 21
  • 2
0
votes
2 answers

How can I fix my tilemap being flipped from the array it's generated from?

I'm trying to render a tilemap in a game that I'm working on, but when rendering it's flipped both vertically and horizontally. I'm working on it in the HTML 5 Canvas using JavaScript. I've tried everything I can think of, but I can't seem to get…
Twickz
  • 29
  • 5
0
votes
1 answer

HTML5 canvas Showing lines when drawing

I have a Problem when drawing tile-map and setting the tile width to $(window).width() / 10 and the tile height to $(window).height() / 10 The canvas drawing additional lines between every tile Here's the code: https://jsfiddle.net/t68sgrf3/
0
votes
1 answer

XYZ geo.admin.ch map doesn't work with qgis 3.0

I'm new to XYZ tile maps. I'm trying to add an XYZ map from geo.admin.ch the well known swiss map available to all bordering states. Here I've found the leaflet link. Here's the code var map = new L.Map('map', { crs: L.CRS.EPSG3857, …