Sign in to follow this  
paledoor

struggling with tile mapping

Recommended Posts

Hello, all. I'm a web dev student, new to phaser, and I'm using it to make my final project. I'm having a devil of a time with the tile map functionality. I've scoured google, looked at every tutorial and guide I can find, and it's just not working. 

Here's my repo: https://github.com/Brad-Chapin/daky-in-monsterland

Basically, the sprite is rendering, but the tile set isn't. I've double and triple checked my file and path names, my JSON structure, everything I can think of, but I'm not getting anywhere. Any advice would be appreciated.

Thanks in advance, and happy coding.

Share this post


Link to post
Share on other sites

https://github.com/Brad-Chapin/daky-in-monsterland/blob/master/js/main.js

Your code doesn't include a tilemap. Follow this example: https://phaser.io/examples/v2/tilemaps/blank-tilemap

 

Additionally, looking at your repo, I cannot find a tileset in https://github.com/Brad-Chapin/daky-in-monsterland/tree/master/assets

Are you sure you included it, and pushed to github your latest code?

Share this post


Link to post
Share on other sites

I was making frequent changes, trying to correct the problem, and in all likelyhood, I hadn't pushed the most recent changes. As it turns out, a really silly error was the source of my grief- I was testing whether my naming convention was the problem, and I did a bad thing: find/replace... so I was referencing a JSON object that didn't exist >.<

Short version, I think I got it sorted out. Thanks very much for taking the time to look and respond. =)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.