Unable to see TMX map using SpriteKit and JSTileMap

I am trying to present a large map with SpriteKitand JSTileMap. Card size 3398 x 4842.

I defined a TMX map using 4 tiles of 1699 x 2421 in one layer, each tile corresponding to a set of tiles.

Here is tma:

<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" orientation="orthogonal" width="2" height="2" tilewidth="1699" tileheight="2421">
 <tileset firstgid="1" name="BL" tilewidth="1699" tileheight="2421">
  <image source="new_york_map_bl@2x.jpg" width="1699" height="2421"/>
 </tileset>
 <tileset firstgid="2" name="BR" tilewidth="1699" tileheight="2421">
  <image source="new_york_map_br@2x.jpg" width="1699" height="2421"/>
 </tileset>
 <tileset firstgid="3" name="TL" tilewidth="1699" tileheight="2421">
  <image source="new_york_map_tl@2x.jpg" width="1699" height="2421"/>
 </tileset>
 <tileset firstgid="4" name="TR" tilewidth="1699" tileheight="2421">
  <image source="new_york_map_tr@2x.jpg" width="1699" height="2421"/>
 </tileset>
 <layer name="Main Layer" width="2" height="2">
  <data encoding="base64" compression="zlib">
   eJxjZmBgYAFiRiBmAmIAAIAACw==
  </data>
 </layer>
</map>

While I see the TMX map using software Tiled, I cannot visualize the map in xode with SpriteKitand JSTileMap. The boot part seems to be handling correctly, but I can’t visualize anything: I have a black screen with a label: 0 nodes / 0 nobody. Is there a possible advantage that may interfere with the proper visualization of my map?

+4
source share
1 answer

@2x . SpriteKit, , , . TMX , , . , setSourceImage: _imageSize - ​​ @2x.

@2x ( Xcode, XML- TMX), .

, , , iPhone.

+3

Source: https://habr.com/ru/post/1525254/


All Articles