Buh-bye Windows, hello Linux!

Published November 06, 2018
Advertisement

I've been looking into server hosting for the game server, and since Windows Server does cost a bit to lease and also fires up a bunch of services that I don't need at all I've been looking into Linux.
The server is written in C# and previously Mono was the only realistic alternative for Linux - but it had a reputation for very bad performance in many cases.
.Net Core 1.x was way too restricted feature-wise, but with .Net core 2.x the tables have turned.
So last day I embarked on a mission to port my entire codebase - except for some Windows Forms test projects - into .Net Standard, and created a .Net Core console project to start the service.
This turned out to be totally painless. I wasn't using any functionality that wasn't part of .Net Standard 2.x so it simply just worked.

The next step was to run this on Linux. I have very little experience with Linux but Google works well for most things so I set up a Centos 7 VM in Hyper-V and went to work. The installation did take a few tries and I had to battle a few permission problems when following a guide on installing .Net Core on Centos but they weren't a big hurdle.
Of course when I managed to start the program it crashes immediately, and I found some issues with path names - backslashes and case-sensitivity - when loading game data. These were also fixed pretty easily and soon the server was running.
I couldn't connect to it though from the host system, but this was a simple matter of opening a port in the firewall.

So far I'm already becoming a Linux fan at least when it comes to servers. Running a box without any graphical user interface is in some ways easier.
Everything is a file and everything you can do can be done with a command.
On Windows most things you do when managing a server consist of a complex series of clicking this and that button or file icon, filling out textfields etc. etc. and is hard to document (I'm sure you can also do most things with CMD and Powershell of course)
On Linux it might take some time to research how to do even the simplest thing for a newbie such as myself, but every command needed can simply be stored in a text-file, so that I can easily set up a new server from scratch.
And this file can easily be updated - and reviewed by a Linux expert for troubleshooting.

1 likes 0 comments

Comments

Aceticon

In my pre-Indie Game Maker career I worked in Investment Banking IT designing and developing mission critical high-performance systems and we used almost entirely Linux.

Linux machines are cheaper, more reliable and waste fewer resources as you can run them without a GUI. Even when you have insane uptime requirements one can cluster them and/or setup load-balancing and fallback system designs with enough machines to achieve the reliability of all but the most specialized systems, at a fraction of the price.

We had them doing everything from hosting clustered load-balanced in-memory caching systems, message queuing infrastructures and databases to being the building blocks of thousands-sized distributed computing clusters for calculating the value of non-market traded financial assets.

Even before that when I was doing other server-side work (such as the server-side of web apps) we overwhelmingly used Linux as it delivers more bang for the buck and for the same hardware is more reliable than Windows.

I have more than a decade of server-side and networked systems design and development expertise and have worked with other OSes on the server side (not just MacOS and WIndows but also more obscure and old OSes) and I can't see myself using anything other than Unix for the server side of things, and unless there are some special requirements for insanelly reliable hardward that comes with its own Unix, that would be Linux.

So applause for doing this transition and keep on with it as it's well worth it.

November 06, 2018 04:42 PM
lawnjelly

Do try out linux desktop too. I eventually gave up the whole microsoft ecosystem last year after trying out linux mint, and was so impressed I reformatted all my hard disks to ext, ported all my work, and almost a year and a half later I couldn't be happier. :)

November 06, 2018 07:56 PM
Polydone

Thanks. When I get around to buying a new computer I'll definitely be looking into creating a dual-boot setup, because I want to release my game for Linux too - might as well since I'm using Unity for the client.

I'm not quite able to switch to Linux as a main desktop because of Visual Studio and games. Pretty much everything else on Windows is non-essential for me, although I'm not 100% sure how well the Unity editor runs on Linux.

November 07, 2018 08:54 AM
Gooey

I have dual boot for exactally that reason @Polydone games not so much VS

November 10, 2018 05:50 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement