FieldWalker
FieldWalker Verification Steps
Table of Contents
Sample Overview
This project is a sample project (
FieldWalker
) using theDiarkis UnrealEngine Plugin
in UnrealEngine.It allows you to verify the
Field
feature ofDiarkis
.By launching multiple instances of
FieldWalker
, you can verify synchronization of character positions running on different client devices.It uses the
UDP
protocol to verify character position synchronization.Supported operational verification environments are
Windows10/11, Mac, iOS, Android, Nintendo Switch, PS4, PS5, Xbox Series X|S
.Verified on UE4.27.2 and UE5.0.3.
Verification Steps
Windows Verification Steps
Right-click on
FieldWalker.uproject
and select "Generate Visual Studio project files".Open
FieldWalker.sln
with Visual Studio.Specify the Diarkis server connection information as follows:
(FieldWalker/Source/FieldWalker/Diarkis/DiarkisPluginBase.cpp)
If a client key is not needed, specify
clientKey = ""
.If the user ID is
uid = 0
, a random ID will be assigned when starting.
Build & Run:
Windows: Build and run by selecting
DebugGame_Editor
andWin64
in VisualStudio
Mac Verification Steps
Right-click on
FieldWalker.uproject
and select "Generate XCode Project".If the process fails, run the following shell command to create
FieldWalker.xcworkspace
.
For UE4.27
For UE5.0
Open
FieldWalker.xcworkspace
withXCode 12.5.1 (for UE4.27)
/XCode 13.3 (for UE5.0)
.Specify the Diarkis server connection information as follows:
(FieldWalker/Source/FieldWalker/Diarkis/DiarkisPluginBase.cpp)
If a client key is not needed, specify
clientKey = ""
.If the user ID is
uid = 0
, a random ID will be assigned when starting.
Build & Run:
Selected Viewport
After starting UE4Editor, press the
Play
button on the toolbar.Select
Selected Viewport
/Multiplayer Options
, and setNumber of Players: 1
.
Screen Descriptions
MainMenu Screen
Specifying Diarkis Server
HostName: Specify the URL of the Diarkis HTTP server.
ClientKey: If the Diarkis server has set a ClientKey, specify that Key. If not set, leave it blank.
UID: Specify a unique UID different from other clients. Note! If the same ID is specified as another client, synchronization will not work.
Specifying Synchronization Method
SyncMethod: Synchronization method (needed to join within 1 minute)
Field: Synchronization using the Field feature. The Field is divided by the number of Pods used (number of UDP/TCP servers).
By default, one Pod of UDP server is started, so one Map is divided into four Grids.
Moving across Grids will not send position information between characters in different Grids, resulting in them not being displayed.
Show Stat: Displays the frame rate, etc.
Fix FPS: Fixes the FPS.
FPS: Switches the fixed FPS to 30 FPS or 60 FPS.
InGame Screen
Grid Size Slider: Slider to change the Grid size
Server Count Slider: Number of connected UDP servers (this affects the number of Grids)
Application Controls
Operation Verification (Multiplayer Options)
After starting UE4Editor, press the
Play
button on the toolbar.Select
Play Standalone Game
.Select
Number of Players: 2 to 4
inMultiplayer Options
.
Multiple Windows will be displayed and press the
Start
button of the gameBe careful not to have the same UID. If UID is the same, unintended behavior will occur.
Delays in character synchronization may occur depending on the specifications of the PC when increasing the number of Players.
Log Output
Log Output Section
Log files will be output to the following folder.
Output to folder under
FieldWalker/logs/○○○○/
(OOOO is user ID)Logs are output only during debug builds.
To output logs during Development Build, adjust to
bOutputLog = true
in the DiarkisInterfaceBase constructor.You can switch the log output type to file output or debug output in the DiarkisInterfaceBase constructor using LogOutType.
Changing Log Levels
You can change the log output level in the LoggerFactory constructor.
You can set the log output level by feature (UDP, TCP, Socket, Room, P2P, MatchMaker, Runtime, etc.) in the client library.
The logs set in the Base class can specify the output level at Runtime.
For example, if set to DiarkisLoggerSeverity::Warning, the following order will output logs below Warning.
About Code
Main Code on FieldWalker Side (Sample Using Diarkis Plugin)
FieldWalker/Source/FieldWalker
FieldWalkerGameMode.h / FieldWalkerGameMode.cpp
: Core class managing the game (AGameModeBase)FieldWalkerCharacter.h / FieldWalkerCharacter.cpp
: Class for your own character (ADiakisCharacter)
FieldWalker/Source/FieldWalker/Diarkis
DiarkisPluginBase.h / DiarkisPluginBase.cpp
: Basic class using Diarkis PluginDiarkisPluginInterface.h / DiarkisPluginInterface.cpp
: Interface class using Diarkis PluginDiarkisPluginSample.h / DiarkisPluginSample.cpp
: Sample class using Diarkis Plugin
Main Code of Diarkis Plugin
About Client Code
Role Overview
Parent class of interfaces controlling Diarkis library
Location of Code
FieldWalker/Plugins/Diarkis/Source/Diarkis/Client
Classes
DiarkisInterfaceBase.h / DiarkisInterfaceBase.cpp
: Interface class controlling Diarkis from UE4 (controls libDiarkis)DiarkisRoomBase.h / DiarkisRoomBase.cpp
: Parent class of Room function (controls libDiarkis)DiarkisGroupBase.h / DiarkisGroupBase.cpp
: Parent class of Group function (controls libDiarkis)DiarkisFieldBase.h / DiarkisFieldBase.cpp
: Parent class of Field function (controls libDiarkis)DiarkisTcpBase.h / DiarkisTcpBase.cpp
: Parent class of TCP function (controls libDiarkis)DiarkisUdpBase.h / DiarkisUdpBase.cpp
: Parent class of UDP function (controls libDiarkis)DiarkisP2PBase.h / DiarkisP2PBase.cpp
: Parent class of P2P function (controls libDiarkis)DiarkisMatchMakerBase.h / DiarkisMatchMakerBase.cpp
: Parent class of MatchMaker function (controls libDiarkis)DiarkisRPCBase.h / DiarkisRPCBase.cpp
: Parent class of RPC function (controls libDiarkis)
About Extension Code
Role Overview
Child class group of interfaces controlling Diarkis library
Location of Code
FieldWalker/Plugins/Diarkis/Source/Diarkis/Extension
Classes
Character
(Class for synchronizing character data)DiarkisCharacter.h / DiarkisCharacter.cpp
: Class for Diarkis character synchronizationCharacterSyncData.h / CharacterSyncData.cpp
: Class for serializing/deserializing character position dataCharacterMoveData.h / CharacterMoveData.cpp
: Class for character position data. Initial position for synchronizationCharacterStateData.h / CharacterStateData.cpp
: Class for character position data. Frame-to-frame differential information
Component
(Component class for position synchronization in Diarkis)DiarkisSyncComponent.h / DiarkisSyncComponent.cpp
: Component class for position synchronization in DiarkisDiarkisCharacterSyncComponent.h / DiarkisCharacterSyncComponent.cpp
: Sample implementation of custom data send/receive component when creating actor class
Movement
(Class for position synchronization in Diarkis)DiarkisMovementController.h
: Interface class for position synchronization componentDiarkisLocalMovementSync.h / DiarkisLocalMovementSync.cpp
: Local position synchronization component classDiarkisRemoteMovementSync.h / DiarkisRemoteMovementSync.cpp
: Remote position synchronization component class
Diarkis/Utils
(Utility classes)DiarkisUtils.h / DiarkisUtils.cpp
Class derived from interface class controlling the library (XXXBase)
DiarkisInterface.h / DiarkisInterface.cpp
DiarkisRoom.h / DiarkisRoom.cpp
: Class controlling Room functionsDiarkisGroup.h / DiarkisGroup.cpp
: Class controlling Group functionsDiarkisField.h / DiarkisField.cpp
: Class controlling Field functionsDiarkisTcp.h / DiarkisTcp.cpp
: Class controlling TCP functionsDiarkisUdp.h / DiarkisUdp.cpp
: Class controlling UDP functionsDiarkisP2P.h / DiarkisP2P.cpp
: Class controlling P2P functionsDiarkisMatchMaker.h / DiarkisMatchMaker.cpp
: Class controlling MatchMaker functionsDiarkisRPC.h / DiarkisRPC.cpp
: Class controlling RPC functionsDiarkisSyncData.h / DiarkisSyncData.cpp
: Class for processing Diarkis position synchronizationDiarkisReplication.h / DiarkisReplication.cpp
: Class for variable replication using Room's PropertyDiarkisActorManagement.h / DiarkisActorManagement.cpp
: Class identifying Actor managed by Diarkis
About DiarkisNetwork Code
Role Overview
Interface classes of Diarkis Plugin
Location of Code
FieldWalker/Plugins/Diarkis/Source/Diarkis/DiarkisNetwork
Classes
Event/Interfaces
( Interface class receiving callbacks from Room functions of Diarkis Plugin )DiarkisNetworkCoreEvent.h
: Interface for Core events of Diarkis PluginDiarkisNetworkRoomEvent.h
: Interface for Room events of Diarkis PluginDiarkisNetworkGroupEvent.h
: Interface for Group events of Diarkis PluginDiarkisNetworkFieldEvent.h
: Class receiving callbacks for Field functions of Diarkis PluginDiarkisNetworkP2PEvent.h
: Interface for P2P events of Diarkis PluginDiarkisNetworkMatchMakerEvent.h
: Interface for MatchMaker events of Diarkis Plugin
Event/Emitters
( Class queuing Room events of Diarkis )DiarkisNetworkCoreEventEmitter.h / DiarkisNetworkCoreEventEmitter.cpp
: Class queuing Core events of DiarkisDiarkisNetworkEventEmitterBase.h / DiarkisNetworkEventEmitterBase.cpp
: Base class generating various events`Di
最終更新