- Home /
Serverside PhysX
I want to emulate the game logic server-side. Regretfully I haven't found exact information regarding the version of PhysX used in Unity, but after reading the changelog I believe that it is 2.8.3.
Is it at all possible to emulate Unity behaviour (with great precision) of obects on pure PhysX serverside? If yes, then is version 2.8.3 correct, or may I use any other version? It seemed that it is difficult to find this old version of PhysX.
"With great precision", no, not using any 3d real time physics evaluation known to mankind will you get "great precision". Not server side, not client side :)
$$anonymous$$aybe not with great precision, but more or less equal (more is better:) on client and on server. I mean that I want my server to have exact copy of the client-side physics.
You should be able to run physx on your server just fine, but it's difficult to emulate Unity's calls to physx without access to Unity's source. You can get a proper answer for Unity's physx version when you email the support $$anonymous$$m.
If you're running Windows you can find the PhysX dll's for all the currently installed versions under: Program Files/NVIDIA Corperation/PhysX/Engine
, so getting the correct version isn't a problem ;)
Thank you for your answers. I've found out that it is difficult to sync physX between server and Unity, because Unity3d uses slightly modified bersion of the physics engine. It also may be inefficient to move rigidbodies directly. Now I'm looking towards other engines, specifically gpu-accelerated (physX supports only cloth and particles as far as I've found). For example, Bullet engine client-side and server-side seems like a plausible idea.
PhysX supports much more than cloth and particles... It does rigidbody, softbody, fluids, and even dyanamic generation of rigidbodies through fractured meshes.
Answer by jonas-echterhoff · Jan 24, 2014 at 10:29 AM
The version of PhysX used in Unity currently is 2.8.3. Whether you will get good results exactly emulating Unity's PhysX behavior on a server running PhysX, I have some doubts. You will probably be able to approximate it, but it won't be easy, as there are many parameters to tweak, and getting PhysX to be deterministic is difficult to say at least (behavior depends on the underlying FPU model, as well as on initialization order of objects, among other things). But with enough work, you can probably come up with a good enough approximation to use the server as the authoritative source, and synchronize client results to that.
Thank you, your answer is accurate. Though after some research I've decided to look towards gpu accelerated engines for better performance.