Projects Jams Discord News
Resources
Unwind Fishbowls Forums
About
Manifesto Our values About
Foundation
Foundation Membership Details
Log In
moecs logo
moecs
/
Blog

Observers has been implemented

@modev April 8, 2026

I have implemented Observers for moecs.

Observers are a mechanism that allows to subscribe on events of structural and data changes in the world. By default observers are disable for performance reasons, so you need to pass true for observable argument of new_world procedure when you create the world. You also can change observable property of the world to turn off/on observers globally.

There are different event types that can be handled for entities, components, and tags.

Event Description
SPAWNED Entity has been spawned.
DESPAWNED Entity has been despawned.
Read more

How do you build your ecs?

@modev April 3, 2026

I think we can connect and share own experience, ideas, approaches for building ecs.

I decided to build this ecs to learn the language, but then found myself deep dived into creation process, testing, optimizing, redesigning (firstly I had so-called quick entities type that were stored in stack memory and flushed into heap only when block limit reached; but then I tested and saw that speed of "quick" buffers does not cost algorithms and complications of the code for them, so I removed all code for quick entities and simplified algorithms).

I am not browsing other ecs code, just used bevy, flecs and read it's documentation. I make all from scratch, maybe I miss some well-known approaches and do not follow common standards, but this is my way to craft things.

I hope this discussion gives me more ideas about ”how” (improve, extend, simplify, speed up, ...).

Maybe you just want to share something you consider as important or/and interesting, your story of crafting ecs, anyt

Read more

Implemented without condition to systems query

@modev April 2, 2026

I thought that there should exists ability to select entities that does not have some components/tags yet to, for example, add them; or to select entities excluding some types of them.

You just list components/tags in without filed of system definition struct when mounting them.

Currently systems queries works this way:

You pass a list of component types and/or tag types when mounting a system and these set is a match query for selection of entities which will be passed to system callback. Entity must have all components and tags defined for the system to match its query condition (but it also may have more, it hasn't to be exact match). If you need to exclude entities without some components/tags from the query result (entities mustn't have them added), you can use without condition when mount the system. If system has no specified components/tags and without conditions it is considered as a task, no queries are executed for them at each progress step, and nil is passed as

Read more