Jump to content

  • Log In with Google      Sign In   
  • Create Account


How much data per second can I allow my engine to send?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

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

#1 GuyWithBeard   Members   -  Reputation: 801

Like
0Likes
Like

Posted 18 October 2012 - 08:38 AM

I am working on a game engine for real-time action multiplayer games. I have a client-server architecture where the server ticks at some fixed rate (eg. 15 ticks per second) and the clients at some other (eg. 60 ticks per second). Those game objects whose transform are set as propagated are automatically sent from the server to all clients at the end of every tick. In between, the clients do client side prediction etc. All the normal stuff.

Currently in a scene with about 20 objects being synchronized across the network, I need to transform 15-20 kB of data from the server to all clients. The amount of data going from a client to the server is much smaller, perhaps 1 kB. Does this sound like too much? As far as I know, console games are expected to stay around the 10 kB/s mark, but I am not sure if that's a requirement anymore. Of course, the game engine I am developing is designed for PCs with decent network connections, but still, I would like to know if this sounds bad.

I am using ENet for the low-level networking. The data amount is the total data as reported by the lib. I am unsure if this includes the IP headers, etc.

Thanks!

Sponsor:

#2 frob   Moderators   -  Reputation: 19770

Like
1Likes
Like

Posted 18 October 2012 - 10:48 AM

How much data per second can I allow my engine to send?
...
I need to transform 15-20 kB of data from the server to all clients.

So you need a constant flow of about 200Kbps upstream for the server.

Also consider that you are not the only software using the Internet connection; many homes have multiple devices all concurrently using the same cable or DSL connection.

It is up to you to know your demographics, and to realize if that fairly big slice of bandwidth is acceptable or not.
Check out my personal indie blog at bryanwagstaff.com.

#3 GuyWithBeard   Members   -  Reputation: 801

Like
0Likes
Like

Posted 18 October 2012 - 02:09 PM


How much data per second can I allow my engine to send?
...
I need to transform 15-20 kB of data from the server to all clients.

It is up to you to know your demographics


Unfortunately I don't, and that us why I am asking. What sort of connection can you generally expect people to have? Having 20 objects moving around and getting propagated is probably extremely rare. Most likely you would only be propagating the position of the players and some gameplay critical objects. Also, I have not spent that much time thinking about compression etc. I can probably get the data rate down by 20% or so, if needed.

It's okay if you don't have any definite answers for me. I am just interested in this topic on a high level. Of course if you have some numbers and/or rules of thumb regarding this, all the better!

#4 hplus0603   Moderators   -  Reputation: 5099

Like
1Likes
Like

Posted 18 October 2012 - 04:49 PM

What sort of connection can you generally expect people to have?


Google for "Steam hardware survey" and "unity3d hardware survey" to find some snapshots of the gameplaying public.
enum Bool { True, False, FileNotFound };

#5 swiftcoder   Senior Moderators   -  Reputation: 9761

Like
1Likes
Like

Posted 18 October 2012 - 05:14 PM

Keep in mind that your demographic requirements seem to be very different for users running a client versus a server.

Your client seems to need about 20kbps down, 10kbps up - that's within the range of a decent dial-up connection. Your server seems to need ~200kbps up and down, which should be easily attainable with a good DSL, or average Cable connection (assuming, of course, that the user isn't streaming HD video or running a torrent server at the same time).

Tristam MacDonald - Software Engineer @Amazon - [swiftcoding]


#6 hplus0603   Moderators   -  Reputation: 5099

Like
1Likes
Like

Posted 18 October 2012 - 10:43 PM

Your client seems to need about 20kbps down, 10kbps up - that's within the range of a decent dial-up connection.


I think you're off by an order of magnitude there ;-) The OP said kB, not kb.
enum Bool { True, False, FileNotFound };

#7 GuyWithBeard   Members   -  Reputation: 801

Like
0Likes
Like

Posted 18 October 2012 - 11:02 PM

Thanks for your replies! Unfortunately hplus is correct, it's indeed kilobyte, not kilobit. Posted Image

So my clients need roughly 200 kbps down and 10 kbps up. If those speeds can be reached with DSL then I guess that's acceptable. I don't see why the server would need 200 kbps down since the data going to the server is fairly small. Also, this sort of synch data that keeps the environment consistent is sent as unreliable packets, so no acks need to go back to the server. Of course, depending on the number of clients connected to the server, the requirements go up.

#8 swiftcoder   Senior Moderators   -  Reputation: 9761

Like
1Likes
Like

Posted 19 October 2012 - 06:09 AM

I don't see why the server would need 200 kbps down since the data going to the server is fairly small.

I may have misinterpreted that as well - I read it as 10kbps per client.

Either way, internet connections are at best symmetrical, and more typically have greater downstream bandwidth than up, so if you have 200kbps up available, you should have at least that much down.

Tristam MacDonald - Software Engineer @Amazon - [swiftcoding]


#9 hplus0603   Moderators   -  Reputation: 5099

Like
2Likes
Like

Posted 19 October 2012 - 10:28 AM

So my clients need roughly 200 kbps down and 10 kbps up. If those speeds can be reached with DSL then I guess that's acceptable. I don't see why the server would need 200 kbps down since the data going to the server is fairly small.


So, if each client needs 200 kbps down, that means that the server needs 200 kbps up per client. Additionally, if the clients send 10 kbps up per client, then the server needs 10 kbps down per client. How many clients? Multiply, and add some safety margin.

FWIW: Residential internet does not make for a good permanent server solution, even if you get a "static IP" from your ISP. The service level just aren't at the level of reliability you get from a co-location or hosting datacenter. There are fairly cheap "full" hardware solutions with significant bandwidth (10 Mbit or so) for $50/month, and you can get similar pricing, including bandwidth, for virtual servers if you can live with the scheduling latency/jitter.
enum Bool { True, False, FileNotFound };

#10 GuyWithBeard   Members   -  Reputation: 801

Like
0Likes
Like

Posted 19 October 2012 - 02:21 PM


So my clients need roughly 200 kbps down and 10 kbps up. If those speeds can be reached with DSL then I guess that's acceptable. I don't see why the server would need 200 kbps down since the data going to the server is fairly small.


So, if each client needs 200 kbps down, that means that the server needs 200 kbps up per client. Additionally, if the clients send 10 kbps up per client, then the server needs 10 kbps down per client. How many clients? Multiply, and add some safety margin.

FWIW: Residential internet does not make for a good permanent server solution, even if you get a "static IP" from your ISP. The service level just aren't at the level of reliability you get from a co-location or hosting datacenter. There are fairly cheap "full" hardware solutions with significant bandwidth (10 Mbit or so) for $50/month, and you can get similar pricing, including bandwidth, for virtual servers if you can live with the scheduling latency/jitter.


Exactly, this still does not explain why the server would need 200 kbps down. Although, with all clients (4-8) it might end up being something like that, so let's leave it at that.

The game I am working on uses so called "listen servers". At least that seems to be the term that is used. In other words, they are not "permanent" since they only act as a server for one game session at a time. I have a matchmaking server running on a virtual machine with a static IP. This server runs matchmaking, NAT-punch through and possibly score keeping services. Whenever someone creates a game, he/she becomes the host for that game and starts up a game server in the same process as his/her client. The game is registered on the matchmaking server and others can join.

I am sure that this probably won't work with all NAT setups, but it has worked in every network that I have tried. I might add some intelligence to the create/join logic, so that people with problematic NAT setups get a warning message, or cannot create games or something similar. The game is supposed to be free anyway, so I am not that concerned with covering every single case. Also, it's actually designed to be played among friends at a LAN party or similar. Posted Image I do want the game to be playable on the net, however. The engine is designed to be pretty generic, and the next game might not be designed for LAN...

Anyway, thoughts?

Thanks for your posts thus far! It's nice to ventilate these things with someone every now and then.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS