Determinstic PhysX, GangBeast Setup, and LockStep Frame

I was just wondering how Gang beast setup their server tech, seems like lockstep frame by passing commands to server or p2p communication to emulate all client device to have same PhysX emulation would be impossible, how did gang beast go solve this kind of problem able to have same emulations for all their clients.

Anybody?

On Gangbeast they have official and non-official hosting, but I am still wondering how they sync their physics variables, having bunch of players sync all their rigidbodies, making an Unity Physics Server just seems like unreasonable thing to do… I was wondering if they just use fastest’s player’s physics simulation data passes into server, where server will adjust to all these variables?

After doing some research and I saw this: Steam Community :: Error, Seems like gangbeast didn’t use lockstep framework, I guess it’s because of PhysX and animation of Unity, rather they just use Unity to start a server instance with -batchmode and -nographics, and probably simulate most of the stuff inside of Unity server, which probably figure why they start letting other players to host because of the usage is huge, if they hosted so many official servers could end up with a huge cost.

1 Like

Gang beasts isn’t very many players and it is slow paced, so it’s OK to just send a whole lot of correction data.

On the side, have anybody tried using Newton Dynamics?
Physics Engine: GitHub - MADEAPPS/newton-dynamics: Newton Dynamics is an integrated solution for real time simulation of physics environments.
Unity Wrapper: GitHub - svenberra/NewtonUnityPlugin: NewtonUnityPlugin is a managed plugin for Unity 3D that allows you to use the Newton Dynamics physics engine
Newton Dynamics • About Newton
It seems like somebody already ported this into Unity, figure if using one thread this might be truly deterministic 3D physics Engine.

I think you’re really chasing the wrong bunny. You don’t need deterministic physics for this, but if you want to go there, please do.

You need deterministic physics, or do you need deterministic results? They’re not the same thing. And why deterministic? do you mean accurate or forecasted?

1 Like

I want exact deterministic physics because I want to use lock step implementation on my mobile game simulate all 3D physics to be deterministic, rather than using state sync with heavy server simulations.
So far using Newton Dynamics, I was able to generate exact same physics deterministic simulations over and over on different PCs, using 1 thread worker and fixed update, just like what DPhysics is doing.

Just to throw it out there, Photon has TrueSync which is a lockstep framework with built-in physics for 2D/3D.

Their source code is not exposed, they don’t have Joint Component which is what I need to simulate ragdoll behavior.

Have you asked them about adding that? I think they’re open to suggestions like that.

I was able to get TrueSync to work, I also have their source code, so I went with that, however the problem remains with getting mecanim’s animate physics to work with any outside physics engine code, seems like they react differently with animations(unity animation). PhysX itself has with its compound collider system implemented inside unity is already some other 3D physics engine doesn’t have, without full source code, I can’t really do a full implementation. I think it was always been a big topic having animations and physics been mixed together, it doesn’t always play right together, just when you tought having a deterministic physics 3D engine solved all the problem, but really another problem arises, also implementing modifying 3D physics engine itself is a hefty work(trying to implement configurable joint). Back to Snapshot Interpolation, heavy physics simulation over server for now… Not try to discourage anybody out there, but I am on a deadline.

Hello guys, I’m looking for deterministic physics solution for a while, I need my bullets to be a local objects with ricochet ability and to be synced over the network without any client/server side corrections, can I achieve this with
Newton Dynamics or anything else? Is this even possible?

If it is just bullets you can probably write your own deterministic solution, you don’t need the whole physics engine.

Hi, thanks for reply and yes, all I need is a points based shape logic with height to detect and calculate first collision hit normal and possibility to spherecasting in to this shapes for other gameplay features. Another question is a skill needed for this, I’ve not any experience in this… I would very appreciate any links to any sources that could help me with this.

um… right, sounds like something you could do yeah… so basically you just need a math library that has different type of 3D detection, I believe there is one on assetstore that’s pretty good. I am also making a deterministic 3D physics engine right now based off truesync, got a ragdoll to walk almost, if anybody with good physics background, feel free to join me and work on the physics joints and stuff.

Yes, Truesync is very promising, but I can’t use it for now, because there is no dynamic connections support, no raycasts and a lot of bugs.
I’ve found an opensource C# physics engine, which can work with unity called BEPU and considering to this topic (https://forum.bepuentertainment.com/viewtopic.php?t=2302), it seems to be a way to make a crossplatform deterministic physics, but I dont think I can handle this. Would be great to cooperate with community, with all who ran in to this problem, so we can make a solution together

I have integrate a simple version of this into unity as you described, I find that the performance for this is not going to anyway close to commercial use, I spent 2 hours integrating this, so there might be some stuff I am not getting. I was able to run alot of cubes, but the frame rate just drops to pretty much nothing.

I am also following the avatar physics forum, their engine is pretty deterministic running very accurate complicated 3D physics in a good performance.

3539289–284010–BEPUDeterminsticPhysics.unitypackage (2.11 MB)