{"id":16184135,"url":"https://github.com/eidng8/space-flight-unity-dots","last_synced_at":"2026-05-15T11:36:12.963Z","repository":{"id":146319289,"uuid":"234003287","full_name":"eidng8/Space-Flight-Unity-DOTS","owner":"eidng8","description":"An exploration of Unity","archived":false,"fork":false,"pushed_at":"2020-02-16T13:22:36.000Z","size":413,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T12:50:04.641Z","etag":null,"topics":["c-sharp","unity","unity-dots"],"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/eidng8.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":"2020-01-15T05:11:44.000Z","updated_at":"2020-02-16T13:22:38.000Z","dependencies_parsed_at":"2023-04-27T21:32:45.683Z","dependency_job_id":null,"html_url":"https://github.com/eidng8/Space-Flight-Unity-DOTS","commit_stats":{"total_commits":41,"total_committers":2,"mean_commits":20.5,"dds":"0.024390243902439046","last_synced_commit":"311b5271d8d84217f522ab1bc46bd8697af95fcf"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eidng8/Space-Flight-Unity-DOTS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eidng8%2FSpace-Flight-Unity-DOTS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eidng8%2FSpace-Flight-Unity-DOTS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eidng8%2FSpace-Flight-Unity-DOTS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eidng8%2FSpace-Flight-Unity-DOTS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eidng8","download_url":"https://codeload.github.com/eidng8/Space-Flight-Unity-DOTS/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eidng8%2FSpace-Flight-Unity-DOTS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33065719,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["c-sharp","unity","unity-dots"],"created_at":"2024-10-10T07:09:06.417Z","updated_at":"2026-05-15T11:36:12.948Z","avatar_url":"https://github.com/eidng8.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Space-Flight-Unity-DOTS\n\nA physics driven space flight simulation using Unity's new DOTS.\n\n\n### Goal\n\nI want to make this usable as a library. The `Assets/Scripts` directory contains\neverything. Other stuff in the repo are just samples and documents.\n\nIt is not supposed to directly edit anything in this package. One could derive\nsub-class if needed. Or use various delegates to tap into processes.\n\nI also want to salvage my long forgotten maths \u0026 physics. So there are lots of grade\nschool comments littering all over.\n\n\n### Playing around\n\nOpen `Assets/Scenes/Space/Startup.unity` and play.\n\nCurrent thought is to use one empty scene repeatedly and spawn everything on the fly.\n\n\n### Problems met\n\n##### EntityManager.MoveEntitiesFrom()\n\n`EntityManager.MoveEntitiesFrom()` doesn't move the whole hierarchy of prefabs.\nOnly the entities selected by `EntityQuery` will be moved, no child under them would\nbe moved. Because of this, off-active-world entity creation is almost (practically)\nimpossible.\n \nHowever, such creation process happening on main thread is not too bad\nat the moment, unless creating many hundreds or more entities at once. Mostly the\nrendering pipeline will crumble if a few dozens entities were spawned in sight.\nLong before one would have to worry about entity creation.\n\n\n##### The PhysicsStep Component\n\nThe `PhysicsStep` component is not destroyed after a scene were unloaded. Say two\nscene (A \u0026 B) both have an entity with `PhysicsStep` component on them. When you\nswitch from scene A to scene B using `SceneManager.LoadScene(\"B\")`, the `PhysicsStep`\nfrom scene A will persist into scene B. Resulting in broken physics simulation.\n\n\n### Beginner's Notes\n\nI count myself as a beginner. So I have a dedicated section here.\n\n\n##### Moment of Inertia is a Vector3 tensor\n\nIn Unity, moment of inertia is not a simple number. Instead, it is the inertia tensor\nin `Vector3` (`Rigigbody.inertiaTensor`) for `GameObject`, and `float3` for ECS\n`Physics Shape`.\n\nIn ECS, `Physics Body`, `Physics Mass` and `Physics Shape` replace the `Rigidbody`\ncomponent. And they have a bit more parameters can be tweaked  than the `GameObject`'s\n`Rigigbody` counterpart. But do note that, such as `Physics Mass`, it's\n`inverseInertia`, though the underlying numbers are the same.\n\n\n\n### General Notes\n\n##### Entity Conversion\n\nThe `ConvertToEntity` component is a heavy duty task. The\n [Crosair](https://github.com/eidng8/Space-Flight-Unity/blob/278e03e11ebc2810bfe84ec449246ff671cb3796/Assets/Resources/Prefabs/Ships/Crosair.prefab)\ngame object from the Space-Flight-Unity takes around 3.5 seconds to convert\non-the-fly. Although the conversion is a one-time process happens at the first time\nof instantiation. Working out a dozen game objects will freeze the game for quite a\nwhile.\n\nThis is the reason to always stick to sub-scenes. Placing prefabs to sub-scene saves\na whole lot of runtime resources. Even prefabs not requiring entity conversion will\nbenefit greatly from the sub-scene cache.\n\n\n\n### Temporary Problems\n\n* In 2019.3, the NetCode package has an error, so it is temporarily uninstalled.\n```\nLibrary\\PackageCache\\com.unity.netcode@0.0.4-preview.0\\Runtime\\ClientServerWorld\\ClientServerBootstrap.cs(31,33):\nerror CS1503: Argument 1: cannot convert from 'System.Collections.Generic.IReadOnlyList\u003cSystem.Type\u003e' to 'System.Collections.Generic.List\u003cSystem.Type\u003e'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feidng8%2Fspace-flight-unity-dots","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feidng8%2Fspace-flight-unity-dots","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feidng8%2Fspace-flight-unity-dots/lists"}