Jump to content
Sign in to follow this  
bastian

Running a Dedicated Server.

Recommended Posts

So I'm doing software design & development classes at school. Mainly to learn how to make games from the physical standpoint (paperwork and planning sort of stuff) and it's kind of inevitable that I'm going to be making games in the future. I have a heap of questions but mainly for today I was wondering if anyone out there knew what it took to run and integrate a game into a dedicated server. It came up in class when I was talking to my teacher about online games and he mentioned that I would need a dedicated server for that sort of thing.

 

I'm talking like WoW servers but on a much smaller scale. So instead of hundreds of servers each with 4000 player cap I'm thinking more along the lines of just one server with maybe 1000-2000 if the game gets popular most likely split into smaller 200 pop cap servers. Is this sort of thing achievable on rented servers or would I need to build my own? If I did have to build my own what would I need and how would I do it? Which would be better? Renting or "Home Grown"? There are also things like loggins to account for. I've thought about localization as well but I kind of just want to know what it takes to run one server before I start talking about multiple servers all over the place.

 

If it depend on what sort of game I'm talking about. How big of a server would you need to play Diablo with 300 of your friends?

 

Also a lot of the google result I've fallen upon have been for storage or web servers, or running servers for specific games like TF2. I re-read that article on setting up a home server from an old Atomic issue as well. These aren't really the things I'm looking for, are they? I thought I'd need something much bigger?

 

Posted Image

Share this post


Link to post
Share on other sites

To run dedicated game servers you need the dedicated game server software and this is often only available to registered partners. For some games, WoW is one, it ain't going to happen at all as Blizzard will not allow anyone else to run a WoW server and of course have not released their server code.

For other games the closest they get to having a dedicated server is their inbuilt peer to peer gaming, Call of Duty co-op gaming uses this as does Company of Heroes multiplayer. This is also the norm for console games apparently.

 

Server size again depends totally on the game and how many games you are going to try to hot on the one piece of hardware. Game hosting companies who host game servers generally do each game in a different virtual machine all on the same hardware.

For home/office dedicated servers a bigger issues is bandwidth on the network. If going to an internet accessible game you are going to need bandwidth dedicated to the game and with a lot of games the connection u speed will need to be at least 5Mbps. IE way more than ADSL can provide.

 

A quick way to see what games can run dedicated servers is to look at Games.on.net, Game Arena, Gameservers, Hypernia etc to see what games they are hosting.

EG

http://www.gameservers.com/game_servers/

Then a quick google should tell you the hardware and bandwidth required to run that game.

Share this post


Link to post
Share on other sites

When it comes to building your own server and hosting it from a data center, you have to pay 'co-location'. This is usually charged based on the size of your case measured in RU, and how much bandwidth you want per month. If you want daily backups, or specialised remote tech support from staff this costs extra too. I'd probably just rent servers myself, unless it became a large scale business operation.

 

Dedicated servers help take the processing load off individual players's computers, reduce ping and provide adequate bandwidth for players.

 

I can't imagine the network processing overhead would be too large, or very bandwidth intensive for an RPG like Diablo. Ping doesn't matter in RPG games much, that's more first person shooters where response times etc. are critical.

Share this post


Link to post
Share on other sites

If you're question is about designing games where a server component is needed...

 

From an architectural point of view your game software would simply expose "services" such as web services of whatever your flavour is, or down to raw sockets. It's easier to scale if you use a particular distributed framework. A game is just another app, and the implementation isn't particularly different from services supplied to applications over the internet.

 

Once your service is built you either host it on a VPS (eg like what Mammoth Networks provides - Disclaimer: I'm a lead developer at Mammoth Media - the parent company of Mammoth Networks and when we develop software for hosted instances we provide that on Mammoth Networks as part of the overall solution - unless a cloud based solution is specifically asked for) or in the cloud (eg Azure). For what you want, hosting in the cloud is a better alternative in my opinion, because it is much easier to scale as well as to get geographically appropriate service instances.

 

FWIW We created GameCreate and do all the work for Telstra's GameArena, as well as we're Ausgamers, and the original QGL guys. It's accurate to say that gaming and hosting games is in our DNA :)

 

Happy to answer any Q's you've got :)

Edited by kikz

Share this post


Link to post
Share on other sites

to give insite into why WoW keeps it's code close to it's chest. Blizz set up Battle groups some expantions ago, so that when you do a dungeon, the group can be drawn from multiple realms, reducing wait times. this is now done for any temporary group, Raid, Dungeon and PvP areas.

to step it up, they also also seem to leverage their world phasing not just for load times at quest hubs (towns) as you travel but also for cross realm populations. they can boost normal world zone populations by allowing cross realm interation. just incase you need help with a tough mob.

 

sometimes it's more like you sign in to a realm but really it's just for appearances. once outside of cities they phase servers together to help the player experience.

 

I know not really for your moderate player groups but does show that virtual MMO worlds can get fancy.

Share this post


Link to post
Share on other sites

I don't really understand the question, there is no way you can just set up a server and play diablo with 300 friends, unless someone has written the software to do it.

Are you going to be designing your own game/server, or just looking to set up a hacked WoW server?

 

I used to run a Ragnarok Online server and it wasn't too resource intensive. I think at most had about 40 users. I also worked with a dutch guy on his RO server too and we shared scripts for NPCs etc. to enhance content, his server had about 2k users and I played there a lot too. I also setup a WoW server for a while too, but that was only so my friends and I could play with no lag, this needed a little more grunt but was not overly demanding. The software is easily available (not officially - others have written it) and there are loads of guides on setting something like this up.

 

I got the idea that you are going to be making your own game though, and were just using WoW/diablo as examples, in this case my suggestion would be that you should test your game as you develop it, as I assume you'll also be looking to develop the dedicated server software. You will then gauge how much resources it's consuming on a test machine/your machine and will then be able to rent appropriate hardware in a DC which will provide adequate bandwidth. There is no need to go out and get a server before you even have working code. Baby steps.

 

Hopefully I didn't just miss the point completely.

Edited by p0is0n

Share this post


Link to post
Share on other sites

How big of a server would you need to play Diablo with 300 of your friends?

Dunno. I don't even have 30 friends :p

Share this post


Link to post
Share on other sites

I don't really understand the question, there is no way you can just set up a server and play diablo with 300 friends, unless someone has written the software to do it.

Are you going to be designing your own game/server, or just looking to set up a hacked WoW server?

 

I used to run a Ragnarok Online server and it wasn't too resource intensive. I think at most had about 40 users. I also worked with a dutch guy on his RO server too and we shared scripts for NPCs etc. to enhance content, his server had about 2k users and I played there a lot too. I also setup a WoW server for a while too, but that was only so my friends and I could play with no lag, this needed a little more grunt but was not overly demanding. The software is easily available (not officially - others have written it) and there are loads of guides on setting something like this up.

 

I got the idea that you are going to be making your own game though, and were just using WoW/diablo as examples, in this case my suggestion would be that you should test your game as you develop it, as I assume you'll also be looking to develop the dedicated server software. You will then gauge how much resources it's consuming on a test machine/your machine and will then be able to rent appropriate hardware in a DC which will provide adequate bandwidth. There is no need to go out and get a server before you even have working code. Baby steps.

 

Hopefully I didn't just miss the point completely.

You hit the nail on the head, I blew right past the baby steps! Thanks for tugging on my collar. :) And yeah WoW and Diablo were just examples.

 

Dunno. I don't even have 30 friends :p

Hehe I don't have 300 friends either!

 

To clarify a little more, yes I am planning on making my own game and wanted to make it an MMOaRPG which is why I'm asking about the dedicated servers. Thanks for the help and info! Keep it coming if more comes to mind.

 

"From an architectural point of view your game software would simply expose "services" such as web services of whatever your flavour is, or down to raw sockets." Could you elaborate on this kikz? I don't quite understand what you mean.

Share this post


Link to post
Share on other sites

bastian, any multiplayer game requires a component whose job is at least to manage the "world state". Think of WoW. You have a client that you install on your PC and you have a server that handles co-ordinating displaying all the other players in the game on your screen. Behind the scenes your client is sending a message to the server saying something like "here is my current movement vector", which might be "I'm moving north east at 3.5 m/s With that vector the server can calculate your position. Each time you change direction or speed the vector is updated and sent to the server. The server collects all hte player vectors and sends them to your computer, so you can see players move around. Likely it'll be more optimised than that, only sending you the information you can see on your screen, rather than sending you all the players in your world. The server also needs a service to coordinate mail. A service for the auction house. A service for this and service for that. All these services operate together to provide all the functionality needed for your game. Services don't all need to sit on the same server box. That's how you scale out. As your game grows in numbers and the server has to do more work, you move servers around to their own hardware, and you can run load balancers in front of the server to distribute the load to your server/service instances, much as is done with web sites.

 

At a lower level sits how you communicate with the server. That is, how are the messages sent from your client to the server and vice-a-versa

 

With web services, or soap, or json, or whatever formatter your sending messages at a highever level. Likely you'll want to use UDP to communicate and send tiny binary packets to the server.

 

I'm going to guess most of this has just gone over your head, so I'll stop now, and wait for you to ask questions :)

 

From a hosting point of view, once your game is at a stage where multiple players can connect you can start off small and rent a $9.99/month linux box. As you need more processing power you can keep upgrading teh box, adding memory and cpu's (remember this is a virtual private server and adding these things is trivial). once that isn't enough you can keep adding machines. Or you could just whack it in the cloud and the cloud will start up more instances for you as it detects you need them.

Edited by kikz

Share this post


Link to post
Share on other sites

Okay cool, Thanks for explaining that for me that made perfect sense. The web services you started to mention like soap and jason are they software or coding languages that are used to communicate with the server or something completely different? And would there be any downsides to making the server cloud based straight off the bat?

Share this post


Link to post
Share on other sites

Disadvantages with cloud based straight off the bat. No. You'll pay a tiny price. I think you can pretty much get free azure time while you're in Dev. If you meet certain conditions.

 

Yeah. JSON (JavaScript Object Notation) is a text method of formatting data to be sent across the wire. You wouldn't use it for a games. More verbose than it needs to be, even with compression (And text compression is good).

 

Web Service is just a highlevel concept for server side processing. You communicate with your web service using data in JSON or XML, or whatever other formatted/serializer you dream up (eg Binary). A Web Service can be implemented in many different languages.

Share this post


Link to post
Share on other sites

One thing to be aware about with an MMORPG is that once you get above the limits of a single server the complexity of the architecture goes up really quick. Maintaining your world state on a single server isn't that hard, maintaining it across several is, especially when you need to keep latency down. I would suggest starting with the simple single machine case first and understand the core game issues before attempting something beyond that.

 

As kikz mentioned UDP is usually what is used for transmitting game events. UDP is a very light weight protocol verses TCP and a little more predictable from a latency perspective (lose a few TCP packets and latency will spike as retries kick in). But there are a couple of things to be aware of, the order that packets are received is not guaranteed and there is no retry or acknowledgement of packets. There are of course ways of handling these drawbacks.

 

Sounds like you have some fun times ahead though. Good luck!

Share this post


Link to post
Share on other sites

One thing to be aware about with an MMORPG is that once you get above the limits of a single server the complexity of the architecture goes up really quick. Maintaining your world state on a single server isn't that hard, maintaining it across several is

Isnt that the whole purpose of things like wow having 'loading' screens? Entering an instance dungeon isnt so much about loading the dungeon, as it is about popping you onto the server in charge of that area?

 

To run dedicated game servers you need the dedicated game server software and this is often only available to registered partners. For some games, WoW is one, it ain't going to happen at all as Blizzard will not allow anyone else to run a WoW server and of course have not released their server code.

This has me honestly curious; How are there so many hundreds of Private Servers with hacked leveling rates etc then? Did someone remake WOW dediserver from scratch?!?

Share this post


Link to post
Share on other sites

One thing to be aware about with an MMORPG is that once you get above the limits of a single server the complexity of the architecture goes up really quick. Maintaining your world state on a single server isn't that hard, maintaining it across several is

Isnt that the whole purpose of things like wow having 'loading' screens? Entering an instance dungeon isnt so much about loading the dungeon, as it is about popping you onto the server in charge of that area?

 

Not at all. Loading screens are there to reduce the perception of time. Sledgy is talking about the problem of synchronising game world across multiple (load balanced servers). It's not a front end problem. It's a developer problem. When an update is sent to a server behind a load balancer it is sent to one server. Different clients may be tied to different servers and for the updates to get accurately sent, the server side representation of the world must be consistent across all server side servers. There are a number of ways to do this, but the point being, from developers point of view the complexity of multiple servers (anything more than 1) is exponentially larger than a single server scenario.

Share this post


Link to post
Share on other sites

To run dedicated game servers you need the dedicated game server software and this is often only available to registered partners. For some games, WoW is one, it ain't going to happen at all as Blizzard will not allow anyone else to run a WoW server and of course have not released their server code.

This has me honestly curious; How are there so many hundreds of Private Servers with hacked leveling rates etc then? Did someone remake WOW dediserver from scratch?!?

 

They will hack/crack/steal/reverse engineer/other as much of the code as they can, and fill in any blanks with their own code, in order to get it running.

This is my understanding anyway, you can think of the private servers as 'emulators'.

Share this post


Link to post
Share on other sites

Okay, awesome, you guys are really helpful! I appreciate it.

One thing to be aware about with an MMORPG is that once you get above the limits of a single server the complexity of the architecture goes up really quick. Maintaining your world state on a single server isn't that hard, maintaining it across several is, especially when you need to keep latency down. I would suggest starting with the simple single machine case first and understand the core game issues before attempting something beyond that.

 

As kikz mentioned UDP is usually what is used for transmitting game events. UDP is a very light weight protocol verses TCP and a little more predictable from a latency perspective (lose a few TCP packets and latency will spike as retries kick in). But there are a couple of things to be aware of, the order that packets are received is not guaranteed and there is no retry or acknowledgement of packets. There are of course ways of handling these drawbacks.

With multiple servers becoming more tedious to deal with as you get more, is that because I would have multiple servers running the same world instance? To solve this couldn't I just make each new server run its own 'shard' and then just update them all at the same time?

 

I'm not sure if I just missed it earlier but I don't actually know what UDP and TCP are?

 

Also I really appreciate all the help you guys are giving me and I hope you guys can still help me understand how to do this more as well, but a lot of what you guys are saying I've never heard before. Is there somewhere on the internet you guys can take me where I can read up on servers in more layman's terms and that way I don't have to ask you guys what everything means but rather I'll be able to get more experience based information from you guys instead of, you know "what's a UDP?" (herp!)

 

Sounds like you have some fun times ahead though. Good luck!

I'm looking forward to it actually!

Share this post


Link to post
Share on other sites

With multiple servers becoming more tedious to deal with as you get more, is that because I would have multiple servers running the same world instance? To solve this couldn't I just make each new server run its own 'shard' and then just update them all at the same time?

That was kind of what I was getting at, go for the single server option first, while this approach will work for a while eventually (especially in very large instances with many clients) the load will grow beyond what a single server to manage and needs to be spread across multiple servers. Remember that a server managing WOW (or any MMORPG) has to maintain the state of all players, NPC's and any other dynamic elements, calculate any interactions that these elements may have, in addition to handling connections to clients, messaging etc. Compared to your average FPS this is a significant amount of data, just the maps alone would consume a large chunk of memory.

 

In practice this load would be spread across many servers. From an architecture point of view there will be many servers each with specific tasks, with some form of data fabric used to hold a consistent view of the world state. In addition to a persistent data store to hold player data, statistics etc.

 

I'm not sure if I just missed it earlier but I don't actually know what UDP and TCP are?

This is a great introduction to network programming, while all code is presented in C the functions and methods are usually fairly consistent across all languages.

 

http://beej.us/guide/bgnet/output/html/multipage/index.html

 

I'll leave you with that and not scare you too much with the next area, threading and concurrency. ;)

Share this post


Link to post
Share on other sites

To run dedicated game servers you need the dedicated game server software and this is often only available to registered partners. For some games, WoW is one, it ain't going to happen at all as Blizzard will not allow anyone else to run a WoW server and of course have not released their server code.

This has me honestly curious; How are there so many hundreds of Private Servers with hacked leveling rates etc then? Did someone remake WOW dediserver from scratch?!?

 

They will hack/crack/steal/reverse engineer/other as much of the code as they can, and fill in any blanks with their own code, in order to get it running.

This is my understanding anyway, you can think of the private servers as 'emulators'.

 

 

Proves how smart gamers are to code that then eh? Have you seen a dediserver set-up for wow? Its pretty full featured!

And as someone who played on them ages ago, before i quit wow in 2009 or so; they played like 1:1 clones.

 

Colour me impressed :)

Share this post


Link to post
Share on other sites

Pretty sure developers made it, not gamers :p (given that by definition developers develop software). I reckon a large proportion of developers could do it, but how many "gamers" do you think could do it? A very tiny proportion. Developers FTW :p

 

It's probably not that difficult to reverse engineer, providing the packets between the client and the server aren't encrypted (And they're probably not, at least for performance reasons). All you need is a proxy in the middle then perform any action and watch what the client sends out and the server sends back. Spoken by a Gamer who has reverse engeineered data packets pumped out by a game ;)

Edited by kikz

Share this post


Link to post
Share on other sites

Wireshark is invaluable for reverse engineering protocols, example:

 

Some games (Quake 1-3) are even built in and Wireshark will decode the packets for you.

Share this post


Link to post
Share on other sites

I know I'm coming in a bit late here but have a look at the private uo shards. There's plenty of them and plenty of guides on setting up your own.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×