Game Development Community

Tagged/dynamic fields client side

by Novack · in Torque Game Engine · 10/27/2007 (10:17 pm) · 9 replies

There is anyway I can read dynamic (aka tagged) fields from the client?

I have to activate/deactivate a gui option in base of such field, this isnt possible?

The other options like messageClient are too complex for this simple flag value that I need to read -and even dont know if it would work-.

My only option is to make it a member field on the c++ code?

Hope anyone have an idea... and thanks.

#1
10/27/2007 (11:19 pm)
I think Ill use commandToClient to emulate the same dynamic field client side.

I guess I can use the exact same field name client side... Any objections?
#2
10/28/2007 (2:53 am)
I do have one sugestion. If you are using multiple tagged / dynamic fields that are constantly changing, instead of sending multiple commands to client to change values it may be easier to just set one dynamic field and use a fixed length NUMBER or STRING that can be extracted by client. String "BCDDA" could represent 5 fields that your server and client could extract and identify. You can schedule the server to check at regular time intervals if there is a change in the value send out this commandToClient .
#3
10/28/2007 (8:57 am)
I dont know if its really my current case, but its a really good idea in general, I think I can use that concept in many places!

thanks Swaroop!
#4
10/28/2007 (10:55 am)
There's some stuff to think about here.
* which clients need to know this value ? if it's only the one client whom the value belongs to, yeah, command to client is probably the way to go. if it's all the clients (eg the information is something like what Hat the player is wearing), then you need to ensure that all the clients get it, and the Ghosting mechanism is built for exactly that.
* how often does the value change ? if it's only a few times during the course of a mission, again, command to client is fine, but if it changes say every second or so, again, the ghosting mechanism might be a better choice.
#5
10/28/2007 (12:15 pm)
Thank you Orion, your comments are always a learning reading. For what you have said, the commandToClient seems to be the better choice.

Im trying to implement construction stages for a RTSbuilding, so the value is the current status. The only one client intrested in this value is the building owner, who will see a limited functionality on a building still not finished. The animation changes are called from the server so that part is already solved (I think).

So, the client to inform is only one, and the updates are made just a few times, commandToClient is the winner.
#6
11/29/2007 (7:48 am)
How exactly can I force changes to an RTSunit field to be ghosted over from the server side to the clients?

I noticed that some RTSunit info when changed on server side is not showing up on the client. I am not talking about tagged / dynamic fields. Even fields such as Team are not showing up on client side objects when changed on server side objects. I cant use command to client because it is about 40 RTSunits whose control I need changed from one player to an other. About 3 or 4 fields will be changed on these objects. At present only when the RTSunit is created are the fields being transfered over to the client. Other fields such as SkinName when set on server are transfered to client.
#7
11/29/2007 (9:28 am)
elenzil.com/gg/images/search.pngsearch "ghosting" ?
#8
11/29/2007 (9:41 am)
Swaroop, Orion is right, in this case you should read about ghosting, seems to be the correct approach.

Orion you did that png just for this ocasion, or you usually make it appear? :D
Can I use it too?

P.S.: btw, there are some troubles with the search engine -as Im sure you already know-, so be care in what context you show your spontaneous art (there are some people always waiting the oportunity to start flaming ;)
#9
11/29/2007 (10:06 am)
Hey Novack - heh. there's another similar graphic floating around somewhere but one day i wanted it and couldn't find it so i just made a new one. sure, please use it.
good point too about the shortcomings of search around here.
i actually did the search myself first to make sure some reasonable hits come up.
cheers!