{"id":13708289,"url":"https://github.com/Doprez/stride-arch-ecs","last_synced_at":"2025-05-06T12:31:44.882Z","repository":{"id":205641656,"uuid":"714501836","full_name":"Doprez/stride-arch-ecs","owner":"Doprez","description":"An example in Stride using Arch ECS.","archived":false,"fork":false,"pushed_at":"2023-12-29T01:29:10.000Z","size":1165,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-03T23:12:20.834Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Doprez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-11-05T03:10:14.000Z","updated_at":"2024-04-10T02:02:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"1d7df0e7-3d45-4f6a-845f-9a7b756cdd21","html_url":"https://github.com/Doprez/stride-arch-ecs","commit_stats":null,"previous_names":["doprez/stride-arch-ecs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doprez%2Fstride-arch-ecs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doprez%2Fstride-arch-ecs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doprez%2Fstride-arch-ecs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Doprez%2Fstride-arch-ecs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Doprez","download_url":"https://codeload.github.com/Doprez/stride-arch-ecs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224503916,"owners_count":17322291,"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-08-02T23:00:19.730Z","updated_at":"2024-11-13T18:30:56.778Z","avatar_url":"https://github.com/Doprez.png","language":"C#","funding_links":[],"categories":["ECS Examples"],"sub_categories":[],"readme":"# stride-arch-ecs\nAn example in [Stride](https://github.com/stride3d/stride) using [Arch ECS](https://github.com/genaray/Arch).\n\n[![CircleCI](https://dl.circleci.com/status-badge/img/gh/Doprez/stride-arch-ecs/tree/release.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/Doprez/stride-arch-ecs/tree/release)\n\n# Features\n## Ease of use\nSystems can be added through the GameSettings class in the Stride editor for easy management.\n![image](https://github.com/Doprez/stride-arch-ecs/assets/73259914/4840313e-42b5-499e-9ba2-06cb18d77953)\n\nall that you need to do is inherit from the SystemBase class and add it to the list.\n\n### Add Arch components in Strides Editor!\n![image](https://github.com/Doprez/stride-arch-ecs/assets/73259914/03796e5c-4e38-4ff5-8fde-cc2fd813dcfd)\n\neach component attached will create an Entity in the Arch world, with the correct components to be able to be queried later in any systems.\nExample:\n- System:\n```\nnamespace ArchECSStride.Code.Systems;\n[DataContract(nameof(TestSystem))]\npublic class TestSystem : SystemBase\n{\n\tprivate DebugTextSystem _debugText;\n\tprivate QueryDescription _queryDescription;\n\n\tpublic override void Start()\n\t{\n\t\t_debugText = Services.GetService\u003cDebugTextSystem\u003e();\n\n\t\t_queryDescription = new QueryDescription().\n\t\t\tWithAny\u003cVector3\u003e();\n\t}\n\n\tpublic override void Update(in GameTime state)\n\t{\n\t\tvar result = World.CountEntities(in _queryDescription);\n\n\t\t_debugText.Print($\"TestSystem: {result}\", new Int2(50, 50));\n\t}\n}\n```\n- Components:\n```\n[DataContract(nameof(ArchPosition))]\n[ComponentCategory(\"Arch Components\")]\npublic class ArchPosition : ArchComponent\n{\n\tpublic bool UseStridePosition { get; set; } = true;\n\tpublic Vector3 StartPosition { get; set; }\n\n\t[DataMemberIgnore]\n\tpublic override object ComponentValue { get; set; } = new Vector3();\n\n\tpublic override void SetData()\n\t{\n\t\tif (UseStridePosition)\n\t\t{\n\t\t\tComponentValue = Entity.Transform.Position;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tComponentValue = StartPosition;\n\t\t}\n\t}\n}\n```\n```\n[DataContract(nameof(ArchTest))]\n[ComponentCategory(\"Arch Components\")]\npublic class ArchTest : ArchComponent\n{\n\t[DataMemberIgnore]\n\tpublic override object ComponentValue { get; set; } = new TestComponent();\n}\npublic struct TestComponent\n{\n\tpublic int Number;\n\tpublic string Text;\n}\n```\n\n\n## Easy access\nWhen inheriting from SystemBase and registered in settings each System has access to both the Arch World and Strides Service registry.\n\n# Future goals\n- ~Allow EntityComponents to create Arch Entities with Arch Components (Partially done. I would like to have editable values in editor as well)~ Done!\n- Have an easy way to modify Stride entities with a quick access array reference.(Mostly done. I need a way to verify removing entities wont cause issues.)\n- Multithreading\n- create a basic game/demo example\n\n# Example\nBelow is an example of 50,000 entities randomly changing positions at a capped 144FPS. \n![image](https://github.com/Doprez/stride-arch-ecs/assets/73259914/3932095e-d6ef-4733-8b2d-2f626f8dcf7b)\n\nThe only Stride performance improvement used are instanced meshes since meshes are my current big limitation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDoprez%2Fstride-arch-ecs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDoprez%2Fstride-arch-ecs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDoprez%2Fstride-arch-ecs/lists"}