Download

Multiple (sub)games in one game - how to setup ?

o/

I have singleplayer main game with multiple minor games. Player play main game and choose any minor game to play (with some functionality from main game).
How would I go about making it ?

Since single GameMode can be active I was thinking about making MainFunctionalityActor which would be spawned during minor game gameplay session. But while in minor game You can enter minor game menu (and thus leave level which I guess makes GameMode & Actors gone).
Theres also GameInstance, but is it good to store gameplay in GameInstance anyway ?

It depends on many factors and the complexity of the other games.
One solution is to create a new folder in your content folder for each game and it will contain: map/level, game mode, game state, player state etc. All persistent data store into Game Instance.
This solution is good for maintenance and if it is more complex games and there is a lot of correlation between actors and functions.
If it is a simple games, just create one main “GamePlay” actor and put almost all logic there (with switch between games)…or create “MinorGame” actor for each game (and call it/spawn it when you need - best way is to create Parent Actor and child actor for each minor game).

Obviously Im doing that.

I said Actor but really wanted to say Object with MainFunctionality. I can have data object being run all the time during gameplay. So it seems logical to put all the main functionality there and just swap GameModes, controllers etc. while playing different smaller games.
Am I thinking right ?

Sorry for late answer and thanks for interest.