Why do NetEvents have to be console objects
by Dumbledore · in Torque Game Engine · 07/20/2008 (9:29 am) · 4 replies
I just don't understand why you'd need to make a console object out of an event you want to trigger over a network. From what I understand you MUST make every NetEvent a console object using the ConsoleObject macro because NetEvent derives from ConsoleObject.
#2
My question to you would be: is there a specific reason why you are concerned with NetEvent being a child class of ConsoleObject?
07/20/2008 (11:28 am)
The ConsoleObject class is what gives your project the ability to be cross-platform, by implementing the design concepts of AbstractClassRep and ConcreteClassRep, which provide the ability for two different executables, compiled on two different operating systems, to still transmit data across the network connection.My question to you would be: is there a specific reason why you are concerned with NetEvent being a child class of ConsoleObject?
#3
yes, because i am interested in knowing why. thanks for your explanation, that is a good start for me.
07/20/2008 (4:20 pm)
Quote:
My question to you would be: is there a specific reason why you are concerned with NetEvent being a child class of ConsoleObject?
yes, because i am interested in knowing why. thanks for your explanation, that is a good start for me.
#4
Top 5 classes in Torque hierarchy:
ConsoleObject : implements cross platform capability via the DECLARE_ and IMPLEMENT_XXX_OBJECT macros, which let operating system specific compilers create different .obj implementations (as they pretty much have to), and still be able to communicate data about those objects. Also allows for remote instantiation of objects (across the network). Uses AbstractClassRep and ConcreteClassRep for this ability. Also provides some utility functionality (such as ::initPersistFields() ) for TorqueScript.
SimObject : Implements the ability to participate in the simulation by ->registerObject(), which gives each object a unique SimID for communications between objects. Also allows for optional by name object registration, giving the ability to search within the simulation for a uniquely named object. Finally, implements the smart referencing system, where objects that contain a reference to another object are informed when their referenced object is about to be deleted, so they can safely remove the reference (avoids corrupt pointers).
NetObject : Allows objects to dynamically stream updates via the Ghosting system for client synchronization by utilizing the bitStream class sent across a NetConnection/GameConnection.
SceneObject : allows objects to have a 3 dimensional world location, and first level of rendering ability. Several other utility functions, including participation in the Container system for collision optimization.
GameBase : provides the ability for objects to process ticks (which in turn allows for physics and over time collisions), and also allows objects to become client control objects.
07/21/2008 (12:29 am)
Ah, ok :)Top 5 classes in Torque hierarchy:
ConsoleObject : implements cross platform capability via the DECLARE_ and IMPLEMENT_XXX_OBJECT macros, which let operating system specific compilers create different .obj implementations (as they pretty much have to), and still be able to communicate data about those objects. Also allows for remote instantiation of objects (across the network). Uses AbstractClassRep and ConcreteClassRep for this ability. Also provides some utility functionality (such as ::initPersistFields() ) for TorqueScript.
SimObject : Implements the ability to participate in the simulation by ->registerObject(), which gives each object a unique SimID for communications between objects. Also allows for optional by name object registration, giving the ability to search within the simulation for a uniquely named object. Finally, implements the smart referencing system, where objects that contain a reference to another object are informed when their referenced object is about to be deleted, so they can safely remove the reference (avoids corrupt pointers).
NetObject : Allows objects to dynamically stream updates via the Ghosting system for client synchronization by utilizing the bitStream class sent across a NetConnection/GameConnection.
SceneObject : allows objects to have a 3 dimensional world location, and first level of rendering ability. Several other utility functions, including participation in the Container system for collision optimization.
GameBase : provides the ability for objects to process ticks (which in turn allows for physics and over time collisions), and also allows objects to become client control objects.
Associate James Ford
Sickhead Games