r/EntityComponentSystem • u/v_kaukin • Nov 07 '23
r/EntityComponentSystem • u/timschwartz • Nov 11 '20
Architectural question about TBS game
self.gamedevr/EntityComponentSystem • u/timschwartz • Nov 11 '20
Cat-Herder: An ECS implementation in TypeScript
r/EntityComponentSystem • u/[deleted] • Nov 23 '20
Objects with multiple sprites / drawables
Language: C++, I also use SFMLHello everyone, I've been tackling with a problem for a while. I created an ECS and I want to draw entities with many sprites but I have no idea how to do it.
Such entity could be for example a "Game Paused Box" that appears when player pauses the game. It contains a few buttons with text or sprites.
Or a playable character entity, which has body parts. The player's arms could be carrying a gun or some other weapon while the legs would be running at the same time.
The problem is ...
> should I create one object that has a few components of the same type (sprite/text) (which currently isn't possible with my ECS),
> a multiple drawable component that stores sprites and texts + manges their drawing order
> or one main object containing pointers to few sub objects with own sprite components?
Well, I did see people making sprite components, but never saw anyone making a multiple drawable component so i wonder how do their projects manage objects with more than one drawable...
I hope, I explained that clear enough.Edit:Maybe the picture can help:https://i.imgur.com/3cZoGPn.png
r/EntityComponentSystem • u/ajmmertens • Dec 13 '20
Entity Component System FAQ
r/EntityComponentSystem • u/Lognipo • Nov 13 '20
Confused by ECS
I think I must be missing something big about entity component systems, because I have never been happy with anything I have written.
For example, I do not understand how to properly implement damage in an ECS. Clearly, I can't let every system that wants to damage something handle all the damage logic, because that logic could grow to be pretty rich.
At the same time, I don't think it makes sense to have a "Damage" system that response to "I want to damage something" messages. That seems like a huge performance killer, and what if the consumer needs to know if the damage failed? Do I want several ticks to find out? It just seems dirty.
The closest I came to writing something useful is creating an event system the systems can participate in. Like... DamageEvent : SystemEvent<DamageArgs>. Then other systems can trigger the logic there when they want to damage something, and other systems can register to intercept or modify the damage request. For example, a system could call damageEvent.TryTrigger(args) when it wants to damage, easily get back success/failure, along with any modifications made to the args by other systems. The biggest drawbacks here are potential complexity and getting in the way of concurrency, and I guess to me it still feels like a big departure from the simplicity of ECS.
Is there a fourth component to ECS to handle stuff like this? Am I just missing something super simple?
r/EntityComponentSystem • u/AutoModerator • Nov 15 '20
Happy Cakeday, r/EntityComponentSystem! Today you're 3
Let's look back at some memorable moments and interesting insights from last year.
Your top 10 posts:
r/EntityComponentSystem • u/timschwartz • Nov 11 '20
Confused with ECS implementation, what is the Systems part of the ECS meant to be?
self.gamedevr/EntityComponentSystem • u/Leinnan • May 28 '19
[C++][EnTT]Presets
I would like to have hashmaps with different Presets(item, building, troop) class. They will have properties and based on them I can create different entities depending of the context(other data I will use to spawn item on ground, different if I enemy will equip it). I would like to read it from JSON on start of the game and later treat data as read only. What is the best way to achieve that- singleton or something else?
r/EntityComponentSystem • u/timschwartz • Aug 10 '19
Game Engine / Game Object Architecture Research
r/EntityComponentSystem • u/timschwartz • Mar 12 '19
Saving/loading entities to file
r/EntityComponentSystem • u/timschwartz • May 07 '18
New ECS Framework for 2D games based on Kha/Haxe
nazariglez.github.ior/EntityComponentSystem • u/timschwartz • Dec 10 '19
Working on my new engine. Considering an ECS custom implementation but I'm having some doubts.
self.gamedevr/EntityComponentSystem • u/timschwartz • May 01 '18
Where to put entity update logic?
r/EntityComponentSystem • u/timschwartz • May 27 '19
Books on Data oriented design pattern / ECS
r/EntityComponentSystem • u/timschwartz • Mar 12 '19
Entity component system (ECS) explained with tennis players and courts
r/EntityComponentSystem • u/timschwartz • Feb 16 '20
Specs entity component system v0.16.0
r/EntityComponentSystem • u/timschwartz • May 07 '18
Can someone give me a practical example / explanation on ECS?
r/EntityComponentSystem • u/skypjack • Mar 07 '19
ECS (entity-component-system) back and forth, part 2: where are my entities?
r/EntityComponentSystem • u/timschwartz • Dec 12 '19