Jump to content

tiled json problem


Recommended Posts

hi. i have a funny problem.


i use tiled program  for build up my map and always i got the same problem.

in the tiled i got the map correctly but in the game every tile got the next tilemap picture.


function preload() {
          // Load the 'map.json' file using the TILDED_JSON special flag
          game.load.tilemap('pina', 'assets/proba.json', null, Phaser.Tilemap.TILED_JSON);
          game.load.image('level', 'assets/tilemap.png');

function create() {

          map = game.add.tilemap('pina');


          // Create a layer from the 'map.json' file
          // based on 'Tile Layer 1' from the available tiles.
          layer2 = map.createLayer('Tile Layer 2');
          layer1 = map.createLayer('Tile Layer 1');
          layer2.scrollFactorX = 0.5;


sry for my english

thx for advice


Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...