Advertisement

How often should you send updates?

Started by March 05, 2006 07:06 PM
11 comments, last by kloffy 18 years, 11 months ago
Make sure that you are reading in "all available packets" each loop, rather than only reading one.

--Dave
Alright, I replaced:
if(packet=client->Receive()){ //Update }
with:
while(packet=client->Receive()){ //Update }
Now my older PC can play as well. I also don't have to limit the number of packets anymore. Thanks guys!


Btw.: Since I'm using RakNet, I don't think it would be a good idea to implement send/receive as threads.
Quote:
RakNet FAQ
I want to, or should I call Send and Receive from multiple threads.
Those functions are not currently threadsafe. There is no benefit to calling them from threads, as they are already optimized to run asynchronously with the main network thread.

This topic is closed to new replies.

Advertisement