Network Question, packet sending

Started by
1 comment, last by fly_cow 21 years, 11 months ago
Another question... In my simple fps game, should I allow the clients to decide when to send updates to the server (eg: 10/sec) and just have the server relay them to everone else when they come, or should I have the server send out updates (10/sec) with the latest info for each player regardless if some clients havn''t send their info yet? Thanks again, Kevin
Advertisement
Depends on what your net system is doing and what exactly is happening inside the engine.

In my net tests I had the server sending out updates to a client when it had received a message from it (I copied this from the quakeworld method), but you could have the server sending out messages each tick or whatever. The reason I had it as above is that my method of reliable messages meant that each client only had one packet ''live'' at a time and had to acknowledge it before getting another (thus the onus is on the client to request an update). Different systems will have different requirements for this of course.
Well, choosing the second option will, in my opinion create more latency overall. Think about it a second. If I''m understanding this right, it sounds like for some amount of time, clients send your server information. And then the server sends them all out at the end of the time period. As opposed to sending them out to people right after you recieve them, that will create more delay the transfer of the data. Thus, lag.

Short answer? Number one.

This topic is closed to new replies.

Advertisement