Game Development Community

Visibility, ghosting, and scope

by Fenrir Wolf · in Torque Game Engine · 06/11/2004 (12:33 pm) · 3 replies

Hi there. A recent thread brought up some questions about scoping, and I didn't want to pollute Hugo's thread with my questions, so I created a seperate thread.

Anyway, I see an old 2003 thread from Chris Garrett about automatic ghost deletion based upon a scoping timeout. I haven't got my SDK in front of me, so I can't tell if this was incorporated into HEAD or not, but this looks like the path I need to explore for server-based visibility detection.

In other words, I want objects to have "radars" that let them see (or not see) other objects around them. For example, a client might not see another client if they are standing right next to each other due to visibility rules. How hard would this be to implement? My thought is just to modify the scoping system, add some extra logic for the visibility radius and such, but I am not sure how frequently this scoping occurs.

And how much bandwidth does it cost to add a ghost to a game? In other words, would adding/removing partially visibile clients case extra slowdown and screw with the prediction code? After all, if one object interacts with another, the visibility flag will need to set immediately. (ie: If you are attacked from behind you need to be aware of your attacker.)

The only other way I see to do this would be to leave Torque's scoping rules intact as they are, and then just do client-side scoping but that isn't very secure.

Just curious what everybody's thoughts are.

#1
06/12/2004 (8:54 am)
Scoping is done every tick. This sort of thing was done to great effect in Tribes and Tribes2, so the system will deal with it very well. Zap also does the same thing, so you might want to take a peek at the code there.
#2
06/14/2004 (2:05 pm)
Thanks, Ben, I'll check out the Zap code, then. I just wanted to make sure I was looking in the right direction.

In my next game for Torque, it'll be very important that objects have varied visibility for individual clients. I suppose as long as I execute the visibility checks every few ticks, I can avoid too much bandwidth loss due to ghosts popping in and out of visibility.
#3
06/15/2004 (11:43 am)
I did a little radar, but I havnt really worked on it too much, but in mean time I've been thinking.

Just an idea I had, perhaps you could do the radar sweep on the server, and then send the radar targets to the client using some object as the interface for this. This way you would be able to do tricks server side with the radar, maybe a couple cool things. It seems like it might take a bit more bandwidth (definitely more than just showing dots for all scoped objects on the client, which is what Im doing)