This PR introduces some changes to improve in-gameplay pause availability. Basically, in-gameplay pausing is ambiguous in design across different projects but should be available, universal, and configurable. It should also be a feature available out-of-the-box.
Things changed:
Changes to the Routers/Standard and Runners/Complete
A pause_managed_gameplay_screen member to Routers/Standard
Add EVENT_PAUSE_GAME, EVENT_UNPAUSE_GAME to Routers/Standard
Some unrelated side enhancements:
Pass audio_controller* to GameConfigurations/Main
Cleanup 2 forward declarations
Here's a draft sketch of a flow, showing three possible ways that a pause state might be handled by the developer. The Screens/Gameplay emits an event to pause the game (this event could be emitted from anywhere, including a display-switch-out event). The draft is incorrect here showing Screens/Gameplay consuming an event, which it does not. Instead, the Routers/Standard consumes the event and translates it to suspend/unsuspend commands to the Screens/Gameplay.
The actual consequential behavior that happens in the router as a result of consuming the event still remains to be added, though it should be a branched option for the developer. Any of these three options:
1) Activate a Screens/PauseScreen (this should be default behavior)
2) Have the Screens/Gameplay manage everything during pause including a pause menu. (more work for developer)
3) Activate a SubScreen (like zelda) (best experience)
This PR introduces some changes to improve in-gameplay pause availability. Basically, in-gameplay pausing is ambiguous in design across different projects but should be available, universal, and configurable. It should also be a feature available out-of-the-box.
Things changed:
Routers/Standard
andRunners/Complete
pause_managed_gameplay_screen
member toRouters/Standard
EVENT_PAUSE_GAME
,EVENT_UNPAUSE_GAME
toRouters/Standard
Some unrelated side enhancements:
audio_controller*
toGameConfigurations/Main
Here's a draft sketch of a flow, showing three possible ways that a pause state might be handled by the developer. The
Screens/Gameplay
emits an event to pause the game (this event could be emitted from anywhere, including a display-switch-out event). The draft is incorrect here showingScreens/Gameplay
consuming an event, which it does not. Instead, theRouters/Standard
consumes the event and translates it tosuspend
/unsuspend
commands to theScreens/Gameplay
.The actual consequential behavior that happens in the router as a result of consuming the event still remains to be added, though it should be a branched option for the developer. Any of these three options:
1) Activate a
Screens/PauseScreen
(this should be default behavior) 2) Have theScreens/Gameplay
manage everything during pause including a pause menu. (more work for developer) 3) Activate a SubScreen (like zelda) (best experience)