Skip to content
(unofficial) Chipmunk2D in Go, no dependencies
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.
examples cleanup, add fps counter vsync toggle to examples Apr 11, 2018
.gitignore
LICENSE
README.md Add godoc badge Nov 8, 2017
arbiter.go possible performance enhancements: use the stack more & better inlining Apr 10, 2018
arbiter_test.go
bb.go rename package to cp Sep 19, 2017
bbtree.go
bbtree_test.go rename package to cp Sep 19, 2017
body.go
circle.go add missing setters and getters Oct 25, 2017
collision.go
constraint.go
contactbuffer.go
dampedrotaryspring.go
dampedspring.go rename package to cp Sep 19, 2017
debug.go
draw.go
everything.go
gearjoint.go rename package to cp Sep 19, 2017
groovejoint.go
hashset.go rename package to cp Sep 19, 2017
hashset_arbiter.go possible performance enhancements: use the stack more & better inlining Apr 10, 2018
hashset_collisionhandler.go rename package to cp Sep 19, 2017
hashset_handle.go
hashset_test.go rename package to cp Sep 19, 2017
pinjoint.go rename package to cp Sep 19, 2017
pivotjoint.go rename package to cp Sep 19, 2017
poly.go
ratchetjoint.go rename package to cp Sep 19, 2017
release.go move asserts behind build flag Apr 10, 2018
rotarylimitjoint.go
segment.go add missing setters and getters Oct 25, 2017
shape.go possible performance enhancements: use the stack more & better inlining Apr 10, 2018
simplemotor.go
slidejoint.go
space.go
spacehash.go
spatialindex.go
transform.go
vector.go possible performance enhancements: use the stack more & better inlining Apr 10, 2018

README.md

cp

GoDoc

Chipmunk2D ported to Go

project status

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

Some of the API may still change over time.

run the examples

go get github.com/jakecoffman/cp
cd $GOPATH/src/github.com/jakecoffman/cp/examples
go get -d ./...
go run logosmash/logosmash.go

documentation

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

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