Levels of abstraction for groups of components #4434
colepoirier
started this conversation in
General
Replies: 2 comments 2 replies
-
Just FYI that should be #3877. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hi, I'm thinking on universal reusable constructors for "bundles", they have properties of bundles, but the difference is that they also may have children. I wonder how that should be called? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
#4072 was migrated here because its content and intent were much more that of a 'discussion' than 'tracking issue'.
This is an issue for tracking the discussions and implementations of the conceptual hierarchy of abstraction for data i.e.
Component
s in Bevy. We need figure out where to draw the lines between the kinds of organization in bevy. The currently existing levels of abstraction areComponent
,Bundle
, andScene
. There is currently discussion of the conceptual clarity and ergonomics ofBundle
, andScene
. There are proposals to change the definition and meaning ofBundle
, and additional proposals to add new capabilities to it specifically a dynamic/runtime reflection API. There are discussions of the conceptual clarity ofScene
and proposals to replace it with new and more levels of abstraction calledSchematic
,Prefab
, andBlueprint
, or to keepScene
while adding new levels of abstraction, narrowing the currently very large scope ofScene
. These discussion and proposals have wide ranging implications for the architecture of the engine, Cart said that even a seemingly small proposal like the one to implementBundle
for allComponents
may have far reaching implications for the engine and has the potential limit or hamstring future development it is not carefully evaluated in a holistic and future-looking manner. Proposals likeSchematics
and dynamicComponents
and dynamicBundle
would be primarily useful and perhaps essential for good ergonomics of the Bevy Visual Editor, and they have other potential uses independent of this.The most recent and extensive discussion of
Scenes
involving Cart occurred on 28 February 2022 on the bevy discord server in the #scenes-dev channel starting at this message: https://discord.com/channels/691052431525675048/745805740274614303/948117767754764348Issue: Better tools for working with dynamic collections of components #3227
Guidance from @alice-i-cecile for my filling in of this issue: "I think the other core idea that we should communicate is that things should be able to be promoted up the hierarchy of abstraction levels, but not back down."
What is a
Component
A
Component
is single struct or enum that implementsComponent
which is stored on andEntity
.What is a
Bundle
A
Bundle
or properly as Component Bundle is an abstraction that allows you to organize one or moreComponent
s in a structs so that a user can spawn a group ofComponents
without having to manually insert them on anEntity
individually. When a user inserts a ComponentBundle
, Bevy turns each of its fields into a distinct component and inserts them on the entity.The user can nest
Bundles
, embedding one bundle of components within another, becauseBundles
are after all just a collection ofComponent
. Bundles are not currently checked (#2387) for duplicate component types.Component
inserted on anEntity
will overwrite existingComponents
of the same type.What is a
Scene
Scenes focus area tracking issue #255
What is proposed to be a
Prefab
What is proposed to be a
Schematic
Issue:
Schematic
proposal and discussion #3877What is proposed to be a
Blueprint
DynamicBundle
proposal and discussionPR: Make a dynamically applicable version of Bundle #3694
SceneBundle
proposal and discussionPR: add a SceneBundle to spawn a scene #2424
Implement
Bundle
for everyComponent
proposal and discussionPR: Implement Bundle for every Component #2975
Simplified
Scene
and reflection serialization and proposalIssue proposing two alternative syntaxes to improve the verbosity and format of
Scene
files #4153Comparison of
Scenes
and the three proposed levels of abstractionBeta Was this translation helpful? Give feedback.
All reactions