Difference between revisions of "Entity Component System"
HexDecimal (talk | contribs) (Add to Stubs and Articles categories, add link to Sander Mertens ECS FAQ) |
|||
Line 1: | Line 1: | ||
{{stub}} | |||
An entity component system is a way to implement your game objects so that you can build their functionality through composition instead of object-oriented inheritance. The prevailing wisdom in current game development seems to be that complex games should have one of those instead of an inheritance-based object system that is likely to lead to unmaintainable blobs of a class. A roguelike is probably a complex enough game that you should use an entity component system in one. | An entity component system is a way to implement your game objects so that you can build their functionality through composition instead of object-oriented inheritance. The prevailing wisdom in current game development seems to be that complex games should have one of those instead of an inheritance-based object system that is likely to lead to unmaintainable blobs of a class. A roguelike is probably a complex enough game that you should use an entity component system in one. | ||
Line 5: | Line 7: | ||
This makes it easy to have data-driven object construction and allows very diverse combinations of component loadouts in objects that still coexist in the same game world as the same fundamental type of program object. | This makes it easy to have data-driven object construction and allows very diverse combinations of component loadouts in objects that still coexist in the same game world as the same fundamental type of program object. | ||
== | == External Links == | ||
* Good overview and links on Stack Overflow: http://stackoverflow.com/questions/1901251/component-based-game-engine-design | * Good overview and links on Stack Overflow: http://stackoverflow.com/questions/1901251/component-based-game-engine-design | ||
Line 23: | Line 25: | ||
* [https://kyren.github.io/2018/09/14/rustconf-talk.html Catherine West: RustConf 2018 Closing Keynote: Using Rust for Game Development] ([https://www.youtube.com/watch?v=aKLntZcp27M video], [https://kyren.github.io/rustconf_2018_slides/index.html slides]), works through various alternatives for game engine structure in Rust and ends up at an ECS architecture as the best option for a medium to large game in Rust. | * [https://kyren.github.io/2018/09/14/rustconf-talk.html Catherine West: RustConf 2018 Closing Keynote: Using Rust for Game Development] ([https://www.youtube.com/watch?v=aKLntZcp27M video], [https://kyren.github.io/rustconf_2018_slides/index.html slides]), works through various alternatives for game engine structure in Rust and ends up at an ECS architecture as the best option for a medium to large game in Rust. | ||
* [https://github.com/SanderMertens/ecs-faq Sander Mertens Entity Component System FAQ] | |||
== References == | |||
<references /> | |||
[[Category:Articles]] | |||
[[Category:Developing]] | [[Category:Developing]] |
Revision as of 22:32, 16 January 2024
- This page is a stub. Please help RogueBasin by expanding it. Click here to edit this page.
An entity component system is a way to implement your game objects so that you can build their functionality through composition instead of object-oriented inheritance. The prevailing wisdom in current game development seems to be that complex games should have one of those instead of an inheritance-based object system that is likely to lead to unmaintainable blobs of a class. A roguelike is probably a complex enough game that you should use an entity component system in one.
The basic idea is that game objects at their core are just unique identifiers (UIDs), plain strings or integers, instead of complex objects. The complex data and functionality is moved into multiple components, which are stored in their own containers and associated with the object UIDs.
This makes it easy to have data-driven object construction and allows very diverse combinations of component loadouts in objects that still coexist in the same game world as the same fundamental type of program object.
External Links
- Good overview and links on Stack Overflow: http://stackoverflow.com/questions/1901251/component-based-game-engine-design
- A Handful of Components, descriptions of some useful components by Michael A. Carr-Robb-John
- Entity Systems Project, an entity component system wiki
- Entity Systems: what makes good Components? good Entities?, a post describing an architecture that has both entity components and global system objects for the game state
- Case Study: Bomberman Mechanics in an Entity-Component-System, a post on actually implementing a small ECS.
- Game Programming Patterns: Component, a straightforward explanation of component based architecture, along with example implementation.
- Brian Bucklew: Data-Driven Engines of Qud and Sproggiwood, IRDC 2015 talk about a data- and component-driven roguelike architecture.
- Catherine West: RustConf 2018 Closing Keynote: Using Rust for Game Development (video, slides), works through various alternatives for game engine structure in Rust and ends up at an ECS architecture as the best option for a medium to large game in Rust.