Well everything in a game is physics, technically, so I still don't see how they can't code it directly.
Ex: I shoot a window, the glass breaks. Why can't that be done in code without using a special API? Server calculates bullet trajectory and all the physics involved in the shards flying, then sends the info to the clients that have line of sight to make that animation. Isin't that how everything else works anyway?
What happens if I have physx and my friend does not, and I shoot a window, what does he see, it just vanishes?
Or am I missing something?
Physx was originally introduced by a company named Ageia. It was a hardware (proprietary card) and software (physics library) solutions for simulating game physics.
The original emphasis of the company was that a general CPU was not the most efficient method to process physics. They instead built a custom card that was dedicated to nothing but game physics, advertising it could perform many more physics operations then a CPU could.
This is the emphasis of Physx, that a general CPU is NOT the ideal hardware to handle physics. They advertised that game companies could perform more complex and realistic simulations with their system.
Since then, nVidia has argued that their video cards actually perform very similar calculations to what the Ageia hardware card did. They purchased Ageia and Physx and ported Physx to work on nvidia cards using CUDA.
Physx now works on all nVidia cards.
claimed Advantages of Physx:
---------------------------------------------------
1) ability to perform much more physics calculations then a regular CPU
(more hard body calculations, faster fluid simulations, more complex soft body calculations, higher particle count effects)
claimed Disadvantages of Physx:
---------------------------------------------------
1) Modern processors have much more power to handle physics then their older models (many cores, AVX instructions, etc). So the advantage of using video cards to process physics is not as great as it once was. *** Some people go even further and claim that nVidia goes out of their way to slow down CPU physics using Physx to show how fast their video cards are and/or forces game companies to drastically reduce physics effects when Physx is disabled. I cannot comment on these accusations.
2) Physx is proprietory to nVidia. As oppose to physics solutions that use more open standards to access the power of video cards such as opencl.
Most physx calculations do not affect gameplay as of today (they are just eye-candy), so there's no problem with server-client networking. It's just a system to render a large number of physics calculations faster on the local computer.