<?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: Intro to Box2D with Cocos2D Tutorial: Bouncing Balls</title>
	<atom:link href="http://www.raywenderlich.com/457/intro-to-box2d-with-cocos2d-tutorial-bouncing-balls/feed" rel="self" type="application/rss+xml" />
	<link>http://www.raywenderlich.com/457/intro-to-box2d-with-cocos2d-tutorial-bouncing-balls</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: JC</title>
		<link>http://www.raywenderlich.com/457/intro-to-box2d-with-cocos2d-tutorial-bouncing-balls#comment-7968</link>
		<dc:creator>JC</dc:creator>
		<pubDate>Fri, 17 Dec 2010 18:54:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.raywenderlich.com/?p=457#comment-7968</guid>
		<description>Hi Ray,

I wanted to say thank you! I started with this tutorial many months ago. 

Combined with your other tutorials, many hours of late night coding/recoding, intense perseverance, and pure luck at times I was able to get my game North Pole Ninja approved for sale! It&#039;s not going to break any records for sure but it is a start. 

Your willingness to help others is a testimony to the spirit of what it means to be an independent developer. Your teaching style is excellent! Still saving my pennies to buy your book!

Happy Holidays!
-JC

@KrashEd - I think you can use the statement Yourb2Body-&gt;SetTransform(b2Vec2( YourPositionX, YourPositionY ), YourAngleToRotate); for immediate &quot;teleporting&quot; to new position.</description>
		<content:encoded><![CDATA[<p>Hi Ray,</p>
<p>I wanted to say thank you! I started with this tutorial many months ago. </p>
<p>Combined with your other tutorials, many hours of late night coding/recoding, intense perseverance, and pure luck at times I was able to get my game North Pole Ninja approved for sale! It&#8217;s not going to break any records for sure but it is a start. </p>
<p>Your willingness to help others is a testimony to the spirit of what it means to be an independent developer. Your teaching style is excellent! Still saving my pennies to buy your book!</p>
<p>Happy Holidays!<br />
-JC</p>
<p>@KrashEd &#8211; I think you can use the statement Yourb2Body-&gt;SetTransform(b2Vec2( YourPositionX, YourPositionY ), YourAngleToRotate); for immediate &#8220;teleporting&#8221; to new position.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KrashEd</title>
		<link>http://www.raywenderlich.com/457/intro-to-box2d-with-cocos2d-tutorial-bouncing-balls#comment-7683</link>
		<dc:creator>KrashEd</dc:creator>
		<pubDate>Tue, 14 Dec 2010 03:32:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.raywenderlich.com/?p=457#comment-7683</guid>
		<description>sorry for double posting, while you may be answering my question I might as well ask. What is the proper way of repositioning the ball to a certain location (Let&#039;s say resetting back to starting position)? I am currently doing it by destroying the body and recreating it using redefined b2BodyDef and b2FixtureDef, is there a more elegant way of doing it?</description>
		<content:encoded><![CDATA[<p>sorry for double posting, while you may be answering my question I might as well ask. What is the proper way of repositioning the ball to a certain location (Let&#8217;s say resetting back to starting position)? I am currently doing it by destroying the body and recreating it using redefined b2BodyDef and b2FixtureDef, is there a more elegant way of doing it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KrashEd</title>
		<link>http://www.raywenderlich.com/457/intro-to-box2d-with-cocos2d-tutorial-bouncing-balls#comment-7679</link>
		<dc:creator>KrashEd</dc:creator>
		<pubDate>Tue, 14 Dec 2010 03:06:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.raywenderlich.com/?p=457#comment-7679</guid>
		<description>Thanks For the response ray. I have another question. This is regarding the value for the gravity. In the tutorial you used -30.0 on the y value for gravity. Is that value in anyway related to the PTM_RATIO? IS there a way to calculate a realistic or at least functioning value for the gravity based on the PTM_RATIO?</description>
		<content:encoded><![CDATA[<p>Thanks For the response ray. I have another question. This is regarding the value for the gravity. In the tutorial you used -30.0 on the y value for gravity. Is that value in anyway related to the PTM_RATIO? IS there a way to calculate a realistic or at least functioning value for the gravity based on the PTM_RATIO?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ray Wenderlich</title>
		<link>http://www.raywenderlich.com/457/intro-to-box2d-with-cocos2d-tutorial-bouncing-balls#comment-7644</link>
		<dc:creator>Ray Wenderlich</dc:creator>
		<pubDate>Tue, 14 Dec 2010 00:45:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.raywenderlich.com/?p=457#comment-7644</guid>
		<description>@Dexx: Yep the book has 3 chapters on Box2D.  The first chapter is about making a very simple puzzle game with Box2D, and the second two chapters go onto some more advanced topics to make a cool cart racing game.  You can check out a video and see details about when it&#039;s coming out, etc. here:

http://www.raywenderlich.com/2274/cocos2d-book-and-360idev

@Adrian: Hm, weird.  I don&#039;t have time to look into this right now, but if you figure out the problem, let me know!

@KrashEd: Thanks for the kind words!  In response to your questions:

1) You can either create a very very large world (that is unlikely for the user to ever reach), or you can write some code to check where the ball is, and dynamically keep adding ground pieces to the left and right of the ball as it moves, to give the illusion of an infinite floor.
2) One very simple way is to never change the rotation of the ball sprite.  Another solution is set a very large angular damping on the sprite.  There&#039;s probably others too.
3) Not sure what you&#039;re asking here?

@Josh: You should just work in points, not pixels, so PTM_RATIO would mean &quot;points to meters ratio&quot;.</description>
		<content:encoded><![CDATA[<p>@Dexx: Yep the book has 3 chapters on Box2D.  The first chapter is about making a very simple puzzle game with Box2D, and the second two chapters go onto some more advanced topics to make a cool cart racing game.  You can check out a video and see details about when it&#8217;s coming out, etc. here:</p>
<p><a href="http://www.raywenderlich.com/2274/cocos2d-book-and-360idev" rel="nofollow">http://www.raywenderlich.com/2274/cocos2d-book-and-360idev</a></p>
<p>@Adrian: Hm, weird.  I don&#8217;t have time to look into this right now, but if you figure out the problem, let me know!</p>
<p>@KrashEd: Thanks for the kind words!  In response to your questions:</p>
<p>1) You can either create a very very large world (that is unlikely for the user to ever reach), or you can write some code to check where the ball is, and dynamically keep adding ground pieces to the left and right of the ball as it moves, to give the illusion of an infinite floor.<br />
2) One very simple way is to never change the rotation of the ball sprite.  Another solution is set a very large angular damping on the sprite.  There&#8217;s probably others too.<br />
3) Not sure what you&#8217;re asking here?</p>
<p>@Josh: You should just work in points, not pixels, so PTM_RATIO would mean &#8220;points to meters ratio&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh</title>
		<link>http://www.raywenderlich.com/457/intro-to-box2d-with-cocos2d-tutorial-bouncing-balls#comment-7603</link>
		<dc:creator>Josh</dc:creator>
		<pubDate>Mon, 13 Dec 2010 13:53:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.raywenderlich.com/?p=457#comment-7603</guid>
		<description>Hi Ray, awesome tutorial! I am making a game using Box2d and cocos2d. It is going to support the Retina display. In cocos2d they changed the position data (I don&#039;t know how you call it) from pixels to points, however i don&#039;t think they did that in box2d. How can i have PTM_RATIO = 64 for Retina display devices and how can i have PTM_RATIO = 32 for non-Retina display devices?</description>
		<content:encoded><![CDATA[<p>Hi Ray, awesome tutorial! I am making a game using Box2d and cocos2d. It is going to support the Retina display. In cocos2d they changed the position data (I don&#8217;t know how you call it) from pixels to points, however i don&#8217;t think they did that in box2d. How can i have PTM_RATIO = 64 for Retina display devices and how can i have PTM_RATIO = 32 for non-Retina display devices?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: KrashEd</title>
		<link>http://www.raywenderlich.com/457/intro-to-box2d-with-cocos2d-tutorial-bouncing-balls#comment-7395</link>
		<dc:creator>KrashEd</dc:creator>
		<pubDate>Fri, 10 Dec 2010 06:54:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.raywenderlich.com/?p=457#comment-7395</guid>
		<description>Hey Ray,

Thanks for all your tutorials, they were really helpful and your response to commenters make you a great person.

Just want to know, let&#039;s say I want to create a scenario where I&#039;ll apply an impulse to throw the ball to the right, I&#039;ll have the camera following the ball and I wont know when the ball will stop bouncing/rolling. Here&#039;s a few questions:
1. What&#039;s the best way to create a physics world for the above scenario when you wont know where is the end edge (limitless world)?
2. Using ApplyLinearForce I notice the ball would eventually roll, is it possible to just bounce the ball but not let it roll?
3. at certain Fixture definition (like the one posted aboce), the ball seem to bounce endlessly as if the ground is vibrating, did i miss something regarding that?</description>
		<content:encoded><![CDATA[<p>Hey Ray,</p>
<p>Thanks for all your tutorials, they were really helpful and your response to commenters make you a great person.</p>
<p>Just want to know, let&#8217;s say I want to create a scenario where I&#8217;ll apply an impulse to throw the ball to the right, I&#8217;ll have the camera following the ball and I wont know when the ball will stop bouncing/rolling. Here&#8217;s a few questions:<br />
1. What&#8217;s the best way to create a physics world for the above scenario when you wont know where is the end edge (limitless world)?<br />
2. Using ApplyLinearForce I notice the ball would eventually roll, is it possible to just bounce the ball but not let it roll?<br />
3. at certain Fixture definition (like the one posted aboce), the ball seem to bounce endlessly as if the ground is vibrating, did i miss something regarding that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adrian</title>
		<link>http://www.raywenderlich.com/457/intro-to-box2d-with-cocos2d-tutorial-bouncing-balls#comment-7393</link>
		<dc:creator>Adrian</dc:creator>
		<pubDate>Fri, 10 Dec 2010 06:19:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.raywenderlich.com/?p=457#comment-7393</guid>
		<description>Awesome site, thanks for all your help!

However I found a problem that I&#039;m not sure if it&#039;s being caused by Cocos2d, Box2d, or even this tutorial... but if you compile this and run it on an iPhone (I have an iPhone 4 running 4.2) and you tilt it so that the accelerometer makes the ball go to any of the screen corners, once the ball stops bouncing it will FREEZE the ball in the corner, and then the iPhone has to be locked and then unlocked in order for it to be used again. The app will also stop working and will have to be deleted and re-installed on your phone.

I hope this makes some sense and you guys can recreate this scenario to see what I&#039;m talking about.</description>
		<content:encoded><![CDATA[<p>Awesome site, thanks for all your help!</p>
<p>However I found a problem that I&#8217;m not sure if it&#8217;s being caused by Cocos2d, Box2d, or even this tutorial&#8230; but if you compile this and run it on an iPhone (I have an iPhone 4 running 4.2) and you tilt it so that the accelerometer makes the ball go to any of the screen corners, once the ball stops bouncing it will FREEZE the ball in the corner, and then the iPhone has to be locked and then unlocked in order for it to be used again. The app will also stop working and will have to be deleted and re-installed on your phone.</p>
<p>I hope this makes some sense and you guys can recreate this scenario to see what I&#8217;m talking about.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

