Closed jimfrize closed 8 years ago
@jimfrize So, you can open and edit the map, and exporting seems to go alright (no errors at that point). But the generated file fails?
Just to be clear, you are trying open and edit the "Test_v2.tmx" file I made?
@metalx1000 That's all correct
Can you post both your saved tmx file and the json output file some place so I can see them?
It seems I can save out new maps with different platforms and layouts, but I get the problem again if I try to add a jetpack. I have added a single jetpack at the beginning of the level: map.zip
@metalx1000 Still looking into this, just making small changes to the map and seeing when things break. I've got some new objects and background images ready to go, just need to work this Tiled thing out and I can make a pull request. I'm currently looking into the .JS files and working out how to preload images and stuff. Hold tight!
Here is the tutorial I used when learning how to design tile maps: https://gamedevacademy.org/html5-phaser-tutorial-top-down-games-with-tiled/
The map you created worked for me, but here are a few things: 1) Seems like my browser had cached the old "map.json", clear the cache for that file after making changes. 2) The Jet pack needs to be added to "objects" layer, and "type" in the properties tab on the left needs to be set to "jetpack".
Our code searches through the map.json file's object layer, and get's the position for all objects with "jetpack" as their type and uses those positions to place/create jetpack objects.
@metalx1000 thanks! I'll have a look at that tut later :)
I don't have to worry about the cached version, the bookmark I have stored has a suffix in the url to stop that:
http://jimjim.local/Awesome-Game/?nocache=1
So whenever the page loads it ignores the cache.
Ok, finally worked out what was wrong, I was adding the jetpacks to the world layer - doh! I've got it sorted now :)
I cant seem to edit the maps on my system using Tiled, the resulting .JSON file stops the game from running and it throws an error. I've asked a question on the Tiled community forum to see if they know anything about it:
http://discourse.mapeditor.org/t/typemismatcherror-after-editing-map/1366