Networked physics with PhysX

Started by
0 comments, last by wodinoneeye 15 years, 8 months ago
How would one typically integrate PhysX for use with networked physics simulations? In this case, many old simulation frames must be saved, inputs may arrive later than the actual simulation step they belong to, and so on, and we may need to perform some client prediction and run a different simulation on clients than on the host in some cases. Does the PhysX simulation offer support for these things? Or should I use the PhysX SDK only for complex particle effects etc which can run entirely on a single computer and doesn't need much interaction with other computers or correction of small timing errors (for example, it's not disastrous if a smoke grenade is exploded 0.1 seconds later on one client), while using custom physics code for basic character movement and collision detection, which won't be overly complex anyway (basic FPS physics, and perhaps some simple vehicle physics)? Any sample code, links or tips would be appreciated.
Advertisement

What it looks like frame by frame is less important than the results of a complex interaction happening (and final reasonably correct settling point). Accuracy and precision as shown to a client can be be somewhat off but still look pretty much the same (when it gets noticeably rediculous -- like things falling in curves when they should go straight down -- then that is the point where you have to be much tighter).

There are also game methods to incrementally correct movements to make up for late data (and temporal delays over the internet) where a predicttion is made and a sudden late change makes continuing that prediction wrong, the system then slowly adjusts the paths to bring the clients representation back to match the server state.

I have no idea what PhysX has built into it (especailly for prediction/correction) and its most likely you will have to do those things yourself.

I would assume that the server would need to have the PhysX running in it because it is the arbiter of the real game state, but there are likely plenty of cosmetic effects which dont effect game play that the client would make use of PhysX as well.


Generally games requiring split second corrections all the time dont work too well over the internet because the temporal distortions cause to much noticable anomalies (too many obvious corrections which impact player interactions).


--------------------------------------------[size="1"]Ratings are Opinion, not Fact

This topic is closed to new replies.

Advertisement