Jump to content

Tileset not loading correctly


Kir13y
 Share

Recommended Posts

Im trying to load in a map made in tiled (.json) into phaser.  The map seems to load ok but the tileset loads really weirdly.  Some tiles that are supposed to be a top tile load as the tile to the left of them and some load correctly.  Some will load as a white box and some load as the one below them.  I have no idea what is wrong.

 

Screenshots:

From Phaser:post-14678-0-12539200-1432514881_thumb.p

From Phaser:post-14678-0-27931800-1432515037_thumb.p

 

From Tiled:post-14678-0-17436800-1432514886_thumb.p

 

 

Thanks in advance! :)

Link to comment
Share on other sites

  • 2 weeks later...

Can you post the code how you load the map?

 

EDIT:

what i use:

Preload:    game.load.tilemap("level1", "level1.json", null, Phaser.Tilemap.TILED_JSON);Create:    map = game.add.tilemap("level1");    map.addTilesetImage("rock");    map.addTilesetImage("crate");    map.addTilesetImage("lava");    map.setCollisionBetween(1,4);    levelLayer = map.createLayer("level");Update:    game.physics.arcade.collide(player, levelLayer, movePlayer); //Player is a sprite - movePlayer if the player touches the layer the player can move
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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