I have a big question, but I think I have it pretty narrowed down. It’s hard to conceptualize this stuff so I’ve made an infographic:
The question is, where should I store my game logic?
In this case, the game is single player only and has only one game type. It has multiple maps but changing the map does not necessitate any new data or logic. The same game rules work no matter the map.
I think that there is no reason to add an extra block in the daisy chain so to speak- no reason to make use of game mode/game state - I can pass data from actors and widgets to the Game Instance. Game Instance holds onto any data which needs to be saved and it will also generate data and run game logic which also gets passed down to actors.
As an example, a widget tells Game Instance, “we are starting a new exercise.” Game Instance generates data for this exercise, spawns a new pawn, and the pawn looks to the Game Instance for data it specifically needs for the exercise.
So the flow goes like:
- user input into widget
- data transfer to Game Instance
- run logic in game instance
- open level, spawn actors, deliver data to actors, play game
Typically people are using game mode/game state, but in my case because of the simplicity of the game, I believe that would only add an extra step of data transfer with no benefit?
Is this correct assumption? Can anybody share a lesson llearned, or possibility/contingency I might be missing?
The primary goal here is to refactor my project so that it is more easily maintainable for a solo developer. Right now I have data that needs to persist on things that do not persist, and without a clear central command I find I waste too much time trying to hunt down dependencies when I make changes.
This is a blueprint only project. Thanks!