Skip to content
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

Simplify examples #123

Open
janhohenheim opened this issue Feb 6, 2024 · 4 comments
Open

Simplify examples #123

janhohenheim opened this issue Feb 6, 2024 · 4 comments

Comments

@janhohenheim
Copy link
Contributor

janhohenheim commented Feb 6, 2024

The current examples are functional character controllers, which is cool, but 95% of the code shown is irrelevant to the crates a newcomer is trying to learn. Personally, this made it daunting to get into an otherwise simple to use crate ecosystem. In fact, I was delighted at how little code I actually needed to setup everything once I fought my way through!

The biggest offender here is the basic component reader, which requires only a single line of code, namely registering the plugin. Reading the example, this fact is not obvious, as it contains not only a lot of liens but a lot of files. I recommend replacing the entire example with a single file.

In sum, I suggest removing most dynamic interactions in favor of showing a simple, boring, static scene. This might not look as impressive, but would be instantly understandable to a beginner. We could of course just add these as new examples, but I believe this would bloat the examples, as the interactive ones become dead weight to maintain.

I hope any of this doesn't come as overly harsh. My motivation is that I am very happy with the Blender workflow and wish to make it as accessible as possible to newcomers :)

@janhohenheim janhohenheim changed the title Overhaul examples Simplify examples Feb 6, 2024
@kaosat-dev
Copy link
Owner

Thanks for the feedback, and no it does not sound harsh at all, I agree with pretty much all your points!
In fact, I started doing that today :D

  • the examples have / had a bad signal/noise ratio, and where too numerous to be manageable , so I am extracting common code, merging some examples, removing some of them
  • btw for the "basic component reader" do you mean this one ?
  • there is the slight added problem that the examples work both as examples of feature on the Bevy side, as well as on the Blender side, but with the trimmed down versions, it should be a lot more palatable
  • I could convert one of them to being a static scene to remove the distraction ? (I need at least a few with dynamic elements to also work as testing grounds, but it should indeed not be all of them)

@janhohenheim
Copy link
Contributor Author

janhohenheim commented Feb 6, 2024

In fact, I started doing that today :D

Hehe, great minds and all that :D

btw for the "basic component reader" do you mean this one ?

exactly

there is the slight added problem that the examples work both as examples of feature on the Bevy side, as well as on the Blender side, but with the trimmed down versions, it should be a lot more palatable

If possible, try not to have "common example functionality" crate. I find that these reduce drastically increase the mental load of the learner as simple relationships between systems and types are no longer evident.

I could convert one of them to being a static scene to remove the distraction ? (I need at least a few with dynamic elements to also work as testing grounds, but it should indeed not be all of them)

Having a testing ground is nice, but it handles a different concern than an example. I recommend you take that testing ground and move it to a dedicated binary. This way the testing grounds can have whatever diagnostics you need and can test multiple things at once, while the examples stay simple and readable.

@kaosat-dev
Copy link
Owner

@janhohenheim even if not perfect, I think this is resolved ?

@janhohenheim
Copy link
Contributor Author

@kaosat-dev I think it would be best for new users if they saw the workflow in action on a simple single main.rs per example.
No physics (except for the dedicated example), no controls, no common.rs, nothing but the actual libraries in question.
If I find the time, I can write some of these and move the current ones into a "demo" folder. Feel free to assign me to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants