Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

SGreth

Who handles collision detection/response?

This topic is 5298 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In a client/server archetecture who should handle the collision detection? Consider the following, somewhat complicated, solution. -Each client does their own collision detection of their object (say the space ship they''re flying). -The server does collision detection for all AI objects. -The server does collision detection for all weapons to help prevent client-side hacking. Any comments/ideas on this solution? More importantly, I''m interested to see how everyone else is doing collision detection and response in a client/server environment. Thanks, ~S''Greth

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
it is likely that you would want your sever doing only as little as is nessecary to maintain secure connections for players, thusly i would say all calculations should be client side with the sever well, serving.

Share this post


Link to post
Share on other sites
In the Unreal Engine, as an example, both sides do it. The server does it authoritatively, however, so the client is just giving the player an approximation of the actual result.

ld

Share this post


Link to post
Share on other sites
I was originally going to use that approach but my concerns were the following.

1) If the server doesn''t do collision, how can AI objects do any pre-emptive collision checking.

2) Is it secure to have clients doing their own weapon hit-checking. I could see a quick hack where the client just sends out messages saying "I hit obejct X" even if they didn''t. Of course you could *try* and previent this with encrypted packets and other preventative measures, but they aren''t foolproof.

Share this post


Link to post
Share on other sites
quote:
Original post by liquiddark
In the Unreal Engine, as an example, both sides do it. The server does it authoritatively, however, so the client is just giving the player an approximation of the actual result.

ld


That was kind of the approach that I was thinking about. Each client does collision detection for it''s body/hull/object, but when it comes to weapons the server should be the authoritative testing agent for those objects.

Share this post


Link to post
Share on other sites
I think that the client should do all of its own collision detection so that it can render the game even when the connection is laggy, but the server should do its own collision detection to prevent hacking, and override the client if the results differ.

Share this post


Link to post
Share on other sites
quote:
Original post by psykr
I think that the client should do all of its own collision detection so that it can render the game even when the connection is laggy, but the server should do its own collision detection to prevent hacking, and override the client if the results differ.


As an example...
With this approach a client would do the collision detection for weapons (to display the special effect of a laser hitting an object...) but the actual damage would be dealt out when the server detects the collision.

this sounds like a good way to do things.

Share this post


Link to post
Share on other sites
quote:
Original post by BarnyardMessiah
It''s how the Torque Game Engine works,

and it was good enough for Tribes.


If that''s how Tribes did it then it''s good enoguh for me!
Long live Tribes what a great game.

Share this post


Link to post
Share on other sites
Any time the client is allowed to make world state changes, it leads to cheating and stabability problems, much like a peer to peer network game works, and why most people choose client-server now.

The server should do world calculations like hit detection and such to keep the game world data accurate, and send out delta info. The client should do only the amount needed for prediction (i.e. starting with QuakeWorld). Again, it is good if you can let the client do some of the work, but be carefull of cheating.





interNEKO

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!