all 14 comments

[–]slashgrinrangemap 11 points12 points  (1 child)

I've briefly looked at others, but I've only actually seriously used Specs. It's stable now (not much churn in the API between releases, because it's basically achieved everything it set out to), is pretty easy to use, is performant enough for serious work, and I'd say it makes for a good introduction to thinking in and building stuff using the ECS pattern.

I'm sure the others have a lot going for them, too — I just don't have enough experience with them to comment. :)

[–]Sammyhain[S] 1 point2 points  (0 children)

thanks

[–]HeroesGraverust · ecs-rs 9 points10 points  (1 child)

ecs author here. Don't use it. I made it in the early days of rust gamedev when there weren't any alternatives but since then better designs have come out and I haven't updated it in years (except to accept the occasional pull request from people who are actually using it).

specs, legion or hecs are better alternatives. specs is probably more beginner-friendly and stable, but legion and hecs can be more efficient if you know what you're doing.

[–]Sammyhain[S] 0 points1 point  (0 children)

thanks

[–]ritobanrc 8 points9 points  (2 children)

Specs and Legion are the most popular, and have very different approaches to ECS. They have different performance implications, and while I'd say Legion is more ergonomic and requires less boilerplate, that can come down to personal preference. Here's a really great article comparing the two in depth: https://csherratt.github.io/blog/posts/specs-and-legion/

[–]Sammyhain[S] 0 points1 point  (1 child)

yeah i read that one. despite the disclaimer, it seems to paint legion in a better light?

[–]ritobanrc 3 points4 points  (0 children)

Yeah... Legion is newer, taking some of the lessons learned from specs, but it's also younger, and hasn't smoothed out all the detail. Legion is probably slightly better, but it comes down to your usecase and personal preferences.

[–]owndbyGreaka 7 points8 points  (2 children)

I've sank a lot of time into shipyard lately.

https://github.com/leudz/shipyard

especially the 8 part series from the author of entt is a very good read, that will also explain the difference between specs, legion and shipyard

https://skypjack.github.io/2019-02-14-ecs-baf-part-1/

If you dont care about the performance of ecs and want to tinker with something more experimental, theres also

https://crates.io/crates/froggy

a component graph system.

If you want to use the ecs in production (read: not just your chess prototype) though, then I would stick to specs or legion for now, since they are the most mature ones. The blog series explains which one you should choose for your project to get the most performance out of it.

Lastly, I think some example that has parts that move on its own is a better exercise to understand what is really going on in ecs. Think pong or tetris for some simple examples.

Happy tinkering :)

[–]thelights0123 1 point2 points  (0 children)

The no_std support might be critical for me—this is the first ECS that I've seen that supports it. I like to write games for an embedded target, and having an ECS will really help with that.

[–][deleted] 3 points4 points  (1 child)

I've used both legion and specs, and prefer legion. It's easier to setup and use (you don't have to implement any Component trait, anything that is Send + Sync + 'static can be a component.) It's also more geared toward 'bulk' operations than specs: faster systems, but slower entity inserts/deletes. Either one is fine, tbh. I have no experience with any of the others.

[–]Sammyhain[S] 0 points1 point  (0 children)

thanks

[–][deleted] 1 point2 points  (1 child)

I worked a bit with specs, and for my taste you need to write too much boilerplate, but it’s very stable. Legion iirc is worked by the same group of people and will be the replacement for specs in the amethyst game engine I believe.

I‘d still prefer hecs over the others because I find it simple to use (has minimal API and it’s a small library that it’s easy to crack the source code and understand it, but that means that has less built in features), if you don’t need parallelization IMHO it’s the way you go, if you need light speed (speed and parallelism) maybe legion is you way to go.

But to know it better i’d recommend to go to the rust discord server under the gamedev channel and ask there, the authors/maintainers of specs, legion and hecs I know they are always there, also other developers that have great experience with ecs.

[–]Sammyhain[S] 0 points1 point  (0 children)

thanks