I'm currently making an open world 2D game that uses TileMaps with a scene collection tileset. Each scene just contains a label and collision body, so they're not too complex (but it does load in a lot at once)
Originally I was going to have the entire game be one big TileMap, but I was afraid of that hindering performance on lower end machines, so I changed it.
I now have it so that when you reach a certain point in the map it'll load the next map scene, instantiate that map, and then add it as a child to the main node before doing queue_free on the previous map scene. The idea is for the loading to be seamless.
The issue is that once the code hits add_child it has a pretty noticeable and significant stutter as the game loads in the next map's scene. I was wondering if there's a way to prevent the engine from freezing the game to load in a child scene, or if there's another way I should go about loading in and out maps.
The other idea I had was load all of the maps in at once, then change their visibility when traveling from one section to another. I don't know how much this would realistically help with optimization, though.
Any ideas?