Skip to content

Commit 208e7ab

Browse files
zakarumychozkriff17cupsofcoffee
authored
N30: Edict (#922)
Co-authored-by: Andréy Lesnikóv <[email protected]> Co-authored-by: Joe Clay <[email protected]>
1 parent 4088243 commit 208e7ab

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

content/news/030/index.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,44 @@ for expressively abstracting over user input.
385385
Supports local multiplayer, enables input rebinding, integrates with `bevy_ui`,
386386
and handles chords!
387387

388+
### [Edict]
389+
390+
New archetypes based ECS implementation by [@zakarumych](https://github.com/zakarumych).
391+
392+
The novel feature of [Edict] is entity ownership implemented via reference counting.
393+
This optional feature allows creating owned kind of `Entity` "reference",
394+
that ensures entity is alive and despawns it on drop.
395+
Storing owning `Entity` in the component of another entity
396+
creates ownership relation between those entities.
397+
Even though `Entity` is an owning reference,
398+
components of the entity are can be queried from `World` as usual.
399+
Shared ownership is also available.
400+
401+
Optimized for both high density `World`s with thousands of entities
402+
and also for `World`s with lower number of entities spread among many archetypes.
403+
[Edict] is aimed for wide range of game genres and use cases outside of games.
404+
405+
Built-in change detection with epochs allows systems to query for components
406+
that were updated since last run of that query,
407+
or since any other epoch as defined by `Tracks` argument.
408+
This opens possibility to have multiple POV on changes even in single system.
409+
For example server-side netcode can track changes individually
410+
for each client and query for changes since last ACK.
411+
[Edict] optimizes iteration significantly when entities
412+
with modified components are queried.
413+
414+
Although ECS abbreviation implies, [Edict] does not come
415+
with predefined `System` trait and systems scheduler.
416+
We can call it ECQ (Entity-Component-Query) as an alternative to ECS.
417+
418+
[Edict] is added to [ecs_bench_suite](https://github.com/rust-gamedev/ecs_bench_suite)
419+
so anyone can compare performance in some trivial examples with other ECS.
420+
421+
Development focus for February is making more public API, including unsafe parts,
422+
to allow writing custom queries, implement schedulers with parallel execution etc.
423+
424+
[Edict]: https://github.com/zakarumych/edict
425+
388426
### [rafx]
389427

390428
[![Rafx Screenshot](rafx-screenshot.jpg)][rafx-youtube-video]

0 commit comments

Comments
 (0)