<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
	>
<channel>
	<title>Comments for NateJC.com</title>
	<atom:link href="http://natejc.com/blog/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://natejc.com/blog</link>
	<description>Flash &#38; AS3 info, source, &#38; experiments</description>
	<lastBuildDate>Fri, 13 Jan 2012 17:18:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>Comment on Flash Game: Kung Fu Panda Tales of Po by Nate Chatellier</title>
		<link>http://natejc.com/blog/2011/11/flash-game-kung-fu-panda-tales-of-po/comment-page-1/#comment-116315</link>
		<dc:creator>Nate Chatellier</dc:creator>
		<pubDate>Fri, 13 Jan 2012 17:18:54 +0000</pubDate>
		<guid isPermaLink="false">http://natejc.com/blog/?p=261#comment-116315</guid>
		<description>Hey Augustine, I wrote a post about how to handle collision detection here:
http://blog.teamthinklabs.com/index.php/2011/11/30/pseudo-3d-collision-detection/

And another post about how to handle depth sorting here:
http://natejc.com/blog/2011/11/as3-displayobject-auto-sorter/

Hope that helps!</description>
		<content:encoded><![CDATA[<p>Hey Augustine, I wrote a post about how to handle collision detection here:<br />
<a href="http://blog.teamthinklabs.com/index.php/2011/11/30/pseudo-3d-collision-detection/" rel="nofollow">http://blog.teamthinklabs.com/index.php/2011/11/30/pseudo-3d-collision-detection/</a></p>
<p>And another post about how to handle depth sorting here:<br />
<a href="http://natejc.com/blog/2011/11/as3-displayobject-auto-sorter/" rel="nofollow">http://natejc.com/blog/2011/11/as3-displayobject-auto-sorter/</a></p>
<p>Hope that helps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Flash Game: Kung Fu Panda Tales of Po by Augustine</title>
		<link>http://natejc.com/blog/2011/11/flash-game-kung-fu-panda-tales-of-po/comment-page-1/#comment-116269</link>
		<dc:creator>Augustine</dc:creator>
		<pubDate>Fri, 13 Jan 2012 09:25:51 +0000</pubDate>
		<guid isPermaLink="false">http://natejc.com/blog/?p=261#comment-116269</guid>
		<description>Dear Nate Chatellier,

I am a flash programmer in Malaysia and currently involving in a similar game project that using side-scrolling brawler style. Do you mind to share how is the collision detection method that using in the Kungfu Panda Tales of Po? I am pretty sure it is not only checking hitTestObject method only. Thanks.</description>
		<content:encoded><![CDATA[<p>Dear Nate Chatellier,</p>
<p>I am a flash programmer in Malaysia and currently involving in a similar game project that using side-scrolling brawler style. Do you mind to share how is the collision detection method that using in the Kungfu Panda Tales of Po? I am pretty sure it is not only checking hitTestObject method only. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on AS3 DisplayObject Auto Depth Sorter by Nate Chatellier</title>
		<link>http://natejc.com/blog/2011/11/as3-displayobject-auto-sorter/comment-page-1/#comment-107857</link>
		<dc:creator>Nate Chatellier</dc:creator>
		<pubDate>Wed, 30 Nov 2011 18:15:27 +0000</pubDate>
		<guid isPermaLink="false">http://natejc.com/blog/?p=268#comment-107857</guid>
		<description>@Anthony: 

I programmed for the worst-case scenario: a fast-paced action game where all of the objects are moving nearly every frame and there is a high probability of multiple necessary depth swaps. This is when the hit on the cpu is likely the most intense in-general and so this method of depth-sorting becomes very efficient since it doesn&#039;t do any additional checks or conditions that might slow it down if every single object passed the conditional checks and needed to be sorted.

The best-case scenario would occur when objects aren&#039;t moving much or at all. &quot;Optimizing&quot; this as you suggest would most definitely help performance in the best-case scenario, but would hurt performance in the worst-case scenario. In all of the games that I have made, the best-case scenario has always been when there was the lightest load on the cpu. So if I have to choose whether the code will perform better in the best-case scenario or better in the worst-case scenario, I choose better performance in the worst-case scenario.

If it&#039;s not common for objects to swap frequently in your game, you could easily add a flag to each game object that changes to true if the object has moved since the last frame. Or handle it a number of other ways too.

Since, it just so happens that all of the games I&#039;ve created so far fit into the worst-case scenario I described above, that&#039;s why I wrote it the way I did. Hope that helps. Thanks for the feedback.</description>
		<content:encoded><![CDATA[<p>@Anthony: </p>
<p>I programmed for the worst-case scenario: a fast-paced action game where all of the objects are moving nearly every frame and there is a high probability of multiple necessary depth swaps. This is when the hit on the cpu is likely the most intense in-general and so this method of depth-sorting becomes very efficient since it doesn&#8217;t do any additional checks or conditions that might slow it down if every single object passed the conditional checks and needed to be sorted.</p>
<p>The best-case scenario would occur when objects aren&#8217;t moving much or at all. &#8220;Optimizing&#8221; this as you suggest would most definitely help performance in the best-case scenario, but would hurt performance in the worst-case scenario. In all of the games that I have made, the best-case scenario has always been when there was the lightest load on the cpu. So if I have to choose whether the code will perform better in the best-case scenario or better in the worst-case scenario, I choose better performance in the worst-case scenario.</p>
<p>If it&#8217;s not common for objects to swap frequently in your game, you could easily add a flag to each game object that changes to true if the object has moved since the last frame. Or handle it a number of other ways too.</p>
<p>Since, it just so happens that all of the games I&#8217;ve created so far fit into the worst-case scenario I described above, that&#8217;s why I wrote it the way I did. Hope that helps. Thanks for the feedback.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on AS3 DisplayObject Auto Depth Sorter by Anthony</title>
		<link>http://natejc.com/blog/2011/11/as3-displayobject-auto-sorter/comment-page-1/#comment-107782</link>
		<dc:creator>Anthony</dc:creator>
		<pubDate>Wed, 30 Nov 2011 09:58:51 +0000</pubDate>
		<guid isPermaLink="false">http://natejc.com/blog/?p=268#comment-107782</guid>
		<description>So if you have 100 items on screen, you will do 100 x setChildIndex() each ENTER FRAME, even if nothing has changed. This is not optimized !</description>
		<content:encoded><![CDATA[<p>So if you have 100 items on screen, you will do 100 x setChildIndex() each ENTER FRAME, even if nothing has changed. This is not optimized !</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on AS3 DisplayObject Auto Depth Sorter by Pseudo 3d Collision Detection in a 2d World (AS3) &#124; Team Think Labs</title>
		<link>http://natejc.com/blog/2011/11/as3-displayobject-auto-sorter/comment-page-1/#comment-107765</link>
		<dc:creator>Pseudo 3d Collision Detection in a 2d World (AS3) &#124; Team Think Labs</dc:creator>
		<pubDate>Wed, 30 Nov 2011 08:33:41 +0000</pubDate>
		<guid isPermaLink="false">http://natejc.com/blog/?p=268#comment-107765</guid>
		<description>[...] I published a utility class that automatically solves this problem, which you can download from here. The focus of this article will be on solving the collision detection [...]</description>
		<content:encoded><![CDATA[<p>[...] I published a utility class that automatically solves this problem, which you can download from here. The focus of this article will be on solving the collision detection [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Bitmap and Sprite Conversion in ActionScript 3 by Nate Chatellier</title>
		<link>http://natejc.com/blog/2007/06/bitmap-and-sprite-conversion-in-actionscript-3/comment-page-1/#comment-97077</link>
		<dc:creator>Nate Chatellier</dc:creator>
		<pubDate>Mon, 16 May 2011 17:54:53 +0000</pubDate>
		<guid isPermaLink="false">http://natejc.com/blog/?p=60#comment-97077</guid>
		<description>@Animedude: There are programs that do that. If you just want the source you can use a decompiler, such as: http://www.sothink.com/product/flashdecompiler/index2.htm

If you have the source and just want png&#039;s cut from it, you can use one of many tools such as this one: https://github.com/pixelrevision/texture_atlas_generator</description>
		<content:encoded><![CDATA[<p>@Animedude: There are programs that do that. If you just want the source you can use a decompiler, such as: <a href="http://www.sothink.com/product/flashdecompiler/index2.htm" rel="nofollow">http://www.sothink.com/product/flashdecompiler/index2.htm</a></p>
<p>If you have the source and just want png&#8217;s cut from it, you can use one of many tools such as this one: <a href="https://github.com/pixelrevision/texture_atlas_generator" rel="nofollow">https://github.com/pixelrevision/texture_atlas_generator</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Bitmap and Sprite Conversion in ActionScript 3 by Animedude5555</title>
		<link>http://natejc.com/blog/2007/06/bitmap-and-sprite-conversion-in-actionscript-3/comment-page-1/#comment-97074</link>
		<dc:creator>Animedude5555</dc:creator>
		<pubDate>Mon, 16 May 2011 04:51:49 +0000</pubDate>
		<guid isPermaLink="false">http://natejc.com/blog/?p=60#comment-97074</guid>
		<description>How about an SWF2PNG.EXE (forget using AS or flash or other crap for conversion), that would be a dedicated program to extract FRAME, SPRITE, and SHAPE, type vector graphics from SWF files and then export them as PNG image files (or at least 32bit BMP image files), complete with transparency (or alpha channel). 

Anyone here want to write such a program? I&#039;m personally interested in such, and none currently exists, so I&#039;m requesting someone here with programming knowledge to write such a program for me. Thanks in advance.</description>
		<content:encoded><![CDATA[<p>How about an SWF2PNG.EXE (forget using AS or flash or other crap for conversion), that would be a dedicated program to extract FRAME, SPRITE, and SHAPE, type vector graphics from SWF files and then export them as PNG image files (or at least 32bit BMP image files), complete with transparency (or alpha channel). </p>
<p>Anyone here want to write such a program? I&#8217;m personally interested in such, and none currently exists, so I&#8217;m requesting someone here with programming knowledge to write such a program for me. Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Bitmap and Sprite Conversion in ActionScript 3 by Nate Chatellier</title>
		<link>http://natejc.com/blog/2007/06/bitmap-and-sprite-conversion-in-actionscript-3/comment-page-1/#comment-96936</link>
		<dc:creator>Nate Chatellier</dc:creator>
		<pubDate>Tue, 26 Apr 2011 21:45:25 +0000</pubDate>
		<guid isPermaLink="false">http://natejc.com/blog/?p=60#comment-96936</guid>
		<description>I have never had to deal with a differing registration point on any of my projects. But I suppose that would cause an issue. And the solution would be different depending on which direction you were applying the conversion. 

Is your issue for going from a Sprite to a Bitmap? Then you could just use this code instead:
&lt;code&gt;var r:Rectangle = sprite.getBounds(sprite);
var bitmapData:BitmapData = new BitmapData(sprite.width, sprite.height, true, 0x00FFFFFF);
bitmapData.draw(sprite, new Matrix(1,0,0,1,-r.left,-r.top));&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>I have never had to deal with a differing registration point on any of my projects. But I suppose that would cause an issue. And the solution would be different depending on which direction you were applying the conversion. </p>
<p>Is your issue for going from a Sprite to a Bitmap? Then you could just use this code instead:<br />
<code>var r:Rectangle = sprite.getBounds(sprite);<br />
var bitmapData:BitmapData = new BitmapData(sprite.width, sprite.height, true, 0x00FFFFFF);<br />
bitmapData.draw(sprite, new Matrix(1,0,0,1,-r.left,-r.top));</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Bitmap and Sprite Conversion in ActionScript 3 by Bobmoff</title>
		<link>http://natejc.com/blog/2007/06/bitmap-and-sprite-conversion-in-actionscript-3/comment-page-1/#comment-96934</link>
		<dc:creator>Bobmoff</dc:creator>
		<pubDate>Tue, 26 Apr 2011 21:03:38 +0000</pubDate>
		<guid isPermaLink="false">http://natejc.com/blog/?p=60#comment-96934</guid>
		<description>Isn&#039;t there problem using this if the registration point is centered ?</description>
		<content:encoded><![CDATA[<p>Isn&#8217;t there problem using this if the registration point is centered ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Adobe Wallaby (Flash to HTML) gotcha&#8217;s &amp; clarification by Joseph</title>
		<link>http://natejc.com/blog/2011/03/adobe-wallaby-flash-to-html-gotchas-clarification/comment-page-1/#comment-96437</link>
		<dc:creator>Joseph</dc:creator>
		<pubDate>Wed, 09 Mar 2011 04:17:35 +0000</pubDate>
		<guid isPermaLink="false">http://natejc.com/blog/?p=220#comment-96437</guid>
		<description>same here... I got excited when I first heard of it today and downloaded it... gave it a quick run, never seemed to cnvert the bitmaps.

Kept giving me an error. Thats my experience in it.</description>
		<content:encoded><![CDATA[<p>same here&#8230; I got excited when I first heard of it today and downloaded it&#8230; gave it a quick run, never seemed to cnvert the bitmaps.</p>
<p>Kept giving me an error. Thats my experience in it.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

