Cross Module Communication

The event loop depicted in the sequence diagram demonstrates the flow of actions when a player buys items from the shop in the RPG game. The loop is initiated and controlled by the "Main" entity, while the "Player" entity interacts with the various modules involved in the process.

The first step in the loop is for the "Main" entity to control the actions. Then, the "Player" entity communicates with the "ShopModule" to initiate the purchase of an item.

spinner

Once the purchase request is made, the "ShopModule" processes it and sends a confirmation message back to the "Player" with the details of the purchased item.

spinner

Next, the "Player" requests authorization for the purchase from the "AuthModule." The "AuthModule" verifies the request and responds with an authorization confirmation.

spinner

After obtaining authorization, the "Player" records the action in the "DBModule" for future reference and tracking. The "DBModule" acknowledges the successful recording of the action.

spinner

The loop continues, allowing the player to perform subsequent actions within the RPG game. The sequence diagram captures the interactions between the "Player," "ShopModule," "AuthModule," and "DBModule," demonstrating how Motion Modules facilitate a seamless process of buying items, obtaining authorization, and recording actions.

Here's what the full loop looks like:

spinner
circle-info

Remember, Modules are composable. Want to let your users bring their own player scripts, or setup their own 2FA? Feel free.

This sequence diagram illustrates a possible loop between the modules where the "Main" entity controls the flow, and the "Player" entity interacts with the "ShopModule" to make purchases, requests authorization from the "AuthModule," and records actions using the "DBModule." The loop continues as the process repeats for subsequent actions in the RPG game.

Last updated