wizardeddas

tilemap not displaying properly

Recommended Posts

So I'm having an issue trying to get a tilemap working properly.

I made my tilemap in Tiled.

JSON: http://intheexpanse.com/rpg/levels/level4.json

Image: http://intheexpanse.com/rpg/images//base_out_atlas.png

Code: http://intheexpanse.com/rpg/js/main.js

Any ideas what I'm doing wrong?

 

I've used multiple tilemaps from different sources and they all have similar display errors.

 

Thank you.

Share this post


Link to post
Share on other sites

The first parameter for addTileSetImage must match the name of the tileset in the map file.

Here is your example working:

http://jppresents.net/static/examples/tilemap/

http://jppresents.net/static/examples/tilemap/main.js

(I also edited the level file to not only contain green tiles - I also changed path in the main.js because my server layout isn't the same.)

Share this post


Link to post
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...

  • Recently Browsing   0 members

    No registered users viewing this page.