Skip to content

About

Personal base crate for Bevy based games.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

375 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ed's Bevy Common

Who's this for?

Me (eswartz75)!

Should you care?

If you came across this repo, 👋.

Feel free to snoop around and steal ideas, even the bad ones.

But ⚠️⚠️⚠️ this is my personal repo and will change without warning ⚠️⚠️⚠️.

What?

This is an opinionated set of plugins that can be used in Bevy game projects (it's not on crates.io). I've been using this in my own (private) projects since Bevy 0.15. It currently works for 0.19.

It is not documented but just start from the example example_menu.rs.

But it contains:

  • Mouse cursor grab/ungrab tracking

  • Bevy States for program, gameplay, level progression

  • Bevy States for overlay (2D) handling ** I.e. when a given menu is up, or whether debug UI is up ** Allows for cleanly hooking up setup/teardown/level switch

  • Menuing framework (using bevy_ui) ** toggles ** sliders ** enums ** main menu vs. escape menu

  • Play/pause support (PauseState, distinct gameplay and menu flags; pausing only affects Time<Physics>)

  • bevy_inspector_egui integration

  • see DebugUiState for various things visible when debugging enabled (toggle "`")

  • bevy_asset_loader integration with the states ** I.e. New/Initializing -> AssetsLoaded transitions ** I.e. so you know when you have fonts/icons/etc. available to use ** Any loading errors trigger OverlayState::ErrorScreen so users aren't left wondering when loading will end.

  • player camera and FPS or space/flying controller ** keyboard/mouse/controller integration

  • common action setup using bevy_enhanced_input

  • skybox and reflection probe setup from .exr files which occurs when asset collections are ready and performs conversions into cubemaps

  • support for splitting huge meshes into smaller maps to make Avian happy, see split_into_cubes.rs

  • bevy_seedling integration

  • random sound selector for footsteps and sliding when collisions occur on entities with SurfaceMaterial, see sound_sampler.rs

Why?

  • Obligation 😼: I used a version v0.1 of this code for my Bevy Game Jam 7 project here, and according to the rules, prewritten code for that project should be publically available.

  • Benevolent indifference 🤷: I thought the code was good enough to be public, or even be snarfed into training data, and might be useful. Take it or leave it. Nothing here is revolutionary. Some things are bad. Some things are my reluctance to refactor.

  • Pragmatism: Being public, I can link to it, share it amongst my projects without needing to have ssh credentials in random OSes and VMs.

I will continue to update this code and use that game jam entry for testing when I remember to. But I don't recommend linking to this crate without the caveat, beware of sudden changes.

Attributions

  • fps.rs: based on bevy_mini_fps (single-file implementation in lib.rs)

About

Personal base crate for Bevy based games.

Resources

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages