What one client sees, and another does not.
by Jacob Wood · in Torque Game Engine · 09/18/2006 (11:48 am) · 10 replies
Hello,
This seems like it would be a simple task, and maybe it is (I'm not an expert just yet), but how would one make the player on a client game do something, like go invisible, and have it to where the other clients in the same game still see that same object.
I've read many forums and researched the TDN and I'm still boggled by this issue. It seems like the RTS package has the same kind of effect I want (making some objects visible to some clients but not to others) except that I want to do it in a FPS game.
Help would be emmensly appreciated.
This seems like it would be a simple task, and maybe it is (I'm not an expert just yet), but how would one make the player on a client game do something, like go invisible, and have it to where the other clients in the same game still see that same object.
I've read many forums and researched the TDN and I'm still boggled by this issue. It seems like the RTS package has the same kind of effect I want (making some objects visible to some clients but not to others) except that I want to do it in a FPS game.
Help would be emmensly appreciated.
About the author
#2
I'm curious to know how making one model render differently on different clients can work with little network programming.
09/18/2006 (9:06 pm)
Ok, so it seems I might've been going down the wrong path to solve this problem? I'm curious to know how making one model render differently on different clients can work with little network programming.
#3
Can you give a game-type description of exactly what you are looking for? That way, we can point you in the right direction.
09/18/2006 (10:10 pm)
We still don't have enough of a problem description to know what you want :)Can you give a game-type description of exactly what you are looking for? That way, we can point you in the right direction.
#4
I am implementing a mod that gives a player the choice of adjusting two scores, perception and concealment. Perception determining how well a player detects other players, and concealment determining how well a player hides from detection. This results in the need for clients to have a different view of every other player on the map.
For instance,
PlayerA has perception: 50, concealment: 50
PlayerB has perception: 10, concealment: 90
PlayerC has perception: 90, concealment: 10
So PlayerA could probably see PlayerB, PlayerB could probably see PlayerC, and PlayerC could probably see PlayerA, even though they could be right next to each other.
There's an equation I created that takes into account the distance the player is from other players, their concealment scores, and the current player's perception score to result in the distance that he could see each player.
And there inlies my problem. I can't seem to get one client to disappear to one player, and not to another.. etc etc.
I hope that helps! And thank you for your support.
09/19/2006 (6:10 am)
Well I was trying to be as simple as possible but here goes!I am implementing a mod that gives a player the choice of adjusting two scores, perception and concealment. Perception determining how well a player detects other players, and concealment determining how well a player hides from detection. This results in the need for clients to have a different view of every other player on the map.
For instance,
PlayerA has perception: 50, concealment: 50
PlayerB has perception: 10, concealment: 90
PlayerC has perception: 90, concealment: 10
So PlayerA could probably see PlayerB, PlayerB could probably see PlayerC, and PlayerC could probably see PlayerA, even though they could be right next to each other.
There's an equation I created that takes into account the distance the player is from other players, their concealment scores, and the current player's perception score to result in the distance that he could see each player.
And there inlies my problem. I can't seem to get one client to disappear to one player, and not to another.. etc etc.
I hope that helps! And thank you for your support.
#5
1. Just hide the player on the local client. Look at the cloaking code. Many games do it this way, but it's prone to cheating.
2. Stop ghosting the object to the client in question. You do this from the server. I'm not sure you can do it out of the box so a hack is probably needed.
09/19/2006 (6:16 am)
There are two ways that I know of.1. Just hide the player on the local client. Look at the cloaking code. Many games do it this way, but it's prone to cheating.
2. Stop ghosting the object to the client in question. You do this from the server. I'm not sure you can do it out of the box so a hack is probably needed.
#6
And how would one just stop an object from ghosting? I read some articles about it but I can't seem to just do it. It's really frustrating me. You guys are like my last hope from just scrapping this project. I'm gonna go ahead and take a look over the cloaking code like you suggested Stefan.
09/19/2006 (6:59 am)
I've been using the startFade() function to make the players go invisible, but for some reason I can't get them to fade out on the client locally. And how would one just stop an object from ghosting? I read some articles about it but I can't seem to just do it. It's really frustrating me. You guys are like my last hope from just scrapping this project. I'm gonna go ahead and take a look over the cloaking code like you suggested Stefan.
#7
FYI, as long as we don't start talking source code, or specific algorithms, this is a good topic for this forum.
Unfortunately, I can see your very next question: "how do I change the scoping system to do this?"--and that will require source code discussion, and therefore needs to do to a new, private forum.
09/21/2006 (10:03 pm)
I also would suggest that you make the perception decision server side, and then modify the scoping to a specific client to determine if the ghost copy should be sent to that specific client at all.FYI, as long as we don't start talking source code, or specific algorithms, this is a good topic for this forum.
Unfortunately, I can see your very next question: "how do I change the scoping system to do this?"--and that will require source code discussion, and therefore needs to do to a new, private forum.
#8
I'll go ahead and post in the private forums on the question you predicted I'd ask :).
Broken link
Edit: not sure why I can't get my links to work right.
09/23/2006 (3:48 pm)
Thanks Stephen, I'll go ahead and post in the private forums on the question you predicted I'd ask :).
Broken link
Edit: not sure why I can't get my links to work right.
#10
09/25/2006 (9:54 am)
Oh, my bad :P
Torque 3D Owner Stephen Zepp
In general, the Torque server controls what objects are transmitted to each client (and therefore what each client can "see") via the scoping rules.
However, in your first sentence, you seem to imply that you want to render the same model differently on two different clients, which actually has nothing to do with networking (well, only a little).