Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Environment and hardware for multiplayer online game development.

  • You cannot reply to this topic
10 replies to this topic

#1 Spidyy   Members   -  Reputation: 180

Like
0Likes
Like

Posted 14 August 2014 - 06:17 PM

Hello there.

 

I'm about to learn how to do networking games, and I'd like to do it all the way through, from a simple "rock paper scissors online" to a kind of MMO game, with most of the basics needs of such game, like player database, server runned gameplay, chat server, logins and such.

 

For this, I want to set up a dedicated workspace made of my laptop and a separated dedicated server. I'm looking for a solution allowing me to minimize the number of manual file transfer I would have to do, and be able to test my stuff on the fly, with a minimum of operation to do to have the game server up and running, and the client ready to connect.

 

For this, I'm thinking to setup a small PC / mini-PC with linux on it, and have it run subversion to keep the server's source code, update and commit them from my windows PC and compile it directly on the server PC with g++. I would develop the client entirely on Windows using Visual Studio.

 

About the server PC itself, I'd like to have a home server for this, made only for game development and hosting. It would be able to run a game server process with a physics engine and such, have 4 process running at a time at minimum for the most complicated multiplayer setup and a database. My internet connection is just good enough to have 3 or 4 peoples connected at a time, but I don't really need more unless my game is interresting enough to go retail, in which case I would loan a good and big dedicated server.

 

A friend of mine said to avoid getting a home server, unless I have money to give, and get a server hosting from a datacenter.

 

What would you recommend me? What kind of setup do you usually have for multiplayer game development?


Edited by Spidyy, 14 August 2014 - 06:21 PM.


Sponsor:

#2 Ashaman73   Crossbones+   -  Reputation: 7793

Like
0Likes
Like

Posted 14 August 2014 - 11:44 PM

For a simple setup I would just use two PCs + two monitors, both running windows. The basic idea is to let your server and client run on both machines. The development PC should be able to debug the client and server code (therefor a mix of linux/windows isn't ideal at first...) and you want to run and watch two clients concurrently. Servers often don't need much CPU power when running with only a few clients, therefor you dont need dedicated server hardware at first, just let your server run as dedicated process on one of the PCs and start two clients on each PC.



#3 frob   Moderators   -  Reputation: 22218

Like
0Likes
Like

Posted 15 August 2014 - 12:52 AM

You can even do it on a single machine if you are careful. Connecting to a server on localhost is not a problem.  

 

There are four values involved in every Internet connection:  {Target IP} {Target Port} {Source IP} {Source port}. As long as the combination of the four is unique you're good to go. Normally you specify the target IP and the target port. The operating system gives you your source IP address, and it assigns an unused port number on your machine. Because that port value is automatically assigned to an unused value you can establish several tens of thousands of connections between any two IP addresses.

 

Ultimately you'll want to verify it in a real world environment, of course, but being able to run many instances on a single machine is VERY convenient. I cannot imagine the number of times I have had five debuggers running on a single machine, one attached to a server and the others attached to clients, all being debugged on the one machine.  I would hate to have a system that forced me to find a bunch of machines just to debug the networked app.


Check out my book, Game Development with Unity, aimed at beginners who want to build fun games fast.

Also check out my personal website at bryanwagstaff.com, where I write about assorted stuff.


#4 Felix Ungman   Members   -  Reputation: 1049

Like
0Likes
Like

Posted 15 August 2014 - 02:22 AM

If you have a good enough PC you could consider running a virtualised linux server with VirtualBox or VMware. During development it's really convenient to have your server running on your desktop in an environment that's very similar to the deployment environment, and you don't need any extra hardware.


openwar  - the real-time tactical war-game platform


#5 Spidyy   Members   -  Reputation: 180

Like
0Likes
Like

Posted 15 August 2014 - 11:33 AM

Well, my PC is not really good enough to have a VM on it. It is a modest laptop, it can run games on medium quality and still generate a good amount of heat. I'd really rather have an external server than a VM.

 

Speaking of VM, a friend of mine talked to me about hosted VM offered as services by some datacenters, in my case OVH from France. It is like having another PC running from the data center on which you connect like any other server, just you don't have to manage any hardware. But in the case of games, I wonder if they are sufficient.

 

Talking about hardware, would a mini-PC with passive cooling be good enough to run a game/compilation server? I'm looking for example at the Gygabyte Brix series, some mini-PC small enough to fit in your hand and are affordable. Do anyone have one of them and could give some feedbacks?


Edited by Spidyy, 15 August 2014 - 11:36 AM.


#6 hplus0603   Moderators   -  Reputation: 5513

Like
0Likes
Like

Posted 15 August 2014 - 12:35 PM

Source control is different from testing servers is different from development workflow.

I would recommend setting up a server for your source code control, for sure! You can do this with a "shell account" on any Linux server, because git works well with ssh. If you're developing on Windows, install Putty and load your SSH key using Pageant, and set the environment variable "GIT_SSH=plink.exe"

Separately, make it so that you can build from source with a single script -- typically a good makefile will do this. On Windows, you'll use a Visual Studio project. You may want to look at a tool like CMake to generate both makefiles and visual studio projects from the same source code.

Finally, development and testing. There are many ways you can do this. The simplest is to run the server and client in the same process, which works as long as you don't use global variables or singletons too much. If you can't do that, you can spawn the server executable from the client using a CreateProcess() call (or fork() on UNIX/Mac.) Using the same code base and IDE for client/server makes development the easiest.

However, if you plan on hosting on Linux at some point, then you need to make sure your code works on Linux at regular intervals, so back to the makefiles. You can either set up a separate Linux server, or you can use a virtual machine on your local machine. A VM that doesn't run a windowing system doesn't need a lot of RAM -- 512 MB might be enough. Check VirtualBox or VMWare Player for some options.
enum Bool { True, False, FileNotFound };

#7 frob   Moderators   -  Reputation: 22218

Like
0Likes
Like

Posted 15 August 2014 - 03:09 PM


Talking about hardware, would a mini-PC with passive cooling be good enough to run a game/compilation server? I'm looking for example at the Gygabyte Brix series, some mini-PC small enough to fit in your hand and are affordable. Do anyone have one of them and could give some feedbacks?

Game servers are not all created equally.

 

As hplus mentioned above, you can run a windowless virtual machine with very little resources. I've seen modest machines run 32+ virtual servers under Xen. As long as each virtual server is mostly idle it can handle the load just fine.

 

Most game servers require minimal resources. The vast majority of modern game resource use comes from graphics, audio, and other UI features. The server-supported simulations usually only require a few megabytes of memory and a tiny bit of space.

 

For one game we shipped our server needs were minimal, there was almost nothing managed on the server beyond the matchmaking, host migration, and a bit of periodic validation and other processing; that one server neatly handled a peak of about 60,000 logged in players.  Other games have enormous requirements as they do significant in-game processing, supporting several hundred players may be a strain on a powerhouse machine.

 

As an easily understood comparison, you can run a Minecraft server with 6-10 players in world on 256MB memory. While not officially supported, there are stories online about people firing up their old Win95 and Win98 boxes for minecraft servers. From the Minecraft wiki, a 300MHz P2 computer with 256MB memory, roughly a machine from 1996, can serve a 4-player world easily.  

 

Your game servers may have much less responsibility -- such as running a simple lobby and messenger -- or may have much more responsibility -- such as running the entire simulation -- than a minecraft server instance.


Check out my book, Game Development with Unity, aimed at beginners who want to build fun games fast.

Also check out my personal website at bryanwagstaff.com, where I write about assorted stuff.


#8 Spidyy   Members   -  Reputation: 180

Like
0Likes
Like

Posted 15 August 2014 - 03:22 PM

Well, I'll develop games from little to huge responsibility, so I might need a server able to handle good a good load of calculation, with few memory needs. So as I understand, until I'm making a game with thousands of players or gigabytes sized maps, any modern PC can handle them. My computer is not strong enough to have a virtual machine running, or not one with a GUI. I think I'll go for a cheap Gigabyte Brix with a 2 Go RAM and a small CPU.

 

I assume the same linux server can handle source control + compilation + test. The makefile solution, or even the CMake solution looks a good idea for me.

 

Well thanks a bunch for all those advices. :)



#9 hplus0603   Moderators   -  Reputation: 5513

Like
0Likes
Like

Posted 15 August 2014 - 06:21 PM

Yes, a 2 GB server with a small CPU can handle game server, and source control. You could even use a Raspberry Pi. It's all a question of how fast you want it to be.
I would recommend against trying to do "remote compilation" on the server. If you are trying to make the Linux build work, you should be logged into a Linux machine, and edit the source on a Linux machine. Running Vim or Emacs over a SSH client like Putty might work fine for this, if you're OK with a terminal environment.
The one thing I would recommend is that you don't need a ton of disk space for a game server and for source control (unless you're checking in gigabytes of large game assets into source control, like tons of meshes and textures and source Max/Maya files.)
Thus, you will likely find that performance is a lot better if you get a 64 GB SSD for about $50, rather than the equivalent-cost spinny disk, which might be bigger, but will be significantly slower for compilation.

Edited by hplus0603, 15 August 2014 - 06:24 PM.

enum Bool { True, False, FileNotFound };

#10 Spidyy   Members   -  Reputation: 180

Like
0Likes
Like

Posted 17 August 2014 - 08:02 AM

I'm aiming thiis :

 

Gigabyte Brix GB-BXi3-4010, a mini-PC with intel i3-4010 Dual core at 1.7Gz

2x Crucial 2Go SO-DIMM ram at 1600MHz CL 11 (offered with the Brix)

Samsung SSD 840 EVO 120Go

 

For a total of 370€. Seems a good plan for me.



#11 Gl2eenDl2agon   GDNet+   -  Reputation: 201

Like
0Likes
Like

Posted 27 September 2014 - 10:30 PM

You can just install debian or ubuntu or something on a VM on your windows laptop and then run codeblocks which will give you a visual studio like experience in linux using GCC to compile.

You can run a VM running ubuntu with a full blown GUI window manager like KDE or Gnome on even a 6 year old laptop with excellent performance.

Modern VM's run everything on the actual host CPU so its nearly as fast as just installing linux directly on the laptop itself.

Don't make the assumption that a VM won't run on your laptop without actually trying it.

Install virtualbox, turn up the RAM and graphics acceleration a bit and be pleasantly surprised.







PARTNERS