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

Refactor project for Bevy 0.14 update #327

Open
xx1adfasd opened this issue Jul 31, 2024 · 2 comments · May be fixed by #330
Open

Refactor project for Bevy 0.14 update #327

xx1adfasd opened this issue Jul 31, 2024 · 2 comments · May be fixed by #330

Comments

@xx1adfasd
Copy link

xx1adfasd commented Jul 31, 2024

First of all, thank you for the brilliant project! I learned a lot from foxtrot!
I just learned almost everything by learning "how foxtrot did it". Here're some thoughts because I just finished learning all codes in foxtrot.

  1. Is some code a little fragmented? I mean, most of the code are just fine, but maybe some exceptions.

For example, there's a particle.rs file and a particle/ folder (and all the other sub mods also follow this pattern). I think it's better put it all inside particle folder, so it becomes particle/mod.rs. This way people won't need to look at different folder for related code. I think it's a better rust code managing style.

The 3 files in util folder and the util.rs in root folder can be merge into one .rs file too.

  1. Embed bevy_yarnspinner_example_dialogue_view. Because if you are really want to make your own game, customizing dialog ui is a must do. Also, there's no sound effect in the yarnspinner example, and many visual novel game have some sound effect during the typewriter or when the player continues the dialog. (Also by embedding the dialog ui we can make some example codes on how to integrate kira and yarnspinner-rust)

  2. A prelude file, just as this page suggested: https://github.com/tbillington/bevy_best_practices?tab=readme-ov-file#prelude

  3. create_sprint_particle_bundle might need to config the transform of ParticleEffectBundle as not all people are using the default fox model, so when it's a humanoid or some other model whose origin isn't on the ground level (for example, origin at the center), then we need to shift it down.

  4. UiCamera is not needed (at least in 0.14 it's true) as long as we use embedded yarnspinner dialog and make it only setup when 3d camera is spawned.

  5. Mention that this project is not for every type of 3D game. I think it's better for a 3d RPG or a 3d visual novel game.

  6. Make some feature as optional. Such as grass, sky, bevy_editor_pls. They can be easily toggled on and off by a feature flag. Apparently not all game want grass or sky. And also, bevy_editor_pls has many bugs and might conflict with the game key binding, so not all people like it.

  7. Maybe a tiny "Save and Load" feature using bevy_pkv or bevy-persistent

In fact I'm interersted in contributing Foxtrot in the future because I just like it and had read all the code.
But I'm currently using bevy 0.14 so by learning foxtrot I basically wrote a my own version of "bevy 0.14 version of foxtrot" but it's written in my style so it's un-mergeable as it's a complete overhaul... And there're also many tiny improvements for the code but they are trivial to mention here.

I have to repeat that foxtrot is so important and I think it has a great influence on the bevy introduction level learning.

@janhohenheim
Copy link
Owner

janhohenheim commented Jul 31, 2024

Thanks a bunch for the kind words! I agree with almost everything you wrote.
I plan the 0.14 update to include a lot of overhaul based on the lessons I learned while co-creating bevy_quickstart that are very much in line with your feedback :)

@janhohenheim janhohenheim changed the title Some thoughts and suggestions for the project Refactor project for Bevy 0.14 update Aug 5, 2024
@janhohenheim
Copy link
Owner

Little update on this: I'm currently working through some feedback for bevy_quickstart, most importantly Alice's. I want to get this done first so I don't run into a weird cycle of

  • Refactor Foxtrot based on bevy_quickstart
  • Refactor bevy_quickstart based on Bevy maintainer feedback
  • Refactor Foxtrot based on bevy_quickstart feedback
  • Rinse and repeat

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

Successfully merging a pull request may close this issue.

2 participants