Skip to main content

Graceful Disruption Handling in Online Game Integration During Maintenance

Last updated on February 27, 2025

Online games powered by AccelByte Gaming Services (AGS) rely on a strong backend infrastructure for essential features such as authentication, matchmaking, friend lists, and cloud saves. Regular maintenance is crucial to maintaining stability, security, and performance. However, if not managed properly, maintenance periods can result in poor player experiences, unexpected disconnections, and failed API requests.

To minimize these disruptions, developers should implement graceful disruption handling to keep players informed, manage retries effectively, and reduce the impact on gameplay. By utilizing AccelByte's built-in retry mechanisms, games can ensure a smoother experience even during service interruptions.

Prerequisitesโ€‹

These handling examples are explained based on the Byte Wars implementation. For better insights, set up Byte Wars in your workspace by following our step-by-step guide on Unreal Engine Byte Wars Setup or Unity Byte Wars Setup.

AGS Network Communicationsโ€‹

AGS mainly relies on two types of network communication:

  1. WebSocket connection; used for lobby and chat service.
  2. HTTP connection; used for access, social features, storage, and engagement service.

Both the AGS Unreal Engine and Unity SDK come with built-in features for automatic reconnection and retrying with a set timeout. However, if the default timeout is reached, additional handling is needed to manually attempt a reconnection.

How to Implement Graceful Disruption Handlingโ€‹

Example of graceful disruption handling in the game integration during regular maintenance:

Game SDK Logโ€‹

To help developers debug connection issues, it's recommended to enable verbose logging for AccelByte-related components in the game SDK. This provides detailed insights into network disruptions and reconnection attempts.

In the Unreal Engine SDK, the following log categories can be enabled to get the AccelByte-related components:

  • LogAccelByte โ€“ General logs for the AccelByte SDK, covering API requests and responses.
  • LogAccelByteOSS โ€“ Logs related to the AccelByte Online Subsystem, useful for matchmaking, authentication, and session handling.
  • LogAccelByteLobby โ€“ Logs WebSocket connections for lobby interactions, such as party management and friend notifications.
  • LogAccelByteWebsocket โ€“ Provides detailed logs on WebSocket connectivity and reconnection attempts.
  • LogAccelByteHttpCache โ€“ Provides detailed logs on HTTP cache.
  • LogAccelByteHttpRetry โ€“ Provides detailed logs on HTTP retry mechanisms.

Enabling these logs helps developers track issues, analyze retry behavior, and debug disruptions more effectively, ensuring a smoother player experience even during network interruptions.

To enable these logs in your Unreal Engine project, follow these steps:

  1. Open the Config/DefaultEngine.ini file in your game project directory.
  2. Add the log category names under the [Core.Log] section, like this:
...
[Core.Log]
LogAccelByte=VeryVerbose
LogAccelByteOSS=VeryVerbose
LogAccelByteLobby=VeryVerbose
LogAccelByteWebsocket=VeryVerbose
LogAccelByteHttpCache=VeryVerbose
LogAccelByteHttpRetry=VeryVerbose
...
  1. You also can control the level of detail for different log categories using command-line parameters when starting your game. To do this, add the following flags at the end of your launch command:
-LogCmds="LogAccelByte VeryVerbose, LogAccelByteOSS VeryVerbose, LogAccelByteLobby VeryVerbose, LogAccelByteWebsocket VeryVerbose, LogAccelByteHttpCache VeryVerbose, LogAccelByteHttpRetry VeryVerbose"

This will enable detailed logging for AccelByte components, helping you track network issues, API requests, and reconnection attempts more effectively.

Best Practices for Game Integrationโ€‹