Giter Club home page Giter Club logo

aeroliteengine's Introduction

Aerolite Physics Engine

Overview

Aerolite Physics Engine is a comprehensive, efficient 2D physics library with planned extensions for 3D simulations. Tailored for game development and graphical simulations, it offers a robust platform for realistic physics behavior in a variety of environments.

Features

  • 2D and Planned 3D Support: Robust support for 2D physics and a roadmap for 3D simulation capabilities.
  • AeroWorld2D: A dedicated 2D world manager for handling physics simulations.
  • Collision Detection and Response: Advanced algorithms for detecting and responding to collisions between various shapes (circles, polygons, boxes) using methods like AABB and SAT (Separating Axis Theorem).
  • Rigid Body Dynamics: Simulates realistic rigid body dynamics, including rotation and translation.
  • Impulse Resolution: Implements impulse resolution for accurate collision responses.
  • Force Generators: Flexible force generators to simulate gravity, drag, springs, and more.
  • Constraint Systems: Implements constraints for realistic joint and articulated structure simulation.
  • Particle Systems: Efficient particle system for simulating large numbers of interacting objects.
  • Material Properties: Customize friction and restitution for different materials for varied interaction effects.

Algorithms and Techniques

  • Numerical Integration: Utilizes Euler and Runge-Kutta integration methods for precise motion calculation.
  • Broad and Narrow Phase Collision Detection: Efficiently detects collisions using AABB for broad phase and SAT for narrow phase.
  • Impulse-Based Dynamics: Applies realistic impulses to bodies for authentic movement.
  • Constraint Solving: Simulates complex joint behavior with constraints.
  • Particle Dynamics: Manages large numbers of particles effectively for simulations like smoke or liquid.

Video Demos

IMAGE ALT TEXT HERE IMAGE ALT TEXT HERE IMAGE ALT TEXT HERE IMAGE ALT TEXT HERE IMAGE ALT TEXT HERE

Usage and Examples

  • Creating and Configuring a 2D Body
// Creating a box body
auto box = std::make_unique<Aerolite::Body2D>(new BoxShape(50, 50), 100, 100, 10.0);
box->restitution = 0.8;
  • Creating and Adding bodies to the world
auto box = std::make_unique<Aerolite::Body2D>(new BoxShape(50, 50), 100, 100, 10.0);
world->AddBody2D(std::move(box));
  • Running the simulation world->Update(deltaTime);

  • Applying force

// Applying a force to a body
Vec2 force(10.0, 0.0);
box->ApplyForce(force);
  • Collision Detection & Response
// Assuming bodyA and bodyB are already created and initialized
Aerolite::Contact2D contact;
if (CollisionDetection2D::IsColliding(*bodyA, *bodyB, contact)) {
    contact.ResolveCollision();
}

Installation

To install Aerolite Physics Engine, clone the repository and include it in your project:

git clone https://github.com/your-repository/aerolite.git

License

The MIT License (MIT)

Copyright (c) [year] [fullname]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

aeroliteengine's People

Contributors

beyondbelief96 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.