Difference between revisions of "Dedicated Server Kit Demo Setup"
(→Setup) |
|||
Line 39: | Line 39: | ||
* At this point, you should be able to run the demo by launching the game client build. | * At this point, you should be able to run the demo by launching the game client build. | ||
+ | = Go server's configuration file = | ||
+ | |||
+ | The Go server is the heart of the Dedicated Server Kit. You can easily configure it via the ''conf.json'' configuration file: | ||
+ | |||
+ | { | ||
+ | "ip_address": "127.0.0.1", | ||
+ | "port": 8000, | ||
+ | "db_connection_string": "root:@tcp(127.0.0.1:3306)/dsk", | ||
+ | "game_server_bin_path": "INSERT_YOUR_GAME_SERVER_BINARY_ABSOLUTE_PATH_HERE", | ||
+ | "game_server_port": 9000, | ||
+ | "jwt_key": "my_secret_key" | ||
+ | } | ||
+ | |||
+ | This is the meaning of each field: | ||
+ | |||
+ | * '''ip_address:''' The IP address of the dedicated server. | ||
+ | * '''port:''' The port number of the dedicated server. | ||
+ | * '''db_connection_string:''' The MySQL database connection string. We use the default one for MySQL, which should work on any default installation of the database. | ||
+ | * '''game_server_bin_path:''' The absolute path to your game server binary. | ||
+ | * '''game_server_port:''' The starting port number for every spawned game server instance. | ||
+ | * '''jwt_key:''' The encryption key used to generate the hashed passwords for your users. Make sure to use a unique, private value here. | ||
|} | |} |
Revision as of 03:09, 28 July 2020
IntroductionDedicated Server Kit has four main components:
How do these components interact between each other? It all starts with the Unity game client, which is your actual game. Upon starting the game, your player will register a new account with the system (if he does not have one yet) and log into it. Once logged in, he can create new games and join existing ones as well. Communication with the Go server happens via REST calls. The Go server is responsible for spawning new instances of the Unity game server as players create new games. The player's data is safely stored in a MySQL database (passwords are hashed using Argon2 encryption and clients do not have access to the database; only the Go server does). SetupIn order to play the Dedicated Server Kit demo, please follow these steps:
Go server's configuration fileThe Go server is the heart of the Dedicated Server Kit. You can easily configure it via the conf.json configuration file: { "ip_address": "127.0.0.1", "port": 8000, "db_connection_string": "root:@tcp(127.0.0.1:3306)/dsk", "game_server_bin_path": "INSERT_YOUR_GAME_SERVER_BINARY_ABSOLUTE_PATH_HERE", "game_server_port": 9000, "jwt_key": "my_secret_key" } This is the meaning of each field:
|