{"id":25972013,"url":"https://github.com/SuperV1234/ecst","last_synced_at":"2025-03-05T00:02:44.847Z","repository":{"id":147653659,"uuid":"57969328","full_name":"vittorioromeo/ecst","owner":"vittorioromeo","description":"[WIP] Experimental C++14 multithreaded compile-time entity-component-system library.","archived":false,"fork":false,"pushed_at":"2019-09-03T09:32:19.000Z","size":1092,"stargazers_count":471,"open_issues_count":14,"forks_count":42,"subscribers_count":32,"default_branch":"master","last_synced_at":"2024-08-05T02:01:19.634Z","etag":null,"topics":["cpp","cpp11","cpp14","entity","entity-component","generic","library","parallel","thesis"],"latest_commit_sha":null,"homepage":"http://vittorioromeo.info","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vittorioromeo.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}},"created_at":"2016-05-03T12:57:30.000Z","updated_at":"2024-07-30T14:47:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"b7a2b46b-665c-4cbb-a0ad-8c7cf932c458","html_url":"https://github.com/vittorioromeo/ecst","commit_stats":null,"previous_names":["superv1234/ecst"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vittorioromeo%2Fecst","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vittorioromeo%2Fecst/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vittorioromeo%2Fecst/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vittorioromeo%2Fecst/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vittorioromeo","download_url":"https://codeload.github.com/vittorioromeo/ecst/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241940573,"owners_count":20045881,"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":["cpp","cpp11","cpp14","entity","entity-component","generic","library","parallel","thesis"],"created_at":"2025-03-05T00:02:43.814Z","updated_at":"2025-03-05T00:02:44.807Z","avatar_url":"https://github.com/vittorioromeo.png","language":"C++","funding_links":[],"categories":["ECS Libraries","TODO scan for Android support in followings","GameProgramming"],"sub_categories":[],"readme":"# ecst\n\n\u003e **Experimental \u0026 work-in-progress C++14 multithreaded compile-time [Entity-Component-System](https://en.wikipedia.org/wiki/Entity_component_system) header-only library.**\n\n[![stability][badge.stability]][stability]\n[![license][badge.license]][license]\n[![gratipay][badge.gratipay]][gratipay]\n![badge.cpp](https://img.shields.io/badge/c++-14-ff69b4.svg?style=flat-square)\n\n[badge.stability]: https://img.shields.io/badge/stability-experimental-orange.svg?style=flat-square\n[badge.license]: http://img.shields.io/badge/license-afl%203.0-blue.svg?style=flat-square\n[badge.gratipay]: https://img.shields.io/gratipay/user/SuperV1234.svg?style=flat-square\n\n[stability]: http://github.com/badges/stability-badges\n[license]: https://github.com/SuperV1234/ecst/blob/master/LICENSE\n[gratipay]: https://gratipay.com/~SuperV1234/\n\n\n\n## Overview\n\nSuccessful development of complex real-time applications and games requires a flexible and efficient entity management system. As a project becomes more intricate, it’s critical to find an elegant way to compose objects in order to prevent code repetition, improve modularity and open up powerful optimization possibilities.\n\nThe Entity-Component-System architectural pattern was designed to achieve the aforementioned benefits, by separating data from logic.\n\n* Entities can be composed of small, reusable, and generic components.\n\n* Components can be stored in contiguous memory areas, thus improving data locality and cache-\nfriendliness.\n\n* Application logic can be easily parallelized and abstracted away from the objects themselves and\ntheir storage policies.\n\n* The state of the application can be serialized and shared over the network with less effort.\n\n* A more modular, generic and easily-testable codebase.\n\n**\"ecst\"** was developed as my BCS graduation project.\n\n---------------------------------------------------------------------------------------------------\n\n## Getting started\n\n* [Build instructions](BUILD_INSTRUCTIONS.md)\n\n* [Code sample](CODE_SAMPLE.md)\n\n* [License](LICENSE)\n\n---------------------------------------------------------------------------------------------------\n\n## More information\n\n* [Accompanying Thesis](https://github.com/SuperV1234/bcs_thesis)\n\n* [Slides](https://github.com/SuperV1234/cppnow2016)\n\n    * NOTE: These are accompanying an earlier version of the library was that presented at [**C++Now 2016**](https://cppnow2016.sched.org/event/6SgH/implementation-of-a-multithreaded-compile-time-ecs-in-c14)\n\n--------------------------------------------------------------------------------------------------\n\n## Terminology\n\n* **Entities:** defined by Adam Martin (see thesis) as “fundamental conceptual building blocks” of a system, which represent concrete application ob-jects. They have no application-specific data or logic.\n\n* **Components:** small, reusable, types that compose entities. Again, citing Adam Martin in *(see thesis)*, a component type “labels an entity as possess-ing a particular aspect”. Components store data but do not contain any logic.\n\n* **Systems:** providers of implementation logic for entities possessing a specific set of component types.\n\n* **Outer parallelism:** term used in ECST which defines the concept of running multiple systems that do not depend on each other in parallel. Its implementation details will be analyzed in Chapter 10 *(see thesis)*. Conceptually, an implicit directed acyclic graph is created at compile-time thanks to the knowledge of system dependencies. The execution of the implicit DAG is handled by a\nsystem scheduler type specified during settings definition.\n\n* **Inner parallelism:** other that running separate systems in parallel, ECST supports splitting a single system into multiple sub-tasks, which can be executed on separate threads. Many systems, such as the ones that represent functionally pure com- putations, do not contain side-effects that modify their own state or that define interactions between the subscribed entities: these are prime examples of “embarrassingly parallel” computations. \n\n---------------------------------------------------------------------------------------------------\n\n## FAQ\n\n* *\"Where can I find documentation for the API?\"*\n\n    * See [issue #10](https://github.com/SuperV1234/ecst/issues/10).\n\n* *\"Can we have components that aren't default constructible?\"*\n\n    * This has come up before in the past. The answer is no - see [issue #8](https://github.com/SuperV1234/ecst/issues/8).\n\n* *\"I'm trying to read/write to/from my component, but I'm getting a compilation error. What is happening?*\"\n\n    * Systems need to know at compile-time which component types they will access and how *(read-only or write access)*. This has to be specified when defining *system signatures*. See [issue #4](https://github.com/SuperV1234/ecst/issues/4) for more info.\n\n* *\"Is it possible to iterate over the components attached to entities, without being inside of a system's process function?\"*\n\n    * See [issue #9](https://github.com/SuperV1234/ecst/issues/9#issuecomment-244577591).\n\n* *\"How do control whether my system runs in parallel, or as a single thread?*\"\n\n    * Context-wide *inner parallelism* must be enabled by calling [allow_inner_parallelism()](https://github.com/SuperV1234/ecst/blob/7f0f84a0e496d0a83ce07a41260f08528bbf79ac/include/ecst/settings/data.hpp#L118) in order to allow systems to be split in multiple *sub-tasks*. Inner parallelism strategies can be customized and composed at compile-time for particular systems, during *system signature* definition.\n\n*  *\"What is the difference between making my system single-threaded vs disabling inner paralellism?\"*\n\n    * Disabling inner parallelism prevents all systems to be split in multiple *sub-tasks*, regardless of their inner parallelism strategy. Making a system single-threaded prevents only that system from being split in multiple *sub-tasks*: this may be necessary for systems that maintain data-structures or that rely on iterating over all entities in the same thread.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSuperV1234%2Fecst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSuperV1234%2Fecst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSuperV1234%2Fecst/lists"}