Sign in to follow this  

Free form movement, Network Theory & Collision

This topic is 4035 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

Anyone know of a good article that discusses the following client/server concepts. I'm converting my tile based rpg client/server code to a free form moving environment so its no longer tile based. BTW what I mean by free form moving is like free roaming. Take world of warcraft for example see how you move around freely? - X,Y,Z free form movement. Do you send the clients position to the server or do you move the user at the server level? - How do you go about doing collision checks at the server level? I know this has been discussed to death, can you guys point me to some good resources that cover these concepts? Thanks

Share this post


Link to post
Share on other sites
Sorry, I dont know any resources, but here are three basic approaches:

1. action game:
Physics runs on server and client, where the client physics it only needed for prediction,BUT for all visible dynamic objects. This one is the most difficult approach (=> BF,Quake).

2. restricted client physics:
Physics runs on server and client, but you only need the client physics to move your own character. Most of this games disable the object-object collision detection. (=>EQ,WOW)

3. Server only physics:
Physics only on server. Client recieves only position of objects and interpolates the position data. This approach is really easy, but you won't be able to directly control you character. You need a click'n'go approach to control your char. High lag may be annoying. (=>Diabolo ?)

--
Ashaman
KISS - Keep it Simple'n'Stupid

Share this post


Link to post
Share on other sites


A very accurate collision could be done at the client (thus to do realistic deflections and partial body effects) and simpler validation tests (bounding box??) done on the server -- enuf to keep a player from cheating but not as expensive....)

Share this post


Link to post
Share on other sites
You have to do the movement on the server, otherwise it's ridiculously easy to cheat. A client will commonly do the movement locally as well to reduce the appearance of lag (movement would be delayed by twice the latency otherwise, which doesn't feel good), but server packets will override the locally calculated position when they arrive.

Collision checks are the same wherever you do them. You typically have a simplified 'collision mesh' for this purpose which has enough accuracy to make the collisions look okay but still make them run fast. Client-side collision detection should be limited to visual effects, and player vs static geometry (to stop you running through walls and then snapping back when the server notices the collision).

Share this post


Link to post
Share on other sites
You could go and run the same simulation on the server. The client side simulation could only be used for displaying graphics, while the server could calculate the reference simulation. The physics simulation can use a simplified graphical (collision) mesh and the server side doesn't have to render anything. The clients just send in the commands, the server caluclates the new state and sends everything back to the clients. The clients do the calculation on their own, and interpolate into the server state when there is a difference.

Viktor

Share this post


Link to post
Share on other sites

This topic is 4035 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this