Hi! I was wanting to build an html5 game with a level editor, and wanted players to be able to share levels with each other. Except I’ve hit several snags.
-
Attempted to use local storage. Browser doesn’t seem to store the information in a place users can actually get to it, at least not in any way that players could share with other people.
-
Create a sort of “seed” players can put into a text box to cause the game to load the level. Problem, while I can simulate proper textboxes using gui elements, I cannot find a way to allow players to copy/paste. Not in Defold or even in Lua itself.
-
Decide, well, it’s html5…maybe I can interact with the webpage itself to use an html textbox. Except the generated javascript is fairly incomprehensible, which rules out editing it directly, and I can’t find a way to interact with the outside webpage otherwise. Webviews looked promising for being able to evaluate javascript, but attempting to use them gives an error (attempting to access a null global variable) and google seems to indicate that they’re maybe for mobile only, even though the api page doesn’t say anything about that.
Any ideas? I’m fairly stumped. Unfortunately, storing things server side just isn’t an option right now. What am I missing? Is something like this even possible?