espace Posted April 18, 2017 Share Posted April 18, 2017 Hi, I managed to create a level editor in my game. All my data is save with the local storage. To go further i would give the possibility to the players to create themselve their levels. My data are a json files. What is the best solution to let the possibility to publish the json file somewhere and then get this information accessible to the players ? The second question is how to create snapshot of these levels and store them also ? Thanks for your advice. Quote Link to comment Share on other sites More sharing options...
mattstyles Posted April 18, 2017 Share Posted April 18, 2017 If you want people to be able to share in a nice way you'd have to expose a couple of endpoints and store them on a server somewhere. My initial stab at this would be a service that exposes 2 endpoints, save and load, clients would supply a key and the json blob your editor creates, the service then makes sure that the key is unique in the system and saves the json blob to disk. The load endpoint does the same in reverse. From there you could build up to storing into a disk persisted db for better perf and then work on stuff like versioning. You'd probably want some sort of authentication system in place from the get-go. If your levels exist entirely in json then surely saving at any point creates a snapshot? You just need to store them somewhere, if you created some sort of arbitrary naming scheme then that would suffice initially to know where to store and retrieve them. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.