Advertising

Just a little note: As it's more readable, you may want to use
1000.msecs instead of dur!("msecs")(1000) in the example
program. 1000.msecs is the equivalent of the msecs(1000)
function call, which returns dur!("msecs")(1000).

Ali

Done, thank you!

I'm implementing pretty much the same thing in my project,
although I'm probably
more in line with the original blog post (e.g. every system can
only access
specific components of an entity, which are statically
determined, entities are more lightweight, etc.). I'm using much
less OOP and more of a generic/metaprogramming approach.
Currently I'm trying to rewrite the code to add a concept of
"past" and "future" state; a System processes past Components and
outputs a future Component, past Components are const, and no two
systems may write to the same future Component. This should allow
very simple threading

with little synchronization.
I'll look at your code if there are interesting ideas.
The previous version of my entity system is used in my ICE game:
https://github.com/kiith-sa/ICE
It's quite messy, though; which is why I'm rewriting it.

The new version doesn't even compile at the moment, I'm working
on it slowly as I'm studying and working at the same time right
now.