Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My friend and I are going to write a multiplayer, multiplatform RTS game and are currently analyzing the costs of going with a client-server architecture.

The game will have a small map with mostly characters, not buildings (think of DotA or League of Legends). The authoritative game logic will run on the server and message packet sizes will be highly optimized.

We'd like to know approximately how much server bandwidth our proposed RTS game would use on a monthly basis, considering these theoretical constants:

  1. 100 concurrent users maximum
  2. 8 players maximum per game
  3. 10 ticks per second

Bonus: If you can tell us approximately how much server RAM this kind of game would use that would also help a great deal.

Thanks in advance.

share|improve this question

closed as not a real question by Tetrad Apr 6 '12 at 2:06

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

No-one can answer this question, and why not let players host their own server, this way it will cost you zero and most PCs these days have 3 perfectly fine cores idling any way. – Roy T. Apr 5 '12 at 22:17
Have you ever considered firing up DOTA and/or LoL and measuring the client bandwidth, extrapolate and stick a fork in it 'cause it's done. – Patrick Hughes Apr 5 '12 at 22:18
-1, No one can answer that without knowing some very specific details. That said, once you have decided on an exact architecture you can count every single byte that goes in and out. Doing your own maths is way better than asking a question here. – aaaaaaaaaaaa Apr 5 '12 at 23:01
ATAIK most RTSs only use a server for the lobby - why do you need game logic on the server? – Pubby Apr 6 '12 at 0:36
@RoyT: good point, but we want our game to run on mobile devices as well. – Nat Weiss Apr 6 '12 at 3:11
up vote 2 down vote accepted

As @royT suggested the best solution would be letting players to host their own games. although you will end up developing a match-making server, but the costs for that one is much more cheaper than a dedicated game server.

But other than that Option let's do some multiplications. first of all you need to check how much data you need to send per game-state. for example let's say there each player can own at most 100 units in the game, and each one can have a position in a plane with 16k*16k resolution. which will result in roughly 28 bits of data for just position. let's say there are some extended data for these units. for example their type, hitpoint, experience and so on. for these extended data I guess reserving 20 bits is reasonable. so far we have computer 48 bits unit, multiply that by number of units and you'll get to 4800 bits for one play units in a game. for each player there are some other variable you need to send, for example how much money they own, or if they are chatting to other player. I guess assuming 200 bits average is more than enough, which will result in 5000 bits per player, knowing that each game consist of at most 8 players we will need 40Kbits or 5KB for just player data in each game-state. of course every player only needs to send his own data, but needs to receive game-states from all other players, so in total server needs to send 4375Bytes to each player and receive 625B from him. meaning exactly 5KB bandwidth for each player connected to server per tick. multiply that by number of ticks per second and you'll get to the 50KBps and multiply that number of seconds in a month (2592000) and you'll get to ~129GB bandwidth usage per month per player. so your server needs ~13TB bandwidth to handle all the traffic! I know these numbers seems a bit too much crazy but that's what you'll get by the values you provided.

but that's not how big RTS titles were implemented! I'm not sure how they did handle their transactions but they usually use less bandwidth for example:

  • WarcraftIII : 3KBps down and 1KBps up.
  • BattleForge : 5KBps down and 1KBps up.
  • DotA2 : 10KBps down and 3KBps up.
  • StrongHold crusader : 5KBps down and 3-4KBps up.

(note that all these numbers are what I can remember from the time I was/am playing those games)

putting these numbers as a base you can see there still is a huge bandwidth usage server needs to handle (maybe around 1TB per month).

share|improve this answer
someone please edit my answer, I'm too sleepy to write it with correct grammar rules!. – Ali.S Apr 6 '12 at 0:01
thanks Gajet! i feel that you really answered my question. if i could vote up yet i would pick your answer! – Nat Weiss Apr 6 '12 at 3:04
Big RTS titles send user input to the server, the server waits for input from all the players (lock step) and then sends the results to the clients. Have a look at this article about Age of Empires:… – Roy T. Apr 6 '12 at 6:39
@RoyT. that's why they are averagely using 1/10 bandwidth from what I calculated. I was just giving some rough measures on how much data transmission is needed to send each game state. – Ali.S Apr 6 '12 at 9:02

You've got some of the numbers you need for your estimate, but not all. The main thing you don't have is what data packets are going to be sent, and how big they are.

For example, if you know you have 100 players and 10 ticks per second, and you're assuming each tick means a data packet being sent from the server to every game to say, "Here is the current game state", that translates to 100 players * 10 packets/sec * DATA_PACKET_SIZE bytes per second. Item in caps is something you don't have yet.

Another one you need is how big a command packet is from the client to server. That is, if a player makes a move or hits a key or takes an action, that's a packet sent from client to server. So 100 players * ESTIMATED_COMMANDS_PER_SECOND_MAX * COMMAND_PACKET_SIZE = estimated data per second for players.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.