A powerful 3D/2.5D game controller plugin for Bevy Engine.
Caution
WARNING: This plugin is currently NOT TESTED. It is provided "as is" and may contain bugs or breaking changes. Use with caution in production projects.
The plugin provides a comprehensive set of systems for building complex 3D and 2.5D games:
- ✅ Character Controller: Full-body awareness 3rd/1st person controller with walk, run, jump, crouch, and sprint.
- ✅ Camera System: Advanced camera management with multiple modes (follow, orbiting, first-person), collision detection, and smooth transitions.
- ✅ Movement Systems: Ladder climbing, wall running, ledge climbing, and character movement physics.
- ✅ Combat & Stats: Health system, core attributes (Strength, Agility, etc.), derived stats, and stat modifiers (buffs/debuffs).
- ✅ Skills & Abilities: Configurable skill trees and ability management system.
- ✅ Inventory & Vendor: Item management, equipment system, and shop/trading mechanics.
- ✅ AI & Stealth: NPC behavior, detection systems, line-of-sight, and stealth/hiding mechanics.
- ✅ Interaction System: Flexible object interaction framework (switches, doors, pressure plates, etc.).
- ✅ Narrative Systems: Dialog system with branching paths and a robust Quest system.
- ✅ Save System: Game state persistence for all major systems.
- ✅ Puzzle & Devices: Logic gates, puzzle elements, and electronic device simulations.
- ✅ Tutorial System: Dynamic tutorial logging and display system.
- ✅ Vehicles: Basic vehicle physics and controller support components.
Add to your Cargo.toml:
[dependencies]
bevy_allinone = { path = "../bevy_allinone" } # Adjust path as neededUse in your game:
use bevy::prelude::*;
use bevy_allinone::prelude::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(GameControllerPlugin)
.add_systems(Startup, setup)
.run();
}
fn setup(
mut commands: Commands,
mut meshes: ResMut<Assets<Mesh>>,
mut materials: ResMut<Assets<StandardMaterial>>,
) {
// Spawn a ground plane
commands.spawn((
Mesh3d(meshes.add(Plane3d::default().mesh().size(20.0, 20.0))),
MeshMaterial3d(materials.add(StandardMaterial::from(Color::srgb(0.3, 0.5, 0.3)))),
));
// Spawn the player
commands.spawn((
Player,
CharacterController::default(),
// Add other components as needed
));
}The plugin is organized into modular components:
character- Core character controller logiccamera- Camera management and follow logicinput- Platform-agnostic input mappingphysics- Custom gravity and ground detectioncombat- Health and damage processingstats- Attributes and derived statsskills/abilities- Progression systemsinventory/vendor- Item and trade systemsstealth/ai- Perception and behaviorinteraction- Interactive object frameworkdialog/quest- Story and progressiontutorial- Instructional feedback system
The repository includes numerous examples demonstrating each system. You can run them using cargo run --example <example_name>:
tutorial_demostats_demostealth_demoabilities_demoskills_demoquest_demovendor_demoladder_democlimb_demo- ...and more in the
examples/directory.
MIT OR Apache-2.0