Godot Version
4.2.1
Question
I am looking for some advice / guidance. In a game I’m making with my wife, we need the townspeople to be able to do things autonomously outside of the scene that is currently active. I’m using GDScript, btw, not C#.
Think about this like Stardew Valley a bit, NPCs are on a set schedule, yes, but they are free to autonomously walk around even when the player is not in the same scene.
Very simply, I guess you could call this game my wife and I are making a 2D hospital sim. I need the game to be able to determine what towns person gets sick and then they need to autonomously navigate from their house to the hospital, possibly interacting with things on the way, even when the player is only in the operatory.
Right now, I have my game set up with a scene manager. When the player walks through one door, the scene manager instantiates the new scene from the resource path, adds it as a child, then queue frees the old scene. I’m sure I probably need to rethink my system a bit, but how do I allow things to happen in the world outside of the rendered scene, processing in the background? Are there any suggestions, tutorials, or system or algorithm resources you can point me to to help me figure out how to set this up?
I need it to work first and foremost, obviously, but if done wrong I can see this becoming incredibly inefficient and bogging the game down. So I really need help.