Hacker News new | ask | show | jobs
by jvuygbbkuurx 67 days ago
My problem with bevy isn't the basics, but the architecture. I always feel like I'm making wrong decisions on if something should be a component or a field, and how it interacts with other stuff in systems. I just feel like I'm making an unmaintainable mess, but I'm not sure how it could be improved.
2 comments

I think ECS is a new enough architecture that the patterns are still very much folk lore.

I think a lot of the way I try and structure my Bevy apps comes down to trying to separate the rendering from my game logic. Its very easy to confuse the two responsibilities.

Coming from the web and Ruby I find the lack of automated testing and TDD to be foreign to me. So I've been trying to figure out patterns that make my games easier to test. Hoping to write about it soon.

> I think ECS is a new enough architecture that the patterns are still very much folk lore.

ECS is a pretty old idea, built on concepts that are even older. I was playing around with an ECS-like engine of my own in C over 10 years ago, based on blog posts and talks that are now 20-25 years old. Even the Wikipedia article for ECS can trace the origins back to the 1960s. (Though obviously it hasn't been applied to video games for quite that long.)

Nowadays I'd probably reach for Godot and Kotlin if I just wanted to build a game in an ergonomic language on a solid foundation. You could still apply ECS concepts there, as well.

> lack of automated testing and TDD

Rust has testing in the standard library -- IMHO Bevy is far easier to test than most game engines because it's "just rust". You can test game logic by starting headless apps, proding the ECS, and making assertions on the results.

For acceptance tests I've dusted off cucumber (after ten years of not thinking about BDD), as I it works great with Bevy

> I always feel like I'm making wrong decisions on if something should be a component or a field... I just feel like I'm making an unmaintainable mess,

That is true for all game platforms, experience takes care of it, don't give up.

About compilation time concerns, it doesn't seem to be a problem with Bevy, there's a fast compile mode with very reasonable performance.

However, I didn't see any scripting, there are scripting options for rust, it would be good to have bindings for some rust-like scripting.