Godot Version
4.0
Question
Hello,
I have created a custom tile resource, and I would like to create a custom map resource that is essentially a grid of the tile resources. I would like for this map to be saved in the game files so that it does not need to be regenerated every time the game is run.
Normally I would create a grid on runtime using something like
@export var tile: Class_Tile
@export var size:= 9
@export var map = []
func _ready():
map = []
for x in range(size+1):
var x_cont = []
for y in range(size+1):
var new_tile = tile.duplicate()
x_cont.append(new_tile)
map.append(x_cont)
My problem is that I don’t see a reason to do this every time the game is run, I would like to have this grid structure saved in the game files if possible. How could I go about doing this?
I can clarify if this is confusing, I apologize for not really knowing how to word my problem.
Thanks in advance!