Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Adding json string to game.load.tilemap()


rpiller
 Share

Recommended Posts

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

 Share

  • Recently Browsing   0 members

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