Godot Version
4.7.2
Question
I’m planning to make a strategy game, one in which human and nonhuman players make decisions to move units around a map, but I’m not sure how to organize that code.
For some game genres it makes sense to attach scripts for behavior directly to NPC scenes. But in a strategy game, there is a changing set of territory controlled by each player and NPC, so their behavior shouldn’t be stored in scripts that are attached to any node on the board that might change ownership.
I suspect that I’ll attach a script for managing game state near the root of the board / map scene, and that I’ll split out that code into separate files if there’s a lot.
But it’s not so clear to me where to put the NPC decision making logic. Should it be contained in an otherwise empty / invisible scene?
I’m using this post to think out loud, so it’s somewhat answered, but any insight is appreciated : )