In most mobile games in South Korea, server integration is essential from the start to the end of the game. This is due to the excellent internet infrastructure in the country and various security concerns. As a result, it’s natural for almost all key features, including currency management, to rely on server-side control. However, the internet environment differs in many countries, and there are cases where offline play is necessary, which is a valid concern for many reasons.
That said, it’s not feasible to entrust the management of all in-game currencies entirely to the client. The core currencies and critical data should be validated and managed by the server, but the game should allow for some offline play, where user data can be preserved even without an internet connection. This leads to the following conditions:
Objective:
- When playing with the same account on multiple devices, the data on each device should be synchronized with the server.
- Data updated during offline play should be synchronized with the server.
Types of Currencies and Data:
- Cash: In-game currency exchanged for real money.
- Points: Secondary currency earned through cash or gameplay, used for transactions in the in-game store.
- Tickets: A currency that is deducted with each gameplay session.
- Score: A score achieved by the player in the game.
Offline Behavior:
Currency | Cash | Points | Ticket | Score |
---|---|---|---|---|
Check | ? | ? | C | CS |
Earn | X | ? | C | CS |
Use | ? | ? | C | - |
- ?: Not yet defined
- X: Not supported
- C: Client-side management
- S: Server-side management
- CS: Client-side storage, then server sync
- M: Managed via marketplace
Online Behavior:
Currency | Cash | Points | Ticket | Score |
---|---|---|---|---|
Check | S | S | C | S |
Earn | M,S | S | S (per transaction), C | S |
Use | S | S | C | - |
Synchronization Method:
- Synchronization is based on the data of the last online device.
- Data changes from all online devices are sent to the server and synchronized sequentially.
- If there’s a negative balance due to currency deductions across multiple devices, the value is set to zero.
Synchronization Timing:
- When the game is first launched.
- After a gameplay session is completed.
The above steps serve as hints for making decisions, and visualizing this as a decision tree would be helpful in streamlining the process.