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.
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
What the folder holds
KroysDedicatedServer.exeand 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 askey=valuetext. The engine readsserver_name,game_name,map_nameandmax_players(shown in server lists); every key is available to the rules throughGameSession.GetSetting.StartServer.bat, which starts the server with the right options.
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.