<?xml version="1.0" encoding="UTF-8"?><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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How To Create A Breakout Game with Box2D and Cocos2D Tutorial: Part 1</title>
	<atom:link href="http://www.raywenderlich.com/475/how-to-create-a-simple-breakout-game-with-box2d-and-cocos2d-tutorial-part-12/feed" rel="self" type="application/rss+xml" />
	<link>http://www.raywenderlich.com/475/how-to-create-a-simple-breakout-game-with-box2d-and-cocos2d-tutorial-part-12</link>
	<description>Tutorials for iPhone / iOS Developers and Gamers</description>
	<lastBuildDate>Sun, 29 Jan 2012 06:07:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
	<item>
		<title>By: Dexx</title>
		<link>http://www.raywenderlich.com/475/how-to-create-a-simple-breakout-game-with-box2d-and-cocos2d-tutorial-part-12#comment-7789</link>
		<dc:creator>Dexx</dc:creator>
		<pubDate>Wed, 15 Dec 2010 08:00:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.raywenderlich.com/?p=475#comment-7789</guid>
		<description>hey ray what would be some great places to get more info on box2d i like what you&#039;ve done with the starter tutorials but I&#039;ve been figure out the property attributes for the world and a few other minor things, I&#039;m trying to create a baseline on the y axis were my sprites will not be able to fall below, instead of the y axis being 0.</description>
		<content:encoded><![CDATA[<p>hey ray what would be some great places to get more info on box2d i like what you&#8217;ve done with the starter tutorials but I&#8217;ve been figure out the property attributes for the world and a few other minor things, I&#8217;m trying to create a baseline on the y axis were my sprites will not be able to fall below, instead of the y axis being 0.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ray Wenderlich</title>
		<link>http://www.raywenderlich.com/475/how-to-create-a-simple-breakout-game-with-box2d-and-cocos2d-tutorial-part-12#comment-7628</link>
		<dc:creator>Ray Wenderlich</dc:creator>
		<pubDate>Mon, 13 Dec 2010 23:46:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.raywenderlich.com/?p=475#comment-7628</guid>
		<description>@Muhammad: The best reference to understand what joints can do is the Box2D User&#039;s Manual, available here: 

http://www.box2d.org/manual.html

As far as jumping goes, usually that is best done by applying an impulse.</description>
		<content:encoded><![CDATA[<p>@Muhammad: The best reference to understand what joints can do is the Box2D User&#8217;s Manual, available here: </p>
<p><a href="http://www.box2d.org/manual.html" rel="nofollow">http://www.box2d.org/manual.html</a></p>
<p>As far as jumping goes, usually that is best done by applying an impulse.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Muhammad Usman</title>
		<link>http://www.raywenderlich.com/475/how-to-create-a-simple-breakout-game-with-box2d-and-cocos2d-tutorial-part-12#comment-7287</link>
		<dc:creator>Muhammad Usman</dc:creator>
		<pubDate>Wed, 08 Dec 2010 06:36:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.raywenderlich.com/?p=475#comment-7287</guid>
		<description>Hi Ray, 
Nice tutorial, i have one question. i m a newbie in game development in iphone and trying to learn Cocos and Box2D. Can you please tell me a good reference link to find and understand all functions in Box2D. Coz i still have some confusion in b2Joints you have discuss two of them,  mouse joint and Prismatic joint are there any other joint like them. 
Coz in my game i want a char who can jump but to a specified height. can this be done by joints?

Usman</description>
		<content:encoded><![CDATA[<p>Hi Ray,<br />
Nice tutorial, i have one question. i m a newbie in game development in iphone and trying to learn Cocos and Box2D. Can you please tell me a good reference link to find and understand all functions in Box2D. Coz i still have some confusion in b2Joints you have discuss two of them,  mouse joint and Prismatic joint are there any other joint like them.<br />
Coz in my game i want a char who can jump but to a specified height. can this be done by joints?</p>
<p>Usman</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ray Wenderlich</title>
		<link>http://www.raywenderlich.com/475/how-to-create-a-simple-breakout-game-with-box2d-and-cocos2d-tutorial-part-12#comment-6633</link>
		<dc:creator>Ray Wenderlich</dc:creator>
		<pubDate>Thu, 25 Nov 2010 05:59:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.raywenderlich.com/?p=475#comment-6633</guid>
		<description>@Vladislav: There&#039;s a much easier way to accomplish what you&#039;re trying to do.  It sounds like you just want to restrict the paddle to move along a certain axis, and only a certain amount in each direction.

What you should do in that case is use a prismatic joint.  We used a prismatic joint in this tutorial in fact.  But another cool thing you can do with prismatic joints is restrict how much an object is allowed to move along an axis, by setting the &quot;enableLimit&quot; to true and then setting the lowerTranslation and upperTranslation.  See here for more details:

http://box2d.org/manual.html

So basically, instead of creating a weird border to restrict the movement, I&#039;d recommend using a prismatic joint with limits enabled.</description>
		<content:encoded><![CDATA[<p>@Vladislav: There&#8217;s a much easier way to accomplish what you&#8217;re trying to do.  It sounds like you just want to restrict the paddle to move along a certain axis, and only a certain amount in each direction.</p>
<p>What you should do in that case is use a prismatic joint.  We used a prismatic joint in this tutorial in fact.  But another cool thing you can do with prismatic joints is restrict how much an object is allowed to move along an axis, by setting the &#8220;enableLimit&#8221; to true and then setting the lowerTranslation and upperTranslation.  See here for more details:</p>
<p><a href="http://box2d.org/manual.html" rel="nofollow">http://box2d.org/manual.html</a></p>
<p>So basically, instead of creating a weird border to restrict the movement, I&#8217;d recommend using a prismatic joint with limits enabled.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vladislav</title>
		<link>http://www.raywenderlich.com/475/how-to-create-a-simple-breakout-game-with-box2d-and-cocos2d-tutorial-part-12#comment-6549</link>
		<dc:creator>Vladislav</dc:creator>
		<pubDate>Tue, 23 Nov 2010 09:15:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.raywenderlich.com/?p=475#comment-6549</guid>
		<description>The first of all, thak you for your lessons Ray! 

I am novice iPhone game developer and I have question of course.

It is not clear in this lesson for me (Breakout game) how to restrict paddle in the horizontal dimension.
I want to have dead zone for paddle on the left size and on the right size (f.e. 22 pixels).
I have 90 pixels deadzone on top of the scereen and 15 pixels deadzone on the bottom.
It is a border.

What have I done at this moment. I tryed to move all fixtures to create a border. 

groundBox.SetAsEdge(b2Vec2(22.0/ TM_RATIO,15.0/PTM_RATIO),  b2Vec2((winSize.width-22.0)/PTM_RATIO,15.0/PTM_RATIO));
_bottomFixture = _groundBody-&gt;CreateFixture(&amp;groundBoxDef);
	
groundBox.SetAsEdge(b2Vec2(22.0/PTM_RATIO,15.0/PTM_RATIO),  b2Vec2(22.0/PTM_RATIO, (winSize.height-90.0)/PTM_RATIO));
_groundBody-&gt;CreateFixture(&amp;groundBoxDef);
	
groundBox.SetAsEdge(b2Vec2(22.0/PTM_RATIO,(winSize.height-90.0)/PTM_RATIO),  b2Vec2((winSize.width-22.0)/PTM_RATIO, (winSize.height-90.0)/PTM_RATIO));
_groundBody-&gt;CreateFixture(&amp;groundBoxDef);
	
groundBox.SetAsEdge(b2Vec2((winSize.width-22.0)/PTM_RATIO,(winSize.height-90.0)/PTM_RATIO),  b2Vec2((winSize.width-22.0)/PTM_RATIO,(15.0)/PTM_RATIO));
_groundBody-&gt;CreateFixture(&amp;groundBoxDef);
	
My breakout game use vertical orientation. 

But it doesn&#039;t work. When paddle collide this fixture it starts behaive very strange.
I don&#039;t know how to explain it. But something goes wrong and I lost control of the paddle.

Another idea is to change paddle coordiants manually. 
Paddle here is a Box2d object and it is not possible to change paddle coordinats directly. 
There is a method GetPosition() but there is not method SetPosition() for box2d bodyes.
Anyway, I think it is not good practice to change Box2d objects coordiants manually.

Could you please give me a tip what is wrong in my fixture code? 
Or may be I have wrong idea in general.</description>
		<content:encoded><![CDATA[<p>The first of all, thak you for your lessons Ray! </p>
<p>I am novice iPhone game developer and I have question of course.</p>
<p>It is not clear in this lesson for me (Breakout game) how to restrict paddle in the horizontal dimension.<br />
I want to have dead zone for paddle on the left size and on the right size (f.e. 22 pixels).<br />
I have 90 pixels deadzone on top of the scereen and 15 pixels deadzone on the bottom.<br />
It is a border.</p>
<p>What have I done at this moment. I tryed to move all fixtures to create a border. </p>
<p>groundBox.SetAsEdge(b2Vec2(22.0/ TM_RATIO,15.0/PTM_RATIO),  b2Vec2((winSize.width-22.0)/PTM_RATIO,15.0/PTM_RATIO));<br />
_bottomFixture = _groundBody-&gt;CreateFixture(&amp;groundBoxDef);</p>
<p>groundBox.SetAsEdge(b2Vec2(22.0/PTM_RATIO,15.0/PTM_RATIO),  b2Vec2(22.0/PTM_RATIO, (winSize.height-90.0)/PTM_RATIO));<br />
_groundBody-&gt;CreateFixture(&amp;groundBoxDef);</p>
<p>groundBox.SetAsEdge(b2Vec2(22.0/PTM_RATIO,(winSize.height-90.0)/PTM_RATIO),  b2Vec2((winSize.width-22.0)/PTM_RATIO, (winSize.height-90.0)/PTM_RATIO));<br />
_groundBody-&gt;CreateFixture(&amp;groundBoxDef);</p>
<p>groundBox.SetAsEdge(b2Vec2((winSize.width-22.0)/PTM_RATIO,(winSize.height-90.0)/PTM_RATIO),  b2Vec2((winSize.width-22.0)/PTM_RATIO,(15.0)/PTM_RATIO));<br />
_groundBody-&gt;CreateFixture(&amp;groundBoxDef);</p>
<p>My breakout game use vertical orientation. </p>
<p>But it doesn&#8217;t work. When paddle collide this fixture it starts behaive very strange.<br />
I don&#8217;t know how to explain it. But something goes wrong and I lost control of the paddle.</p>
<p>Another idea is to change paddle coordiants manually.<br />
Paddle here is a Box2d object and it is not possible to change paddle coordinats directly.<br />
There is a method GetPosition() but there is not method SetPosition() for box2d bodyes.<br />
Anyway, I think it is not good practice to change Box2d objects coordiants manually.</p>
<p>Could you please give me a tip what is wrong in my fixture code?<br />
Or may be I have wrong idea in general.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ray Wenderlich</title>
		<link>http://www.raywenderlich.com/475/how-to-create-a-simple-breakout-game-with-box2d-and-cocos2d-tutorial-part-12#comment-5904</link>
		<dc:creator>Ray Wenderlich</dc:creator>
		<pubDate>Mon, 08 Nov 2010 23:38:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.raywenderlich.com/?p=475#comment-5904</guid>
		<description>@Joey:  I think the problem is you need to run the animation on the ball sprite with [ball runAction:repeat], not on the scene with [self runAction:repeat].

@Alex: Excellent, glad you got it working!

@Prashant: Since a basket would be a concave shape (see &lt;a href=&quot;http://www.raywenderlich.com/606/how-to-use-box2d-for-just-collision-detection-with-cocos2d-iphone&quot; rel=&quot;nofollow&quot;&gt;this tutorial&lt;/a&gt; for an explanation for what that means), you can&#039;t make that shape in Box2D with a single fixture.  Instead, you need to make three rectangles and put them together in the right spots.

@MonkeyKing: Probably the best thing to do would be to destroy the old joint (world-&gt;DestroyJoint) and create a new joint when you want to switch.

@Zahur: To move a body at constant speed, one good option is to set the body to be a kinematic body, which is a body that is made for you to set the velocity directly.  Then you can call SetLinearVelocity to get it to move at the speed you want.</description>
		<content:encoded><![CDATA[<p>@Joey:  I think the problem is you need to run the animation on the ball sprite with [ball runAction:repeat], not on the scene with [self runAction:repeat].</p>
<p>@Alex: Excellent, glad you got it working!</p>
<p>@Prashant: Since a basket would be a concave shape (see <a href="http://www.raywenderlich.com/606/how-to-use-box2d-for-just-collision-detection-with-cocos2d-iphone" rel="nofollow">this tutorial</a> for an explanation for what that means), you can&#8217;t make that shape in Box2D with a single fixture.  Instead, you need to make three rectangles and put them together in the right spots.</p>
<p>@MonkeyKing: Probably the best thing to do would be to destroy the old joint (world->DestroyJoint) and create a new joint when you want to switch.</p>
<p>@Zahur: To move a body at constant speed, one good option is to set the body to be a kinematic body, which is a body that is made for you to set the velocity directly.  Then you can call SetLinearVelocity to get it to move at the speed you want.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zahur</title>
		<link>http://www.raywenderlich.com/475/how-to-create-a-simple-breakout-game-with-box2d-and-cocos2d-tutorial-part-12#comment-5625</link>
		<dc:creator>Zahur</dc:creator>
		<pubDate>Tue, 02 Nov 2010 06:37:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.raywenderlich.com/?p=475#comment-5625</guid>
		<description>Oh! my mistake ----------
Hi Ray,
Thanks for posting this blog. Using the base of this tutorial I had started developing a game where I need to move the paddle at the constant speed WITHOUT any user interaction &amp; detect the collision where ever necessary; let say constant velocity.speed=200 &amp; direction; let say constant direction x =0 y=10
I had fixed the direction issue using the joindef but I can’t maintain the constant speed without any interaction…. Please guide me
Thanks &amp; Regards,
Zahur</description>
		<content:encoded><![CDATA[<p>Oh! my mistake &#8212;&#8212;&#8212;-<br />
Hi Ray,<br />
Thanks for posting this blog. Using the base of this tutorial I had started developing a game where I need to move the paddle at the constant speed WITHOUT any user interaction &amp; detect the collision where ever necessary; let say constant velocity.speed=200 &amp; direction; let say constant direction x =0 y=10<br />
I had fixed the direction issue using the joindef but I can’t maintain the constant speed without any interaction…. Please guide me<br />
Thanks &amp; Regards,<br />
Zahur</p>
]]></content:encoded>
	</item>
</channel>
</rss>

