Client/Server Networking Problems

Blitz3D Forums/Blitz3D Programming/Client/Server Networking Problems

Poita(Posted 2006) [#1]
I've been reading this article:

http://www.gamedev.net/reference/articles/article1138.asp

(Really good article btw for anyone looking to start internet games programming)

Anyway, I was curious about this statement on out of order packets and using delta packeting:

"Out of order and missing packets. The trick here is to only treat one symptom and ignore the other. If you number your game packets (when we talk about packets here, I mean game server frame packets - IE the packet that contains a complete frame update from the server) as they go out to the client, the client can know if it gets an out of order packet. The simplest solution is to dump it, and treat it as a missed packet entirely. Doing this is a must if you are dealing with deltaed packets, since the delta values in the packet refer to the frame that came before."

I don't understand how you can simply drop an out of order packet when using delta-time since it would make the game go out of sync.

Also, how can you ensure that the client receives essential packets (such as a new object being created) without having to acknowledge every packet since that would reduce back to TCP?

Thanks in advance


Poita(Posted 2006) [#2]
Does nobody know or did I word my question badly?


Luke.H(Posted 2006) [#3]
My thoughts, (I have not read all that article)


I don't understand how you can simply drop an out of order packet when using delta-time since it would make the game go out of sync.



Your game should be expecting dropped packets and recover from nearly anything, hard to make, and test by it is need,

(You mean ‘delta packeting’ not delta-time as in game speed, don’t you?)




Also, how can you ensure that the client receives essential packets (such as a new object being created) without having to acknowledge every packet since that would reduce back to TCP?



Design you game to deal with it, don’t make any messages essential (if possible), e.g.:

Client wants a new object:
-ask sever for new ID (The sever has a list, counter, etc)
-Tell everyone about the new object including ID

Sever wants a new object:
-get new ID
-Tell everyone about the new object including ID

Client/Sever wants to update an object:
-Tell everyone about the object state including ID

Client/Sever gets message to update an object but the object is not found (It missed the new object message):
-Ask for the object from the object's owner (message from?)

It is hard because even the message to the sever asking for the ID might be missed and need to be resent, etc...


Poita(Posted 2006) [#4]
So in your version you posted there with the client wanting a new object, what happens if one player misses the 'Tell everyone about the new object including ID' message? That is an essential message...

btw. Yeah I meant delta packeting not delta time.


Luke.H(Posted 2006) [#5]
Client/Sever gets message to update an object but the object is not found (It missed the new object message, and it was not created on this computer):
-Ask for the object from the object's owner (message from?)


octothorpe(Posted 2006) [#6]
Yeah, I'd love to help too, but that article is atrociously written.