3
A little-known javascript ECS named HECS that I love
Post Body
I'm not the author of [Hecs](https://github.com/gohyperr/hecs/tree/master/packages/hecs), but I'm really digging it. I think it is under-appreciated tech, and thought others might like to take a look (especially if you're weighing javascript ECS libraries at the moment).
HECS is a [very fast](https://github.com/gohyperr/hecs/blob/master/packages/hecs/TECHNICAL.md) Entity-Component-System that is based on some of the same principles as Unity DOTS. I couldn't be happier with having chosen it for our in-browser virtual world (www.relm.us).
Some of the things I've appreciated:
- The queries are fast but flexible. You can query for entities with a particular set of components, or add `Not()` as well as `Modified()` to your query as modifiers. This is extremely helpful in managing the full life-cycle of a component as it travels through states like being "added", "active" or "removed."
- It has a plugin system which allows you to pull in others' work, as well as group components and systems together into logical containers. For example, I [implemented](https://github.com/relm-us/relm-experimental/tree/main/src/ecs/plugins/rapier) the [Rapier3D physics engine](https://rapier.rs/) as a HECS plugin.
- It runs on both server (node) and client (browser). This means you can run physics simulations in both places for a networked multiplayer game, for instance.
- Small, extremely well-written codebase. In addition, the developer is very responsive & friendly.
I hope you like it as much as I do!
Author
Account Strength
100%
Account Age
18 years
Verified Email
Yes
Verified Flair
No
Total Karma
9,504
Link Karma
3,299
Comment Karma
5,923
Profile updated: 1 day ago
Posts updated: 8 months ago
Subreddit
Post Details
We try to extract some basic information from the post title. This is not
always successful or accurate, please use your best judgement and compare
these values to the post title and body for confirmation.
- Posted
- 4 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/gamedev/com...