client based physics&server based physics

pixartist

Newbie
Joined
Jul 23, 2003
Messages
1,009
Reaction score
0
can they interact? i just watched one of the new gamespot vids and i saw a barrel just rolling over a lil tin as if it was no there oO
 
pixartist said:
can they interact? i just watched one of the new gamespot vids and i saw a barrel just rolling over a lil tin as if it was no there oO
They won't interact, no... raises a few questions about how barrels will go over bodies, actually - since the barrels are server and bodies client.
 
the client based stuff wont be much bigger than a can, its mainly there for explosive eye candy, the barrel needs to be server side because it acctully provides cover etc, they cant interact cause that would require sending infomation to the server, and therefore defeat the point.

As for barrels and bodies, Im sure they will simply clip, its just one of those things, having the ragdolls server side, with all the different centers of gravity on all the limbs, interacting with a dynamic object like the barrel would create terrible strain on the netcode, and probbally ruin the CS feel, i havnt seen another game do any better with ragdolls in Multiplayer, so people will just have to get over it.
 
pixartist said:
so barrels wont hit dead bodys? :(

Nope, sorry, i doubt Doom3 or Stalker will behave any differently when it comes to ragdolls, unless they want laggy multiplayer.
 
server side would take precedence always,,,

but that might mean that while a barrel would move through a body, a dying body might fall realistically over a barrel
 
Pehaps, but the ragdoll wouldnt be able to apply any force to the barrel.
 
Ragdolls are client based?

Well, in SP, the only thing ragdolls don't affect is the player. :)

It will be good to see piles of ragdolls. :)
 
I doubt they will just leave it so that a flying dead body falls through barrels.

On the client side, the client knows where the barrels are when it's calculating ragdolls, surely that is all that is needed to make it work properly?

Someone else then pushing a barrel over a dead body, I dunno how they would get around that, since the server doesn't know where the body is (unless it is somehow updated when the body comes to rest) so it can't know that the barrel must hit the body....

Hmm weirdness!
 
It makes me sad that if a ragdoll death turns out really funny, you won't be able to laugh at it with the rest of the server because everyone's is different :(

Edit: doh, thought someone would have replied by now :o
 
its the same in UT2003, and farcry, just take a screenshot, if its that hilarious lol

its somthing they cant really avoid untill everyone of there customers has a really decent connection, which isnt gonna happen any time soon
 
You will still be able to make a pile of dead bodies, though, surely? Because ALL the ragdolls are client side, so they can all interact without any need to talk to the server.
 
Maybe, although i wouldnt be surprised if they removed that aswell to free up some CPU, it really isnt the focus of CS after all.
 
They might represent the corpse as a simple bounding box on the server side so there is some interaction with other objects (barrels). The floppy arms and legs could be client side.
 
Roceh said:
They might represent the corpse as a simple bounding box on the server side so there is some interaction with other objects (barrels). The floppy arms and legs could be client side.

so you mean if there was a body on the ground and a barrel rolled at it it would hit the box around the dead body and roll away?
 
Yah, i think that is what they will most likely do. I heard that the physics in cs:s will be scaled down alot, anyone know if that is true?
 
Headcrab Cakes said:
so you mean if there was a body on the ground and a barrel rolled at it it would hit the box around the dead body and roll away?

If you look on one of the gamepot videos, where he is shooting barrels on aztec it rolls into a live player and rolls back. I dont see why this cant apply to corpses as well.
 
I think what roceh said is true, because the game obvious can tell when a live person is bumping into stuff due to the bounding box.


To Yada:

I heard that they were making the physics more exaggerated so it doesn't have to be as accurate, and also because it is more noticeably impressive :)
 
Roceh said:
If you look on one of the gamepot videos, where he is shooting barrels on aztec it rolls into a live player and rolls back. I dont see why this cant apply to corpses as well.

look at it like this. whatever physics happen client-side go unnoticed to the server, and all ragdoll deaths of players are client-side. basically a server-side object cannot interact with a client-side object, because it can't know how.

so with that in mind if client1 sees a ragdoll fall to the left, the server doesn't know this, the last thing the server kept track of was the live player, so a server-side physic barrell couldn't possibly know where to collide with the body, because to the server, the body just disappeared.

the only way to get collisions with dead bodies is if the barrells were serverside AND the ragdolls were serverside. then the server would say, oh that body is right at this coordinate arranged in this way, ill tell the barrell to watch out for his body location + his limb location.

an easy way to envision this is say a player dies, client-side physics are then calculated for each player, and as we know, they will be different. client1 sees the body roll a bit to the left, client2 sees the body roll a bit to the right. now the barrell comes rolling along. EVEN if there was a possibility for the client to send his info of corpse location, what player gets priority for the barrell to collide with 'his' version of the body location? because if 1 player saw the correct version, every other player would see the barrell bumping up against nothing. which is not a good trade off
 
poseyjmac said:
an easy way to envision this is say a player dies, client-side physics are then calculated for each player, and as we know, they will be different. client1 sees the body roll a bit to the left, client2 sees the body roll a bit to the right. now the barrell comes rolling along. EVEN if there was a possibility for the client to send his info of corpse location, what player gets priority for the barrell to collide with 'his' version of the body location? because if 1 player saw the correct version, every other player would see the barrell bumping up against nothing. which is not a good trade off

that's what i was thinking, but i wasn't sure how to word it. :D
 
Hmm if Valve (perhaps in a future update) worked on the physics code to make it deterministic, all physics could be basically client side, perhaps just checked on for errors once every second or two, and still be identical for everyone. I predict that deterministic physics will become the way of the future for physics in games.
 
Question:
if the server has to detect all the bullets or grenades that start physics reactions and tell the clients, why are all the client-side physics not the same anyway? is the server information sent to clients not the same for every client?
 
Headcrab Cakes said:
Question:
if the server has to detect all the bullets or grenades that start physics reactions and tell the clients, why are all the client-side physics not the same anyway? is the server information sent to clients not the same for every client?

because bullets and grenades aren't affected by physics and very easy to keep track of by the server(compared to rolling ragdolling corpses).

edit: well, ill say that the current grenades don't use the kind of complicated physics that havoc allows
 
Headcrab Cakes said:
Question:
if the server has to detect all the bullets or grenades that start physics reactions and tell the clients, why are all the client-side physics not the same anyway? is the server information sent to clients not the same for every client?
Because the clients may recieve the data at slightly different times (perhaps).
Also (the main reason) is that everyone's computers run at different speeds, so the calculations are done a different number of times dependent on the speed of the CPU. i.e. a slow computer will be inaccurate compared to a faster one.

Generally the physics will be very similar, but in some cases they'd be too different to rely on them being similar.
 
poseyjmac said:
because bullets and grenades aren't affected by physics and very easy to keep track of by the server(compared to rolling ragdolling corpses).

edit: well, ill say that the current grenades don't use the kind of complicated physics that havoc allows
I think he didn't quite mean that.

I read it as this:

"Given that on all client machines the same start conditions exist, why don't they all arive at the same conclusion (yeild the same physical position) given that they physics calculations are constant?"
 
Couldn't (wouldn't) client side physics be affected by server side? Like if say some particles from an explosion collide with a barrel (server side), would they bounce off? I don't see why not.

Now if the same thing was applied to ragdolls, it would look like the bodies were made of styrofoam, and be pushed by barrels (server side objects) without affecting the server side objects.

I wonder what they will do. Perhaps servers with fast players only will make ragdolls server side.

Oh, and Headcrab Cakes, where did you get you avatar. :rolleyes:
 
SLH said:
I think he didn't quite mean that.

I read it as this:

"Given that on all client machines the same start conditions exist, why don't they all arive at the same conclusion (yeild the same physical position) given that they physics calculations are constant?"

that's exactly what i meant. thanks for clearifying.
 
he asked why are things like ragdolling not like bullets and grenades. well the first difference is bullets and grenades aren't stimulated by the havoc physics engine. but yea who knows what he meant
 
Ok, i'm gonna do a little/big post on how i think physics are done (based on other games and common sence).


When playing a MP game the server deals with all gameplay-effecting physics.
Barrels/grenades/bullets etc... I know no all of this is havok, but it's all server-side, and is treated the same sort of way when thinking about server/client stuff.

Re. Server-side physics:

The server sends infomation to the client pertaining to the location/status of all physical objects, also when and where bullets strike/get fired from etc...

The client doesn't 'physiclly simulate'/do calculations on these objects (besides prediction, but that's irrelevent to this discussion).

Re. client-side physics:

I'll use the example of a ragdoll object for this. When a player dies the server creates a ragdoll in place of the player (educated guess), then all it's properties are copied to the client (e.g. leg/arm positions).

From this point on the server forgets about it. Now it's over to each client to do their (independent) calculations for the ragdoll. As said in my previous post these calculations may result in slightly different body positions.

Because the client has info about all server-side physical objects it can use them when it's doing it's own calculations - i.e. ragdolls bouncing off barrels etc...
However the (server-side) barrel will not be effected by the ragdoll because as each client is slightly different (and the server doesn't calculate ragdolls).

How would you feel if you shot an RPG at someone and it exploded mid-air because another client had a ragdoll there? :D :D


Hopefully this will have helped people's understanding.
Feel free to ask questions or question my logic. :)
 
poseyjmac said:
he asked why are things like ragdolling not like bullets and grenades. well the first difference is bullets and grenades aren't stimulated by the havoc physics engine.
No the first difference is that it isn't simulated server-side.

EDITED: Things other than havok-simulated stuff could be client side.
 
Headcrab Cakes said:
got my avatar here: http://members.lycos.nl/michielb55/

i liked the bloodiness! hope the author doesn't mind that i'm using it :upstare:
Yeah uhh. I think that is from the beta.. Screenshot from the model viewer...

It seems no-one really notices but I just want you to know that we don't appriciate beta content here.

This discussion is getting intense! :rolling:
 
SLH said:
No the first difference is that it isn't simulated server-side.

Things other than havok-simulated stuff is client side.

no thats 'a' difference. i just pointed out another difference that led to the same conclusion.
 
poseyjmac said:
no thats 'a' difference. i just pointed out another difference that led to the same conclusion.
The reason that i used 'the first' as opposed to 'a' difference is because whether things that are simulated by havok or not, they may (or may not) be duplicated on all clients (i.e. server-side).

Not meaning to shout you down, i'm just clearing things up, and if you have evidence contrary to what i'm saying i'll be happy (and interested) to read it. :)


EDIT: Just noticed my last sentance in the previous post may be miss-leading. Here's the correction:

"Things other than havok-simulated stuff could be client side."
 
u know, i dont even know what you are trying to say anymore. all i know is that i wasn't wrong. his question could be interepreted in 2 ways, you answered 1 way i answered another, he happened to 'mean' the 2nd way.
 
poseyjmac said:
u know, i dont even know what you are trying to say anymore. all i know is that i wasn't wrong. his question could be interepreted in 2 ways, you answered 1 way i answered another, he happened to 'mean' the 2nd way.
I was mearly pointing out that the answer you gave to what you thought he was asking isn't quite correct.

"he asked why are things like ragdolling not like bullets and grenades. well the first difference is bullets and grenades aren't stimulated by the havoc physics engine."

Whether the bullets/grenades/ragdolls are done by havok or valve/source is irrelevent, what matters is whether they are done server-side or client-side.

:)
 
aha. but u see its automatically assumed that if you mention bullets or grenades, that they are NOT affiliated with havok physics. there is no switch to make them affected by physics. which is why i wasn't explicit about it.
 
poseyjmac said:
aha. but u see its automatically assumed that if you mention bullets or grenades, that they are NOT affiliated with havok physics. there is no switch to make them affected by physics. which is why i wasn't explicit about it.
??

A grenade would be effected by a (server-side) barrel, as would a bullet.

Sorry, i don't think i understood you just then.
 
yes but those are simple calculations, the bullet or grenade ITSELF doesn't use all the variables of the havok physics engine. bullet goes in a straight line(or if modded has slight drop over time), if something is in the way, it hits it.
 
Back
Top