Skip to content

Commit 4d9dfbb

Browse files
authored
[DOCS] Clean ecs docs
1 parent d3be879 commit 4d9dfbb

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

Docs/PipeECS.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ This Pipe module contains a complete [ECS](https://en.wikipedia.org/wiki/Entity_
66
There are similarities with other well-known ECS systems like [entt](https://github.com/skypjack/entt) but this implementation has some key differences.
77
## Architecture
88
Of *Entity-Component-System*, Pipe has **Ids** (*entities*) and **Components** (*components*).
9+
Ids are identifiers without data, and Components are data structures bound to an Id.
910

1011
It does not implement or dictate any specific way to do logic (*systems*).
1112
However, it does provide efficient filtering and iteration of ids that you can use in your logic.
@@ -22,7 +23,7 @@ Each component type is stored closely together in a "**pool**". This makes itera
2223

2324
If we think about it as memory, its closer to this:
2425
![Architecture Memory](Assets/Architecture-Memory.png)
25-
Ids are stored together in memory, and pools do the same.
26+
Ids are stored together in memory. Each pool does the same.
2627

2728
### Id Context
2829
Think of the **Id Context** as the "*world*" or the "*registry*" of ECS. It owns ids and all their components.
@@ -33,7 +34,7 @@ They can be easily copied, serialized, subset, etc.
3334
### Id Scope
3435
**Scopes** represent guaranteed access to a subset of component pools of a **Context** or of another **Scope**.
3536

36-
This means while with the context you can work with any component. In a scope you are limited to a few.
37+
This means that while with the context you can work with any component, with a scope you are intentionally limited to a few.
3738

3839
Some examples:
3940
- A scope that can **read** *Location* and *Velocity* **can't read** *Player*.
@@ -52,13 +53,13 @@ As to why we need scopes, two main reasons: **Performance** and **Thread-safety
5253
> Scopes do NOT iterate ids! See [Filtering](#Filtering).
5354
5455
### Filtering
55-
Filtering is done by combining an extensive list of functions that use contexts and scopes to efficiently get a list of ids to iterate and work with.
56+
Filtering is done by combining an extensive set of functions that use contexts and scopes to efficiently get a list of ids to iterate and work with.
5657

57-
For filtering we simply process an array of ids in whatever way we need.
58-
It does only that.
58+
So, filtering is simply processing an array of ids in whatever way we need.
59+
Just that.
5960

60-
For example, find ids that have Location and Velocity and iterate them to *apply movement*.
61-
But then I exclude those that are not players, and iterate again to *notify players that have moved*.
61+
For example: Find ids that have Location and Velocity and iterate them to *apply movement*.
62+
Then, exclude those that are not players, and iterate again to *notify players that have moved*.
6263

6364
## Quick Start
6465

0 commit comments

Comments
 (0)