https://github.com/fowlmouth/nimrod-chipmunk
Chipmunk bindings for Nimrod
https://github.com/fowlmouth/nimrod-chipmunk
Last synced: 3 months ago
JSON representation
Chipmunk bindings for Nimrod
- Host: GitHub
- URL: https://github.com/fowlmouth/nimrod-chipmunk
- Owner: fowlmouth
- Created: 2012-08-05T20:46:36.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2016-09-24T19:17:01.000Z (over 8 years ago)
- Last Synced: 2025-01-20T17:16:14.074Z (5 months ago)
- Language: Nimrod
- Size: 102 KB
- Stars: 7
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## Chipmunk2D
[Chipmunk 6.1.*](http://chipmunk-physics.net/ "Chipmunk") bindings for
[Nim 0.14.0](http://nim-lang.org "Nim") or higher.
Tested with Chipmunk 6.1.5### Installation: ###
[](https://github.com/yglukhov/nimble-tag)
Installation can be done using the Nimble package manager from the shell/command line (Nimble has to be installed):
```sh
$ nimble install chipmunk
```## Notes on some examples:
The **examples/planets.nim** and **examples/debugdraw_text.nim** examples need to be compiled with
the switch: ```-d:csfmlNoDestructors```
This disables destructors in the Nim-CSFML library, otherwise you will get a lot of segfaults!
Thanks to BlaXpirit for pointing this out.## Using DebugDraw:
DebugDraw is a library for easily visualizing your simulation.
Using it is simple, there is an example in the examples dir :)#### Overridden functions
DebugDraw purposefully clashes with these functions:
* debugDraw.addShape() - also creates the proper SFML shape for this shape, if you
want to store user data pass it as an extra argument
* debugDraw.removeShape() - destroys the sfml shape
* debugDraw.get/setUserData() - handles the shape userdata correctly, do not call these before the shape is initializedCall debugDrawInit() after you add statics!