GithubHelp home page GithubHelp logo

luiseduardohdbackup / chipmunk2d Goto Github PK

View Code? Open in Web Editor NEW

This project forked from slembcke/chipmunk2d

0.0 3.0 0.0 8.78 MB

A fast and lightweight 2D game physics library.

Home Page: http://chipmunk2d.net

License: MIT License

C 89.34% C++ 3.97% Makefile 0.14% Ruby 0.41% Shell 0.14% CSS 0.03% Objective-C 5.97%

chipmunk2d's Introduction

NOTE!

The master branch is the in progress Chipmunk2D 7.0. The documentation on Chipmunk2D’s website may not completely match. While the code should be pretty stable (there are some unit tests), the API is still evolving. You can check out the 6.2.x branch if you want the last released version.

ABOUT:

Chipmunk2D is a simple, lightweight, fast and portable 2D rigid body physics library written in C. It’s licensed under the unrestrictive, OSI approved MIT license. My aim is to give 2D developers access to the same quality of physics you find in newer 3D games. I hope you enjoy using Chipmunk2D, and please consider donating to help make it worth our time to continue to support Chipmunk2D with great new features.

FEATURES:

  • Designed specifically for 2D video games.
  • Circle, convex polygon, and beveled line segment collision primitives.
  • Multiple collision primitives can be attached to a single rigid body.
  • Fast broad phase collision detection by using a bounding box tree with great temporal coherence or a spatial hash.
  • Extremely fast impulse solving by utilizing Erin Catto’s contact persistence algorithm.
  • Supports sleeping objects that have come to rest to reduce the CPU load.
  • Support for collision event callbacks based on user definable object types types.
  • Flexible collision filtering system with layers, exclusion groups and callbacks.
    • Can be used to create all sorts of effects like one way platforms or buoyancy areas. (Examples included)
  • Supports nearest point, segment (raycasting), shape and bounding box queries to the collision detection system.
  • Collision impulses amounts can be retrieved for gameplay effects, sound effects, etc.
  • Large variety of joints – easily make vehicles, ragdolls, and more.
  • Joint callbacks.
    • Can be used to easily implement breakable or animated joints. (Examples included)
  • Maintains a contact graph of all colliding objects.
  • Lightweight C99 implementation with no external dependencies outside of the Std. C library.
  • Many language bindings available.
  • Simple, read the documentation and see!
  • Unrestrictive MIT license

CHIPMUNK PRO:

We also make a bunch of extra for Chipmunk called Chipmunk Pro. It offers features such as auto-geometry for creating collision shapes from images or implicit functions and also multithreading/SIMD optimizations. Check out the link above for more information!

CONTRACTING:

Howling Moon Software (my company) is available for contracting if you want to make the physics in your game really stand out. Given our unique experience with the library, we can help you use Chipmunk to it’s fullest potential. Feel free to contact us through our webpage: http://howlingmoonsoftware.com/contracting.php

BUILDING:

Mac OS X: There is an included XCode project file for building the static library and demo application. Alternatively you could use the CMake files or the macstatic.command script to build a static lib and package up the headers for you.

iPhone: If you want a native Objective-C API, check out Chipmunk Pro on the Chipmunk website. It is inexpensive to license and will save you a lot of time. Otherwise, the XCode project can build a static library with all the proper compiler settings. Alternatively, you can just run iphonestatic.command in the macosx/ directory. It will build you a fat library compiled as release for the device and debug for the simulator. After running it, you can simply drop the Chipmunk-iPhone directory into your iPhone project!

UNIXes: A forum user was kind enough to make a set of CMake files for Chipmunk. This will require you to have CMake installed. To build run ‘cmake .’ then ‘make’. This should build a dynamic library, a static library, and the demo application. A number of people have had build errors on Ubuntu due to not having GLUT or libxmu installed.

Windows: Visual Studio projects are included in the msvc/ directory. While I try to make sure the MSVC 10 project is up to date, I don’t have MSVC 9 to keep that project updated regularly. It may not work. I’d appreciate a hand fixing it if that’s the case.

GET UP TO DATE:

If you got the source from a point release download, you might want to consider getting the latest source from GitHub. Bugs are fixed and new features are added regularly. Big changes are done in branches and tested before merging them in it’s rare for the point release downloads to be better or more bug free than the latest code.

Head on over to GitHub and experience the future TODAY! (Okay, so maybe it’s not that exciting.)

GETTING STARTED:

First of all, you can find the C API documentation in the doc/ directory.

A good starting point is to take a look at the included Demo application. The demos all just set up a Chipmunk simulation space and the demo app draws the graphics directly out of that. This makes it easy to see how the Chipmunk API works without worrying about the graphics code. You are free to use the demo drawing routines in your own projects, though it is certainly not the recommended way of drawing Chipmunk objects as it pokes around at the undocumented/private APIs of Chipmunk.

SUPPORT:

The best way to get support is to visit the Chipmunk Forums. There are plenty of people around using Chipmunk on the just about every platform I’ve ever heard of. If you are working on a commercial project and want some more direct help, Howling Moon Software is also available for contracting.

chipmunk2d's People

Contributors

andykorth avatar dabing1022 avatar darkuranium avatar fouronnes avatar hami9x avatar hrsantiago avatar jacekmigacz avatar jhasse avatar legocylon avatar leonid-s-usov avatar lucasb-eyer avatar maksqwe avatar mcneja avatar nddrylliog avatar niksaak avatar notlion avatar ricardoquesada avatar slembcke avatar vinay avatar xavierjurado avatar

Watchers

 avatar  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.