Hey! I am working on a level editor for my game, and currently the editor saves into an array and loads from the array. I was wondering if there was any way to make an ID system for levels where it converts the array data into a number that people can paste in to essentially “load” the other level. I think it might be possible with a seed system of sorts but I’m not fully sure. Anyone know how this could work?
Hi - you can convert the array data into a json and store that string in an array. That’s what i did in the editor on my game. The user json strings containing the levels are stored in firebase.
I’ve never used firebase before. Could you give me an overview of how it works?(My level editor is only a 12x12 grid with 20 or so items).
Also would it be possible for the level editor to just convert which items are where to a string? Something like “Spot1=Block1, Spot2=Block1, Spot3=Block2” for all 144 spaces and then load that in?
“Spot1=Block1, Spot2=Block1, Spot3=Block2”…That’s pretty much what a structure as a json is - that’s what this is doing and then storing it to firebase. You don’t have to use firebase - but i think it useful for this sort of thing. Watch @LevelUpWithAlex video’s …watch all 5! There’s a couple of potential stumbling blocks/hurdles. 1 the firebase address in your project - all the lines need “” around them 2 the retrieved data needs /docs. and 3 (this one threw me!) when you write a number to firebase it’ll write it as a string! unless you update the whole field (at least i think that was it!.. it’s a hazy blur of distant frustration with yellow edges…like a once white sports sock that you dislocated your back trying to get off your foot, and it stuck to your fingers and whipped you in the eye as you tried to discard it!)