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 Types for Sending and Receiving
    │   └── 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. Implementations for Unity
        ├── Callbacks → 9-1. Event System for Unity
        │   ├── DiarkisCoreEventCallback.cs
        │   ├── DiarkisEventCallback.cs
        │   └── Modules
        │       ├── DiarkisFieldEventCallback.cs
        │       ├── DiarkisGroupEventCallback.cs
        │       ├── DiarkisMatchMakerEventCallback.cs
        │       ├── DiarkisP2PEventCallback.cs
        │       └── DiarkisRoomEventCallback.cs
        └── Replication → 9-2. Replication System for Unity 
            ├── DiarkisGameObjectWrapper.cs
            ├── DiarkisRepInstanceHandler.cs
            ├── Field
            │   ├── DiarkisFieldRepManager.cs
            │   └── IDiarkisFieldGameObject.cs
            └── Room
                ├── DiarkisGameObject.cs
                ├── DiarkisRoomRepManager.cs
                └── IDiarkisGameObject.cs

1. About DiarkisNetworkManager

DiarkisNetworkManager represents the core library.

It contains the following components:

NameRole

DiarkisEventHandler

Event system for module communication

DiarkisTransport

Transport layer (UDP & TCP)

DiarkisModuleHandler

Various modules

2. About DiarkisUID

Represents a unique ID that identifies a client.

3. About Character Position Synchronization

Contains classes related to character position synchronization.

4. About Message Types for Sending and Receiving

Contains classes that specify message types for sending and receiving messages.

5. About the Event System

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

It contains a Queue that accumulates event information and can register instances to receive these events.

6. About the Transport Layer

Represents connections using either UDP or TCP.

7. About Various Modules

DiarkisModuleHandler serves as the core and represents various modules.

Class NameClient Library Class Name Contained Inside

DiarkisRoom

Room

DiarkisGroup

Group

DiarkisField

Field

DiarkisMatchMaker

MatchMaker

DiarkisP2P

P2P

Its main role is to emit events from the aforementioned event system (5.) to match the behavior of the client libraries contained inside.

Additionally, it also caches some data and assists the functionalities of the client libraries.

8. About Additional Libraries

Contains libraries for serializing (and deserializing) data.

9. Implementations for Unity

This folder (Runtime/Extension/MonoBehaviour) contains implementations related to Unity.

9-1. Event System for Unity

Implements the event system as Unity components.

9-2. Replication System for Unity

An example implementation of character position synchronization using Unity.

Supports the functionalities of Room and Field.

最終更新