A physics sandbox/game prototype built with Bevy, featuring a soft-body car body (inspired by JellyCar), spring-connected tires, and an in-progress editor mode. This project is heavily inspired by Walaber Entertainment's Physics of JellyCar: Soft Body Physics Explained video.
- Starts in a main menu with
PlayandEditorbuttons. - In
Playmode, spawns:- one deformable car body (point-mass + spring model)
- two deformable tires
- spring-based joints between body and tires
- a static floor shape
- Runs physics systems for point masses, springs, joints, and collisions.
- Includes rendering/debug components for points/springs.
- Supports an editor plugin with scene/UI/input systems under active development.
- Rust (edition 2024)
- Bevy
0.18 - bevy-inspector-egui
- serde + serde_json
- Rust toolchain (stable):
rustup,cargo - On Linux, native libraries required by Bevy (windowing/audio stack)
cargo runcargo run --releasecargo buildDefined in src/states.rs:
AppStateMainMenu(default)EditorInGame
GameState(sub-state ofInGame)Running(default)Paused
SceneState(sub-state ofInGame)Loading(default)Loaded
src/
main.rs # App bootstrap + plugin wiring
states.rs # App/Game/Scene state machines
engine/
mod.rs # Core plugin group
input/ # Input mapping and input systems
physics/ # Point-mass, spring, joint, collision logic
renderer/ # Debug/visual rendering systems and components
scene/ # Runtime scene creation and teardown
editor/ # Editor scene, UI, and editor-specific input
main_menu/
mod.rs # Main menu UI and transitions
assets/
fonts/
shaders/
shapes/
- The scene setup currently uses
test_scene_setup_systeminsrc/engine/scene/scene_systems.rs. - Spring constants and friction coefficients are currently hard-coded and can be tuned in scene/physics systems.
- Serialization support modules exist under
engine/scene, and can be expanded for save/load workflows.
- Implement a scene save/load workflow, ideally leveraging Bevy's built-in scene tooling (if any).
- Build a proper renderer with support for curves, images, and colors.
- Standardize physics material systems (Friction, Mass, etc...)
- Complete the level editor.
- Add a full sound system.
- Add an options menu for controller, video, and gameplay configuration.
This project is dual-licensed under either of the following, at your option:
- MIT License (see LICENSE-MIT)
- Apache License, Version 2.0 (see LICENSE-APACHE)