All Projects → jcornaz → heron

jcornaz / heron

Licence: MIT license
[DISCONTINUED] An ergonomic physics API for bevy games

Programming Languages

rust
11053 projects
shell
77523 projects

Projects that are alternatives of or similar to heron

TimeEvolvingMPO
A Python 3 package to efficiently compute non-Markovian open quantum systems.
Stars: ✭ 43 (-86.26%)
Mutual labels:  physics
canvas-fluid-solver
Real-time fluid simulation in Javascript.
Stars: ✭ 45 (-85.62%)
Mutual labels:  physics
MAPLEAF
6-DOF Rocket Flight Simulation Framework
Stars: ✭ 28 (-91.05%)
Mutual labels:  physics
GFDL atmos cubed sphere
The GFDL atmos_cubed_sphere dynamical core code
Stars: ✭ 34 (-89.14%)
Mutual labels:  physics
dogfight-sandbox-hg1
Air to air combat game, created in Python 3 using HARFANG 3D.
Stars: ✭ 65 (-79.23%)
Mutual labels:  physics
Unity3D-Cars
A project built for a Renaissance Coders tutorial to introduce vehicle physics.
Stars: ✭ 60 (-80.83%)
Mutual labels:  physics
verlet
build and animate objects according to verlet physics. pure golang library
Stars: ✭ 26 (-91.69%)
Mutual labels:  physics
ai4materials
Deep learning for crystal-structure recognition and analysis of atomic structures
Stars: ✭ 26 (-91.69%)
Mutual labels:  physics
pymae
Materials for the book "Python for Mechanical and Aerospace Engineering"
Stars: ✭ 56 (-82.11%)
Mutual labels:  physics
inelastica
Python package for eigenchannels, vibrations and inelastic electron transport based on SIESTA/TranSIESTA DFT
Stars: ✭ 22 (-92.97%)
Mutual labels:  physics
ThePhysicsHub
The Physics Hub is an open source physics simulations project that is being developed by physics students worldwide and aims to deliver clear and easy to understand physics simulations free for everyone!
Stars: ✭ 116 (-62.94%)
Mutual labels:  physics
piranha
The Piranha computer algebra system.
Stars: ✭ 91 (-70.93%)
Mutual labels:  physics
gopem
GUI for OPEM library
Stars: ✭ 20 (-93.61%)
Mutual labels:  physics
physx-js
PhysX for JavaScript
Stars: ✭ 80 (-74.44%)
Mutual labels:  physics
libracity
LibraCity - City planning on a needle! LibraCity is a puzzle game where you build a city at equilibrium on a needle. To succeed, take advantage of the various weights of the buildings, and place them all while ensuring the city remains stable.
Stars: ✭ 22 (-92.97%)
Mutual labels:  bevy-engine
masci-tools
Tools, utility, parsers useful in daily material science work
Stars: ✭ 18 (-94.25%)
Mutual labels:  physics
good-reads
List of inspiring articles, blogs, tutorials and books. Tech stuff.
Stars: ✭ 14 (-95.53%)
Mutual labels:  physics
react-redux-platformer
A clone of Six using react-game-kit
Stars: ✭ 24 (-92.33%)
Mutual labels:  physics
Fermi.jl
Fermi quantum chemistry program
Stars: ✭ 107 (-65.81%)
Mutual labels:  physics
Radial-Engine
3D Game engine with an editor(Qt) using OpenGL
Stars: ✭ 23 (-92.65%)
Mutual labels:  physics

Heron

License Crates.io Docs Bevy tracking Build Zenhub

An ergonomic physics API for 2d and 3d bevy games. (powered by rapier)

The project is discontinued!

Heron is in now discontinued. No more features, fixes or support will be provided.

For more details on the reasons, read the announcement

Design principles

  • Use bevy types, resources and components when possible (Vec3, Quat, Transform, Events, etc.)
  • Provide a single API that works for both 2d and 3d.
  • Data oriented. Using this library should feel like its a part of bevy.
  • Avoid asking the user to lookup in resources via handles. Data should be accessible and modifiable directly in components.
  • Hide the actual physics engine. This is an implementation detail the user shouldn't have to worry about.
    • But, allow advanced users to access the underlying rapier resources, so the user is never blocked by a missing element in the API of heron.

What it looks like

use bevy::prelude::*;
use heron::prelude::*;

fn main() {
  App::new()
    .add_plugins(DefaultPlugins)
    .add_plugin(PhysicsPlugin::default()) // Add the plugin
    .insert_resource(Gravity::from(Vec3::new(0.0, -9.81, 0.0))) // Optionally define gravity
    .add_startup_system(spawn)
    .run();
}

fn spawn(mut commands: Commands) {
    commands

        // Spawn any bundle of your choice. Only make sure there is a `GlobalTransform`
        .spawn_bundle(SpriteBundle::default())

        // Make it a rigid body
        .insert(RigidBody::Dynamic)
        
        // Attach a collision shape
        .insert(CollisionShape::Sphere { radius: 10.0 })
        
        // Optionally add other useful components...
        .insert(Velocity::from_linear(Vec3::X * 2.0))
        .insert(Acceleration::from_linear(Vec3::X * 1.0))
        .insert(PhysicMaterial { friction: 1.0, density: 10.0, ..Default::default() })
        .insert(RotationConstraints::lock())
        .insert(CollisionLayers::none().with_group(Layer::Player).with_mask(Layer::World));
}

// Define your physics layers
#[derive(PhysicsLayer)]
enum Layer {
    World,
    Player,
    Enemies,
}

Documentation

MSRV

The minimum supported rust version is currently: 1.60

It may be increased to a newer stable version in a minor release. (but only if needed)

It will be increased to the latest stable version in a major release. (even if not needed)

Supported Bevy Versions

bevy heron
0.8 4, 5
0.7 3
0.6 1, 2
0.5 0.4 - 0.13
0.4 0.1 - 0.3

How does this project compare to bevy_rapier?

bevy_rapier plugin is an excellent option and should definitely be considered.

Here are some key differences between the two projects:

  • heron tries to provide a smaller, simpler API that is easier to use. bevy_rapier is more complete and powerful, but a bit more complex.
  • heron is focused on games only. bevy_rapier targets all kind of physics simulation applications (incl. games).
  • bevy_rapier is actively maintained by dimforge, the developer of rapier. heron is also active, but cannot evolve as fast as bevy_rapier can.

heron is probably more suited for simple games and game-jams, where the ease of learn/use is especially valuable and where the lack of advanced feature isn't problematic.

bevy_rapier is probably more suited for bigger/complex games and other types of physics simulations, where it may be better to learn/use a more exhaustive/complex API.

Contribute / Contact

You can open issues/discussions here or you can discuss with me (Jomag#2675) in the bevy discord

See how to contribute

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].