Hey everybody,
hey Chris!
Technically it's not a "technical" question, but I'm in the process of hooking up my game logic and think I understand most of what one can do, but I yet lack the big picture and I'm afraid of realizing how to actually do it down the road.
What is the proper way to handle the main game flow? At the moment it looks like I'm going to have lots of global variables that are something like "IsTutorialComplete", "FirstNight", "MetPersonX", etc. and I'm afraid as the game grows, this could get messy, but on the other hand, I structure them in catergories like "InGame/Story/MetPersonX" and this way I think it wouldn't be that bad. I just don't know if this is the proper way.
Also I would like some input on how to setup a scene. When entering a new scene, the default OnStart interaction can be called. This is where I do lots of variable checks and set scene objects accordingly. Is that the proper way to do it? I sometimes use ActionList:RunInParallel to make it a bit more tidy and I suppose I could move the scene setup logic to it's own action list.
I'm thankful for recommendations, opinions and suggestions.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
It's a wide topic, but on the specific topic of variables: it's a good idea to combine them when the values are dependent on one another.
For example, if IsTutorialComplete is always set to True before FirstNight, then you can combine these into a PopUp variable with values of "Start", "TutorialComplete", "FirstNight", etc.
Acting based on the state is then a case of using the Variable: PopUp switch Action.
The best way to compartmentalise starting logic is actually do bypass OnStart, and attach the ActionList Starter component to your Cutscene(s), which can then be individually set to run when the scene begins.
Mind, though, that this assumes that the order in which they get run doesn't matter. If ordering matters, stick with OnStart.
Thank you very much Chris!