PackUpdate and unpackUpdate where?
by Gordon Walton · in Torque Game Engine Advanced · 10/27/2005 (9:37 am) · 3 replies
I've been looking through the code trying to find out how the function packUpdate and unpackUpdate are called, but i've not had much luck. Has anyone got any ideas? It doesn't seem to be as simple as obj->packUpdate, and i am guessing the updateMask is used to tell the packUpdate and unpackUpdate which parts to pack and unpack. I've looked at the documentation for netObject.
I'm trying to understand the processes that take place during a game loop cycle, that's the reason why i'm looking into packUpdate. During a loop cycle, the network processing takes place, is there something that queries all the objects and looks to see if something like ghostobject is turned on and then packs the update for that object and sends it over the bitstream?
Any ideas would be gratefully appreciated thanks!
I'm trying to understand the processes that take place during a game loop cycle, that's the reason why i'm looking into packUpdate. During a loop cycle, the network processing takes place, is there something that queries all the objects and looks to see if something like ghostobject is turned on and then packs the update for that object and sends it over the bitstream?
Any ideas would be gratefully appreciated thanks!
About the author
#2
during the game processing loop, each object that receives ticks is responsible for marking the "dirty" condition of itself if a network update is needed (based on aspects of the object that have changed). They do this with the setMaskBits(...) call.
Then during the networking portion of the processing, each client connected to the server has a list of ghosted objects, as well as a list of those objects that have been marked as dirty. For each of the objects in this list, packUpdate() is called, and the information is passed through via the bitstream to the client itself.
10/27/2005 (6:12 pm)
Short version:during the game processing loop, each object that receives ticks is responsible for marking the "dirty" condition of itself if a network update is needed (based on aspects of the object that have changed). They do this with the setMaskBits(...) call.
Then during the networking portion of the processing, each client connected to the server has a list of ghosted objects, as well as a list of those objects that have been marked as dirty. For each of the objects in this list, packUpdate() is called, and the information is passed through via the bitstream to the client itself.
#3
10/28/2005 (4:33 am)
Thank you, i'll go take a peek at the processing code :)
Torque 3D Owner Phil Carlisle