/mruby-chipmunk2d

mruby bindings for Chipmunk2d

Primary LanguageC

mruby-chipmunk2d Build Status

Mruby bindings for Chipmunk2d.

WIP

Place the following in your build_config

# build_config.rb
MRuby::Build.new do |conf|
  ...

  conf.gem github: 'IceDragon200/mruby-chipmunk2d'

  conf.cc do |cc|
    cc.include_paths += ['/path/to/Chipmunk2D/include']
  end

  conf.linker do |linker|
    linker.library_paths << '/path/to/Chipmunk2D'
    linker.libraries << 'chipmunk2d'
  end

  ...
end

Check List

  • Arbiter
  • BB
  • Body
  • Constraint
  • DampedRotarySpring (no torque function, there is no support for void *data)
  • DampedSpring (no torque function, there is no support for void *data)
  • GearJoint
  • GrooveJoint
  • Mat2x2
  • PinJoint
  • PivotJoint
  • PolyShape
  • RachetJoint
  • RotaryLimitJoint
  • Shape
  • SimpleMotor
  • SlideJoint
  • Space
  • SpatialIndex
  • Transform
  • Vect

mruby does not have a 'mark' function, as of such, instance variables are used to store instances of the ruby data objects. (Shapes in Spaces) I haven't started binding the ruby objects together, so the library is unstable at the moment (random crashes after garbage collection).

Chipmunk2d

Currently chipmunk2d is expected to be a static library for mruby-chipmunk2d, (it was convient to build it as static). However a dynamic library MAY work as well (untested).

Want to Help?

Feel like helping out with the bindings? fork, clone, binding-branch, pull-request, get-it-merged The faster the bindings are finished, the faster we can test it and have physics goodness in mruby.

Docs

# to generate docs locally
rake docs