Miniplex 2.0 Beta 1 has been released, and it's a big one!


Miniplex 2.0 Beta 1 is out, details here!

Okay, look, I messed up!

In the beginning of 2022, I sat down and wrote my own little ECS implementation for JavaScript and TypeScript. It was designed to be friendly, easy to use, and generally prefer developer experience and familiarity over performance. It started life as hmecs, but I eventually renamed it to miniplex. And it was good! Very good!

Three quarters of a year later, it was time to finally release version 1.0 of the thing. I had been using it in many projects and libraries, and it was feeling extremely stable, so one day I decided to just go for it, and release the first stable major version. I did just that, posted an announcement on Twitter, had some people try it, and... was a disaster!

Someone immediately identified a bug that prevented Miniplex from working correctly in React's <StrictMode> (this is how I found out that React-Three-Fiber doesn't automatically inherit the outer <StrictMode>, a bug that will luckily be fixed in that library's next major version.)

But to make things worse, I failed at fixing this issue because I had made some critical mistakes in the library's design.

So I sat down, just days after the 1.0 release, and... rewrote the entire thing.

Miniplex 2.0

The result of this rewrite is Miniplex 2.0, a much lighter and more relaxed, but at the same time more flexible and powerful take on the ECS pattern (and yes, it works in React's <StrictMode> now), and it's now available as a Beta.

If you already have a project that uses Miniplex 1.0, the upgrade should be relatively painless. There are breaking changes in the API, but they're almost exclusively surface-level API changes (renames, etc.). For example, world.createEntity is now just world.add, and world.destroyEntity is now world.remove. (There's even a world.update now, and I will write more about it soon!)

Buckets, Buckets, Buckets!

The underlying architecture is all new, and allows for some interesting setups that may play an increasibly larger role in the future; for example, you can now derive an archetype from another archetype, building an entire tree of separate buckets of entities. Archetypes can now use predicate functions to filter entities, too! This is going to give you a lot of control in more complex setups.

For games, I'm working on instrumentation tooling that visualizes what is going on in your ECS layer, helping you to identify bottlenecks and other performance issues. Stay tuned for more on that later!

But if your needs are cozy and simple, rest assured that using Miniplex remains just as straight forward to use as you know it from version 1.0.

For a more complete list of changes, please see the Miniplex 2.0 Beta 1 Release Announcement.

Next Steps

I intend to leave Miniplex in Beta for at least another couple of weeks, to give people time to try it out and report any issues they may find. This also gives me some time to finalize the all-new documentation website.

I expect that there will be another two or three Beta releases, with a final 2.0 release happening around the beginning of 2023.