Game Development Community

Game Information Network object

by Adam Beaumont · in Torque Game Engine · 10/09/2003 (12:05 pm) · 3 replies

I'm trying to figure out if there is an object anywhere that holds 'game data' that gets sent down to each client? What I want is basically an information holding class that has network properties (in that it keeps itself up to date on all client connections). It doesn't need to be rendered or exist in the game world. Is there already something like this ?

If there isn't then it seems to me that I should derive something from GameBase and use PackUpdate / unpackUpdate to send data from server to client - is that a good plan ?

#1
10/09/2003 (12:49 pm)
Adam,

If you want to have something that is network 'aware' then base your object lower-down. The lowest and most appropriate for your situation is the 'NetObject'. If you want something the same but not network capable then use its parent, 'SimObject' which has all the simulation stuff in it.

If you then decided you want to render then you can go one up from 'NetObject' and promote it to a 'SceneObject'; something that can get added to the scene.

Hope that helps,

- Melv.
#2
10/09/2003 (9:13 pm)
Read the NetObject/SceneObject documentation, too... it should help clear up a lot of questions.
#3
10/10/2003 (1:44 am)
Thanks for the help guys.

I actually want the object to be ticked (or at least updated fairly frequently) - I didn't mention that (!) but thats why I went for GameBase.

I've come to Torque from coding some stuff in Unreal Tournament 2k3 and one of the things I did there was a minimap where u can see the position of all players in the current map. To do this u can either 'scope always' everything (bad i think), or u can replicate the position parameters of out of scope objects in an info class. There's a fairly easy and useful way of doing this in UT (GameReplicationInfo) so I wanted to replicate (lol) this in my Torque game.

Back tracking a bit - maybe there is already something that allows u to map the position of all (in and out of scope) objects ? Most of the radar type resources seem to rely on objects being in scope for them to be displayed... I presume someone must have looked at this sort of thing before but I couldn't find it...