-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
[Merged by Bors] - Break out Breakout components into a more sensible organization #4261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - Break out Breakout components into a more sensible organization #4261
Conversation
299219a to
e3ba1ba
Compare
|
@bevyengine/docs-team can I get some feedback on this? There's more clean up I'd like to do on this example, but I want to keep the PRs small and sequential. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I definitely like these changes from an ECS point of view. Having speed or velocity be a field instead of a component or constant is really unECS'y and shouldn't be encouraged.
Could you also move this comment to be above the function or somewhere else, because it looks like there is something missing below it in the current state. GitHub wouldn't let me comment on code that you didn't change :(
e3ba1ba to
d531fca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it as it is, but I wonder if there could be a Speed component that can be changed with a slider just to show that these values don't need to be const. This change can wait until we have a slider ui widget though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good changes, it reads much more idiomatically now.
|
This is extremely opiniony, but I think that struct Velocity {
value: Vec2
}overall would improve things further. This looks good to me though. |
|
Awesome, thanks y'all. I'll clean this up; I like your suggestions a lot. |
So, I made this change in the last commit. Overall, I think it's the more idiomatic than the alternative, but it does litter .0 (or worse, .value) everywhere. IMO we should fix that up later with a Deref / DerefMut impl, but that's a problem for another day. |
|
bors r+ |
|
bors r+ |
# Objective - The components in the Breakout game are defined in a strange fashion. - Components should decouple behavior wherever possible. - Systems should be as general as possible, to make extending behavior easier. - Marker components are idiomatic and useful, but marker components and query filters were not used. - The existing design makes it challenging for beginners to extend the example into a high-quality game. ## Solution - Refactor component definitions in the Breakout example to reflect principles above. ## Context A small portion of the changes made in #2094. Interacts with changes in #4255; merge conflicts will have to be resolved.
…engine#4261) # Objective - The components in the Breakout game are defined in a strange fashion. - Components should decouple behavior wherever possible. - Systems should be as general as possible, to make extending behavior easier. - Marker components are idiomatic and useful, but marker components and query filters were not used. - The existing design makes it challenging for beginners to extend the example into a high-quality game. ## Solution - Refactor component definitions in the Breakout example to reflect principles above. ## Context A small portion of the changes made in bevyengine#2094. Interacts with changes in bevyengine#4255; merge conflicts will have to be resolved.
…engine#4261) # Objective - The components in the Breakout game are defined in a strange fashion. - Components should decouple behavior wherever possible. - Systems should be as general as possible, to make extending behavior easier. - Marker components are idiomatic and useful, but marker components and query filters were not used. - The existing design makes it challenging for beginners to extend the example into a high-quality game. ## Solution - Refactor component definitions in the Breakout example to reflect principles above. ## Context A small portion of the changes made in bevyengine#2094. Interacts with changes in bevyengine#4255; merge conflicts will have to be resolved.
Objective
Solution
Context
A small portion of the changes made in #2094. Interacts with changes in #4255; merge conflicts will have to be resolved.