{"id":25686886,"url":"https://github.com/t-rbernard/test_ecs","last_synced_at":"2026-05-07T16:39:45.368Z","repository":{"id":276877520,"uuid":"926546390","full_name":"t-rbernard/Test_ECS","owner":"t-rbernard","description":"A small project to discover Unity's ECS framework by application","archived":false,"fork":false,"pushed_at":"2025-02-12T11:13:04.000Z","size":103,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-24T20:07:36.655Z","etag":null,"topics":["ecs-framework","entity-component-system","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/t-rbernard.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":"2025-02-03T12:59:09.000Z","updated_at":"2025-02-12T11:13:09.000Z","dependencies_parsed_at":"2025-02-10T23:38:39.371Z","dependency_job_id":null,"html_url":"https://github.com/t-rbernard/Test_ECS","commit_stats":null,"previous_names":["t-rbernard/test_ecs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t-rbernard%2FTest_ECS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t-rbernard%2FTest_ECS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t-rbernard%2FTest_ECS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t-rbernard%2FTest_ECS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/t-rbernard","download_url":"https://codeload.github.com/t-rbernard/Test_ECS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240549418,"owners_count":19819137,"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":["ecs-framework","entity-component-system","unity3d"],"created_at":"2025-02-24T20:07:38.256Z","updated_at":"2026-05-07T16:39:45.321Z","avatar_url":"https://github.com/t-rbernard.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project gist\nThis project is a test to see if I can adapt and learn Unity's ECS framework by application.\n\n## Features\n- Car spawners\n  - Randomly affected colours on startup\n  - 2+ segment routes to be created via the scene editor\n  - By default, will spawn a car on startup. Later will be affected a shortcut to spawn multiple cars\n- Cars\n  - Inherit the colour/route from their spawner\n  - Follow the given route. Once the route is completed, destroy the car \n\n# How it works\n## Components\n- **ColourSet** : authoring component to add a buffer of available colours to an entity\n- **Markers** :\n  - _SpawnerMarker_ : Distinguishes spawner from entities with common components (namely, the entity they spawn)\n  - _DestroyOnPathDone_ : Once it arrives at the end of its current path, the marked entity will be destroyed by a cleanup system\n### Movement\n- **CurrentMovementGoal** : Gives the entity float2 goal coordinates (x,z) to go towards. Starts disabled and has to be enabled by the system initiating the entity's first goal\n- **CurrentPathStep** : If an entity goes along a segmented path, this component saves at what step of the path we are to allow finding the next goal\n- **FollowPathParameters** : Currently only sets the entity movement speed, but can be extended to max turn angle, acceleration etc\n- **PathGameObject** : Uses a game object array to bake a dynamic array of path steps into a dynamic buffer. We can use any game object, even empty as path step. It\"s just easier to place around from the scene than bare coordinates\n### Spawn Entity\n- **EntityPrefab** : Container for an Entity Prefab that can be used as a model or to get data from (used by spawners currently)\n- **SpawnerReference** : Reference to the entity that spawned the EntityPrefab. Currently used as a colour set source and a path source as we wish to inherit both from the spawner, but if need be could be split with a PathReference and ColourReference (that could even be the Entity itself if it's its own source)\n- **SpawnRate** : Gives an editable spawn rate and holds the current updated timeout value to be updated by timer related systems\n\n\n## Entities/Prefabs\nTwo prefab entities are given in this test project : \n- **SpawnerWithPathPrefab** : A spawner with a colour, a prefab entity to have spawn, and a path that spawned entity will have to follow\n- **CarEntityPrefab** : A coloured car with pathing parameters, allowing it to parametrically follow its given path\n\n## Systems\n- **DestroyPathCompleteEntities** : If an entity has a DestroyOnPathDoneMarker and has achieved the last goal in its current path, this system will destroy it\n- **EnableCurrentGoalIfNeeded** : If an entity has its current goal component disabled (no current goal) and has a new step available in its current path (added a new step or a whole new path) then enable its goal component and give it a new step\n- **MoveToGoalSystem** : Moves the entity towards its current goal and snaps it to goal if it's close enough\n- **SpawnEntitySystem** : Spawns entities from the _EntityPrefabComponent_ for each _SpawnerMarker_ entities if the spawner's spawn timeout is at 0\n- **UpdateNextStepSystem** : If an entity is at its current goal, set its current step and next goal according to its path\n- **UpdateTimers** : Updates entities' timeout components by decrementing their timeout values according to delta time (snaps to 0 if needed)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft-rbernard%2Ftest_ecs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft-rbernard%2Ftest_ecs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft-rbernard%2Ftest_ecs/lists"}