Entity Overview

The system is structured following a layered entity model, where each entity represents a distinct role or object within the player ecosystem. Below is a detailed description of each entity type and how they relate to one another:


I. MasterPlayer

Represents the master profile of a user.

  • Stores login information and shared data accessible across multiple games (gameId, we call this is gameId, but it mean is enviroment).
  • Enables data sharing across different games the player participates in.
  • Typically used to manage global features such as:
  • Multiple authentication methods (Google, Apple, Facebook, GameCenter, PlayGameService, CustomId, Account username, etc.).
  • Personal information (email, registered IP, country)
  • Sending push notifications to the player’s device (PushNotification)

II. GamePlayer

Represents the master profile of a user.

  • Cannot be directly shared across other gameIds.
  • A single MasterPlayer can have multiple GamePlayer profiles for different games.
  • Stores gameplay-specific data such as level, progression, achievements, friends, etc.
  • Supports features like social systems, in-game transactions, and event participation.

III. CharacterPlayer

Represents a sub-character that the player can create in a game.

  • Each GamePlayer can own multiple CharacterPlayer entities.
  • Typically stores stats, skills, equipment, and character-specific data.

IV. Group

Represents a player organization such as a clan, guild, or any community group.

  • Members can be GamePlayers or CharacterPlayers.
  • Groups can have their own inventories (Inventory) and can sendMessages to members.

V. Inventory

Represents items owned by an entity ( CharacterPlayer, GamePlayer, or Group).

  • Includes items like rings, necklaces, weapons, consumables, etc.
  • Items can be equipped, upgraded, traded, or used in gameplay.
General Relationships
image1
Shared Data Components for All Entities

Each entity above can be extended with the following components:

  • Statistics: Tracks gameplay metrics like battleCount, exp, winCount, loseCount, achievement1Count, gemUse, quest1Progress, etc.
  • Currencies: Represents monetary units such as coin, gem, diamond, gold, balance, etc.
  • StatisticsLogs / CurrenciesLog: Stores the history of changes to each statistics or currency.
  • StatisticsLeaderboard / CurrencyLeaderboard / Backup StatisticsLeaderboard: Used to rank players or groups by various stats. Supports event-based leaderboards and resets (e.g. weekly).
  • Tags / Segments: Helps classify or group entities — e.g., rich-kid, may-be-hack, old-user, admin, game-master.
  • DisplayName / Avatar: Customize display name and avatar for any Entity.
Entity-Specific Data Highlights
EntitySpecial Fields
MasterPlayerEmail for contact, PushNotification to devices, External login methods (Google, Facebook, Apple ID...)
GamePlayer / CharacterPlayerCountryCode, IPAddressCreate, TsLastLogin, Friends list within the same game
GroupSupports sending messages to its members via sendMessage
InventoryCan be owned by GamePlayer, CharacterPlayer, or Group
StoreInventoryRepresents purchasable bundles (either consumable or non-consumable) that may contains Currencies, Inventory items, etc.
ContentRemote configuration system for game data; clients can fetch gameplay stats, map configs, item prices, etc. anytime