<?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: iPhone Game Programming &#8211; Tutorial 8 &#8211; Particle Emitter</title>
	<atom:link href="http://www.71squared.com/2009/05/iphone-game-programming-tutorial-8-particle-emitter/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.71squared.com/2009/05/iphone-game-programming-tutorial-8-particle-emitter/</link>
	<description>iPhone Game Development - Web Development</description>
	<lastBuildDate>Wed, 28 Jul 2010 17:12:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Danegraphics</title>
		<link>http://www.71squared.com/2009/05/iphone-game-programming-tutorial-8-particle-emitter/comment-page-6/#comment-3053</link>
		<dc:creator>Danegraphics</dc:creator>
		<pubDate>Sat, 10 Apr 2010 04:07:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=551#comment-3053</guid>
		<description>Actually I just retested and found that all three mallocs are memory leaks of some kind.

	texCoords = malloc( sizeof(texCoords[0]) * totalQuads);
	vertices = malloc( sizeof(vertices[0]) * totalQuads);
	indices = malloc( sizeof(indices[0]) * totalQuads * 6);</description>
		<content:encoded><![CDATA[<p>Actually I just retested and found that all three mallocs are memory leaks of some kind.</p>
<p>	texCoords = malloc( sizeof(texCoords[0]) * totalQuads);<br />
	vertices = malloc( sizeof(vertices[0]) * totalQuads);<br />
	indices = malloc( sizeof(indices[0]) * totalQuads * 6);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Danegraphics</title>
		<link>http://www.71squared.com/2009/05/iphone-game-programming-tutorial-8-particle-emitter/comment-page-6/#comment-3052</link>
		<dc:creator>Danegraphics</dc:creator>
		<pubDate>Sat, 10 Apr 2010 04:03:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=551#comment-3052</guid>
		<description>I&#039;ve been using your classes and have found memory leaks in you Image.m file at the following places:

	subImage = [[Image alloc] initWithTexture:texture scale:subImageScale];

and

	texCoords = malloc( sizeof(texCoords[0]) * totalQuads);

Both give me leaks when tested with the leak monitor tool.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been using your classes and have found memory leaks in you Image.m file at the following places:</p>
<p>	subImage = [[Image alloc] initWithTexture:texture scale:subImageScale];</p>
<p>and</p>
<p>	texCoords = malloc( sizeof(texCoords[0]) * totalQuads);</p>
<p>Both give me leaks when tested with the leak monitor tool.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saliom</title>
		<link>http://www.71squared.com/2009/05/iphone-game-programming-tutorial-8-particle-emitter/comment-page-6/#comment-3013</link>
		<dc:creator>Saliom</dc:creator>
		<pubDate>Fri, 02 Apr 2010 10:21:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=551#comment-3013</guid>
		<description>oups i meant 79:40 not79h xD sorry</description>
		<content:encoded><![CDATA[<p>oups i meant 79:40 not79h xD sorry</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saliom</title>
		<link>http://www.71squared.com/2009/05/iphone-game-programming-tutorial-8-particle-emitter/comment-page-6/#comment-3012</link>
		<dc:creator>Saliom</dc:creator>
		<pubDate>Fri, 02 Apr 2010 10:20:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=551#comment-3012</guid>
		<description>if it helps you to see hat i mean, my textures ( when not blending ) looks like the multi color balls you got at 79h40 ... and i don&#039;t know why ...</description>
		<content:encoded><![CDATA[<p>if it helps you to see hat i mean, my textures ( when not blending ) looks like the multi color balls you got at 79h40 &#8230; and i don&#8217;t know why &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Saliom</title>
		<link>http://www.71squared.com/2009/05/iphone-game-programming-tutorial-8-particle-emitter/comment-page-6/#comment-3011</link>
		<dc:creator>Saliom</dc:creator>
		<pubDate>Fri, 02 Apr 2010 10:03:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=551#comment-3011</guid>
		<description>Hi mike, i&#039;m doing a little game on iPhone, and need an explosion effect, as i&#039;m using cocos2d i use their Particle System, but i can&#039;t get somehow the same explosion effect than you (in the video at 74:25 )

even with the same settings... in fact the problem is that the texture doesn&#039;t take the colors i put... every particle gets a different color (Green Red or Blue) and it&#039;s quite ugly...

any idea on what should i do?</description>
		<content:encoded><![CDATA[<p>Hi mike, i&#8217;m doing a little game on iPhone, and need an explosion effect, as i&#8217;m using cocos2d i use their Particle System, but i can&#8217;t get somehow the same explosion effect than you (in the video at 74:25 )</p>
<p>even with the same settings&#8230; in fact the problem is that the texture doesn&#8217;t take the colors i put&#8230; every particle gets a different color (Green Red or Blue) and it&#8217;s quite ugly&#8230;</p>
<p>any idea on what should i do?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://www.71squared.com/2009/05/iphone-game-programming-tutorial-8-particle-emitter/comment-page-6/#comment-2993</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Mon, 29 Mar 2010 20:21:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=551#comment-2993</guid>
		<description>Hi Mike

Thanks for that, yep this was testing on a 3GS and your fix solves the problem. Many thanks saved me a lot of time! I will hopefully have my game in the app store very soon, another spectrum classic i may add.

Many thanks Andy</description>
		<content:encoded><![CDATA[<p>Hi Mike</p>
<p>Thanks for that, yep this was testing on a 3GS and your fix solves the problem. Many thanks saved me a lot of time! I will hopefully have my game in the app store very soon, another spectrum classic i may add.</p>
<p>Many thanks Andy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike</title>
		<link>http://www.71squared.com/2009/05/iphone-game-programming-tutorial-8-particle-emitter/comment-page-6/#comment-2979</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Mon, 29 Mar 2010 07:24:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=551#comment-2979</guid>
		<description>Hi Andy

I think I do know what your problem is.  During beta testing of SLQ it was noticed that on iPhone 3GS devices you would get this large secondary artefact somewhere on the screen.  This was traced back to the partile size going below zero, which it can do if you have a size on the variance.

The fix is to make sure the particle size does not go below zero as shown below.
&lt;pre&gt;
vertices[particleIndex].size = MAX(0, currentParticle-&gt;particleSize);
&lt;/pre&gt;

Let me know if that solves your problem.

Mike</description>
		<content:encoded><![CDATA[<p>Hi Andy</p>
<p>I think I do know what your problem is.  During beta testing of SLQ it was noticed that on iPhone 3GS devices you would get this large secondary artefact somewhere on the screen.  This was traced back to the partile size going below zero, which it can do if you have a size on the variance.</p>
<p>The fix is to make sure the particle size does not go below zero as shown below.</p>
<pre>
vertices[particleIndex].size = MAX(0, currentParticle->particleSize);
</pre>
<p>Let me know if that solves your problem.</p>
<p>Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://www.71squared.com/2009/05/iphone-game-programming-tutorial-8-particle-emitter/comment-page-5/#comment-2976</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Sun, 28 Mar 2010 20:20:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=551#comment-2976</guid>
		<description>Ive been going through your tutorials over the last couple of months and just started testing my game on the device and i get a weird problem when i use the particle emitter i get a secondary much larger explosion in the top right corner. It appears to be related to particleLifeSpan if its 50 it works fine, but much lower values cause the problem. It never happens on the simulator. Any help would be much appriated. Its about my last bug!

_explosionEmitter = [[ParticleEmitter alloc] initParticleEmitterWithImageNamed:@&quot;texture.png&quot;
																			  position:Vector2fMake(160, 240)
																sourcePositionVariance:Vector2fMake(5, 5)
																				 speed:1.0f
																		 speedVariance:0.5f
																	  particleLifeSpan:0.5f	
															  particleLifespanVariance:0.8f
																				 angle:0.0f
																		 angleVariance:360
																			   gravity:Vector2fMake(0.0f, -0.00f)
																			startColor:Color4fMake(1.0f, 0.4f, 0.0f, 1.0f)
																	startColorVariance:Color4fMake(0.1f, 0.0f, 0.0f, 0.5f)
																		   finishColor:Color4fMake(0.8f, 0.8f, 0.8f, 0.5f)  
																   finishColorVariance:Color4fMake(0.1f, 0.1f, 0.1f, 0.0f)
																		  maxParticles:500
																		  particleSize:16
																  particleSizeVariance:20
																			  duration:0.025f
																		 blendAdditive:YES];</description>
		<content:encoded><![CDATA[<p>Ive been going through your tutorials over the last couple of months and just started testing my game on the device and i get a weird problem when i use the particle emitter i get a secondary much larger explosion in the top right corner. It appears to be related to particleLifeSpan if its 50 it works fine, but much lower values cause the problem. It never happens on the simulator. Any help would be much appriated. Its about my last bug!</p>
<p>_explosionEmitter = [[ParticleEmitter alloc] initParticleEmitterWithImageNamed:@&#8221;texture.png&#8221;<br />
																			  position:Vector2fMake(160, 240)<br />
																sourcePositionVariance:Vector2fMake(5, 5)<br />
																				 speed:1.0f<br />
																		 speedVariance:0.5f<br />
																	  particleLifeSpan:0.5f<br />
															  particleLifespanVariance:0.8f<br />
																				 angle:0.0f<br />
																		 angleVariance:360<br />
																			   gravity:Vector2fMake(0.0f, -0.00f)<br />
																			startColor:Color4fMake(1.0f, 0.4f, 0.0f, 1.0f)<br />
																	startColorVariance:Color4fMake(0.1f, 0.0f, 0.0f, 0.5f)<br />
																		   finishColor:Color4fMake(0.8f, 0.8f, 0.8f, 0.5f)<br />
																   finishColorVariance:Color4fMake(0.1f, 0.1f, 0.1f, 0.0f)<br />
																		  maxParticles:500<br />
																		  particleSize:16<br />
																  particleSizeVariance:20<br />
																			  duration:0.025f<br />
																		 blendAdditive:YES];</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trevor Newsome</title>
		<link>http://www.71squared.com/2009/05/iphone-game-programming-tutorial-8-particle-emitter/comment-page-5/#comment-2677</link>
		<dc:creator>Trevor Newsome</dc:creator>
		<pubDate>Mon, 15 Feb 2010 20:59:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=551#comment-2677</guid>
		<description>Wow, speechless Mike, fantastic tutorial.</description>
		<content:encoded><![CDATA[<p>Wow, speechless Mike, fantastic tutorial.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: brianb</title>
		<link>http://www.71squared.com/2009/05/iphone-game-programming-tutorial-8-particle-emitter/comment-page-5/#comment-2198</link>
		<dc:creator>brianb</dc:creator>
		<pubDate>Wed, 25 Nov 2009 21:35:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.71squared.co.uk/?p=551#comment-2198</guid>
		<description>When I run the sample code (and my version) in 2.2 &amp; 3.0 simulator, all I see is a colorful glowing white circle. I should be seeing the explosion. Any ideas?</description>
		<content:encoded><![CDATA[<p>When I run the sample code (and my version) in 2.2 &amp; 3.0 simulator, all I see is a colorful glowing white circle. I should be seeing the explosion. Any ideas?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
