Game Development Community

VR Hack is not working for networking

by Mark Grob · in Technical Issues · 11/08/2005 (10:18 am) · 2 replies

Below is my hack code for the player.cc... I made comments in parts of the code most of the changes to the code are in the updateMove() as suggested by other forums, but my issue is that I am not able to get it to work on multiplayer over the network. The host PC/Mac's Player movement gets overwritten by the last player that connects to the hosted game. The other players do not see any of the other players on the landscape. What is my next step to get this working over the net? I am not sure on what the "Good Design" strategy would be for Torque. Is it best to make modifications to Gameconnection's getNextMove? or something else?

Thanks in Advance.

Mod Note: Source code removed from public forum.

#1
11/08/2005 (11:20 am)
I think what you need to do is move the sampling of the tracker data out of update move. I'd add that data in as a new Torque event type. Then shove these values into the Move structure. That way the clients will send the server the tracker data of each client. That's pretty much the only communication mechanism that the client has with the server (ignore CommandToServer in the script interface).
My P5 Glove Resource takes this approach.

Then this move structure will be used in both the client and server. Which will then effect the server version of your object and the changes will be ghosted down to the other clients.

Finally, you'll want to change pack/unpackUpdate to add any new variables you've added that the client ghosts will need to render properly (might not be necessary if you're just modifying pre-existing player vars).

Hope that helps.
#2
03/19/2007 (8:27 pm)
Hi Mark, I am wondering if you have got your tracker working with Brian's suggestion since it's been a quite old thread.