ID on client/server are diferents?
by Luis Anton Rebollo · in Torque Game Engine · 03/15/2005 (3:38 am) · 6 replies
Objects in scene have differents ID for client and server side?
All objects or only non static?
Thx all and sorry for my english.
All objects or only non static?
Thx all and sorry for my english.
About the author
I'm working on a port of Torque3D to OpenGL and Linux/SteamOS
#2
03/15/2005 (11:49 am)
It's possible netConnection::resolveObjectFromGhostIndex resolve my problem?
#3
Here it is...
/// Ghosting is the most complex, and most powerful, part of Torque's networking capabilities. It
/// allows the information sent to clients to be very precisely matched to what they need, so that
/// no excess bandwidth is wasted. The control object's onCameraScopeQuery() is called, to determine
/// scoping information for the client; then objects which are in scope are then transmitted to the
/// client, prioritized by the results of their getPriority() method.
///
/// There is a cap on the maximum number of ghosts; ghost IDs are currently sent via a 10-bit field,
/// ergo, there is a cap of 1024 objects ghosted per client. This can be easily raised; see the
/// GhostConstants enum.
///
/// Each object ghosted is assigned a ghost ID; the client is _only_ aware of the ghost ID. This acts
/// to enhance game security, as it becomes difficult to map objects from one connection to another, or
/// to reliably identify objects from ID alone. IDs are also reassigned based on need, making it hard
/// to track objects that have fallen out of scope (as any object which the player shouldn't see would).
///
/// resolveGhost() is used on the client side, and resolveObjectFromGhostIndex() on the server side, to
/// turn ghost IDs into object references.
///
/// The NetConnection is a SimGroup. On the client side, it contains all the objects which have been
/// ghosted to that client. On the server side, it is empty; it can be used (typically in script) to
/// hold objects related to the connection. For instance, you might place an observation camera in the
/// NetConnnection. In both cases, when the connection is destroyed, so are the contained objects.
- Melv.
03/15/2005 (12:08 pm)
Yes. If you look at "NetConnection.h", it describes (in dOxygen format), the info you require.Here it is...
/// Ghosting is the most complex, and most powerful, part of Torque's networking capabilities. It
/// allows the information sent to clients to be very precisely matched to what they need, so that
/// no excess bandwidth is wasted. The control object's onCameraScopeQuery() is called, to determine
/// scoping information for the client; then objects which are in scope are then transmitted to the
/// client, prioritized by the results of their getPriority() method.
///
/// There is a cap on the maximum number of ghosts; ghost IDs are currently sent via a 10-bit field,
/// ergo, there is a cap of 1024 objects ghosted per client. This can be easily raised; see the
/// GhostConstants enum.
///
/// Each object ghosted is assigned a ghost ID; the client is _only_ aware of the ghost ID. This acts
/// to enhance game security, as it becomes difficult to map objects from one connection to another, or
/// to reliably identify objects from ID alone. IDs are also reassigned based on need, making it hard
/// to track objects that have fallen out of scope (as any object which the player shouldn't see would).
///
/// resolveGhost() is used on the client side, and resolveObjectFromGhostIndex() on the server side, to
/// turn ghost IDs into object references.
///
/// The NetConnection is a SimGroup. On the client side, it contains all the objects which have been
/// ghosted to that client. On the server side, it is empty; it can be used (typically in script) to
/// hold objects related to the connection. For instance, you might place an observation camera in the
/// NetConnnection. In both cases, when the connection is destroyed, so are the contained objects.
- Melv.
#4
I'm working in a console method for make this accesible from script.
Bye
03/15/2005 (3:09 pm)
Ok thx.I'm working in a console method for make this accesible from script.
Bye
#5
int NetConnection::getGhostID (int realID)
and i have learned objectID and ghostID are not same.
03/16/2005 (5:00 am)
.... these method already exist :Pint NetConnection::getGhostID (int realID)
and i have learned objectID and ghostID are not same.
Associate Melv May
There are conversion routines for C++ to help convert between the two though.
- Melv.