{"repo":"andygeiss/ecs","free":true,"listed":false,"github":"https://github.com/andygeiss/ecs","clone":"git clone https://github.com/andygeiss/ecs.git","description":"Build your own Game-Engine based on the Entity Component System concept in Golang.","language":"Go","stars":176,"topics":["go","golang","game-development","entity-component-system","scalability","goroutine","benchmark","game-engine","game-engine-2d","bitset"],"license":"MIT","category":"game-templates","readme_excerpt":"ECS - Entity Component System Build your own Game-Engine based on the Entity Component System concept in Golang. Features - [x] Provide an easy-to-use framework to build a game engine from scratch. - [x] No dependencies to other modules or specific game libraries - Feel free to use what fits your needs. - [x] Minimum overhead - use only what is really needed. Example engine See engine-example for a basic implementation using raylib. Walkthrough Project layout At first we create a basic project layout: Next we create a main.go with the following content: The execution of the program leads to an endless loop, as our engine is not yet able to react to user input. The movement system A system needs to implement the methods defined by the interface System. So we create a new file locally at systems/movement.go : Now we can add the following lines to main.go : If we start our program now, it returns immediately without looping forever. The player entity A game engine usually processes different types of components that represent information about the game world itself. A component only represents the data, and the systems are there to implement the behavior or game logic and change these components. Entities are simply a composition of components that provide a scalable data-oriented architecture. A component needs to implement the methods defined by the interface Component. Let's define our Player components by first creating a mask at components/components.go : Then create a comp","default_branch":null,"files":null,"tree":[],"storefront":"/r/andygeiss","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/andygeiss/ecs/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}