I’ve been thinking about getting a simple template project together for my students so that it handles the typical main-menu to game flow in an organized way and wanted to get your thoughts.
Normally in my projects I have a state machine class that is held in the main game instance. That state machine has the usual FSM functionality (set state, states with enter/update/exit etc). I then bind UI controls to specific states such that as the game progresses through the flow, the appropriate transitions happen on the required UI controls at the right time.
What this means in practice is that the state machine itself needs to be persistent. Ideally I’d like some simple editing interface (tree view based editing would work fine because it usually ends up as a HFSM) to setup states and associate UI with states etc.
I guess my main question is about persistence and level loading. If you look at shootergame, it has an example of this kind of thing. But I really don’t want my students to have to do UI in C++, when blueprint is clearly a better option for UI design.
How do you guys go about structuring a game flow setup?
I’m assuming that you use persistent empty level for all UI, then use openlevel during the game to actually determine the level? How do you then unload the level? How does this all tally with things like level streaming? Is there a better way of setting things up so that its easy to just get straight into a test level etc?