mirror of
https://github.com/matkuki/chipmunk7_demos/
synced 2026-01-14 06:21:42 +00:00
No description
| additional_licenses | ||
| demos | ||
| resources | ||
| build.nims | ||
| chipmunk.nim | ||
| chipmunk7_demos.nim | ||
| chipmunk7_demos.nimble | ||
| data.nim | ||
| LICENSE | ||
| README.md | ||
Chipmunk7 demos for Nim 
Description:
Chipmunk7 demos for the Nim programming language using BlaXpirit's nim-chipmunk library (https://github.com/BlaXpirit/nim-chipmunk).
Demo video: https://www.youtube.com/watch?v=Gg79LT1ItWo
List of demos:
- Nim logo smash
- Player
- Sticky balls
- Spaces
- Weight scale
- Pyramid
- Springs
- Dominos
- Bead curtain
- Liquid tub
Licenses:
The project is licensed under the MIT license.
Chipmunk7 is licensed under the MIT license and was created by Scott Lemcke and Howling Moon Software.
The Nim Chipmunk7 library is licensed under the MIT license and was created by BlaXpirit.
The Nim sdl2, Nim opengl and SDL2 libraries are licensed under the MIT license.
The SDL2_gfx library is licensed under zlib license.
Dependencies:
- Nim sdl2 library (https://github.com/nim-lang/sdl2)
- Nim opengl library (https://github.com/nim-lang/opengl)
- Chipmunk7 (https://chipmunk-physics.net/)
- SDL2, installed on your system (https://www.libsdl.org/)
- SDL2_gfx, installed on your system (http://www.ferzkopp.net/wordpress/2016/01/02/sdl_gfx-sdl2_gfx/)
- OpenGL
Embedded dependencies (included in the project)
- Chipmunk7 wrapper library (https://github.com/BlaXpirit/nim-chipmunk)
Installation/compilation notes
- compile the demos with:
nim c chipmunk7_demos.nim - compiling with the
--define:chipmunkUnsafeflag- Compiles the demos in UNSAFE mode, which shows extra details about the internal workings of the Chipmunk library
- Nim sdl2 and opengl can be installed using Nimble (https://github.com/nim-lang/nimble)
- Chipmunk7 should be installed from source, but there may be some precompiled binaries for Windows out there, I haven't checked.
- The SDL2 and SDL2_gfx libraries have to be installed on your system.
- GNU/Linux: you have to either install them using your distro's package manager (APT, dpkg, ...) or install it from source.
- Windows: Use the precompiled dynamic libraries (dll's) by just placing them next to the Nim compiled binary or put them on the system's PATH. It's prefered to compile them from the source, as I found some bugs in the old precompiled dll's.
- OpenGL is probably already installed on both GNU/Linux or Windows systems. If you have any problems, check their websites for more information.
- You can select either OpenGL or SDL2 as the renderer in the data module using the
DRAW_WITH_OPENGLconstant
Notes/warnings:
- The Chipmunk7 wrapper is slightly modified for the project and should be treated as EXPERIMENTAL. Do not use it in production code as it uses the non-public API, which may change at any time.
- The code uses the Python notation instead of the recomended Nim style. I may change it if enough people request it.
- On my Windows Vista x64 machine, when using OpenGL for rendering the application seems to hang on startup for anywhere from 5 to 30 seconds. I have tested this on Ubuntu and never got this problem, so I'm assuming it's something with Windows. Any more information would be appreciated.