Download presentation
Presentation is loading. Please wait.
1
Washington University in St. Louis
CSE 565 – Fall Hardware Acceleration of Gaming Algorithm TNL Ghosting Explained Abdel Rigumye Washington University in St. Louis Copyright 2005
2
Torque Network Library Ghosting Overview
Torque Network Library (TNL) Uses Ghosting as a means of transferring Object State from Server to Client Entire Object State sent only once. Subsequently only changes in object state transferred from server to client TNL goes through great lengths to minimize BW
3
TNL Connection Establishment Creates Ghost Array
On both the Client & Server every entry initially zeroed out client sends connection request packet to server server sends connection response: client ID & puzzle Client Server Connection Client Proxy Event List Ghost Array Connection Client Proxy Event List Ghost Array Client sends puzzle solution & client ID send notice of success
4
Population of Ghost Array
Whenever Server ghosts object for first time GhostID appears in the packet Client uses the GhostID to create appropriate object The Ghosted object is stored in position in Ghost Array indexed by CID Client Side Ghost Array 8 bits Kill Ghost Flag Ghost Object Flag MyScope_Valid IdSize GostID CID Ghost Object 1 Ghost Params CID Ghost Object 2 Ghost Params
5
Problem – Same as string Table
Because Monitor sits between client and server must Approach I: maintain a copy of client’s Ghost Array Approach II: modify the TNL packet so GhostID always transmitted Ghost Array Ghost Array Ghost Array FPX Network Network Game Server Client
6
Modified TNL Packet GhostID always transmitted in Position Shown
Added Extra Flag to tell HW when we are Ghosting object for the first time When Flag = 1 expect additional 5 bit GhostID2 When Flag = 0 continue reading GhostParams GhostID1 equal to GhostID2 MyScope_Valid IdSize Ghost Object Flag CID Kill Ghost Flag GostID1 Ghost Params Ghost Object 1 Ghost Object 2 8 bits GostID2 First Time Ghosted Flag
7
Parsing TNL Ghost Data Notify is a Connection Oriented Protocol
To implement Ghost Processor for MP1_partIII parse fields of Ghost Data section to obtain GhostID Look at the packUpdate and unpackUpdate functions associated with the Ghosts Ghost ID = 19 is a Ship ghostable object Look at Ship:unpackUpdate and Ship::packUpdate functions
8
Eg: GoalZone::packUpdate
Notify is a Connection Oriented Protocol Eg: GoalZone::packUpdate U32 GoalZone::packUpdate { if(stream->writeFlag(updateMask & InitialMask)) stream->writeEnum(mPolyBounds.size(), MaxPoints); for(S32 i = 0; i < mPolyBounds.size(); i++) stream->write(mPolyBounds[i].x); stream->write(mPolyBounds[i].y); } if(stream->writeFlag(updateMask & TeamMask)) stream->write(mTeam); return 0;
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.