Questions tagged [chipmunk]

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

See: The Chipmunk Website

318 questions
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,888
  • 16
  • 67
  • 108
3
votes
1 answer

Is there an environment variable to disable PyMunk/Chipmunk from printing `Loading chipmunk for Linux`

I am trying to run a PyMunk simulation in a subprocess and get a floating point return value from a pipe, however every time I run the simulation I also get stuck with a Loading chipmunk for Linux (64bit)…
erik
  • 3,810
  • 6
  • 32
  • 63
3
votes
1 answer

How to create a rotation based Impulse Vector (Cocos2d, Chipmunk, Spacemanager)

So im trying to create character with two jetpacks - either of which can be fired independently of one another to create an impulse offset from the center of gravity (Using Cocos2d, Chipmunk, and SpaceManager). My problem is that the by default, the…
Salman
  • 494
  • 4
  • 18
3
votes
1 answer

Changing constraint colors in pymunk/pygame

I am working on a project using pymunk and pygame. I am using PivotJoint constraints to attach my bodies together. I would like to make the joints invisible if possible - is there any way to do this? Right now the joints appear purple in pygame and…
dottified
  • 45
  • 4
3
votes
1 answer

Transfer of energy from one object to another in collision (in pymunk/chipmunk)

This question is about pymunk, but I'm aware that there are a lot more Chimpunk users out there; so if your answer involves C/Chipmunk code, it's okay. While I don't know how to write C code, I can usually figure out what's going on if I read…
3
votes
2 answers

Common lisp, CFFI, and instantiating c structs

I've been on google for about, oh, 3 hours looking for a solution to this "problem." I'm trying to figure out how to instantiate a C structure in lisp using CFFI. I have a struct in c: struct cpVect{cpFloat x,y;} Simple right? I have auto-generated…
andrew
  • 2,819
  • 24
  • 33
3
votes
2 answers

What types of velocity-over-time curve models an object sliding to a halt on a level surface?

I'm writing a little game with a top-down view of some sliding objects, like curling or shuffleboard. (I happen to be using PyMunk for the physics, but since this question is about physics simulations in general, don't worry about language…
3
votes
2 answers

Developing A Simple Game without using Game Engines?

I am trying to develop a simple soccer game including penalty kicks in which i have to animate a ball from player to the goal post...earlier i have been using simple animations using a timer to add to the axis of ball image so that it moves from 1…
hemant
  • 209
  • 2
  • 4
  • 8
3
votes
1 answer

Why does LuaJIT produce a "too many callbacks error" from this simple code?

I'm using LuaJIT and running into a "too many callbacks" exception with this code. I know there is a limit to the number of c callbacks that can be generated, but as far as I know, this should just generate one callback... right? ffi =…
3
votes
1 answer

Cocos2d Chipmunk physics issue

I am working on the game with chipmunk physics (SpriteBuilder + Cocos2d v3). There is one game object with dynamic body and several "walls" (static bodies). When my game object falls to the wall under it, it passes some through static body a bit and…
3
votes
1 answer

Safe to use matching CFBridging calls to transfer in and out of ARC for non CF types?

I'm writing a game using the Chipmunk physics engine, and I'd like to store a pointer to an Objective-C object in every body's userData field. I know I need to use a bridging cast to cast between id and void *, but I'm not sure the way I'm doing it…
godel9
  • 7,340
  • 1
  • 33
  • 53
3
votes
3 answers

How can I detect a permanent collision with the Chipmunk Physics engine

I'm trying to play a "boing" sound when a ball shape hit's any other kind of shape. Which works. But works a little too well.... When the ball comes to rest, or starts to roll, it's in a permanent collision with whatever it's touching, so the…
gargantuan
  • 8,888
  • 16
  • 67
  • 108
2
votes
1 answer

Implicit conversion of an Objective-C pointer is disallowed with ARC

I'm playing around with this Chipmunk Tutorial and I'm running into a problem with the following code (in section 5): // Create our shape associated with the ball's body cpShape *ballShape = cpCircleShapeNew(ballBody, 20.0, cpvzero); …
Fate Rowen
  • 77
  • 2
  • 8
2
votes
1 answer

Chipmunk performance issue (sleeping bodies not working?)

this is my first post here (wish me luck) Im building a side-scrolling iOS-game (cocos2d) that uses the chipmunk physics engine (v 5.3.4). The games framerate is dropping dramatically when I move around waking up sleeping dynamic bodies. When…
2
votes
1 answer

Creating a distructable ground in chipmunk

I am trying to create a distructable floor in chipmunk Pretty much I need a floor or body object that when a bomb explodes that the floor disappears in the area of the balls defined explosion area. I considered useing a CPpoly shape to do this and…
Thermo
  • 55
  • 1
  • 5
1
2
3
21 22