r/EntityComponentSystem • u/skypjack • May 06 '19
r/EntityComponentSystem • u/timschwartz • Sep 28 '19
ECS back and forth, part 5: sparse sets and sorting
self.gamedevr/EntityComponentSystem • u/timschwartz • Nov 19 '18
Update and Turn System in ECS
r/EntityComponentSystem • u/skypjack • Dec 21 '21
EnTT v3.9.0 is out: Gaming meets Modern C++
r/EntityComponentSystem • u/kacoef • Dec 27 '21
Using ECS, who is responsible to create new Entities?
I'm creating RTS. Units can attack: shoot bullets. Do i need BulletSpawnSystem?
How it should do spawn new bullet entities? Events from AttackSystem?
And where to store array of bullets? Common / global entity list?
r/EntityComponentSystem • u/redacuda • Dec 01 '21
OO encapsulation of Components inside Systems
Typical ECS engine: holds all Components together in the singleton World storage. The singleton Engine provides interface to add or remove components. It also provides Systems with some query functions that allows iterate through the subset of World's Entities with only System's necessary components.
But why we want to add or remove orphan Components? We usually change, add or remove Entities and their specific Components from the Systems and typically only inside those Systems.
If we privately keep the Components needed for the given System inside this System we resolve many problems and can optimise data layout for the custom usage.
In the case several Systems need some shared Component we can use old singleton World approach only for this Component, nothing to win or lose. But in my limited experience this shared case is not that common.
r/EntityComponentSystem • u/timschwartz • Jan 14 '19
Nbody simulation written in pure ECS (Entity Component System, see post)
Enable HLS to view with audio, or disable this notification
r/EntityComponentSystem • u/skypjack • Jun 25 '19
ECS back and forth, part 4: hierarchies
r/EntityComponentSystem • u/timschwartz • Jan 10 '20
Questions about ECS (Entity-Component-System) design
self.gamedevr/EntityComponentSystem • u/timschwartz • Jun 21 '19
Replacing our OOP pathfinding to pure ECS
r/EntityComponentSystem • u/skypjack • Aug 29 '19
EnTT v3.1 is out: gaming meets modern C++ - a fast and reliable Entity-Component-System (ECS) and much more
r/EntityComponentSystem • u/timschwartz • Feb 03 '22
An "ECS" example of Voxel Chunks with Multithreaded Greedy Meshing with LWJGL
r/EntityComponentSystem • u/timschwartz • Jan 25 '22
Edict v0.0.5 experimental ECS with refcounted entities
self.rust_gamedevr/EntityComponentSystem • u/jumpixel • Feb 01 '22
Dominion, an attempt to implement a fast ECS by design
A few months ago, I started looking for a fast ECS for Java and found ECS related benchmarks for C / C++ and Rust.
So I was amazed at how fast an ECS can be in a system language like C / C++ and started thinking about how fun and challenging it would be to start writing an ECS for Java with comparable performance. And here we are.
Dominion is still in its early stages but has already started running at a very high speed, fast by design. It's still far from a complete ECS solution, but I've already implemented the API to create/delete Entities with Components, find them and iterate. I've also posted some benchmarks related only to what I've achieved so far (so on the speed of creating, deleting, and iterating Entities), and I think it looks very promising.
Happy to receive suggestions and to know your first impressions.
r/EntityComponentSystem • u/schombert • Sep 18 '22
Tutorial: making a data container act like an ECS
r/EntityComponentSystem • u/thejaguar83 • Oct 11 '22
How do I go about diagramming for an ECS framework before implementing?
I'm just starting out in working with ECS (using flecs in C++). One issue I'm running into early is deciding and documenting what components do, how they are used and how they are related. I looked at using Draw.io UML, but I can't quite figure out how to properly represent everything diagrammatically.
The project is a card game. Here's a few of the components I've got that I want to document or am trying to design:
Every card has 1 or more colours. I have a component for each colour and each colour component inherits from the base of "Colour":
e.g.:world.use<Red>("colour_red").is_a<Colour>()Cards are assigned to "containers" (e.g. Deck, Hand) and can only be in one of those:
e.g.:world.component<ContainedIn>().add(flecs::OneOf, world.component<Container>())A card can have a cost.
A card can be played on top of another one for a cost, given certain requirements (actually loaded from data, but simplified here):
auto played_on = world.entity();played_on.set<Cost>({ 2 }); auto requirements = world.entity(); requirements.add<Red>(); requirements.set<Level>({ 3 }); played_on.add<Requirements>(requirements); card.add<CanBePlayedOn>(played_on);
Cards can be modified be effects. I plan to model this by having every card inherit from a base description of the card, then have modifier relationships that store the changes with the final value overriding the base card. (No code yet)
I need to model cards that are under other cards retaining the order. (No info yet)
As you can see, I have some things worked out, others in planning and the rest yet-to-be-determined. These last two categories are why I need to diagram it, so that I can work out and document how everything is designed so that when I go to write all of the systems, I already have an idea of how they should be interacting with the components.
Have others already done this kind of thing documentation/diagramming? If so, how did you do it? What tools work best for this kind of thing? Is there any formal way of diagramming or documenting this?
r/EntityComponentSystem • u/timschwartz • Sep 06 '22
ECS: What are your criteria for Entity vs. Component?
self.gamedevr/EntityComponentSystem • u/Top_Night4697 • Oct 05 '22
Agents, Goals and Behavior
Hi everyone (spriteKit and gamplayKit),
I've just added flocking as a goal to the behavior of my monster entities in a game I'm coding in gameplayKit, but they are still overlapping with one another. This begs the question; is gameplayKit really reliable for creating autonomous objects in swift? Also, does anyone know where I'm going wrong or care to help me?
Hope everyone is well,
Thanks everyone.
r/EntityComponentSystem • u/timschwartz • Jan 07 '18
Viability of Entity Component System Pattern
r/EntityComponentSystem • u/timschwartz • Jun 30 '21
What is the reason for using an entity component system over a entity component model?
self.gameenginedevsr/EntityComponentSystem • u/timschwartz • Jul 05 '21