Global Gaming Servers (2): Typical System Design and Case Study

Typical System Design

Global Rankings Design

When designing a global rankings service, you must consider demand, analysis, data structure, rank data persistence, rank server SPOF issues, and other issues. A ranking service architecture is shown in the following figure:

Game Time Design

All the game servers use GMT Jan 1, 1970 00:00:00 offset (generally an absolute value of 1 for the second count) to express the in-game time. This time is synced to game clients, who use the time zone set on the cell phone to compute the game time to be displayed in the client. The specifications are shown in the figure below.

  • To prevent client modifications to the local time from confusing the game logic, the client must use the server time.
  • Basically all techniques to solve game status synchronization problems, such as predictive pull or server verification sync, require time synchronization.
  • In games, some timed events or time-related gameplay features require a standard and uniform game server time to ensure fair play.
  • During the client and server communication, a more secured method is to add a timestamp to each packet so that the server can verify the validity of the packets.

Game Data Synchronization

Solution 1: Use a Cache for Instant Data Writeback

  • The database proxy reads role data from the database.
  • The database proxy inserts the role data into the cache.
  • The role data read from the cache is used in computing.
  • When the data changes, the cache data and database data are updated simultaneously.
  • When players exit the game, the data in the cache is deleted.
  • First, the system checks if the player is logged on in another region. If yes, it goes to step 2. If no, it goes to step 3.
  • The player’s role data is written back to the database and deleted from the cache when the player is logged out.
  • The database proxy reads role data from the database.
  • The database proxy inserts the role data into the cache.
  • The role data read from the cache is used in computing.
  • When the data changes, the cache data and database data are updated simultaneously.
  • When players exit the game, the data in the cache is deleted.
  • Advantages:
  • The players can play the game from different regions, their data need not be migrated. All regions support local data reading and writing.
  • Disadvantages:
  • The asynchronous data synchronization can produce data inconsistencies. If the player uses a VPN to access the game, a transient VPN disconnection can cause the player to log on again in another region. If data synchronization messages are lost or delayed, the data read when a player logs in again may not be up to date.
  • The various regions contain all player data, so real-time synchronization may put a high level of pressure on the database. Real-time synchronization between regional databases demands a great deal of cross-region leased line bandwidth.
  • Advantages:
    For players in the same region, role data is read/written to/from the nearest local node.
  • Disadvantages:
    The implementation logic is complicated. All gameplay results must be abstracted to an interface and data is centrally changed by the original server interface.

Game Localization Solutions

Game localization is an important factor for consideration of games seeking to enter overseas markets. Games, either being released overseas or looking to expand to new regions must be attentive to localization work. The general approach is to build a standard client installation package, which contains several basic material packages, art material packages for different languages, and some program materials. This allows the game to be dynamically rendered based on the phone’s language version.

  • After the client installation package is downloaded, the user manually sets the language version. Such large packages contain various language packs and support one-click language selection.
  • When the game is installed on the client, it detects the language used by the mobile device to dynamically select the language version to install. These installation packages generally have a built-in default language and, if another language is needed, a language pack is downloaded from the Internet.
  • Different language versions of the client installation package are submitted to the app store. Then, different installation package versions are served to different regions. Each installation package must be customized.

Case Study

Case Study 1: Game A

How Alibaba Cloud Can Help

  • Unified Management of Resources
    Alibaba Cloud provides features that match games with global players and mass data with ease.
  • Data centers with high compute power across multiple regions worldwide.
  • One account for maintenance and resource management.
  • Centralized presale and aftersales service system along with the localized support.
  • Sustained and Secure Availability
    Alibaba Cloud provides stable and low-latency network to guarantee global players seamless access and fair competition.
  • Dedicated and consistent network connection by using Express Connect to link data centers across the world.
  • High network quality and low latency level specified in SLAs.
  • Comprehensive Suite of Products
    Alibaba Cloud offers properly designed architectures and flexible deployment plans to fulfill the business logic of different genres of games.
  • Reliable global serverless architecture and customizable deployment plans.
  • Customer-based solutions for network latency, data consistency, and other technical difficulties.

Summary and Future Prospects

By describing business needs, technical difficulties, cloud products, player acceleration methods, reference architectures, and typical designs, this article aims to provide complete solutions to more customers who want to develop global server games.

  • Distributed deployment cross-region data synchronization
  • Global serverless game time (such as GMT)
  • Global serverless game localization (such as text, materials, and code)
  • Global serverless latency elimination (such as server frame sync)
  • Distributed node traffic proxy construction best practices
  • Global server SLG game architecture solutions
  • Global server card/board game architecture solutions

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com