You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a part of the ongoing effort to separate "engine code" from "game code", we should modify the engine to support Game Modes as a way of changing the logic each frame.
For example, the default GameMode would just call tick() and render() on every registered Entity, whereas a MenuGameMode would move a cursor around a menu screen, and a SceneGameMode would execute actions based on a script defining the cutscene (delay, move entity, play animation at x, play sound, etc).
GameModes should be stored in a stack, so that a MenuGameMode is pushed on top of the stack, and popped off when the menu is finished and gameplay should continue.
There will be some shared state between GameModes (entities and tilesets, for example), as well as internal state (menu cursor position).
The text was updated successfully, but these errors were encountered:
As a part of the ongoing effort to separate "engine code" from "game code", we should modify the engine to support Game Modes as a way of changing the logic each frame.
For example, the default GameMode would just call
tick()
andrender()
on every registered Entity, whereas a MenuGameMode would move a cursor around a menu screen, and a SceneGameMode would execute actions based on a script defining the cutscene (delay, move entity, play animation at x, play sound, etc).GameModes should be stored in a stack, so that a MenuGameMode is pushed on top of the stack, and popped off when the menu is finished and gameplay should continue.
There will be some shared state between GameModes (entities and tilesets, for example), as well as internal state (menu cursor position).
The text was updated successfully, but these errors were encountered: