KROYSDOCS
HomeWhat's newv0.1.0
MANUAL / Ship your game / Server cook

Server cook

Cook a dedicated server for your game: the level as the server needs it, the rules file and a start script, in a folder you can copy to any Windows machine. No editor, GPU or display needed.

PanelNetwork, Server tab
Command line--cook-dedicated-server
OutputServer folder
01

Cook it

In the editor, open the Network panel, go to the Server tab, optionally type rule overrides (key=value pairs) and press Cook Dedicated Server.... From a script or build machine:

PowerShell
KroysEditor --project MyGame.kproject --cook-dedicated-server C:\Servers\MyGame
02

What the folder holds

  • KroysDedicatedServer.exe and what it needs.
  • Content: the startup scene cooked through the same pipeline as the game, with terrain, collision, skeletons, animations and the baked navmesh, but no textures, materials or audio.
  • The game's native game module, when the project names one, with its default rules.
  • GameRules.kserverrules: the session rules as key=value text. The engine reads server_name, game_name, map_name and max_players (shown in server lists); every key is available to the rules through GameSession.GetSetting.
  • StartServer.bat, which starts the server with the right options.
03

Run it

Copy the folder to the server machine and run StartServer.bat. Rules written as a C# game mode run from the game's script assembly: copy the published scripts next to the server and add --script-assembly and --game-mode to the start line (Dedicated server). Override a rule at launch with --rule key=value, for example --rule bots=8. Open UDP 7777 for players across the internet; the local network finds the server by itself.

See Dedicated server for every option and Game modes and bots for writing the rules.

KroysEngine 0.1.0 documentation, built from the engine repository by Tools/BuildDocsSite.py.