Skip to content
(unofficial) Chipmunk2D in Go, no dependencies
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
README.md
arbiter.go
arbiter_test.go
bb.go
bbtree.go
bbtree_test.go
body.go
circle.go
collision.go
constraint.go
contactbuffer.go
dampedrotaryspring.go
dampedspring.go
debug.go
draw.go
everything.go
gearjoint.go
go.mod
groovejoint.go
hashset.go
hashset_arbiter.go
hashset_collisionhandler.go
hashset_handle.go
hashset_test.go
pinjoint.go
pivotjoint.go
poly.go
ratchetjoint.go
release.go
rotarylimitjoint.go
segment.go
shape.go
simplemotor.go
slidejoint.go
space.go
spacehash.go
spatialindex.go
transform.go
vector.go

README.md

cp

GoDoc

Chipmunk2D ported to Go

project status

Stable -- most features are implemented and the demos are very close to Chipmunk2D demos.

examples

https://github.com/jakecoffman/cp-examples contains the port of all of the Chipmunk2D demos.

https://github.com/hajimehoshi/ebiten/blob/master/examples/chipmunk/main.go is an example using Ebiten

https://github.com/gen2brain/raylib-go/blob/master/examples/physics/chipmunk/main.go is an example with raylib's Go port

documentation

The official chipmunk docs are a really good place to start: https://chipmunk-physics.net/release/ChipmunkLatest-Docs/

features

Same features as Chipmunk2D:

  • 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.
  • No external dependencies.
  • Many language bindings available.
  • Simple, read the documentation and see!
  • Unrestrictive MIT license
You can’t perform that action at this time.