I'm currently working on a rogue-likeish game. I generate my world randomly in GDScript. I've added a thread inside my Gridmap-Script to expand the Gridmap if the player get's to far (like a new floor of a building). But it keeps locking up my scene.
How can I expand the grid map without overloading the main thread. Do I have to divide my addition into small pieces, or is there another approach?