Game Development Community

Player ID's on separate clients

by Johan Janssen · in Torque Game Engine · 02/25/2008 (6:20 am) · 1 replies

I'm currently implementing voice chat in the engine, and I want to animate the player who sent the voice packet. I'm sort of lost in the ID jungle on how to do this.


On client1 I can get either the object ID or the sim ID of the control object and put that in the packet.
But if client2 receives that packet both the object ID and sim ID of the control object are not valid.


Is there ANY ID that uniquely indentifies a client on all clients, and with which I can somehow retrieve the player object?
What ID should I put in the voice chat packet?

#1
02/26/2008 (10:34 pm)
Only on the server, I believe. SimID's are different on the client and server, and presumeably between clients.

Talking a little over my head, here, but I know that much. I'm pretty sure you'll have to use the server to coordinate (at least with out of the box Torque).

You'll certainly have to use the server to trigger the animation, though, if you want all the clients to see it. That much is just logical.

It does seem to me that if this is an important game feature it should be possible to code up a different system that doesn't use the simID's. You could query the server to find out which client you're looking at, but then take over from there.