LogoLogo
English
English
  • Diarkis Help Center
  • Overview of Diarkis
  • Getting Started
    • Diarkis Server Template
    • Diarkis Client SDK
    • Tutorials
      • 1. Launch Diarkis Server in Local Environment
      • 2. Perform Connectivity Check with Test Client
      • 3. Implement Custom Command
      • Connect to Server from Diarkis Client
    • Samples
  • Diarkis Modules
    • Room Module
      • Set Up Room Module on Server
      • Room Sample
        • room_broadcast
      • Utilizing Room Module from Client
      • Additional Features of Room
    • MatchMaker Module
      • Set Up MatchMaker Module on Server
    • Field Module
      • Set Up Field Module on Server
    • P2P Module
      • Set Up P2P Module on Server
      • P2P Sample
    • DM (Direct Message) Module
      • Set Up DM Module on Server
    • Notifier Module
      • Set Up Notifier Module on Server
    • Session Module
      • Set Up Session Module on Server
    • Group Module
      • Set Up Group Module on Server
  • Diarkis Server
    • Launch Diarkis Server in Cloud Environment
      • AWS
    • Launch Diarkis Server on Windows Environment
    • MARS Server
    • UDP Server
    • TCP Server
    • HTTP Server
    • Metrics API
    • Inter-server Communication - Mesh
  • Diarkis Client
    • Runtime Library
      • Diarkis RUDP
    • Diarkis Module
      • Initialization and Termination of Diarkis Module
      • Customization of Diarkis Module
      • Logging System of Diarkis Module
      • Migration
      • Threads of Diarkis
    • Samples
      • C++
        • room_broadcast
        • directmessage_simple
        • group_sample
        • matching_and_turn
        • matchmaker_ticket
        • p2p_rudp_sample
        • session_simple
      • Unreal Engine Plugin
        • FieldWalker
      • Unity Plugin
        • FieldWalker
          • HowToReplicatePosition.md
  • Diarkis Tools
    • Diarkis CLI
      • Procedures to Switch to Diarkis CLI v3
  • References
    • API Reference
    • Release Notes
      • v1.0
      • v1.0.1
      • v1.0.2
      • v1.0.3
      • v1.0.4
      • v1.0.5
      • v1.0.6
  • Support
    • License and Billing
Powered by GitBook
On this page
  • Introduction
  • Operating Environment
  • Procedure
  • Installing Required Tools
  • Installing Diarkis Server Template
  • Generating the Project
  • Project Initialization
  • Build
  • Execution
  • Verification of Operation
  • Supplemental Information
  • Test Client
  • magefile

Was this helpful?

  1. Diarkis Server

Launch Diarkis Server on Windows Environment

PreviousAWSNextMARS Server

Last updated 1 month ago

Was this helpful?

Introduction

You can also build and run the Diarkis server as a Windows binary.

This allows client engineers developing on a Windows machine to operate the Diarkis server without WSL, aiding in the efficiency of development work.

However, please note that it is not intended for use in production environments, so it should be limited to local or development environments.

Operating Environment

As of 2025-04-04, the operation is assumed in the following environments:

  • Windows 10/11

  • Go 1.22 or later

  • (git, if you're cloning the repository using git)

Procedure

Installing Required Tools

Install Go 1.22 or later.

You can also install it using a package manager like scoop.

> scoop install go

Installing Diarkis Server Template

If Cloning the Repository

> git clone git@github.com:Diarkis/diarkis-server-template.git
# Check out the version tag you need, if necessary
> git checkout v1.1.0-beta1

If Downloading Assets

Generating the Project

Run the following command in PowerShell to generate the project.

# parameters: {project_id} {builder_token} {output} {module_name}
> .\run-mage.bat init 12345678901 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx ../server_bin server_bin
  • project_id: Project ID issued by our company

  • builder_token: Builder Token issued by our company

  • output: Output destination of the generated project. Here, it is explained as ../server_bin

  • module_name: Module name. Here, it is explained as server_bin

Project Initialization

Move to the directory where the project was output and execute the following command.

> cd ..\server_bin
> .\run-mage.bat init

Build

Execute the following command to build the Diarkis server binary.

> .\run-mage.bat build:local

Once the build is complete, the binary is output to the remote_bin directory.

Execution

Start mars, http, and udp each in separate PowerShell windows.

> .\run-mage.bat server mars
> .\run-mage.bat server http
> .\run-mage.bat server udp

Verification of Operation

You can verify communication using the Go test client.

# parameters: <HTTP address> <client user ID> <client key> <puffer enabled: true/false>
> .\run-mage.bat goCli 127.0.0.1:7000 user-1 key false
  • HTTP address: Address of the Diarkis HTTP server

  • client user ID: ID of the user for authentication.

  • client Key: Client key. Specify key in the development environment

  • puffer enabled: Use of the Diarkis Puffer module. Specify false here

If authentication is successful, it will display as follows and enter the command waiting state.

[UID: user-1][SID(UDP): 23942c034d8d4094b09ab7219d28cebc]
 > Connected UDP

To create a Room after connection, you can create it by executing the following command.

 > Connected UDP
room create
Enter for which protocol to a create a Room (TCP/UDP): (Default: UDP)
Invalid input. Set to default value: UDP
Enter max members [1 - 255] (uint16): (Default: 10)
Invalid input. Set to default value: 10
Enter if allow empty (y/n): (Default: no)
Invalid input. Set to default value: false
Enter if join on creation (y/n): (Default: yes)
Invalid input. Set to default value: true
Enter TTL (seconds) [10 - 65535] (uint16): (Default: 30)
Invalid input. Set to default value: 30
Enter broadcast interval (milliseconds) (uint16): (Default: 100)
Invalid input. Set to default value: 100
# UDP RoomID is displayed on the prompt and you are in the state of joined Room
[UID: 1111][SID(UDP): c51ea8010bc44ea5b6cd6ef2bb788ad8][UDP RoomID: 580e3cef8588bd287f0000011fa5000000000000000000000000]

Supplemental Information

Test Client

In the test client, you can execute various built-in commands in addition to the room create command to verify. Please check the following page of the help center for details.

magefile

Like make/rake, it is a build tool that allows build flows to be described in Go, enabling platform-independent management.

If you want to check other targets, you can do so by running it without any arguments as follows.

> .\run-mage.bat
Targets:
  build:linux              Build server binary for linux or container environment
  build:local              Build server binary for local use
  build:mac                Build server binary for mac use
  diarkis:changeVersion    Change diarkis version.
  diarkis:version          Print the version of diarkis currently used.
  goCli                    Starts Go test client.
  init                     Initialize project
  puffer:clean             Delete all generated protocol code files.
  puffer:gen               Generate go, cpp, and cs code files using puffer (Diarkis packet gen module) from packet definition written in json.
  server                   Start a server locally: Required 1 following argument: mars http udp tcp

Clone .

Open , download the latest version Assets, and extract and use them.

.¥run-mage.bat uses a Go tool called internally.

https://go.dev/doc/install
https://github.com/Diarkis/diarkis-server-template
https://github.com/Diarkis/diarkis-server-template/releases
magefile
2. テストクライアントで疎通確認する | Diarkis Help Center
Logo