Godot Version
4.2.2
Question
I’m making a game that creates a topdown terrain from a noise function, the game then stores all of those values depending on the tilemap tile that the height correlates to. I wanted the player to be able to save and load the worlds that they have created.
The problem that I have run into is that when the data is saved as a json, it has to be converted to a string, so every Vector2 for the tilemap tiles gets converted to a string, but I can’t get it to convert back into a Vector2 to use, how can I go about this.
The stored Tiles get saved sort of like this, but obviously with much more data.
var TerrainStorage = [[(1,0), (2,0), (1,0)], [(1,0), (2,0), (1,0)], [(1,0), (2,0), (1,0)]]
and the data gets returned when loading like this
[["(1,0)", "(2,0)", "(1,0)"], ["(1,0)", "(2,0)", "(1,0)"], ["(1,0)", "(2,0)", "(1,0)"]]
is there a solution that is simple that I just haven’t though about, or is it something more complicated