Game Development Community

PackUpdate and writePacketData

by Aaron Murray · in Torque Game Engine · 03/03/2002 (12:19 pm) · 2 replies

Not a super long question here, just need to get this straightened out... What is the difference (intended use) of the member functions PackUpdate and writePacketData? Thanks!

#1
03/04/2002 (9:53 am)
Well, the short answer is: packUpdate writes the state of an object for any client, and writePacketData writes the state of an object for the client that is controlling it. For a short overview of the networking code, check out: www.garagegames.com/docs/torque.sdk/engine/Networking.php#Networking.

Basically, in order for client-side prediction to work properly for the object a client is controlling, the server must communicate the full simulation state of the object to the client that is controlling it. For all other clients, the server only needs to send data that is necessary for the object's presentation in the game, and that data can be pared down in terms of accuracy.
#2
03/04/2002 (7:21 pm)
Ahhh, that clears things up! Thanks, your answer is appreciated!