Godot Version
4.2.1
Question
Hi all, I’m currently trying to make a chunking system for my project. Each chunk is set up as a scene, in which it does set_cell and set_cell_terrain_connect operations on procedural generation, and it does this on a higher level shared tilemap. Whenever I load the chunks, however, the main thread is blocked by the slow set_cell_terrain_connect method.
I’ve managed to remove some of this by using
await get_tree().process_frame
after each row of the chunk calculations, but this doesn’t help with the slowness of the terrain function. I’ve thought about splitting the shared tilemap into tilemaps that each chunk can share, and then do the operations before they’re added to the tree, but I don’t know how separate tilemaps in different scenes can connect via terrains.
Any help would be greatly appreciated as I’ve been stuck on this concept for a while, thanks.