Pepuphysics as server with collisions best way to handle it #338
-
Hi, i am building a space game bases on the planet example, the server is made in asp.net core and i have a unity client. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This is a pretty broad question, so I doubt I'll be able to give you a real "best." One thing that comes to mind is that I wouldn't expect the approach in the contact events demo to struggle with performance at these scales. You could try something like My guess is the greater performance consideration is what is being done in response to the collisions, rather than the reporting of those collisions. If something expensive and/or requiring locks to synchronize was in the contact events, that could sequentialize execution and hurt performance a lot. |
Beta Was this translation helpful? Give feedback.
This is a pretty broad question, so I doubt I'll be able to give you a real "best." One thing that comes to mind is that I wouldn't expect the approach in the contact events demo to struggle with performance at these scales. You could try something like
CollisionTrackingDemo
(and I do tend to prefer it over conventional events), but I don't actually expect the performance to differ by much. There's alsoSolverContactEnumerationDemo
, but same thing.My guess is the greater performance consideration is what is being done in response to the collisions, rather than the reporting of those collisions. If something expensive and/or requiring locks to synchronize was in the contact events, that c…