Client representation of objects on server
by Owen Ortmayer · in Torque Game Engine · 01/13/2004 (1:42 pm) · 1 replies
Alright, I've been running in circles. I'm trying to figure out how objects on a client are represented when connected to a server in multiplayer mode.
Here's my problem: Basically on the server, every process tick I run a radius search and determine which object is closet to the player. If its different than the last run it sends a command to the client to switch its "target" to this object (referenced by its object ID). On the client I have gui object that sets its target to whatever the server tells it to and then draws itself where that object is on the screen. My problem is that in single player mode everything is dandy because the objects are the same on the client and server. But in multiplayer mode the objects that the server tells the client to target do not exist on the client. Im sure Im missing something simple but I've been running in circles so I'd appretiate any help.
Thanks,
Owen
Here's my problem: Basically on the server, every process tick I run a radius search and determine which object is closet to the player. If its different than the last run it sends a command to the client to switch its "target" to this object (referenced by its object ID). On the client I have gui object that sets its target to whatever the server tells it to and then draws itself where that object is on the screen. My problem is that in single player mode everything is dandy because the objects are the same on the client and server. But in multiplayer mode the objects that the server tells the client to target do not exist on the client. Im sure Im missing something simple but I've been running in circles so I'd appretiate any help.
Thanks,
Owen
About the author
Associate Stefan Beffy Moises
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4852