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

仕組み

Last updated on June 12, 2024

Introduction

This article will give you a technical overview of how Byte Wars works.

Byte Wars 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 AccelByte Gaming Services (AGS) features using AccelByte plugins. These tutorial modules are grouped based on the types of AGS services, such as Access, Play, Social, Engagement, Storage, etc.

A tutorial nodule can be a dependency of another tutorial module. For example, to integrate the statistics feature, a login feature is required first, hence, the tutorial module in the Access group becomes a dependency of the tutorial module in the Storage group.

ヒント

To see the dependencies of each tutorial module, check the Tutorial Module Dependencies values explained in the Tutorial Module Manager section (for Unreal Engine or Unity).

Additionally, 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 AGS 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 AGS 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.
注記

In the context of Byte Wars, the "Starter Mode" and "Starter files" refer to the incomplete files you will use to follow along with the Byte Wars tutorials. It is not to be confused with the tier of AGS access called "AGS Starter".

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 AGS 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 AGS 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 AGS features into Byte Wars. Here is a list of plugins used by Byte Wars based on the supported game engine: