AboutClass

Folder Structure

Runtime
├── Client
└── Extension
    ├── Auth
    ├── DiarkisNetworkManager.cs → 1. Core Library
    ├── DiarkisUID.cs → 2. Class Representing UID
    ├── Character → 3. Character Position Synchronization
    │   ├── CharacterMoveData.cs
    │   ├── CharacterSyncData.cs
    │   └── DiarkisCharacter.cs
    ├── Data → 4. Message Type for Sending and Receiving Messages
    │   └── DiarkisMessageData.cs
    ├── Events → 5. Event System
    │   ├── Callbacks
    │   │   ├── IDiarkisCmdEvent.cs
    │   │   ├── IDiarkisCoreEvent.cs
    │   │   └── Modules
    │   │       ├── IDiarkisFieldEvent.cs
    │   │       ├── IDiarkisGroupEvent.cs
    │   │       ├── IDiarkisMatchMakerEvent.cs
    │   │       ├── IDiarkisP2PEvent.cs
    │   │       └── IDiarkisRoomEvent.cs
    │   ├── DiarkisEvent.cs
    │   ├── DiarkisEventHandler.cs
    │   └── IDiarkisEvent.cs
    ├── Transport → 6. Transport Layer
    │   └── DiarkisTransport.cs
    ├── Modules → 7. Various Modules
    │   ├── DiarkisModule.cs
    │   ├── DiarkisModuleHandler.cs
    │   └── DiarkisModules
    │       ├── DiarkisField.cs
    │       ├── DiarkisGroup.cs
    │       ├── DiarkisMatchMaker.cs
    │       ├── DiarkisP2P.cs
    │       └── DiarkisRoom.cs
    ├── Lib → 8. Additional Libraries
    │   └── Serialization.cs
    └── MonoBehaviour → 9. Unity-specific Implementation
        ├── Callbacks → 9-1. Unity Event System
        │   ├── DiarkisCoreEventCallback.cs
        │   ├── DiarkisEventCallback.cs
        │   └── Modules
        │       ├── DiarkisFieldEventCallback.cs
        │       ├── DiarkisGroupEventCallback.cs
        │       ├── DiarkisMatchMakerEventCallback.cs
        │       ├── DiarkisP2PEventCallback.cs
        │       └── DiarkisRoomEventCallback.cs
        └── Replication → 9-2. Unity Replication System
            ├── DiarkisGameObjectWrapper.cs
            ├── DiarkisRepInstanceHandler.cs
            ├── Field
            │   ├── DiarkisFieldRepManager.cs
            │   └── IDiarkisFieldGameObject.cs
            └── Room
                ├── DiarkisGameObject.cs
                ├── DiarkisRoomRepManager.cs
                └── IDiarkisGameObject.cs

1. About DiarkisNetworkManager

DiarkisNetworkManager represents the core library.

Internally, it contains the following components.

NameRole

DiarkisEventHandler

Event system responsible for inter-module communication

DiarkisTransport

Transport layer (UDP & TCP)

DiarkisModuleHandler

Various modules

2. About DiarkisUID

Represents a unique ID for identifying the client.

3. About Character Position Synchronization

Contains classes related to character position synchronization.

4. About Message Type for Sending and Receiving Messages

Contains classes specifying message types during send/receive operations.

5. About Event System

Represents the event system responsible for inter-module communication, with DiarkisEventHandler as the core component.

Internally, a Queue exists to accumulate event information, allowing the registration of instances to receive it.

6. About Transport Layer

Represents connections via UDP or TCP.

7. About Various Modules

DiarkisModuleHandler is the core and represents various modules.

Class NameInternal Client Library Class Name

DiarkisRoom

Room

DiarkisGroup

Group

DiarkisField

Field

DiarkisMatchMaker

MatchMaker

DiarkisP2P

P2P

Primarily responsible for firing events in the above event system (5.) to match the behavior of the internal client library.

Additionally, it also plays roles such as caching some data and assisting the client library's functions.

8. About Additional Libraries

Contains libraries for data serialization (and deserialization).

9. Unity-specific Implementation

Contains Unity-specific implementations within the folder (Runtime/Extension/MonoBehaviour).

9-1. Unity Event System

Implemented as a component within Unity's event system.

9-2. Unity Replication System

An example implementation of character position synchronization using Unity.

Corresponds with the functionalities of Room and Field.

Last updated