top of page
LogoScaled.png

MENU SYSTEM

OVERVIEW:

 

I had done the menu design and implementation for several projects before starting Echodream, but they had always been specialized; in Echodream, I tried to make a flexible menu system that could handle any use case.
 

It uses polymorphic state machines with minimal specialized menu code. The state machine is a map of menu nodes.​ Edges connecting the nodes are a callback functions returning a `bool`. Every frame, the edges of the current node are evaluated, and traversal occurs when one returns `true`.

Menu nodes contain a vector of behavior pointers and interactions which implement polymorphic behavior. The behavior pointers can reference anything, including nested menus. Interactions are pairs of callback functions: if the first returns `true`, the second executes (a "conditional" action list).

bottom of page