Hi paril, cool stuff. You get on IRC at all? quakedev seems dead
Yes, something like the death ragdolls in HL2 (not the ones you spawn in GMod as actual ragdolls, but the ones that appear when people die).It would be impossible to sync them up 100% with just client-side prediction.-P
Yes, this is how it is done on the server as well; thank you for your godly insight
I had trouble with Bullet on the client side due to it running at a variable FPS, so I have to see what I can do to make it run at a fixed 30 or 60 like the game DLL.
int ODEIterationsPerFrame; int frametime = Sys_Milliseconds() - lastODEUpdate; //iterations need to be adjusted for framerate. ODEIterationsPerFrame = frametime; //clamp it if(ODEIterationsPerFrame > MAX_ODESTEPS) ODEIterationsPerFrame = MAX_ODESTEPS; if(ODEIterationsPerFrame < MIN_ODESTEPS) ODEIterationsPerFrame = MIN_ODESTEPS; dSpaceCollide(RagDollSpace, 0, &near_callback); dWorldStepFast1(RagDollWorld, (float)(frametime/1000.0f), ODEIterationsPerFrame); // Remove all temporary collision joints now that the world has been stepped dJointGroupEmpty(contactGroup); lastODEUpdate = Sys_Milliseconds();
Yeah. The server would just say "ragdoll spawns here at these angles, have fun".
Quote from: Paril on April 14, 2011, 03:41:48 PMYeah. The server would just say "ragdoll spawns here at these angles, have fun".My presumption would be that in multiplayer, a lot of the potential fun of ragdolls would be diminished if players were seeing dissimilar orientations of the model.player1: haha! player2: what?player1: did you see the corpse arm get caught and the body get dragged up the lift??player2: ...no mine's on the floor over hereMaybe the client could treat its local modeling of the ragdoll as a prediction, and the server could periodically send a low-res snapshot of its 'master' ragdoll position to the client. If the client's ragdoll state has drifted from the server's, the client would be responsible for interpolating over some number of frames to put its position back in line with the server's snapshot.If we've got 10 potentially visible moving ragdolls, and the server were sending just one ragdoll snapshot per frame, then each ragdoll would still be receiving a snapshot every 0.3 seconds given your 30Hz framerate... The fewer ragdolls moving, the more rapidly snapshots could be sent.If the PVS changes and new ragdolls become potentially visible which haven't received snapshots in awhile, their snapshot would be scheduled to be sent ASAP; and presumably the client wouldn't bother interpolating, but would just accept the server's positioning immediately.Dunno... Just a thought. . . Regards,quadz
Excuse the formatting, this board seems to get wonky when posts are longer than the window.
Nicotine has never been addictive to me, whatsoever, no matter how many years I've smoked or how many I smoke a day.
Well that was kind of uncalled for Since I haven't seen your code I wasn't sure if you weren't well, like maybe spawning them from player_die, or something along those lines
if the rag dolls are in a different place to the server vs the client, a rocket could hit a rag doll on the server and explode,