{"id":13661481,"url":"https://github.com/Kimbatt/unity-deterministic-physics","last_synced_at":"2025-04-25T02:33:39.025Z","repository":{"id":38103533,"uuid":"339483833","full_name":"Kimbatt/unity-deterministic-physics","owner":"Kimbatt","description":"Cross-platform deterministic physics simulation in Unity, using DOTS physics and soft floats","archived":false,"fork":false,"pushed_at":"2024-02-14T00:32:54.000Z","size":13146,"stargazers_count":470,"open_issues_count":13,"forks_count":60,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-08-02T05:13:12.619Z","etag":null,"topics":["deterministic","physics","physics-engine","physics-simulation","unity","unity3d"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kimbatt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-16T17:56:07.000Z","updated_at":"2024-07-31T13:24:34.000Z","dependencies_parsed_at":"2024-08-02T05:10:59.098Z","dependency_job_id":"7c9c2f4e-621f-4b69-ad2a-bd9b7607808a","html_url":"https://github.com/Kimbatt/unity-deterministic-physics","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kimbatt%2Funity-deterministic-physics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kimbatt%2Funity-deterministic-physics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kimbatt%2Funity-deterministic-physics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kimbatt%2Funity-deterministic-physics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kimbatt","download_url":"https://codeload.github.com/Kimbatt/unity-deterministic-physics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223979377,"owners_count":17235389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deterministic","physics","physics-engine","physics-simulation","unity","unity3d"],"created_at":"2024-08-02T05:01:35.474Z","updated_at":"2024-11-10T16:30:47.725Z","avatar_url":"https://github.com/Kimbatt.png","language":"C#","readme":"# Unity deterministic physics\n\nThis is a modified version of [Unity DOTS Physics version 0.6.0-preview.3](https://docs.unity3d.com/Packages/com.unity.physics@0.6/manual/index.html), which supports cross-platform deterministic physics simulation by using [soft floats](https://github.com/Kimbatt/soft-float-starter-pack).\n\n## Usage\nThe following packages must be installed:\n- Burst\n- Collections\n- Entities\n- Jobs\n\nYou'll need to use the `UnityS.Physics` and the `UnityS.Mathematics` namespaces instead of the usual `Unity.Physics` and `Unity.Mathematics`.\n\nSee [Unity Physics manual](https://docs.unity3d.com/Packages/com.unity.physics@0.6/manual/index.html) for documentation.\n\n## Notes on determinism\nFor a deterministic physics simulation:\n- All bodies must be created in the same order every time you create the simulation\n- Bodies must only be modified in a system that is updated in FixedStepSimulationSystemGroup\n- You must not use the result of floating point operations as input for the physics engine\n- Be careful when using hashmaps / hashsets, because iterating over them may be non-deterministic (it depends on the implementation).\n- Check how to use soft floats [here](https://github.com/Kimbatt/soft-float-starter-pack#how-to-use).\n- Make sure that your code is also deterministic.\n\n## Example\nSee the ExampleScene scene for an example. After running it, your simulation should look exactly like this:\n![](deterministic.gif)\n\n## License\n`Unity.Physics`, `Unity.Mathematics`, and `Unity.Transforms` are licensed under the [Unity Companion License](https://unity3d.com/legal/licenses/Unity_Companion_License).\n\n`Soft floats` is licensed under the MIT License. See [https://github.com/Kimbatt/soft-float-starter-pack](https://github.com/Kimbatt/soft-float-starter-pack) for more information.\n","funding_links":[],"categories":["C\\#","Open Source Repositories"],"sub_categories":["DOTS"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKimbatt%2Funity-deterministic-physics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKimbatt%2Funity-deterministic-physics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKimbatt%2Funity-deterministic-physics/lists"}