Dedicated server

Dedicated server

Requests for features in the spring code.

Moderator: Moderators

Ralith
Posts: 22
Joined: 06 Aug 2007, 04:43

Dedicated server

Post by Ralith »

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.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

I think all devs agree, but if it was simple, it would have been done 8) One guy is working on foundations needed to do that, so there's hope.
tberthel
Posts: 59
Joined: 12 Jan 2008, 06:17

Re: Dedicated server

Post by tberthel »

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
tberthel
Posts: 59
Joined: 12 Jan 2008, 06:17

Re: Dedicated server

Post by tberthel »

Was it ever done?

viewtopic.php?f=21&t=11696&p=250748#p250748
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Dedicated server

Post by Auswaschbar »

Dedicated server is currently in development.
tberthel
Posts: 59
Joined: 12 Jan 2008, 06:17

Re: Dedicated server

Post by tberthel »

Do you want or need help with this feature?
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Dedicated server

Post by Auswaschbar »

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.
tberthel
Posts: 59
Joined: 12 Jan 2008, 06:17

Re: Dedicated server

Post by tberthel »

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.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Dedicated server

Post by Tobi »

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?
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.

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.
User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Re: Dedicated server

Post by bibim »

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 :/
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.
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.

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 ?
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Dedicated server

Post by Auswaschbar »

bibim wrote:P.S: Concerning the parsing of the startscript for dedicated servers, couldn't we "simply" reuse the CGameSetup class ?
CGameSetup depends on some stuff, which depends on other stuff which depends on graphic rendering etc.
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.
User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Re: Dedicated server

Post by bibim »

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...
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Dedicated server

Post by Auswaschbar »

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...
It's because it didn't got any testing until now, so feel free to post any further bugs here too.
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Dedicated server

Post by Auswaschbar »

These bugs should be fixed now.
User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Re: Dedicated server

Post by bibim »

I did a full rebuild and I still have the same problems :/
User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Re: Dedicated server

Post by bibim »

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.
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Dedicated server

Post by Auswaschbar »

I'm afraid I updated the server in spring directory and forgot to update dedicated server accordingly. :oops:
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.
User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Re: Dedicated server

Post by bibim »

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.
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: Dedicated server

Post by Auswaschbar »

Fixed "got invalid player num"
User avatar
bibim
Lobby Developer
Posts: 959
Joined: 06 Dec 2007, 11:12

Re: Dedicated server

Post by bibim »

Indeed, but now the chat message sent on autohost interface keeps flooding the chat window.
Post Reply

Return to “Feature Requests”