Game data and request flow
Use this page to review the data concepts from the tutorial in one place. Each chapter also explains the concepts needed for its steps.
Game settings and player data
A game has rules you define in advance and values that change as people play.
“Completing Forest exploration grants 10 coins” is a game setting. “This player has 30 coins” is data for an individual player. GS2 manages these separately.
| Term | Example in this game | When it changes |
|---|---|---|
| Master data | Forest exploration rewards 10 coins | A developer changes and deploys the settings |
| User data | This player has 30 coins | Player actions or server processing |
For example, when a player with 30 coins completes Forest exploration, GS2 reads the reward settings and adds 10 coins. The stored balance becomes 40.
The Unity game client handles screens, effects, and button input. When the player clicks the start button, Unity requests that GS2 start the adventure. GS2 checks the settings and player data, processes the request, and returns the result for Unity to display.
Developers deploy settings
flowchart LR
A[Configure rewards and costs] --> B[Deploy to GS2]
A --> C[Display data for Unity]
B --> D[Settings used by GS2]
C --> E[Lists and screen display]First, configure rewards and the stamina needed for adventures, then deploy to GS2. If Unity uses assets to display product names or prices, update those too.
When changing a product’s price, update both the amount actually charged and the price shown on screen. Check that they match when making a purchase.
Players perform actions
sequenceDiagram
participant P as Player
participant U as Unity
participant G as GS2
P->>U: Start the quest
U->>G: Specify player and quest
G->>G: Check requirements and start the quest
G-->>U: Result
U-->>P: Show progress and stamina
P->>U: Complete the quest
U->>G: Report quest completion
G->>G: Grant rewards and finish the quest
G-->>U: Result
U-->>P: Show coins and progressServices used in this game
| Service | Role in this tutorial |
|---|---|
| GS2-Account and authentication | Identify and log in players |
| GS2-Quest | Manage quest settings and adventures in progress |
| GS2-Money2 | Manage free coins earned as rewards |
| GS2-Stamina | Manage stamina consumed by adventures |
| GS2-Exchange | Process coin spending and stamina recovery as one operation |
GS2-Exchange powers the shop where players spend coins to restore stamina. Configure TransactionSettingV2 (new tab) so the payment and recovery are processed together.
Think it through
“Change the forest reward to 15”, “Increase my coins by 15”, and “Show a reward of 15 in the list”: which changes master data, user data, or the display? Understanding the difference helps you decide where to look when settings change but the screen does not.