Physics and objects

umop

Newbie
Joined
Jan 16, 2004
Messages
585
Reaction score
0
Ok, I know that each client individually processes the physics of objects in multiplayer, but will it be the same for each client? I wonder...

Imagine this: the barrels on the new aztec near the bombsite get tossed around because of a nade, and since the barrels' physics are processed from each different client, one client sees a barrel at point X, and another client sees the barrel at point Y. Being one of the clients, on your screen it appears a barrel is approaching you and you take cover behind it. To another client where it was processed differently, you are taking cover by thin air.

What I am asking is if the physics will be processed the same on each computer, or will it vary? I assume that if the server tells the clients that the grenade exploded at point A, all clients will process the same physics data and it will look the same on each client, but I havn't read this being confirmed anywhere.
 
I think it was server-side physics.

They aren't as complicated as Client-side but it ensures all the players see the same thing.
 
umop said:
Ok, I know that each client individually processes the physics of objects in multiplayer, but will it be the same for each client? I wonder...

Imagine this: the barrels on the new aztec near the bombsite get tossed around because of a nade, and since the barrels' physics are processed from each different client, one client sees a barrel at point X, and another client sees the barrel at point Y. Being one of the clients, on your screen it appears a barrel is approaching you and you take cover behind it. To another client where it was processed differently, you are taking cover by thin air.

What I am asking is if the physics will be processed the same on each computer, or will it vary? I assume that if the server tells the clients that the grenade exploded at point A, all clients will process the same physics data and it will look the same on each client, but I havn't read this being confirmed anywhere.

Objects like barrels that you can push around and hide behind will be calculated server-side, so it looks the same to everyone. Smaller, useless objects likes stones or cans are done client side, because they cannot be used in the gameplay. Ragdolls are also client-side.
 
It's a mix. Can't find the link just now but Gabe said a while back that any object on a map can be tagged as server or client side physics modelled by the mapper.
 
Abom said:
Objects like barrels that you can push around and hide behind will be calculated server-side, so it looks the same to everyone. Smaller, useless objects likes stones or cans are done client side, because they cannot be used in the gameplay. Ragdolls are also client-side.

Ok, that makes sense now. Thanks for the speedy info :thumbs:
 
Great I was wondering how you could tell what to be clinet/server side otherwise most of my gameplay ideas wouldn't work.
 
this is going to put a massive strain on server side reasources though wont it. meaning prices of rented game servers might go up. if the game uses more cpu and ram to perform these fancy things then they will be able to get less game servers on each physical server thus pushing the price up.
will be interesting to see how they are able to optimize things.
 
Its still a game, so as long as the server marks the point where an impact would be, all clients should then calculate the exact same thing, no? Unless they use some sort of randomizer to get a more realistic effect (for lets say rough terrain textures).
 
Well if you think about it, if ALL physics and items are done client side, the outcome would look exactly the same on all clients.

Math is 100% precise, and as such when the physics engine starts to calculate the happenings of a he grenade smashing up some barrels, each client will be fed the exact same numbers, and thus it would look the same on all clients.

And also, if there were to be exceptions, I doubt the errors would be larger than a couple millimeters.
 
coax said:
Well if you think about it, if ALL physics and items are done client side, the outcome would look exactly the same on all clients.

Math is 100% precise, and as such when the physics engine starts to calculate the happenings of a he grenade smashing up some barrels, each client will be fed the exact same numbers, and thus it would look the same on all clients.

And also, if there were to be exceptions, I doubt the errors would be larger than a couple millimeters.

Incorrect. Take a game like UT2k4, if one person were to kill another, the ragdolled body would 99 times out of 100 end up in a different position between the two computers.
 
Sure, if every condition was exactly the same on every client at all times you might get the same results. That kind of synchronization is, currently, far too taxing on bandwidth to use in a game (much less one as complex as HL2). It would be even more costly than having the server control only the important physics.

Also, Valve's client-side prediction system could allow them to cut down the bandwidth even further by only updating the physically simulated objects half as often (or even less) and letting the client's computer do the necessary calculations until it gets the next update from the server. That way you could avoid using total synchronization, let the client's computer handle a lot of the work to cut down on bandwidth use, and still have everyone seeing the same thing (or very close to it). If that spared a lot of bandwidth they could use some of it to make ragdolls do the same thing on everyone's computers (without that you might say "lol! his head's in the other guy's crotch!" then everyone else is like "wtf are you talking about? they are 5 feet apart"... and you have no one to share in the humor of their pose).
 
Yea I don't think they would screw something like that up, that would be a big problem.
 
I wonder, everyone says that objects that don't affect gameplay are handled client-side. But if you take a ragdoll, that's handled clientside, and on your pc he smashes into a barrel, his momentum moves the barrel, or should, but the barrel is calculated server-side and is on the server not affected by the body which smahes into it, because it didn't happen there.

So how do you keep this synchronized? I assume the effect of client-side objects on server-side objects is completely ignored, but that would look funny if a 90 kg terrorist flies into a 3 kg cardboard box and the box doesn't move at all.
 
That's why the physics are probably calculated server-side :)
So there's no real need for synchronization.
 
Back
Top