{"id":17267503,"url":"https://github.com/technius/ecs-experiments","last_synced_at":"2025-03-26T11:14:14.616Z","repository":{"id":143021356,"uuid":"53293330","full_name":"Technius/ecs-experiments","owner":"Technius","description":"Experiments in writing entity-component-systems in Scala","archived":false,"fork":false,"pushed_at":"2016-03-13T06:54:57.000Z","size":29,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-31T12:24:59.890Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Technius.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-07T03:35:57.000Z","updated_at":"2017-02-12T06:14:34.000Z","dependencies_parsed_at":"2023-04-16T06:01:04.785Z","dependency_job_id":null,"html_url":"https://github.com/Technius/ecs-experiments","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/Technius%2Fecs-experiments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Technius%2Fecs-experiments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Technius%2Fecs-experiments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Technius%2Fecs-experiments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Technius","download_url":"https://codeload.github.com/Technius/ecs-experiments/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245641437,"owners_count":20648644,"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-15T08:10:52.698Z","updated_at":"2025-03-26T11:14:14.594Z","avatar_url":"https://github.com/Technius.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Entity-Component-System Experiments (in Scala)\nThis repository contains some plans for writing a game/simulation engine in\nScala based on entity-component-systems.\n\n## Experiment List\n\nIn each experiment, an **entity** is defined as a collection of\n`Component`s associated with an `Id`.\n\nA **world** is a set of global rules.\n\n### 1. Event Based\nInspired by Michael Shaw's\n[Game Development in Scala talk](https://michaelshaw.github.io/game_talk/game.html#/).\n\nThe design of this ECS is based on the following ideas:\n* The simulation is deterministic\n* Everything is immutable\n* Changes to entities are stored as immutable objects called `Event`s\n  * Events are devided into `EntityEvent` and `WorldEvent`\n    * An `EntityEvent` is applied to a specific entity entity\n    * A `WorldEvent` is applied to the list of entities\n  * An `EventHandler` applies the changes stored in events to the entities\n* Systems are essentially `Seq[Entity] =\u003e (Seq[EntityEvent], Seq[WorldEvent])`\n* During simulation, each system operates on the pre-simulation entity list to\n  give events as output\n* After the systems are run, the events are processed and the new entity list is\n  returned\n\nPrinciples:\n* Events should have very little power\n* Systems should be simple and composable\n* Associative events are preferred\n\nBenefits:\n* Events that can be applied associately can be combined, making transfer of\n  events take less bandwidth\n* All systems can be run in parallel\n* Separation of events into `EntityEvent` and `WorldEvent` limit side-effects\n* Can easily undo and redo events\n\nDisadvantages:\n* Systems cannot depend on other systems easily\n* Produces a lot of data to be garbage-collected\n\n## License\nThe explanations and documentation are licensed under the\n[CC BY 4.0](https://creativecommons.org/licenses/by/4.0/legalcode) license.\n\nThe code is licensed under the GPLv3 license. See LICENSE for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnius%2Fecs-experiments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftechnius%2Fecs-experiments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftechnius%2Fecs-experiments/lists"}