rpiller Posted April 15, 2014 Share Posted April 15, 2014 It doesn't look like I can send a json string to game.load.tilemap(). I have a json file from Tiled and if I give the path of the json it works fine, but when I use SignalR to send the json file as a string back to the client and pass it to game.load.tilemap() then I get an error: "Failed to load resource: the server responded with a status of 404 (Not Found)" Are we supposed to be able to send a json string to this method? The reason I'm doing this is because the map is 100% changeable by the players. The server opens up the base json file (which is pretty empty) and loads it into a structure. It passes this structure as a json string (back to it's original format) to players when they log in. The users can then modify the map, which will have it saved in the server structure, so when new users log in they'll get the entire map once from this and logged in users will get changed data. So I need to load a map based on the json Tiled string. Is there anything I can do for this? Link to comment Share on other sites More sharing options...
rpiller Posted April 15, 2014 Author Share Posted April 15, 2014 tilemap: function (key, mapDataURL, mapData, format) { I see I should pass null to mapDataURL and my json object to mapData. It worked! Seems you thought of everything Link to comment Share on other sites More sharing options...
rich Posted April 15, 2014 Share Posted April 15, 2014 I'm quite enjoying all these questions you post and then solve yourself a few minutes later Link to comment Share on other sites More sharing options...
rpiller Posted April 16, 2014 Author Share Posted April 16, 2014 Yeah, I know it's a problem I have. To be fair this one was 40 mins so that's not bad Link to comment Share on other sites More sharing options...
Recommended Posts