{"id":16203581,"url":"https://github.com/unitycoder/unity-dots-rts-collision-system","last_synced_at":"2025-06-12T19:04:24.674Z","repository":{"id":144946645,"uuid":"345339564","full_name":"unitycoder/Unity-DOTS-RTS-Collision-System","owner":"unitycoder","description":"A simple physics collision system suited for large numbers of entities *FORKED*","archived":false,"fork":false,"pushed_at":"2021-03-02T08:12:35.000Z","size":79,"stargazers_count":41,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-07T19:26:55.510Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":false,"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/unitycoder.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-03-07T12:22:20.000Z","updated_at":"2025-02-01T13:14:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"bb21189a-b9c1-48d7-853c-832c4281d3cb","html_url":"https://github.com/unitycoder/Unity-DOTS-RTS-Collision-System","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"7dedd29ccd51f12e2e4e1ede993cd10147f5c347"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/unitycoder/Unity-DOTS-RTS-Collision-System","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unitycoder%2FUnity-DOTS-RTS-Collision-System","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unitycoder%2FUnity-DOTS-RTS-Collision-System/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unitycoder%2FUnity-DOTS-RTS-Collision-System/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unitycoder%2FUnity-DOTS-RTS-Collision-System/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unitycoder","download_url":"https://codeload.github.com/unitycoder/Unity-DOTS-RTS-Collision-System/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unitycoder%2FUnity-DOTS-RTS-Collision-System/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259519771,"owners_count":22870364,"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":[],"created_at":"2024-10-10T09:54:31.326Z","updated_at":"2025-06-12T19:04:24.619Z","avatar_url":"https://github.com/unitycoder.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unity-DOTS-RTS-Collision-System\nA basic RTS collision system.\nUnity 2020.2.3f1\n\nA physics collision system to handle very large amounts of units, in the 30-50 thousand range.\nUses ECS, jobs and Burst.\nIt uses a fixed grid to spatially partition the units.\nThe grid is state-dependant, meaning if you kill units you must rebuild it occasionally;\nthis shortcut allows my broadphase to be much faster.\nYou can get away with updating the grid every 5 minutes, so no big deal.\n\n\nUnitDynamicCollisionSystemGrid is the main file, the others are just scripts to setup a very basic scene, sorry about the mess lol.\nIf the scene has some broken dependencies, all you have to do is add a mesh and material to GameManager in the editor,\nand it should work.\nYou can change the number of units and where they spawn in UnitSpawner()\n\nYou can control the camera in Play-Mode with WASD, TG, and mouse.\nYou can select units with left click, or drag select, and right click to send them to location\nBy default, all units have random target position\nYou can disable this in unit spawner\nYou can change number of units spanwed and where they spawn in unit spawner\n\n\nI chose a grid to represent spatial partitioning because you just can't beat the performance of the grid\nObviously RAM is sacrificed, for example a 6kmx6km map would be 288mb in this example, but I don't really care\nbecause people have so much ram today that it doesn't really matter, and the performance benefit is so sweet.\n\nI have tried quadtree, and spatial hashing, and those use much less memory, but they just bottleneck above\n30k units on my machine, and in my case I want to push 50k units.\n\nNext updates include:\n- hierarchical grid, for different unit sizes\n- k-d or binary tree for static collision\n- SIMD some stuff","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funitycoder%2Funity-dots-rts-collision-system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funitycoder%2Funity-dots-rts-collision-system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funitycoder%2Funity-dots-rts-collision-system/lists"}