Game Development Community

Collision detection

by Brian Batchelor · in General Discussion · 09/30/2005 (10:50 pm) · 2 replies

I was interested to know in Torque's server/client (out-of-box) configuration where is the collision calculated? Does each client determine collisions then inform the server. Or does the server keep track of all entities' collision then, transmitted to each client? I suspect that each client would keep up with its player's collision and have the server calculate NPC collision, this would off load some computation from the server, but I could be wrong.

Brian B.

#1
09/30/2005 (11:29 pm)
To my knowledge, server and client both run the full collision checks. The server side collision check affects the server side object, and those changes are sent over to the client. However, when the ping or packet loss is too high, the client side checks serve to help keep the simulation running while we wait for our ping or packet loss to drop. I've run simulated network tests where I had separated out client and server collisions, and found that even if the (simulated, again, no comments on real performance here) ping was 3,000 and our packet loss 90% we still appropriately collided. Naturally, in all cases server overrides client. If I had it set up so that just the client collided with the object, I could go right through it.
#2
10/01/2005 (4:42 am)
The server is the authoritative source for all collision information (both player objects and other world objects), but as Alex mentions the client does quite a bit of non-authoritative work as part of our strategies for overcoming various networking issues, including both latency and packet loss.