Jump to content

  • Log In with Google      Sign In   
  • Create Account

Network traffic


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
5 replies to this topic

#1 NekoCode   Members   -  Reputation: 123

Like
0Likes
Like

Posted 04 July 2014 - 12:32 PM

Hey guys&girls, 

 

I've made my custom multiplayer system for my game, but I am not sure about thingy:

For five minutes of testing, I've noticed that client sends ~700kb for 5 minutes of playing with no another clients. Is it good for game trafic?

Clients sends it's position, lastmessage data per game frame. ( 125 fps usually ).

 

EDIT: with 32 clients (bots) client receives 700 kb less for 2 minutes. sad.png


Edited by NekoCode, 04 July 2014 - 12:51 PM.


Sponsor:

#2 slicer4ever   Crossbones+   -  Reputation: 3883

Like
0Likes
Like

Posted 04 July 2014 - 01:13 PM

sending ~700Kb for 5 minutes translates to ~2.3kb/s.  that's not too bad for a game(using a deterministic game setup with sending only inputs can get you down into the byte range depending on how frequently you send inputs.)

 

receiving ~700Kb for 2 minutes translates to ~5.9kb/s.  still not terrible for a game.  if you don't have central game servers and have a player act as the host, then this setup can be usable over the internet pretty easily(with a dozen or so players at a time).  however if you have a Central server to facilitate all your games, then you'll likely want to reduce the amount of bandwidth used by an individual client, as even a few dozen of clients can add up and saturate your bandwidth very quickly.


Check out https://www.facebook.com/LiquidGames for some great games made by me on the Playstation Mobile market.

#3 NekoCode   Members   -  Reputation: 123

Like
0Likes
Like

Posted 04 July 2014 - 01:34 PM

Oh, thanks for the answer and tip.



#4 hplus0603   Moderators   -  Reputation: 5280

Like
1Likes
Like

Posted 05 July 2014 - 10:23 AM

Note that 125 fps for network traffic is generally way more than optimal. 20 or 30 Hz network packets is usually quite enough. Even twitch-action games with custom servers, like high-end Counter-Strike games, will seldom have a network tick rate above 60 Hz.
enum Bool { True, False, FileNotFound };

#5 NekoCode   Members   -  Reputation: 123

Like
0Likes
Like

Posted 04 August 2014 - 09:11 AM

Note that 125 fps for network traffic is generally way more than optimal. 20 or 30 Hz network packets is usually quite enough. Even twitch-action games with custom servers, like high-end Counter-Strike games, will seldom have a network tick rate above 60 Hz.

I have two main frame functions. 

First one is game, it has value com_fps which is 60-120.

Second one is server, it has value server_fps which is 10-20 fps.

 

What if I make one common network_fps function which will manage server and client frames? I guess, network_fps will be 20, 30 nor 60 fps.

Is it right?



#6 hplus0603   Moderators   -  Reputation: 5280

Like
1Likes
Like

Posted 04 August 2014 - 04:11 PM

Note that there are likely three frame rates in your game:

1) The rendering frame rate.
2) The simulation/physics frame rate.
3) The network packet frame rate.

These are typically all de-coupled from each other. You can separately use multiple mechanisms, such as "display latest" or "interpolate between two latest" or "extrapolate from latest," to go from network to simulation, or simulation to display.

For each network tick, you will typically collect all the player input that has been seen for all simulation ticks since the last network tick. You may also collect the latest state dump of objects being updated, and/or events that have been generated since the last network tick. Then send all of those messages in a single packet (with appropriate per-message timing information.)

The network packet frame rate and the simulation frame rate are typically fixed, whereas the display frame rate depends on the performance of the computer running the particular game instance.
enum Bool { True, False, FileNotFound };




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