Dedicated server
Moderator: Moderators
Dedicated server
I believe the community would benefit grealy from the existance of a Linux-compatible dedicated server, appropriate for running on headless machines, like your typical rented server. Reading game options from a config file would suffice for setup, but add support for authenticating as administrator and configuring via the lobby client and/or a more streamlined, integrated (hopefully guifical) version of something like springie's chat commands, and you've got a highly desirable utility. Dedicated servers are not subject to NAT issues, and tend to have little to no latency to most areas, thus making life much easier for those who experience issues playing with their friends, or anyone at all, relating to these factors. Windows support might be nice, but the vast majority of actual dedicated servers out there run Linux or something compatible, and there is no such thing as a headless windows box.
Re: Dedicated server
Was this ever done?
If so how do I get Autohost to load the headless Spring?
If not I think I could make the mod if someone that can commit it for me.
Thanks,
Travis
If so how do I get Autohost to load the headless Spring?
If not I think I could make the mod if someone that can commit it for me.
Thanks,
Travis
Re: Dedicated server
Was it ever done?
viewtopic.php?f=21&t=11696&p=250748#p250748
viewtopic.php?f=21&t=11696&p=250748#p250748
-
- Spring Developer
- Posts: 1254
- Joined: 24 Jun 2007, 08:34
Re: Dedicated server
Dedicated server is currently in development.
Re: Dedicated server
Do you want or need help with this feature?
-
- Spring Developer
- Posts: 1254
- Joined: 24 Jun 2007, 08:34
Re: Dedicated server
Help is always appreciated.
The development version is currently located in "trunk/tools/DedicatedServer".
To-do's:
- gamestart / gamestop handling
- parsing of the startscript
If you have an questions, don't hesitate to send me a PM.
The development version is currently located in "trunk/tools/DedicatedServer".
To-do's:
- gamestart / gamestop handling
- parsing of the startscript
If you have an questions, don't hesitate to send me a PM.
Re: Dedicated server
Wow. So, you are creating a real dedicated server.
I was thinking that I would just use AutoHost with Springie and just add and option to Spring.exe to ignore the graphics processing portion of the code. I.E. headless Spring, but not headless lobby client.
Well I am downloading the SVN now to take a look, and see about what you are up to versus what I was thinking.
Maybe both options are logical, but I don't know. What you want is better but takes a bunch more code. What do you think?
Reasoning:
Basically, I have an old system that does not do D3D because it has a bad on the motherboard graphics card. Also I don't really want waste processing on graphics.
I was thinking that I would just use AutoHost with Springie and just add and option to Spring.exe to ignore the graphics processing portion of the code. I.E. headless Spring, but not headless lobby client.
Well I am downloading the SVN now to take a look, and see about what you are up to versus what I was thinking.
Maybe both options are logical, but I don't know. What you want is better but takes a bunch more code. What do you think?
Reasoning:
Basically, I have an old system that does not do D3D because it has a bad on the motherboard graphics card. Also I don't really want waste processing on graphics.
Re: Dedicated server
Not that much more. The original design already had the server running in it's own thread. Also the entire game server is one file (plus some dependencies), which is much easier to oversee then 100k NCLOC C++ with random OpenGL commands spread throughout it.tberthel wrote:Maybe both options are logical, but I don't know. What you want is better but takes a bunch more code. What do you think?
The code that still needs to be written would have to be done too in case you turn entire Spring in a dedicated server.
And besides those advantages, a dedicated server of the type Auswaschbar is making now, takes close to 0 resources because it does not have to do the game simulation at all. It just needs to multicast the network traffic and perform some checks on it (and compute game speed etc.), and that's about it.
Re: Dedicated server
Concerning the AutoHost daemon for dedicated servers, we already have "Springie" for Windows. And I believe that Licho plans to bring Linux support to it in a future release. However, I don't know if Springie is/will be able to run in command-line mode, without graphic interface.
I'm currently making a command-line AutoHost in Perl for dedicated servers on Linux platform. If my autohost is ready before the Dedicated Server, then I would be glad to help coding the Dedicated Server. But as I'm really new to Spring code, I don't know if I could be of any help quick :/
P.S: Concerning the parsing of the startscript for dedicated servers, couldn't we "simply" reuse the CGameSetup class ?
P.P.S: Another thread is dealing with dedicated servers (viewtopic.php?f=12&t=12731). Maybe one of them could be closed with a reference to other one ?
I'm currently making a command-line AutoHost in Perl for dedicated servers on Linux platform. If my autohost is ready before the Dedicated Server, then I would be glad to help coding the Dedicated Server. But as I'm really new to Spring code, I don't know if I could be of any help quick :/
Wow that's good news, running Spring dedicated servers won't require very fast hardware then. I though that some server-side game simulation was needed anyway to check data sent by clients and detect desynchronizations for instance.Tobi wrote:And besides those advantages, a dedicated server of the type Auswaschbar is making now, takes close to 0 resources because it does not have to do the game simulation at all. It just needs to multicast the network traffic and perform some checks on it (and compute game speed etc.), and that's about it.
P.S: Concerning the parsing of the startscript for dedicated servers, couldn't we "simply" reuse the CGameSetup class ?
P.P.S: Another thread is dealing with dedicated servers (viewtopic.php?f=12&t=12731). Maybe one of them could be closed with a reference to other one ?
-
- Spring Developer
- Posts: 1254
- Joined: 24 Jun 2007, 08:34
Re: Dedicated server
CGameSetup depends on some stuff, which depends on other stuff which depends on graphic rendering etc.bibim wrote:P.S: Concerning the parsing of the startscript for dedicated servers, couldn't we "simply" reuse the CGameSetup class ?
Also I didn't think there is a need to rewrite it from scratch, it only needs some refactoring to work properly without other parts of the engine.
Re: Dedicated server
I started some AutoHost tests with the DedicatedServer, and I found that when we send chat messages to the DedicatedServer on the AutoHost interface, it produces endless "Got invalid player num 255 in chat msg" messages, and the chat message initially received by the DedicatedServer keeps beeing echoed back to the AutHost until the DedicatedServer is stopped.
I suppose it's normal because the Dedicated Server is under development, but I post this anyway, just in case I'm missing something...
I suppose it's normal because the Dedicated Server is under development, but I post this anyway, just in case I'm missing something...
-
- Spring Developer
- Posts: 1254
- Joined: 24 Jun 2007, 08:34
Re: Dedicated server
It's because it didn't got any testing until now, so feel free to post any further bugs here too.bibim wrote:I suppose it's normal because the Dedicated Server is under development, but I post this anyway, just in case I'm missing something...
-
- Spring Developer
- Posts: 1254
- Joined: 24 Jun 2007, 08:34
Re: Dedicated server
These bugs should be fixed now.
Re: Dedicated server
I did a full rebuild and I still have the same problems :/
Re: Dedicated server
I can set up an instance of my test program on the test lobby if you want, with a svn-update-and-rebuild on-demand feature so that you will be able to test your changes fast.
-
- Spring Developer
- Posts: 1254
- Joined: 24 Jun 2007, 08:34
Re: Dedicated server
I'm afraid I updated the server in spring directory and forgot to update dedicated server accordingly.
Did that now...
Thanks for your offer, but its not that useful because I neeed something to test before commiting. What would help is a small commandline tool to send / recieve messages from spring. If you have something like this it would be nice if would sent it to me.

Did that now...
Thanks for your offer, but its not that useful because I neeed something to test before commiting. What would help is a small commandline tool to send / recieve messages from spring. If you have something like this it would be nice if would sent it to me.
Re: Dedicated server
Ok now chat messages sent on the AutoHost interface are no longer echoed back to the AutoHost. However this wasn't really annoying as it can be easily filtered at AutoHost level (and I thought it was the normal behavior, so that AutoHost can check that his message has been received by the DedicatedServer). What was annoying was that the message was echoed back again and again until the server was stopped.
However, I still have the "Got invalid player num 255 in chat msg" message flooding my chat window at client side.
I've implemented the Spring AutoHost interface through a Perl module. So if you want I can do a small script that uses this module and send a test chat message every 5 seconds for example. Send me a pm for the way to send you this.
However, I still have the "Got invalid player num 255 in chat msg" message flooding my chat window at client side.
I've implemented the Spring AutoHost interface through a Perl module. So if you want I can do a small script that uses this module and send a test chat message every 5 seconds for example. Send me a pm for the way to send you this.
-
- Spring Developer
- Posts: 1254
- Joined: 24 Jun 2007, 08:34
Re: Dedicated server
Fixed "got invalid player num"
Re: Dedicated server
Indeed, but now the chat message sent on autohost interface keeps flooding the chat window.