Every project I’ve ever made has been very modular with tiny scenes. I’m starting on a project now that is a little bit larger and will have persisten denizens all out doing their thing regardless of what the player is doing.
My question/curiosity is how this kind of thing is normally handled. I could have hundreds of these little guys (this isn’t including the “flavor” denizens like animals and such) all doing stuff that could affect the game, and I feel like having them always running, whether in view or not, could be bad.
Any thoughts on this? How do you guys handle non-static NPCs when they’re not in view, or nowhere near the player?
Here are the ideas I have now…
1: Just fake it. If an NPC gets too far away from the player disable them until the player comes back into view. Hopefully the player doesn’t realize that the denizen never moved.
2: Use some kind of coroutine system and significantly reduce they’re logic frequency the further they are from the player. This would still be faking it, but at least they would be active.
3: Let it run. Mess with performance later if it becomes an issue.
None of these seem ideal, and this is a whole new realm for me. Thanks in advance for any help.