Advertisement

Linux/FreeBSD as a scalable multiplayer server

Started by July 28, 2010 10:51 AM
7 comments, last by rogerdv 14 years, 1 month ago
Hi all,

How many people here are using linux or *BSD as their server for multiplayer functions of their game?

For me there was no contest, as i already have tens of thousands of lines of C++ for Linux and BSD systems invested in an open source project which is much more scalable and stable than anything i could produce for windows so i simply adjusted this to do my bidding saving myself months, possibly years of development considering the featureset. It seems that a lot of people just code their server-side daemons on windows because 'well, this is what i know'.

What are your own thoughts on this?
What kind of game? Are we talking about an MMO-type game, or something where players are expected to host servers for themselves? Regardless, while I would prefer to run such a server on Linux, I can see many benefits in developing or porting the server to run on Windows as well:

- Simplifies development. You can use the same tools (Visual Studio) for both the server and the clients.

- Your developers need not all be familiar with Linux to work on the server side.

- Allows players to easily run their own servers on their regular gaming machines. This can mostly be ignored if we're discussing MMO-type games.

Of course, there are drawbacks as well. Supporting two platforms is always more difficult than supporting one. That said, what I like to do is provide a minimum feature set on Windows -- just enough to allow me to test the game on a Windows system. The full feature set is available only in builds for the production OS, which in my case is Ubuntu Server.
Advertisement
These are all good points, for me my code is for a multiplayer roleplayer which when finished will operate on a subscription model with micropayments. So, if it wasnt for the fact that i do not expect a massive amount of players, you could call it an MMO. As it stands, i guess the correct term might be MORPG, without the extra M? ;-)

Being the only software developer right now i did not consider that it would make life difficult for any other developers, i dont know if this might bite me in the ass later :-)
Quote: Original post by braindigitalis
Being the only software developer right now i did not consider that it would make life difficult for any other developers, i dont know if this might bite me in the ass later :-)


It's impossible to say, because neither of us know who you will hire next. Maybe it's Bob, the lifetime Windows user who has never typed a single command into a UNIX shell. Maybe it's Tommy, the commandline wizard who installs Linux on his toaster. What we do know, however, is this:

1. MMO client development is usually focused on Windows, and therefore developed on that platform.
2. Client developers will often need access to the server in order to analyze problems and apply minor fixes.
3. Additionally, it really helps if each developer is able to run her own private instance of the server. Not only is this sometimes useful (running private tests which must not be interfered with) but also sometimes necessary (testing a different branch of code).
4. Linux, and BSD in particular, are not by far as widely understood as Windows. As such it might, for a new developer with no background in UNIX, be a very frustrating experience which results in loss of his time, that of his colleagues, and ultimately your money.

From personal experience, I can tell you that being able to run the server on your Windows development machine really helps. Likewise, not being able to do so can lead to some very frustrating situations. I recently worked with the BigWorld technology suite, and because the server only runs under Linux I had to constantly commit untested Python code to our version control system just to get it running on the server. Then I had to manually log in to the server through SSH and run a shell script to update the server's local copy of the SVN repository and reboot the server. With that done, since the code was untested and therefore inevitably full of bugs, I had to log on to a web management interface to read the log output and locate the error. A single syntax error could take me minutes to fully fix.

EDIT: BigWorld suggest a different, more productive workflow which we for various reasons couldn't use. I'm not trying to bash the BW Tech suite, as it is an excellent engine for MMO development -- I used this an example only to make my point.
It sounds like it was definitely the right choice for you since it saved a great deal of time. Obviously you don't have to worry about hiring a developer to work on the server side code that doesn't know his way around Linux, because why would you hire such a person in the first place? I'm sure there are plenty Windows developers who aren't completely lost if you take away their Visual Studio, and it'll ease the transition if you use an IDE for your server code.

Out of curiosity, does your client run on Linux as well?
hi lmelior,

Nope the client is windows, C# to be exact, i could have gone for linux all the way, but for various reasons i decided not to, some of these being;

1) The majority of gamers are windows users
2) The majority of Linux users expect things to be free, so may be unwilling to pay subscription for an online game
3) Linux users would most likely expect the source of the client to be freely available under GPL, while this is good for code security and finding bugs on one hand, it may be bad for the game on the other hand as it would make production of bots and other automatons and griefing very very easy, which lowers the fun factor of the game for its players and makes them leave.
4) Even though Linux has good, stable high performance graphics and sound drivers now, it is simply not as supported as a gaming platform.

I would be interested to see if anyone has any other points and wether or not you disagree with this?
Advertisement
Quote: Original post by Windryder
From personal experience, I can tell you that being able to run the server on your Windows development machine really helps. Likewise, not being able to do so can lead to some very frustrating situations. I recently worked with the BigWorld technology suite, and because the server only runs under Linux I had to constantly commit untested Python code to our version control system just to get it running on the server. Then I had to manually log in to the server through SSH and run a shell script to update the server's local copy of the SVN repository and reboot the server. With that done, since the code was untested and therefore inevitably full of bugs, I had to log on to a web management interface to read the log output and locate the error. A single syntax error could take me minutes to fully fix.

EDIT: BigWorld suggest a different, more productive workflow which we for various reasons couldn't use. I'm not trying to bash the BW Tech suite, as it is an excellent engine for MMO development -- I used this an example only to make my point.


Why didn't you use a Linux VM?

http://www.mildspring.com - developing android games

Quote: Original post by braindigitalis
Nope the client is windows, C# to be exact, i could have gone for linux all the way, but for various reasons i decided not to, some of these being;

1) The majority of gamers are windows users
2) The majority of Linux users expect things to be free, so may be unwilling to pay subscription for an online game
3) Linux users would most likely expect the source of the client to be freely available under GPL, while this is good for code security and finding bugs on one hand, it may be bad for the game on the other hand as it would make production of bots and other automatons and griefing very very easy, which lowers the fun factor of the game for its players and makes them leave.
4) Even though Linux has good, stable high performance graphics and sound drivers now, it is simply not as supported as a gaming platform.

I would be interested to see if anyone has any other points and wether or not you disagree with this?
I don't know if that last is referring to these points or your OP, but I'll pretend it's the former:

1) True, though a larger percentage of gamers can be reached with a cross-platform client
2) This is a common misconception, most famously contradicted by the World of Goo birthday sale and the Humble Indie Bundle. Linux users paid about 75% more than both Windows users in both cases. Linux users made up 17% of World of Goo sales and 25% of Humble Indie Bundle sales. Not huge numbers, certainly, but nothing to sneeze at either.
3) The number of Linux users who demand a completely free system is actually pretty small. Most people happily run binary blob drivers. Also I believe most people avoid compiling their own software, even if they don't have a problem opening up a terminal.
4) Unfortunately I actually wouldn't even go so far as say the graphics drivers are good and stable currently. The last part is true. Luckily, Linux gamers tend to be less afraid of troubleshooting graphics issues, and tend to be careful about buying better supported hardware.

This is not to say I think you made a mistake - I'm sure you save significant development time developing for a single platform, and it may not be worth attempting to port it at this point. Personally I'm a Linux gamer who buys games, though I admit I won't buy games with monthly fees.

As for your OP, I think Windryder covered the minor, mostly comfort-related issues with having a Linux server for a Windows game (though I would argue that free OSes are better understood than Windows by virtue of being open, albeit by fewer people). I was under the impression this was actually pretty common.
I would advise keeping your server crossplatform. Even when I do most of my development under Linux, I tend to make everything cross-platform, even my attempt to make a mmo server was tested on both linux and windows.

This topic is closed to new replies.

Advertisement