Questions tagged [chipmunk]

Chipmunk is an open-source physics library written in C.

See: The Chipmunk Website

306 questions
21
votes
3 answers

Cocos2d + Box2d or Chipmunk

OK, im trying to make an iphone version of a game i made here http://scratch.mit.edu/projects/techy/781198 is box2d or chipmunk better and where are some tutorials for each one
techy
  • 544
  • 2
  • 6
  • 20
21
votes
3 answers

Javascript physics engine and simulated infinite curve

I'm trying to do a Tiny Wings like in javascript. I first saw a technique using Box2D, I'm using the closure-web version (because of the memory leaks fix). In short, I explode the curve into polygons so it looks like that: I also tried with…
SuperSkunk
  • 1,218
  • 10
  • 24
11
votes
2 answers

Converting an NSValue back to the struct type that was stored in it?

I'm storing Chipmunk Physics' cpShape objects in an NSMutableDictionary by way of NSValue objects and the following lines of code: NSValue *shapeValue = [[NSValue alloc] initWithBytes: shape objCType: @encode(cpShape)]; [staticBodiesInUse setObject:…
Luke
  • 8,709
  • 14
  • 74
  • 140
7
votes
0 answers

CFFI hangs on certain functions

I'm writing a FFI on Common Lisp for Chipmunk2d (a 2D physics simulation library) using CFFI. When I evaluate on the REPL: > (cp:moment-for-circle 100 0 1 #(0 0)) (translate-into-foreign-memory 100 #
Jam
  • 73
  • 4
6
votes
2 answers

For collision detection only, is Chipmunk or Box2d the better tool?

For a Cocos2d based project, I'd like to use a physics toolkit for collision detection only. What are the pros/cons of using Chipmunk or Box2d?
Daniel Blezek
  • 4,491
  • 1
  • 17
  • 20
5
votes
1 answer

How do I make water as seen in Sea Stars?

There is a nice Sea Stars iOS application out there, with a good looking water effect can be seen on video. I have found Tiny Wings "waves" tutorial on here, so I guess I can figure out how to make waves. I wonder how do I make effect when hero pops…
Dennis Krut
  • 423
  • 1
  • 6
  • 11
5
votes
1 answer

PivotJoints with friction and limits in Cocos2d V3 (Chipmunk)

I try to convert a game which I started with SpriteKit to Cocos2d V3. I have some problems with the physics though. I create a human like playing figure. The limbs are connected via PinJoints in SpriteKit. I recreated that basic functionality via…
thomas
  • 1,149
  • 6
  • 18
5
votes
2 answers

Chipmunk collision detection

I am completely new to chipmunk and I have just been using it for a few days, so I'm guessing this is something pretty obvious, however I cannot find any documentation for this. Is there any callback or method in chipmunk that tells you that 2 given…
Oscar Gomez
  • 18,102
  • 12
  • 80
  • 113
5
votes
1 answer

FFI Issues with Racket and Chipmunk

I am trying to use the Chipmunk physics library in Racket using the FFI that it provides. However, I am currently having issues with actually getting the FFI to find the functions in the Chipmunk library, even though it seems to load the library…
Freezerburn
  • 993
  • 2
  • 10
  • 27
4
votes
2 answers

Draw a Polygon with Chipmunk and Gosu in Ruby

I am brand new to game development and I thought it would be fun to try out Gosu, Ruby and Chipmunk together. So far I have a player and a ball on a 2d Top-Down field and they collide. My problem right now is that I want my player to be a square. I…
James P. Wright
  • 8,663
  • 18
  • 72
  • 136
4
votes
1 answer

Chaotic Pendulum Exhibiting Chaotic Behavior with the Same Initial Conditions

My first post on Stack Overflow, so bear with me. I have built a model of a chaotic double pendulum in python using the pymunk physics library, which in turn uses the chipmunk C library. The pendulum, being chaotic, displays extreme sensitivity to…
TheRuler
  • 350
  • 2
  • 7
4
votes
1 answer

What is the purpose of this tilde in C#

I'm trying to port this C# code: public static ulong WILDCARD_COLLISION_TYPE { get { int parse = ~0; return (ulong)parse; } } If I understand correctly, doesn't the ~ symbol perform a bitwise complement so what is the…
Garry Pettet
  • 7,482
  • 22
  • 60
  • 97
4
votes
2 answers

Collision with Chipmunk JS failing

http://videobin.org/+70a/8wi.html You can see what's happening there, and a demo to try it here: http://student.dei.uc.pt/~drgomes/carry/index.html. So, I'm using Chipmunk JS demos to get an idea of how it works (see…
David Gomes
  • 5,310
  • 16
  • 52
  • 96
3
votes
1 answer

Where can I find fixture presets of different materials?

Where can I find fixture presets, that can be used in rigid body physics engines, like Box2D to simulate the behaviour of different materials? I'm looking for values of density, friction and restitution for common materials like: Smooth/rough…
Mariusz Jamro
  • 27,234
  • 22
  • 104
  • 144
3
votes
2 answers

What is Chipmunk? (Apart from being a Physics Engine)

Hopefully, this question isn't a dumb as I fear it sounds, but it may still be pretty dumb. I'm new to Objective-C, and Cocoa. In fact, I'm completely new to C in general. I'm trying to implement an iPhone game using Cocos2d-iPhone. It's a game…
gargantuan
  • 8,670
  • 14
  • 63
  • 105
1
2 3
20 21