I've been using Bevy recently so here are some thoughts on this: Firstly, the overall quality is high and seeing this attention being paid to the project's organization is another good sign. Documentation is not great. The Bevy book runs out of content very quickly. The "Cheat Book" has additional useful information: https://bevy-cheatbook.github.io/ . With these plus the examples I've been able to figure out everyth…
How does it lose type safety? I was under the impression that bevy's Query system is type safe.
The Bevy Foundation
31–40 of 82 posts
Re: The Bevy Foundation
#32Re: The Bevy Foundation
#33Earlier quoted context omitted.
How does it lose type safety? I was under the impression that bevy's Query system is type safe.
ECS is basically a very simple relational database. There is no equivalent of foreign keys or other constraints between components. I can't say, for example, "every entity that has a location must also have an associated mesh". If I forget to add a component it's just a silent failure. Everything runs fine, just the expected result doesn't happen.
Granted, this is annoying and not a particularly great solution, but it would serve to give you a reminder for when you forget. I don't mean to diminish from your overall point either, it's a valid and good one I think.
Re: The Bevy Foundation
#34I applaud the decision for a 501(c)(3) and not a 501(c)(6).
Re: The Bevy Foundation
#35If you are trying Bevy for the first time, and it runs slow, put this on your Cargo.toml [profile.dev.package."*"] opt-level = 3
This + more is described if you follow the Quickstart, which if it's your first time, is probably the best place to get started quickly :) https://bevyengine.org/learn/quick-start/getting-started/set...
Re: The Bevy Foundation
#36I applaud the decision for a 501(c)(3) and not a 501(c)(6).
Can you explain the difference?
This has complete sections defining both.
Re: The Bevy Foundation
#37Re: The Bevy Foundation
#38I applaud the decision for a 501(c)(3) and not a 501(c)(6).
Can you explain the difference?
- A 501(c)(3) is for the benefit of the public
- A 501(c)(6) is for the common interests of their members
They both have advantages and disadvantages and are appropriate for certain scenarios.
Examples are:
- A 501(c)(3) Python, Scala, Zig, Mozilla, Apache, SFC, FSF
- A 501(c)(6) .NET, Rust, Eclipse
Re: The Bevy Foundation
#39Earlier quoted context omitted.
ECS is basically a very simple relational database. There is no equivalent of foreign keys or other constraints between components. I can't say, for example, "every entity that has a location must also have an associated mesh". If I forget to add a component it's just a silent failure. Everything runs fine, just the expected result doesn't happen.
You can probably write runtime tests for this. Some system which queries for component Location, and then does an assert for each component that the associated entity also has a mesh. Granted, this is annoying and not a particularly great solution, but it would serve to give you a reminder for when you forget. I don't mean to diminish from your overall point either, it's a valid and good one I think.
I have this vague thought that Rust needs a different kind of type system.
Standard type systems[0] basically rely on references between values[1]. I seem to read about numerous Rust systems that don't use references for various reasons. Usually the borrow checker gets in the way or they want a different memory layout[2]. This makes me think that what's needed is a type system that allows constraints to be expressed between values without requiring a reference between them. I don't know what this type system looks like, though.
[0]: Rust's type system is a fairly standard type system from an academic POV. The novelty is that it's the first language with traction to use a linear / affine type system, but these are relatively well studied in academia.
[1]: The theory is not formulated this way, but the representation they compile into is a bunch of references.
[2]: ECS, as I understand it, is not a reaction to Rust's type system but an architecture driven by memory layout, parallelism, and breaking-out-of-OO-hierarchy concerns. However the net result is the same.
Re: The Bevy Foundation
#40I applaud the decision for a 501(c)(3) and not a 501(c)(6).
Can you explain the difference?