PFC![]() Member Posts: 29 From: Canada Registered: 10-16-2007 |
As many of you know I'm currently working on a 3dmmorpg engine, but I have come to a place where I need to make a decision... what should the update rate for the server-client be(for dynamic objects only)? Currently my server sends the full dynamic world state in each update as opposed to only what the client sees and it does this as fast as it can(well over 1000times/sec). Soon I will only send information about objects the client can/needs to see. Also, in the future there will be a smooth interpolated animation path for the character instead of the moving by block caused by waiting for the server to tell it exactly where the character is. so the big question to anyone who has ever made a networked or online game: How often should the client get updates for the dynamic objects(anything that changes in game and in view)? edit: I should have put this in help wanted thread... but too late now *shakes head* [This message has been edited by pfc (edited December 05, 2007).] |
Mack![]() Administrator Posts: 2779 From: Registered: 01-20-2001 |
Set it to 3.5 and then run tests to see how it works out. The best way to get the right setting is to real time test it. |
PFC![]() Member Posts: 29 From: Canada Registered: 10-16-2007 |
Thanks! I did the real time tests and at the same time fixed a few things that were lagging the server... all that to say that you were right about both the update rate and the method to test for it. Thanks allot! ------------------ |
HanClinto![]() Administrator Posts: 1828 From: Indiana Registered: 10-11-2004 |
Once you get your packet structure a little more defined, it will help to look at the average size of the packets, and then calculate how much bandwidth you plan for your game to take up. (bytes per packet * packets per second = bytes per second) If you're using TCP, keep in mind that there's more overhead to give your packets guaranteed delivery -- turning on the TCP_NOWAIT option with your sockets will take lag down at a small increase in bandwidth. If you use UDP, then you will lose some packets, but it will reduce latency and bandwidth by a little bit. It's all an optimization game -- unless it's a action twitch game (like Quake or Counterstrike), then I would stick with TCP. But yeah, Mack's method is definitely the best place to start -- just getting your hands dirty and messing with packet frequencies. Thanks for the update, and please keep us posted with your progress! --clint |