Physics in Multiplayer

Posted By: Sajeth

Physics in Multiplayer - 06/22/12 19:51

Hi,
how would I go about implementing PhysX into a multiplayer game? Especially since I'd be using a Half-Life 2 style of physics manipulation with impact on gameplay. What would be the best approach in theory?
Calculating the physics on every client and the server and manually updating position, orientation and applying forces if the difference to the server becomes too significant?
Only using PhysX on the server and using "fake" physics on the client, based on the values sent by the server?
Posted By: 3run

Re: Physics in Multiplayer - 06/22/12 20:02

I guess you better handle main physics manipulations on the server, and update directly positions and angles for clients. If I remember correctly, Rackscha was playing with physics in multiplayer world, and as far as I know, he got some nice results, ask him!
Posted By: Rackscha

Re: Physics in Multiplayer - 06/22/12 21:09

HI, someone wrote my name?^^

3Run is right. I updated the values directly. My demo worked on a fixed FPS base(60fps). EVery 3 fps i send new data from the server to the clients.
The clients blended the new position/angle between the next 3 frames to get smooth results. Some kind of problem is the delay on the client, which isnt too significant if the ping is < 100.

The code i used there was initially constructed as my defaultmovementcode(and is). The mechanic is so basic, it can be applied to any xyz and pan/tilt/roll changes of any enty type.

Oh hell...this reminds me on something. Some time ago i posted a signed byte function i designed just for a rewrite of the old system with less traffic grin

Need to investigate this again.

For further questions, just ask laugh

Greets
Rackscha
© 2024 lite-C Forums