Comments (5)
Exactly, DOTS physics is only deterministic on the same machine, so it's not guaranteed that the physics simulation will be the same on PC, Android, WebGL, etc.
This project guarantees that the physics simulation will run exactly the same on every single platform.
See this reddit post for details.
from unity-deterministic-physics.
from my test, it seems to be deterministic on different platforms. I mean at least all 64-bit architecture would work, why would it be different when they are all using burst compiler. Is this proven? The Reddit post also doesn't explain on this matter.
from unity-deterministic-physics.
from my test, it seems to be deterministic on different platforms.
The video in the reddit post shows that they are different on pc, webgl, and android. It's possible that it's deterministic on most of the platforms, but the goal of this project is to be deterministic on all platforms, no matter what hardware is used.
why would it be different when they are all using burst compiler
Different platforms might implement low-level floating point operations differently.
For example, Floating point rounding mode may be different on different platforms. This means that a multiplication/division might be rounded differently on different machines, which breaks determinism. In the burst compiler, there is an option for this (FloatMode.Deterministic
), but it's still not implemented.
Even if the burst compiler generated deterministic floating point operations, the mathematical functions (e.g. sqrt, trigonometry) would still not be deterministic, because those are usually implemented as hardware instructions or system calls. Also, they are usually implemented as an approximation (for performance reasons), which is good enough in 99.9% of the time (but not when trying to be deterministic).
from unity-deterministic-physics.
from my test, it seems to be deterministic on different platforms.
The video in the reddit post shows that they are different on pc, webgl, and android. It's possible that it's deterministic on most of the platforms, but the goal of this project is to be deterministic on all platforms, no matter what hardware is used.
why would it be different when they are all using burst compiler
Different platforms might implement low-level floating point operations differently. For example, Floating point rounding mode may be different on different platforms. This means that a multiplication/division might be rounded differently on different machines, which breaks determinism. In the burst compiler, there is an option for this (
FloatMode.Deterministic
), but it's still not implemented. Even if the burst compiler generated deterministic floating point operations, the mathematical functions (e.g. sqrt, trigonometry) would still not be deterministic, because those are usually implemented as hardware instructions or system calls. Also, they are usually implemented as an approximation (for performance reasons), which is good enough in 99.9% of the time (but not when trying to be deterministic).
That's totally understandable, I used math.sin operation over ECS testing, as long as burst compiler use the same IL2CPP on either X86 or ARM architecture, the result seems to be deterministic for me(this sorta opposite of what you said). The editor returns different results as it skips IL2CPP compiler and uses mono. (even on the same platform I get different results).
from unity-deterministic-physics.
Hi, Is it possible to release the auto generation unity code tool?
from unity-deterministic-physics.
Related Issues (13)
- sfloat values like Translation doesn't show in the inspector?
- CollisionWorld.CastCollider doesn't work well! HOT 1
- Will it be updated later
- Hi, Is it possible to release the auto generation unity code tool?
- Physics quite unstable HOT 4
- Translation component (and likely other transform components) doesn't affect position of object
- 2D support HOT 1
- WebGL Builds are Laggy HOT 1
- Editor Authoring functionality missing HOT 1
- rollback? HOT 1
- Execute ExampleScene, all objects will penetrate the ground! HOT 2
- Can I use JobHandle in the OnUpdate() function?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unity-deterministic-physics.