Game Development Community

What is the best way to make each client "see" different?

by Chris Cain · in Torque Game Engine · 11/24/2005 (3:52 pm) · 4 replies

Okay, what I want to do is make it so every client can see (and hear) things differently. What I mean is, one player could be invisible to one player, but another player could see him. Another thing is when one player sees a lightning storm, another person sees a clear sunny day.

Now, this just affects view (and sound) and view alone. For example, if one of those lightning bolts hits someone who can't see them, they'd still get damaged.

So, whats the best way to do this? What parts of the engine should I be looking at, and what should I keep in mind while doing this?



Oh, also, I'm using the new TGE 1.4, forgot to mention that.

#1
11/24/2005 (4:41 pm)
Perhaps send each client connection a flag in the object updates that says if it should be rendered or not, and then early out of the render code if the flag is not set. Since each update is targeted at a specific client it's easy to figure out whether the flag should be true or false.
#2
11/24/2005 (4:46 pm)
Thanks Ben, I think that'll work fine. I hadn't thought of it that way.

I realize this isn't the right forum for it, but could you make it so a shader in TSE is shown much the same way?
#3
11/24/2005 (4:54 pm)
More or less.
#4
11/24/2005 (4:57 pm)
Okay, thanks Ben. Happy Thanksgiving! :)