Jump to content

Problem with loading tilemap


MatisiekPL
 Share

Recommended Posts

Okay, I got it working, here is what I've found:

- You have to remove the 'game.add.sprite(0, 0, 'Tiles');' line 21, because it is showing on the screen your tileset and it makes no sense
- Line 34 you are trying to load a layer that doesn't exist, the only layer in your json file is called 'Main', and not 'World1'
- Moreover, your layer 'Main', has the same name as the map itself 'Main', what you should do is to rename your map "MainMap" for example (only change the name line 13 and line 29) and rename the layer "MainLayer" (don't forget to change the name in your Tile Editor AND line 34)
- Last thing, your map is saved with a base64 format, but what you need to do is to saved it in a CSV format. This way, it can be read by Phaser.

Now it's working fine :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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