メインコンテンツまでスキップ

How it works

Last updated on March 12, 2025

Introduction

This article will give you a technical overview of how Byte Wars AccelByte Multiplayer Servers (AMS) works.

How Byte Wars AMS works

The purpose of Byte Wars AMS is to demonstrate and guide how a regular game with custom backend services can use AMS to host and manage dedicated servers. For the custom backend service, we provides a sample matchmaking backend service that you can run locally.

There are three components, the game client, the sample matchmaking backend service, and the dedicated servers hosted on AMS. Here is the setup:

Byte Wars AMS structure

The structure of Byte Wars consists of several interconnected components forming dependencies, which you can see in this diagram:

Core Game

The core game is the Byte Wars base that contains the foundation of the game. This base game includes gameplay, basic networking, and fundamental multiplayer features. It is available in these repositories:

Tutorial modules

The tutorial modules contain components that integrate the base Byte Wars game with AMS using AccelByte plugins. A tutorial module has two modes: Default and Starter modes. These modes can be set through the Tutorial Module Manager.

  • Default Mode: In this mode, the integration of AMS features within a tutorial module is complete. Thus, the developer doesn't need to make any adjustments.
  • Starter Mode: In this mode, the integration of AMS features within a tutorial module is not complete. This mode is used to follow along with the Byte Wars tutorials, allowing developers to integrate the features from scratch.

Each Tutorial Module has these main components.

  • User Interface (UI): Contains UI files utilized by the tutorial module. If Starter Mode is active, the files used by the tutorial module are the ones that have the _Starter suffix.
  • Module Wrapper: Consists of files containing wrapper code to integrate AMS features with Byte Wars, then connect them with the UI (if applicable). If Starter Mode is active, the files used by the tutorial module are the ones that have the _Starter suffix.

Byte Wars contains the base game, tutorial modules, and the AccelByte plugins that are available in these repositories:

In-game utilities

The in-game utilities are components that are used by Byte Wars. These utilities consist of these main parts:

UI Manager

This utility is responsible for managing the UI in Byte Wars. It can activate and deactivate UI elements based on certain conditions, such as whether a tutorial module is active, whether the Starter Mode is active, or whether a configuration in the Admin Portal has been set up.

Asset Manager

This utility is responsible for managing the assets in Byte Wars. It can activate and deactivate assets based on certain conditions, such as whether a tutorial module is active, whether the Starter Mode of a tutorial module is active, and whether a configuration in the Admin Portal has been set up or not.

Tutorial Module Manager: Unreal Engine

This utility is responsible for managing the settings used by tutorial modules. For Unreal Engine Byte Wars, the management of tutorial modules is controlled by an asset called Tutorial Module Data Asset. This Tutorial Module Data Asset contains the following settings:

Byte Wars Unreal Tutorial Module Data Asset

  • Code Name: A unique string used as an identification for a tutorial module.
  • Tutorial Module (Default Mode):
    • Default UI Class: The main UI used by the tutorial module when Default Mode is active.
    • Default Subsystem Class: The main module wrapper used by the tutorial module when Default Mode is active.
    • Is Active: If this toggle is turned on, the tutorial module will be active and Default Mode will be used. If this toggle is turned off, the tutorial module will be deactivated.
  • Tutorial Module Starter (Starter Mode):
    • Starter UI Class: The main UI used by the tutorial module when Starter Mode is active.
    • Starter Subsystem Class: The main module wrapper used by the tutorial module when Starter Mode is active.
    • Is Starter Mode Active: If this toggle is turned on, Starter Mode will be active, overriding Default Mode. If this toggle is turned off, Default Mode will be used.
  • Tutorial Module Dependencies: A list of tutorial modules that are dependencies for a particular tutorial module. If any tutorial module in the dependency list is inactive, the tutorial module depending on it will automatically be deactivated.

To follow the along with the Unreal Byte Wars tutorials, developers must activate Starter Mode, which is done through the Tutorial Module Data Asset mentioned above.

In addition, the developer must force activate a tutorial module by adding the code below to the Config/DefaultEngine.ini file.

[AccelByteTutorialModules]
+ForcedEnabledModules=TutorialModule:TUTORIALMODULECODENAME_1
+ForcedEnabledModules=TutorialModule:TUTORIALMODULECODENAME_2
+ForcedEnabledModules=TutorialModule:TUTORIALMODULECODENAME_3
ForceDisabledOtherModules=false
ヒント

The config code specific to each tutorial module is provided in each respective module's prerequisites. Reminders to enable Starter Mode are also mentioned in each tutorial module.

Tutorial Module Manager: Unity Engine

This utility is responsible for managing the settings used by tutorial modules. For Unity Byte Wars, the management of tutorial modules is controlled by a Scriptable Object called Tutorial Module Data, which contains the following settings:

Byte Wars Unity Tutorial Module Data

  • Type: A unique type used as an identification for a tutorial module.
  • Tutorial Module (Default Mode):
    • Default Menu UI Prefab: The main UI used by the tutorial module when Default Mode is active.
    • Default Module Script: The main module wrapper used by the tutorial module when Default Mode is active.
    • Is Active: If this toggle is turned on, the tutorial module will be active and Default Mode will be used. If this toggle is turned off, the tutorial module will be deactivated.
  • Tutorial Module Starter (Starter Mode):
    • Starter Menu UI Prefab: The main UI used by the tutorial module when Starter Mode is active.
    • Starter Module Script: The main module wrapper used by the tutorial module when Starter Mode is active.
    • Is Starter Active: If this toggle is turned on, Starter Mode will be active, overriding Default Mode. If this toggle is turned off, Default Mode will be used.
  • Tutorial Module Dependencies: A list of tutorial modules that are dependencies for a particular tutorial module. If any tutorial module in the dependency list is inactive, the tutorial module depending on it will automatically be deactivated.

To follow the tutorials available in Unity Byte Wars, developers must activate Starter Mode, which is done through the Tutorial Module Data Asset explained above.

In addition, the developer must force activate a tutorial module by adding the code below to the Assets/Resources/Modules/TutorialModuleConfig.json file.

{
"enableModulesOverride": true,
"forceEnabledModules": ["TutorialModuleType_1", "TutorialModuleType_2", "TutorialModuleType_3"],
"forceDisabledOtherModules": false
}
ヒント

The config code specific to each tutorial module is provided in each respective module's prerequisites. Reminders to enable Starter Mode are also mentioned in each tutorial module.

AccelByte Plugins

AccelByte Plugins are used to integrate AMS features into Byte Wars. Here is a list of plugins used by Byte Wars based on the supported game engine: