<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>cocos2d for iPhone &#187; Tag: chipmunk - Recent Posts</title>
		<link>http://www.cocos2d-iphone.org/forum/tags/chipmunk</link>
		<description>A fast, easy to use, free, and community supported 2D game engine</description>
		<language>en-US</language>
		<pubDate>Fri, 10 Feb 2012 03:13:00 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.cocos2d-iphone.org/forum/search.php</link>
		</textInput>
		<atom:link href="http://www.cocos2d-iphone.org/forum/rss/tags/chipmunk" rel="self" type="application/rss+xml" />

		<item>
			<title>breskit on "Am I doing this the right way?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28957#post-143424</link>
			<pubDate>Thu, 09 Feb 2012 10:26:25 +0000</pubDate>
			<dc:creator>breskit</dc:creator>
			<guid isPermaLink="false">143424@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>After much scratching of my head I've finally got this to work as it should.  After much confusion over what child items I was trying to add (the wrong ones!) and playing around with sprite anchor points, I've finally managed to get my shapes connected to my body, and have the sprites displayed accordingly for each shape.</p>
<p><img src="http://i684.photobucket.com/albums/vv207/breskit/cross-1.jpg" /></p>
<p>The cross rotates around the center wheel and the arms rotate around in the correct places.<br />
The advantage I have for this is that I now have many less chipmunk bodies in my project, and less constraints to move them all around.</p>
<p>Thanks again for your help Scott.</p>
<p>EDIT:  I know I still have four shapes in the above diagram, but will change that to using two once I have created new sprites for them.
</p></description>
		</item>
		<item>
			<title>slembcke on "Am I doing this the right way?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28957#post-143293</link>
			<pubDate>Wed, 08 Feb 2012 16:13:42 +0000</pubDate>
			<dc:creator>slembcke</dc:creator>
			<guid isPermaLink="false">143293@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>If [self parent] is returning nil, then addChild: will silently fail. What is 'self' and why are you adding more sprites to the parent of self? Has 'self' actually been added to another node?
</p></description>
		</item>
		<item>
			<title>breskit on "Am I doing this the right way?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28957#post-143264</link>
			<pubDate>Wed, 08 Feb 2012 13:20:42 +0000</pubDate>
			<dc:creator>breskit</dc:creator>
			<guid isPermaLink="false">143264@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p><code>You could sync a single node with 4 child sprites to the body, or you could sync the 4 sprites separately</code></p>
<p>Can anyone tell me how to do this?  I've tried adding a sprite to another using</p>
<p><code>[[self parent] addChild:arm1];</code></p>
<p>I then add my sprite to the batchnode</p>
<p><code>[batchnode addChild:mycross z:zdepth];</code></p>
<p>but I still cannot see the sprite.  I notice that my cross object has no children (i.e. [cross children].count = 0).  So could these issues be related to the way I have subclassed CCSprite?   I have the situation where I inherit CROSS -&#62; CPSPRITE -&#62; CCSPRITE</p>
<p>If I add a parent sprite to a batchnode, do all of it's children automatically get added or do I have to add each child?</p>
<p>Once I crack this problem I should be on my merry way!</p>
<p>Thanks agian.<br />
Tony B
</p></description>
		</item>
		<item>
			<title>breskit on "Am I doing this the right way?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28957#post-143227</link>
			<pubDate>Wed, 08 Feb 2012 08:21:54 +0000</pubDate>
			<dc:creator>breskit</dc:creator>
			<guid isPermaLink="false">143227@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>The reason for the red lines is that I have 4 shapes (one for each arm).  I suppose in this example I could simply get away with just two (makes better sense).</p>
<p>What I was trying to do is simply re-use the textures I already have loaded in my project (as you see above) repeating this 4 times.</p>
<p>I will play around with adding child sprites to my node, which is not something I've yet tried.  If I apply a rotation to the parent sprite, will the child sprites also rotate and keep their position too?
</p></description>
		</item>
		<item>
			<title>slembcke on "Am I doing this the right way?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28957#post-143154</link>
			<pubDate>Tue, 07 Feb 2012 22:11:03 +0000</pubDate>
			<dc:creator>slembcke</dc:creator>
			<guid isPermaLink="false">143154@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>You could sync a single node with 4 child sprites to the body, or you could sync the 4 sprites separately. You could also create a single sprite for it if you didn't care about the wasted texture space. I assume you are just synchronizing the position/angle of the body to the sprite. Set the sprite's anchor point accordingly.</p>
<p>Why are there so many red lines in the center? How many shapes do you have there? You really only need two, although it wouldn't really affect the performance unless you had a ton of those in the game.
</p></description>
		</item>
		<item>
			<title>breskit on "Am I doing this the right way?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28957#post-143131</link>
			<pubDate>Tue, 07 Feb 2012 21:06:18 +0000</pubDate>
			<dc:creator>breskit</dc:creator>
			<guid isPermaLink="false">143131@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I'm getting there, eventually.</p>
<p>I've managed to get my shapes connected to the same body now and this has been verified using the debug node draw.<br />
The only issue I now seem to have is the graphical visualisation of all the shapes.</p>
<p>Before any changes I had each sprite as a separate chipmunk body/shape and these were added to my batchnode without any problem.  Essentially 4 different sprites, each with their own location/rotation and controlled by a pair of constraints.</p>
<p>All I see now is just one of my "arms" or my cross, placed in the centre of my body where I was expecting (hoping) to see 4 arms in the same position of the shapes.</p>
<p>Now that I've created the shapes together on the one body, how do I get the sprites to show in the correct place, or do I just create a new sprite to represent the whole lot?</p>
<p>Here's the image of what I've managed to create.  The red outline should be filled with the grey boxes.<br />
<img src="http://i684.photobucket.com/albums/vv207/breskit/cross.jpg" />
</p></description>
		</item>
		<item>
			<title>slembcke on "Am I doing this the right way?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28957#post-143045</link>
			<pubDate>Tue, 07 Feb 2012 16:01:25 +0000</pubDate>
			<dc:creator>slembcke</dc:creator>
			<guid isPermaLink="false">143045@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Well, the shapes are still defined relative to the center of gravity of the body. If they are all centered on the body, it's trivial and you don't really even need any helper programs to do it. You also don't need to make 4 shapes for each arm, it's fine if they overlap. Use cpBoxShapeNew() if they will be centered over the center of gravity, or cpBoxShapeNew2() if not. When using cpBoxShapeNew2(), the bounding box is relative to the center of gravity.
</p></description>
		</item>
		<item>
			<title>breskit on "Am I doing this the right way?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28957#post-142921</link>
			<pubDate>Mon, 06 Feb 2012 20:06:30 +0000</pubDate>
			<dc:creator>breskit</dc:creator>
			<guid isPermaLink="false">142921@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>What I've not worked out is how to calculate the correct vertices.</p>
<p>When I create my separate shapes/bodies, it's straightforward as I create the items normally, then just apply a rotation to them to put them in the correct position/layout.</p>
<p>Now, picture a cross, with four arms at right angles - top, right, down and left, and a wheel in the centre.<br />
The wheel would represent the centre of my body and I create a circle shape added to it.</p>
<p>Using vertex helper I can find out the vertices for each "arm", but am not sure how I integrate these into a single shape.</p>
<p>Is there anything available that will help me work this out or is there a simple formula I should follow in order to work them out correctly?</p>
<p>I'm lucky that I have the debug node working within my project to help verify the bodies &#38; shapes.  Just need a pointer in the right direction to create these shapes.</p>
<p>I see what you mean about the springiness with the constraints.</p>
<p>Thanks again.<br />
Tony B
</p></description>
		</item>
		<item>
			<title>slembcke on "Am I doing this the right way?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28957#post-142867</link>
			<pubDate>Mon, 06 Feb 2012 15:36:26 +0000</pubDate>
			<dc:creator>slembcke</dc:creator>
			<guid isPermaLink="false">142867@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Yes, you just simply create more than one shape that is attached to the same body by passing the body to more than one shape when creating it.</p>
<p>As for constraints, you don't need any when they are on the same body. Constraints connect bodies together, not shapes. Constraints unavoidably make things a little springy, so you want to have as few as possible (or none). By putting the shapes on the same body they are already perfectly rigidly connected.
</p></description>
		</item>
		<item>
			<title>breskit on "Am I doing this the right way?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28957#post-142831</link>
			<pubDate>Mon, 06 Feb 2012 08:54:47 +0000</pubDate>
			<dc:creator>breskit</dc:creator>
			<guid isPermaLink="false">142831@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>I think I've answered my own question above, looking at an example I've found.  The offsets for my shapes are simply based on the vertices I pass in.</p>
<p>Just need to recalculate the vertices I use for each shape.
</p></description>
		</item>
		<item>
			<title>breskit on "Am I doing this the right way?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28957#post-142829</link>
			<pubDate>Mon, 06 Feb 2012 08:25:16 +0000</pubDate>
			<dc:creator>breskit</dc:creator>
			<guid isPermaLink="false">142829@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Could you please give me an example of how I add a shape to a body?</p>
<p>I currently use this (sort of) method to create my shapes &#38; bodies.</p>
<pre><code>float mass = objectmass;
        if (collisionType == kCollisionTypeLift) {
            body = cpBodyNew(mass, INFINITY);
        } else {
            body = cpBodyNew(mass, cpMomentForBox(mass, self.contentSize.width, self.contentSize.height));
        }
        body-&#62;p = location;
        cpSpaceAddBody(space, body);

        shape = cpPolyShapeNew(body, numVerts, verts, cpvzero);
        shape-&#62;e = objectElastic;
        shape-&#62;u = objectFriction;
        shape-&#62;data = self;
        shape-&#62;collision_type = collisionType;
        cpSpaceAddShape(space, shape);</code></pre>
<p>With this I can see that the body and the shape are added into the Chipmunk space, but having read the documentation, it's not clear to me how I add more shapes to the same body.  Would I just repeat the bottom half of my method above to add more shapes to the body? As so:</p>
<pre><code>shape = cpPolyShapeNew(body, numVerts, verts, cpvzero);
        shape-&#62;e = objectElastic;
        shape-&#62;u = objectFriction;
        shape-&#62;data = self;
        shape-&#62;collision_type = collisionType;
        cpSpaceAddShape(space, shape);</code></pre>
<p>If I did that, how would I set the offset of the shape, as I thought positioning was done on the body? (body-&#62;p)</p>
<p>You could be right in what you say about the constraints as I have had to create 10 constraints per cross object. Sometimes I have 4 or 5 on screen, which is quite a few constraints!  Would be better if I only needed two!!
</p></description>
		</item>
		<item>
			<title>sohan on "Best way to rotate joined bodies in spacemanager?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/11113#post-142821</link>
			<pubDate>Mon, 06 Feb 2012 06:24:33 +0000</pubDate>
			<dc:creator>sohan</dc:creator>
			<guid isPermaLink="false">142821@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi all,I've implemented this way and it's working fine...<br />
you must rotate the body with Angular Velocity instead of manually changing it's angle..</p>
<p>- (void)accelerometer:(UIAccelerometer*)accelerometer didAccelerate:(UIAcceleration*)acceleration<br />
{<br />
	float AccAngle = ccpToAngle(ccp(-acceleration.y,acceleration.x));</p>
<p>	float currentAngle=body-&#62;GetAngle();</p>
<p>	if(currentAngle&#62;=M_PI)<br />
	{<br />
		currentAngle-=M_PI;<br />
		currentAngle=currentAngle-M_PI;<br />
		body-&#62;SetTransform(body-&#62;GetPosition(),currentAngle);<br />
	}</p>
<p>	if(currentAngle&#60;=-M_PI)<br />
	{<br />
		currentAngle+=M_PI;<br />
		currentAngle=M_PI+currentAngle;<br />
		body-&#62;SetTransform(body-&#62;GetPosition(),currentAngle);<br />
	}</p>
<p>	float diff=AccAngle-currentAngle;</p>
<p>	if(diff&#62;M_PI)<br />
	{<br />
		diff=-2*M_PI+diff;<br />
	}</p>
<p>	if(diff&#60;-M_PI)<br />
	{<br />
		diff=2*M_PI+diff;<br />
	}</p>
<p>	body-&#62;SetAngularVelocity(diff*3.0f);   // to change the rotatary speed just modify the multiplied factor.<br />
}
</p></description>
		</item>
		<item>
			<title>slembcke on "Am I doing this the right way?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28957#post-142802</link>
			<pubDate>Mon, 06 Feb 2012 02:13:53 +0000</pubDate>
			<dc:creator>slembcke</dc:creator>
			<guid isPermaLink="false">142802@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Yes, probably a significant performance gain. Though I'm just guessing. The bigger part is that you don't need any constraints to hold the stuff together, and it won't get all spongy from having to solve all the constraints. It also would be a fraction as much code to set it all up.
</p></description>
		</item>
		<item>
			<title>breskit on "Am I doing this the right way?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28957#post-142784</link>
			<pubDate>Sun, 05 Feb 2012 22:01:09 +0000</pubDate>
			<dc:creator>breskit</dc:creator>
			<guid isPermaLink="false">142784@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Thanks for the reply.</p>
<p>I've been doing some digging today and found that the targeted touch despatchers weren't being cleaned up properly which left me with many touch delegates, not attached to any objects, looking for a touch to occur.</p>
<p>I've now modified my project so that I clean everything up and things seem to be behaving much better now.</p>
<p>Scott, can I ask - is there any performance gain from adding multiple shapes to a body rather than having separate shapes &#38; bodies?  I ask as the class I use to create the chipmunk bodies create everything in that manner.  If there is a gain, then I would need to amend my class to add a shape to an existing body.  Is it worth it?
</p></description>
		</item>
		<item>
			<title>slembcke on "Am I doing this the right way?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28957#post-142776</link>
			<pubDate>Sun, 05 Feb 2012 21:02:26 +0000</pubDate>
			<dc:creator>slembcke</dc:creator>
			<guid isPermaLink="false">142776@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>You can attach more than one shape to a body. They can even overlap without issue. Just make a pair of boxes. To calculate the moment of inertia for a compound object, just add the individual moments together.
</p></description>
		</item>
		<item>
			<title>bhaskarchem on "Hit The Box (New Game in App Store)"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/25498#post-142752</link>
			<pubDate>Sun, 05 Feb 2012 18:00:34 +0000</pubDate>
			<dc:creator>bhaskarchem</dc:creator>
			<guid isPermaLink="false">142752@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@<a href='http://www.cocos2d-iphone.org/forum/profile/9440'>FBryant</a>: to explicitly restrict an app from running on iPad, you will have to set telephony as YES in your info.plist file. A problem with this would be that your app will only run on iPhones. Your app won't support both iPad as well as iPod as both of these do not support telephony.
</p></description>
		</item>
		<item>
			<title>breskit on "Am I doing this the right way?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28957#post-142728</link>
			<pubDate>Sun, 05 Feb 2012 09:26:25 +0000</pubDate>
			<dc:creator>breskit</dc:creator>
			<guid isPermaLink="false">142728@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hi folks,</p>
<p>Apologies for the long post, but I'm a little stuck!</p>
<p>I just wanted to ask if some of you more experienced folks can tell me if I am coding my project the right way?  I think I have a couple of areas on my project that I may not be handling in the best way, so here's a question on the first.</p>
<p>In my project I'm using Chipmunk for physics and have created a number of "objects" that rotate.  One such example is a cross.  As the cross is a convex shape I have created each arm as a separate shape, so have a total of 4 shapes in my cross object (well, 5 actually as I also have a centre wheel).  These arms are joined by pivot joints around the centre of the cross and are rotated by a simple motor joints.</p>
<p>The touch event on the cross stops/starts it rotating (sets the motor angle to 0/45 accordingly).</p>
<p>My cross object is defined as so:-</p>
<pre><code>@interface _cross : CPSprite &#60;CCTargetedTouchDelegate&#62; {
    CPSprite *arm1;
    CPSprite *arm2;
    CPSprite *arm3;
    CPSprite *arm4;
    CPSprite *wheel;
    float objectMass;
    BOOL isMoving;
    cpConstraint *c1;
    cpConstraint *c2;
    cpConstraint *c3;
    cpConstraint *c4;
    cpConstraint *c5;
    cpConstraint *c6;
    cpConstraint *c7;
    cpConstraint *c8;
    cpConstraint *c9;
    cpConstraint *c10;
    float rotationAngle;
    cpSpace *mSpace;
    cpBody *mGround;

    CGRect rect1;
    CGRect rect2;
    CGRect rect3;
    CGRect rect4;
    CGRect rect5;

}</code></pre>
<p>Touch event for the cross:</p>
<pre><code>-(BOOL) containsTouch:(UITouch*) touch {

    CGPoint locationTouched = [arm1 convertTouchToNodeSpace:touch];
    BOOL isTouched1 = CGRectContainsPoint(rect1, locationTouched);

    locationTouched = [arm2 convertTouchToNodeSpace:touch];
    BOOL isTouched2 = CGRectContainsPoint(rect2, locationTouched);

    locationTouched = [arm3 convertTouchToNodeSpace:touch];
    BOOL isTouched3 = CGRectContainsPoint(rect3, locationTouched);

    locationTouched = [arm4 convertTouchToNodeSpace:touch];
    BOOL isTouched4 = CGRectContainsPoint(rect4, locationTouched);

    locationTouched = [wheel convertTouchToNodeSpace:touch];
    BOOL isTouched5 = CGRectContainsPoint(rect5, locationTouched);

    return isTouched1 &#124;&#124; isTouched2 &#124;&#124; isTouched3 &#124;&#124; isTouched4 &#124;&#124; isTouched5;
}

-(BOOL) ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event {
    if (![self containsTouch:touch]) return NO;
    [self toggleMoving:mSpace withGround:mGround];
    return YES;
}</code></pre>
<p>Inside CPSprite I have an update method:</p>
<pre><code>- (void)update {
    self.position = body-&#62;p;
    self.rotation = CC_RADIANS_TO_DEGREES(-1 * body-&#62;a);
}</code></pre>
<p>And my game loop, I call the update for every CPSprite:</p>
<pre><code>-(void) step: (ccTime) delta {
    int steps = 1;
    cpFloat dt = 1.0f/60.0f/(cpFloat)steps;

    for(int i=0; i&#60;steps; i++){
        cpSpaceStep(space, dt);
    }

    for (CPSprite *sprite in batchNode.children) {

        if (sprite) {
            [sprite update];
        }
        if ([sprite isKindOfClass:[rock class]]) {
        }
    } 

    // need to check if level complete
    CGRect image_rect1 = CGRectMake(theEndGate.target.position.x,theEndGate.target.position.y,35,35);

    for (rock *arock in _rocks) {
        float rockw = arock.boundingBox.size.width;
        CGRect image_rect2 = CGRectMake(arock.position.x, arock.position.y, rockw, rockw);

        if(CGRectIntersectsRect(image_rect1, image_rect2)) {
            if (!endGateHit) {
                endGateHit = YES;
                [self addEndgatePD];
                [self endScene:TRUE];
            }
        }

    }
    cpSpaceReindexStatic(space);
}</code></pre>
<p>The CPSprite class allows me to create my CCSprite and Chipmunk body/shape. The touch delegate gives me the targeted touches agains this cross object.<br />
As part of the cross 'init' I calculate the CGRect properties for each piece of the cross so I don't have to calculate this each time I look for a touch.  The position and rotation of these are updated within CPSprite.</p>
<p>The questions I have now are:</p>
<p>1.  In pre-calculating the CGRect for the cross arms, do I need to recalculate these each time for the touch event? I don't think I do as the position/rotation appears to be updated OK.</p>
<p>2. Have I created the arms for the cross in the best way - using separate Chipmunk bodies/sprites/etc, or should I be trying to use a single Chipmunk body in someway for the whole object?</p>
<p>3. Is my main update call within the step: the most efficient way of handling this?  On some levels of my project there are as few as 12 sprites to update, but on others there can me as many as 80+.  Performance/FPS still seem quite good though (around 52fps in most cases).</p>
<p>My problem may just be down to my fat fingers not hitting the right place on the screen to toggle the moving (seems accurate when I use the mouse in simulator). Either that or I'm not calculating/using something correctly.
</p></description>
		</item>
		<item>
			<title>ayt on "Current state of Box2D vs Chipmunk debate?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/20201#post-142346</link>
			<pubDate>Thu, 02 Feb 2012 17:54:05 +0000</pubDate>
			<dc:creator>ayt</dc:creator>
			<guid isPermaLink="false">142346@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>If there's not something special you need to have in the physics engine, I recommend you to look at some examples and see what code you understand better.</p>
<p>I decided to use chipmunk with SpaceManager.
</p></description>
		</item>
		<item>
			<title>slembcke on "Current state of Box2D vs Chipmunk debate?"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/20201#post-142340</link>
			<pubDate>Thu, 02 Feb 2012 16:57:14 +0000</pubDate>
			<dc:creator>slembcke</dc:creator>
			<guid isPermaLink="false">142340@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>This is a bit of a blast from the past. I didn't see these last two posts until today. Better late than never I guess.</p>
<p>@<a href='http://www.cocos2d-iphone.org/forum/profile/2043'>indy2005</a><br />
We used to sell just Objective-Chipmunk, but then renamed it to Chipmunk Pro when we started adding features like the autogeometry and platform specific optimizations that weren't Objective-C or even iOS specific. We also have a cheaper Objective-Chipmunk only package called Chipmunk Indie now.</p>
<p>@<a href='http://www.cocos2d-iphone.org/forum/profile/12422'>clarus</a><br />
Niether Chipmunk or Chipmunk Pro are iOS only. There are 4 modules with different requirements:</p>
<ul>
<li>Chipmunk: Written entirely in C with no dependencies beyond the C stdlib. Has been used on pretty much every platform I've ever heard of, including TI graphing calculators and the Nintendo DS.</li>
<li>Objective-Chipmunk: Needs an Objective-C runtime. So iOS, Mac or possibly other platforms using this: <a href="http://www.cocos2d-iphone.org/forum/topic/25414" rel="nofollow">http://www.cocos2d-iphone.org/forum/topic/25414</a></li>
<li>Platform Specific Optimizations: The NEON solver should run on any ARMv7 CPU. This includes most Android phones now. The multi-threaded solver works on any system with pthread support (everything except Windows probably?).</li>
<li>Autogeometry: Core functionality is all in C. It also has Obj-C wrapper classes to integrate with Objective-Chipmunk and Apple specific graphics APIs. The tile cache code for doing high performance deformable terrain is also in Obj-C currently, but will eventually be ported to straight C.</li>
</ul></description>
		</item>
		<item>
			<title>slembcke on "[Chipmunk] How To Determine 3 Collisions"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28862#post-142234</link>
			<pubDate>Thu, 02 Feb 2012 02:51:15 +0000</pubDate>
			<dc:creator>slembcke</dc:creator>
			<guid isPermaLink="false">142234@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>A pair of objects is always easy to detect (obviously), 3 may be easy depending on what you want, but 4 or more will always require querying the contact graph for connected components.</p>
<p>I made this Google doc image thing to try and explain:<br />
<a href="https://docs.google.com/drawings/d/1zGoxCHVCSblBpDUxdZ5ZJ5W4Qmj0jAXcyVV3uaZogNI/edit" rel="nofollow">https://docs.google.com/drawings/d/1zGoxCHVCSblBpDUxdZ5ZJ5W4Qmj0jAXcyVV3uaZogNI/edit</a>
</p></description>
		</item>
		<item>
			<title>PanzyCat on "[Chipmunk] How To Determine 3 Collisions"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28862#post-142225</link>
			<pubDate>Thu, 02 Feb 2012 00:12:18 +0000</pubDate>
			<dc:creator>PanzyCat</dc:creator>
			<guid isPermaLink="false">142225@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Hey everyone!</p>
<p>I have 3 separate bodies. I want to call a function when the three of them have collided. The player jumps and hits a block. If the opponent is on the block the player hits, I want the function to be called. I'm not too sure how to do this. Right now, I am using a collision handler in my player class to see if it hits the block. If this is true, the bool is sent to the opponent class where another collision handler sees if it is colliding with the block and if the bool is true. However, it doesn't really seem to be working. </p>
<p>Anyone have any suggestions?</p>
<p>Thanks!
</p></description>
		</item>
		<item>
			<title>FBryant on "Hit The Box (New Game in App Store)"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/25498#post-141908</link>
			<pubDate>Mon, 30 Jan 2012 20:59:35 +0000</pubDate>
			<dc:creator>FBryant</dc:creator>
			<guid isPermaLink="false">141908@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Ok cheers, if I had explicitly not allowed it where would I have done this? During the app submission process?</p>
<p>My app is waiting for review so I can implement the changes under a new version before the release. The app page doesn't mention anything about supported platforms though. Also my app icon looks fine in the iPad simulator, which is weird as I didn't include one with the iPad sizes.
</p></description>
		</item>
		<item>
			<title>breskit on "Hit The Box (New Game in App Store)"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/25498#post-141905</link>
			<pubDate>Mon, 30 Jan 2012 20:55:20 +0000</pubDate>
			<dc:creator>breskit</dc:creator>
			<guid isPermaLink="false">141905@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Why not just run your app in the iPad simulator and you will see how it will appear.</p>
<p>An iPhone app on an iPad will not fill the screen.  It positions itself in the centre.<br />
That's why there is a x2 function on iPad that simply doubles the viewing size.  </p>
<p>As for graphics, co-ordinates, etc they work as they would if it was running on an iPhone.<br />
So, as said above, unless you've explicitly not allowed the other device types then it should work OK.
</p></description>
		</item>
		<item>
			<title>FBryant on "Hit The Box (New Game in App Store)"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/25498#post-141904</link>
			<pubDate>Mon, 30 Jan 2012 20:50:30 +0000</pubDate>
			<dc:creator>FBryant</dc:creator>
			<guid isPermaLink="false">141904@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@<a href='http://www.cocos2d-iphone.org/forum/profile/7055'>itlgames</a> Wait, what??? This isn't what I've been told? I was told there was quite a lot of effort involved in supporting iPad (new graphics, position of graphics etc).</p>
<p>I thought loads of apps only support iPhone/iPod?
</p></description>
		</item>
		<item>
			<title>bhaskarchem on "Hit The Box (New Game in App Store)"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/25498#post-141882</link>
			<pubDate>Mon, 30 Jan 2012 17:38:23 +0000</pubDate>
			<dc:creator>bhaskarchem</dc:creator>
			<guid isPermaLink="false">141882@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>The game now supports iPhone, iPod &#38; iPad as well.
</p></description>
		</item>
		<item>
			<title>Scryb on "Sound On/Off Flag"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28010#post-141738</link>
			<pubDate>Sun, 29 Jan 2012 14:13:24 +0000</pubDate>
			<dc:creator>Scryb</dc:creator>
			<guid isPermaLink="false">141738@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>You can set an NSString ivar with string = @"";, I think that works fine, and I've done that a lot myself. It autoreleases though of course.</p>
<p>But changing the string doesn't do anything to any labels. You need to have a reference for the CCMenuItemLabel and then change it's string, like this: [soundItem setString:@"new string"];</p>
<p>Unless you do some KVO magic, but that would probably involve changing the cocos classes.
</p></description>
		</item>
		<item>
			<title>tiggybouncer on "Sound On/Off Flag"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28010#post-141726</link>
			<pubDate>Sun, 29 Jan 2012 11:50:27 +0000</pubDate>
			<dc:creator>tiggybouncer</dc:creator>
			<guid isPermaLink="false">141726@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@<a href='http://www.cocos2d-iphone.org/forum/profile/62189'>LittleBitStudio</a> I'm not sure, mainly due to the fact I don't particularly understand.....<br />
If you don't mind, can you please explain? Thanks.
</p></description>
		</item>
		<item>
			<title>phil_me_up on "Sound On/Off Flag"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28010#post-141388</link>
			<pubDate>Thu, 26 Jan 2012 17:44:41 +0000</pubDate>
			<dc:creator>phil_me_up</dc:creator>
			<guid isPermaLink="false">141388@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>Do you need to call synchronise?</p>
<p>My understanding is that iOS will do this for you (albeit not immediately) so to save on performance, I only call synchronize in critical tasks (such as iap purchases etc) and not when updating statistics in game (which could be more than once per second in some cases). I guess it won't make much difference performance wise when setting the sound but still interesting to see how others do this.</p>
<p>Anywho, to the OP, I think LittleBitStudio has the answer your looking for.
</p></description>
		</item>
		<item>
			<title>LittleBitStudio on "Sound On/Off Flag"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28010#post-141246</link>
			<pubDate>Wed, 25 Jan 2012 20:29:25 +0000</pubDate>
			<dc:creator>LittleBitStudio</dc:creator>
			<guid isPermaLink="false">141246@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>When you change the value of the theGame.soundOnOff, you don't appear to be updating the label with the new value like:<br />
[soundLabel setString:theGame.soundOnOff]</p>
<p>Also, if the object theGame is persisting the setting in the user defaults, are you calling synchronize after you're making changes?
</p></description>
		</item>
		<item>
			<title>Birkemose on "Sound On/Off Flag"</title>
			<link>http://www.cocos2d-iphone.org/forum/topic/28010#post-141231</link>
			<pubDate>Wed, 25 Jan 2012 19:46:45 +0000</pubDate>
			<dc:creator>Birkemose</dc:creator>
			<guid isPermaLink="false">141231@http://www.cocos2d-iphone.org/forum/</guid>
			<description><p>@<a href='http://www.cocos2d-iphone.org/forum/profile/4538'>slembcke</a><br />
Okay, maybe I should have added a retain :)<br />
I got the feeling, that @ tiggybouncer though he was setting his string var this way. Much like another common question inhere ... why doesnt myStringVar == @"hello" never return YES?<br />
Apart from that, static strings and such, should imo be defined, and never assigned to something resembling a var.
</p></description>
		</item>

	</channel>
</rss>

