8 ms·
All this hype around ECS started when Minecraft, Factorio and They Are Billions proved that the paradigm works, though that is just a small percentage of games
by johnnycerberus 6y ago
All this hype around ECS started when Minecraft, Factorio and They Are Billions proved that the paradigm works, though that is just a small percentage of games that can benefit from ECS. The rest should use the classic OOP model. I really don't see how a game like Dota, CSGO or your average Battle Royale will be better with ECS. I agree with the article.
There are libraries enabling ECS for you if you are not looking for an engine like Unity:
C++: https://github.com/skypjack/entt https://github.com/skypjack/entt (Non-Java Minecraft uses this)
Java: https://github.com/libgdx/ashley https://github.com/libgdx/ashley
Rust: https://github.com/bevyengine/bevy https://github.com/bevyengine/bevy (it's still work in progress, not battle-tested and a moving target)
- diegoperini 6y agoOverwatch is done with ECS, there are GDC talks from the devs explaining the tech behind it.
- johnnycerberus 6y agoThat's cool, I didn't know that. I've found the presentation: https://www.youtube.com/watch?v=W3aieHjyNvw https://www.youtube.com/watch?v=W3aieHjyNvw
- k__ 6y agoI had the impression this was already state of the art in 2007 when I started my CS degree.
- johnnycerberus 6y agoKind of providing an ECS-based game pre-2016, before Factorio, Minecraft Non-Java, They Are Billions and Overwatch (as I was told in a comment) got released?
- dkersten 6y agoDungeon Siege, although the slides where this was revealed seem to no longer be online. Additionally, here is the blog post from 2007 that largely introduced the concept in the form we know now, based on the Dungeon Siege talk and others: http://t-machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/ http://t-machine.org/index.php/2007/09/03/entity-systems-are... Although, arguably, Dungeon Siege's component architecture is different from what we call ECS today. EDIT: I found the slides: https://www.gamedevs.org/uploads/data-driven-game-object-system.pdf https://www.gamedevs.org/uploads/data-driven-game-object-sys...
- johnnycerberus 6y agoThanks, I will check them out. I'm out of the loop when it comes to older games since for me game development is only a recent hobby. I'm developing Big Data stuff mostly with Java and Scala, but I have been playing with data-oriented stuff in Clojure, hence my interest.
- dkersten 6y agoFunnily enough, I came to it in reverse: I learned about ECS years ago (from the tmachine series of posts, posts about Dungeon Siege, and others I can't remember) and became interested in Clojure's data-oriented stuff because of my interest in ECS. Although, I became interested in and used Clojure already, due to its focus on immutability and functional programming, before people really started pushing the data-oriented aspects, so it was an easy evolution for me.
- jonhermansen 6y agoFor anyone curious to know more about usage of ECS in Overwatch, check out this GDC talk from one of the developers: https://youtu.be/W3aieHjyNvw https://youtu.be/W3aieHjyNvw
- dividuum 6y agoAwesome talk. Thanks for linking.
- vvanders 6y agoSorry but we were doing ECS long time before that in the industry. I remember doing it back on the PSP with Lua(meta-table -> component mapping) and a backing in house C++ runtime. It was pretty widely known in industry as a way to have cache locality and made it out to the broader dev community a good while after.
- johnnycerberus 6y agoThat's nice, but why all the game engines and libraries introduced it only recently? Defold, Unity ECS, etc.?
- vvanders 6y agoBecause not every engine slaps a fancy ECS tag front and center, the pattern evolved concurrently in industry (and we all had games to ship). If you look really carefully you'll find structured column databases have similar properties since when you optimize for speed cache misses are your number one enemy.
- johnnycerberus 6y agoYes, I understand that ECS is probably good for more low-level stuff like particle-like systems. But what about gameplay-code? Unity ECS is mostly about that, to think in a data-oriented way about your gameplay programming. The thing that bothers me is why huge commerical engine like Unreal Engine or idTech don't even lift a finger about that? About structured column databases, the same thing could be said about Lisps like Clojure which match the RMDB data model. But people still find it hard to grok it, hence the low adoption rate.
- teamonkey 6y ago> why huge commerical engine like Unreal Engine or idTech don't even lift a finger about that? https://docs.unrealengine.com/en-US/ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/Actors/Components/index.html https://docs.unrealengine.com/en-US/ProgrammingAndScripting/...
- DominikD 6y agoTotal Annihilation (1997), Thief (1998), Dungeon Siege (2002), and many others used ECS and their developers wrote about it long, long before Minecraft and others.
- bogwog 6y agoEntity component systems are nothing new, I remember reading an article about it from Valve back in like 2007. The recent hype comes from Unity, because they very unimaginatively misappropriated the term.
- pcstl 6y agoI believe ECS is in fact quite a bit older than that. As far as I can tell, ECS first started being talked about by AAA developers who were trying to find efficient ways to deal with the memory hierarchy in modern computing platforms (it got quite big specifically with the PS3, which had a very hard to deal with memory layout that could totally kill game performance). ECS allows data to be processed in a very cache-effective manner.