Game Development Community

Net masks

by Ian Omroth Hardingham · in Torque Game Engine · 06/23/2004 (6:57 am) · 3 replies

Hey everyone.

Okay, I've been asking around on IRC and the forums trying to get a bit better of an understanding of how the net mask system works. The code surrounding the ghost update system seems to be, er, a little indecipherable at best, and I was wondering if anyone had any insight into this.

What I believe so far is that: for a NetObject, such as Player, the server keeps a dirty mask for *each* ghost. When packUpdate is called for one ghost/netConnection, the dirty mask is at some point cleared for that ghost.

My problem is: when is the mask cleared? Is it straight after the packUpdate, or does it wait for the packet to have been received successfully? Am I right in thinking that a packUpdate packet will not be resent if it failes, it will simply wait for the next time packUpdate is called? So then the mask is reset *after* a packet is successfully transmitted, otherwise important info would not get through?

I'm confused. Any help would be much happreciated.

Ian

#1
06/23/2004 (7:16 am)
Have you read the TNL docs? TNL is an updated version of what's in Torque, but the basics (like this) are still the same.

Short answer: the most recent state is always transmitted.
#2
06/23/2004 (7:48 am)
Thanks Ben, as I suspected. However, the main problem is *when*, where, (and how?) is the net mask cleared?

I'll go take a look at the TNL docs.

Ian
#3
06/23/2004 (9:05 am)
The net mask is cleared when an update succesfully goes through... :)