Not logged inOpenClonk Forum
Up Topic General / Help and Questions / Compiling and using the dedicated server
- - By IchUndNichtDu [de] Date 2015-09-22 14:20
I have been thinking about hosting a dedicated server for Open Clonk, similar to various that were present for Clonk Rage.
My motivation is, that whenever I like to play Open Clonk online, I go to the list of open games and see that there are no open games. I could host one myself, but then I would have to wait for people  and so on...
I think a dedicated server *might* improve the situation, as there would be always a round to join (except there is currently a round in progress).

What I would like to know is:
- Are there people, who would be happy to see this?
- Is there any documentation about how to compile and run the dedicated server? (I found some hints that there is a dedicated server, but no concrete infos)
Reply
Parent - - By Zapper [de] Date 2015-09-22 17:56
It's now years ago that I set up a dedicated server myself, but I think there have not been many changes from CR.

Back then, the dedicated server was just a normal game engine that was told to host a lobby and auto-start after some time. And then you had a script around that, which re-started the clonk engine once the round was over.
I think that should work pretty much in the same way today. What system do you use? I believe the compilation is the same as for the normal game just with the flag USE_CONSOLE set in CMAKE.

Also note that JCaesar fixed some compilation errors with the dedicated server some minutes ago. So if you want a server for the last release, you would probably have to use git to go to the release revision and then cherry-pick JCaesars commit.
Parent - - By IchUndNichtDu [de] Date 2015-09-22 18:13
I actually tried that, but the failing build threw me off, so I thought I was just trying the wrong thing.
I will compile it with the fix applied and try if I can work it out from there. If not I will come back here.
Thanks for your help!
Reply
Parent - - By IchUndNichtDu [de] Date 2015-09-23 15:43
Cherry-picking didn't went very well. I instead tried to compile at the commit, where the compilation was fixed and it worked fine.
The engine console isn't quite as intuitive as I hoped and I can't find any documentation about it. How does it work or where can I find documentation about it?
Reply
Parent - - By Maikel Date 2015-09-23 15:52
Here, or do you mean something else?
Parent - By IchUndNichtDu [de] Date 2015-09-23 16:06 Edited 2015-09-23 16:24
It seemed like the engine takes some input interactively. It didn't show a prompt, but seemed to react to some input I made, after I started the engine.
Your link is also very helpful.
Reply
Parent - - By IchUndNichtDu [de] Date 2015-09-23 16:26
Is there a way to specify a scenario to start, tha is packed inside a .ocd?
Reply
Parent - - By Maikel Date 2015-09-23 16:29
to start ./openclonk --network --anything Arena.ocf/RockBottom.ocs (this is for linux, so slashes and ./ may differ).

To find a (random) scenario in a pack, I am not sure.
Parent - By Caesar [de] Date 2015-09-23 18:16
You probably also want --lobby=300 or something, in case you want the dedicated server to start automatically in 5 minutes. (I wonder if --fullscreen is also still required.)

Documentation of all that: http://docs.openclonk.org/en/sdk/cmdline.html (Seems to be up-to-date on the first glance.)
Parent - - By Zapper [de] Date 2015-09-23 16:33
.ocf you mean? I think you can specify a path like Worlds.ocf/GoldRush.ocs
Parent - By IchUndNichtDu [de] Date 2015-09-23 16:37
Yes, I actually meant .ocf. Sorry...
That works. Thanks! (To you too, Maikel!)
Reply
Parent - By Caesar [de] Date 2015-09-23 18:30
I still have that old code that would control the CR (I patched it around at some point to allow OC), but its in pretty bad shape (and its only real functions were allowing to queue scenarios and disallowing player joins at runtime). I can give that to you if you want.
However, I'd suggest some engine changes to allow for easier to implement control.
Talk to me (on IRC or here) about what exactly you imagine your dedi to do, and I'll see where my ideas would get.
Up Topic General / Help and Questions / Compiling and using the dedicated server

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill