<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Phil Hassey &#187; C++</title>
	<atom:link href="http://www.philhassey.com/blog/category/c/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.philhassey.com/blog</link>
	<description>game dev blog</description>
	<lastBuildDate>Fri, 03 Feb 2012 00:13:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>How to create and play IVF / VP8 / WebM / libvpx video in OpenGL</title>
		<link>http://www.philhassey.com/blog/2012/02/02/how-to-create-and-play-ivf-vp8-webm-libvpx-video-in-opengl/</link>
		<comments>http://www.philhassey.com/blog/2012/02/02/how-to-create-and-play-ivf-vp8-webm-libvpx-video-in-opengl/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 23:50:59 +0000</pubDate>
		<dc:creator>philhassey</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=1014</guid>
		<description><![CDATA[Disclaimer: this tutorial covers how to render IVF / VP8 / libvpx video in an OpenGL libSDL / SDL window. IVF video only includes video, not audio. For game developers, it&#8217;s trivial to play audio via their own audio system. So you&#8217;ll have two files per movie &#8220;movie.ivf&#8221; and &#8220;movie.ogg&#8221; or whatever. As an exercise [...]]]></description>
			<content:encoded><![CDATA[<p><em>Disclaimer: this tutorial covers how to render IVF / VP8 / libvpx video in an OpenGL libSDL / SDL window.  IVF video only includes video, not audio.  For game developers, it&#8217;s trivial to play audio via their own audio system.  So you&#8217;ll have two files per movie &#8220;movie.ivf&#8221; and &#8220;movie.ogg&#8221; or whatever.  As an exercise to the reader, you could easily jam both into a single file if you really wanted to.</em></p>
<p><strong>The Problem We&#8217;re Trying To Solve</strong></p>
<p>So you&#8217;re an indie game developer and you want to show a clip of video in your commercial cross-platform (PC/Mac/Linux/other?) game!  Obviously you want a patent-free open source unrestricted license to do it.</p>
<p><strong>Wait, can&#8217;t I go commercial?</strong></p>
<p>Better than that, you could just use the built-in codecs on a platform!  I&#8217;d suggest this if you are targeting a single platform, iPhone / iOS for example.</p>
<p>Otherwise, you&#8217;ll be using <a href="http://www.radgametools.com/bnkmain.htm">Bink</a>, a commercial solution at $8500 / platform.  I emailed about their &#8220;indie licenses&#8221; and never heard back.</p>
<p><strong>The Open Source Options I didn&#8217;t like much</strong></p>
<p>Here&#8217;s what we have for patent free open source codecs .. and their various problems.</p>
<p><a href="http://theora.org/">Xiph Theora</a> &#8211; Probably the best known codec.  To get it working you have to have libogg, libvorbis, and libtheora all built for your target platforms.  To me, that seemed like a lot to ask.  Also, the libtheora API is a MONSTER.  <a href="http://icculus.org/theoraplay/">playtheora</a> is a SDL example (similar to this one) that covers some of that ugliness, so I&#8217;d recommend checking that out if you want to use theora.</p>
<p><a href="http://diracvideo.org/">Dirac / Schroedinger</a> &#8211; the BBC funded codec.  I couldn&#8217;t get this one to build.  It doesn&#8217;t seem to be all that popular.</p>
<p><a href="http://en.wikipedia.org/wiki/Motion_JPEG">Motion Jpeg</a> &#8211; This isn&#8217;t so much of a codec as an idea.  Make your own movie file with a ton of .jpg&#8217;s in it.  I tried this.  The files get really huge really fast.  I wouldn&#8217;t recommend this.</p>
<p><a href="http://www.openjpeg.org/">Motion JPEG 2000</a> &#8211; This implementation was also pretty confusing.  I couldn&#8217;t find where to start.  And, yeah, this isn&#8217;t all that popular either.</p>
<p><strong>libvpx .. why I chose it</strong></p>
<p><a href="http://www.webmproject.org/code/">WebM / libvpx</a> &#8211; Backed by google this is a new contendor on the block.  The thing that sold me was the <a href="http://www.webmproject.org/tools/vp8-sdk/example__simple__decoder.html">sample encoder</a> which was pretty simple.  It also depends on nothing.  Also, building it on OS X and Linux was trivial.  Also they offer a pre-built Windows binary.  Also, they just had their 1.0.0 release a few days ago.</p>
<p>So, yeah, having a supported, up and coming, easy to build codec was key to me.</p>
<p><strong>How to encode for IVF / libvpx</strong></p>
<p>Since it&#8217;s a new codec, not much supports it right now.  I used a fresh build of ffmpeg under linux that I built with this configure command:</p>
<pre>./configure --enable-encoders --enable-libvpx</pre>
<p>Then I was able to use ffmpeg to encode ivf files pretty easily:</p>
<pre>ffmpeg -i Untitled.mov -vcodec libvpx -b 1000k -s 1024x512 movie.ivf</pre>
<p>Note: we&#8217;re not dealing with WebM files.  WebM files are container files that also contain audio.  Again, you&#8217;ll have to store your audio separately, or create your own container file, or figure out what WebM is on your own time.</p>
<p><strong>So .. what&#8217;s the bottom line?  Do we get any code?</strong></p>
<p>Yes!  I created a libSDL player that plays back the video at max speed possible and it converts the YUV data to RGB data and loads it as a texture.  Here are the functions I provide:</p>
<pre>void playvpx_init(Vpxdata *data, const char *_fname) ;</pre>
<p>Just init your Vpxdata with a filename &#8220;movie.ivf&#8221; .. It&#8217;ll try and get libvpx up and running for you.</p>
<pre>bool playvpx_loop(Vpxdata *data) ;</pre>
<p>Call this once per frame to have it decode a frame of video.  It will return false once it has run out of frames.  If you want to mess with the libvpx YUV data yourself, it&#8217;s data->img.  See the playvpx.cpp source or the libvpx example above to see what that structure provides.  It&#8217;s pretty simple.</p>
<pre>int playvpx_get_texture(Vpxdata *data) ;</pre>
<p>Call this once per frame to have it convert the YUV data to RGB and upload the texture to OpenGL.  It will return 0 on failure or a OpenGL texture ID on success.  I convert on your CPU, so it&#8217;s not super fast, but it should work fine on modern computers.  If anyone cares to provide a Shader version of this function, or provide a SIMD / MMX / SSE version .. well, that would be faster!</p>
<pre>void playvpx_deinit(Vpxdata *data) ;</pre>
<p>Call this function when you&#8217;re done to cleanup.</p>
<p><strong>Conclusion and Source Code</strong></p>
<p>Okay, here&#8217;s <a href='http://www.philhassey.com/blog/wp-content/uploads/2012/02/playvpx.zip'>playvpx</a> for you to check out.  It&#8217;s a C-style API, but I&#8217;m sure I use some minor C++ in there.  Probably wouldn&#8217;t be hard to make it C-only if you require C for your project.</p>
<p>Oh, and I include the libvpx binary for Windows, OS X, and Linux.  So you may not have to build it for any platforms!</p>
<p>The code is licensed under the libvpx BSD-style license.  My code here is a gutted version of their sample_decoder.c, so .. that seems to make most sense to me.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<div class="d">
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.philhassey.com/blog/2012/02/02/how-to-create-and-play-ivf-vp8-webm-libvpx-video-in-opengl/&amp;title=How+to+create+and+play+IVF+%2F+VP8+%2F+WebM+%2F+libvpx+video+in+OpenGL" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.philhassey.com/blog/2012/02/02/how-to-create-and-play-ivf-vp8-webm-libvpx-video-in-opengl/&amp;title=How+to+create+and+play+IVF+%2F+VP8+%2F+WebM+%2F+libvpx+video+in+OpenGL" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.philhassey.com/blog/2012/02/02/how-to-create-and-play-ivf-vp8-webm-libvpx-video-in-opengl/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.philhassey.com/blog/2012/02/02/how-to-create-and-play-ivf-vp8-webm-libvpx-video-in-opengl/&amp;title=How+to+create+and+play+IVF+%2F+VP8+%2F+WebM+%2F+libvpx+video+in+OpenGL" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.philhassey.com/blog/2012/02/02/how-to-create-and-play-ivf-vp8-webm-libvpx-video-in-opengl/&amp;title=How+to+create+and+play+IVF+%2F+VP8+%2F+WebM+%2F+libvpx+video+in+OpenGL" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http://www.philhassey.com/blog/2012/02/02/how-to-create-and-play-ivf-vp8-webm-libvpx-video-in-opengl/&amp;title=How+to+create+and+play+IVF+%2F+VP8+%2F+WebM+%2F+libvpx+video+in+OpenGL" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.philhassey.com/blog/2012/02/02/how-to-create-and-play-ivf-vp8-webm-libvpx-video-in-opengl/&amp;title=How+to+create+and+play+IVF+%2F+VP8+%2F+WebM+%2F+libvpx+video+in+OpenGL" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.philhassey.com/blog/2012/02/02/how-to-create-and-play-ivf-vp8-webm-libvpx-video-in-opengl/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+How+to+create+and+play+IVF+%2F+VP8+%2F+WebM+%2F+libvpx+video+in+OpenGL+@+http://www.philhassey.com/blog/2012/02/02/how-to-create-and-play-ivf-vp8-webm-libvpx-video-in-opengl/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.philhassey.com/blog/2012/02/02/how-to-create-and-play-ivf-vp8-webm-libvpx-video-in-opengl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is this a safe pattern for auto-registration?</title>
		<link>http://www.philhassey.com/blog/2011/10/26/is-this-a-safe-pattern-for-auto-registration/</link>
		<comments>http://www.philhassey.com/blog/2011/10/26/is-this-a-safe-pattern-for-auto-registration/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 16:50:01 +0000</pubDate>
		<dc:creator>philhassey</dc:creator>
				<category><![CDATA[C++]]></category>

		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=994</guid>
		<description><![CDATA[Hey, I&#8217;m trying to have various components in my game pre-register themselves upon startup of the game. I&#8217;m using this pattern: Here&#8217;s my registration code that is in one .cpp file. The register_init() function is available from anywhere: std::vector &#038;get_init() { static std::vector goods; return goods; } bool register_init(Init *v) { get_init().push_back(v); return true; } [...]]]></description>
			<content:encoded><![CDATA[<p>Hey,</p>
<p>I&#8217;m trying to have various components in my game pre-register themselves upon startup of the game.  I&#8217;m using this pattern:</p>
<p>Here&#8217;s my registration code that is in one .cpp file.  The register_init() function is available from anywhere:</p>
<pre>
std::vector<Init*> &#038;get_init() {
    static std::vector<Init*> goods;
    return goods;
}
bool register_init(Init *v) {
    get_init().push_back(v);
    return true;
}
</pre>
<p>Here&#8217;s how I auto-register some init code from some other file by calling register init to initialize a variable:</p>
<pre>
int _is_levedit_init = register_init(new LeveditInit());
</pre>
<p>Is there some case where this would NOT work or is somehow a really bad idea?  Or is there some pattern that is better to use?</p>
<p>-Phil</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<div class="d">
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.philhassey.com/blog/2011/10/26/is-this-a-safe-pattern-for-auto-registration/&amp;title=Is+this+a+safe+pattern+for+auto-registration%3F" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.philhassey.com/blog/2011/10/26/is-this-a-safe-pattern-for-auto-registration/&amp;title=Is+this+a+safe+pattern+for+auto-registration%3F" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.philhassey.com/blog/2011/10/26/is-this-a-safe-pattern-for-auto-registration/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.philhassey.com/blog/2011/10/26/is-this-a-safe-pattern-for-auto-registration/&amp;title=Is+this+a+safe+pattern+for+auto-registration%3F" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.philhassey.com/blog/2011/10/26/is-this-a-safe-pattern-for-auto-registration/&amp;title=Is+this+a+safe+pattern+for+auto-registration%3F" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http://www.philhassey.com/blog/2011/10/26/is-this-a-safe-pattern-for-auto-registration/&amp;title=Is+this+a+safe+pattern+for+auto-registration%3F" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.philhassey.com/blog/2011/10/26/is-this-a-safe-pattern-for-auto-registration/&amp;title=Is+this+a+safe+pattern+for+auto-registration%3F" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.philhassey.com/blog/2011/10/26/is-this-a-safe-pattern-for-auto-registration/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Is+this+a+safe+pattern+for+auto-registration%3F+@+http://www.philhassey.com/blog/2011/10/26/is-this-a-safe-pattern-for-auto-registration/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.philhassey.com/blog/2011/10/26/is-this-a-safe-pattern-for-auto-registration/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Invasion of the Blobs &amp; dev toolkit in the works</title>
		<link>http://www.philhassey.com/blog/2011/05/20/invasion-of-the-blobs-dev-toolkit-in-the-works/</link>
		<comments>http://www.philhassey.com/blog/2011/05/20/invasion-of-the-blobs-dev-toolkit-in-the-works/#comments</comments>
		<pubDate>Sat, 21 May 2011 02:29:03 +0000</pubDate>
		<dc:creator>philhassey</dc:creator>
				<category><![CDATA[android]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[development]]></category>

		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=925</guid>
		<description><![CDATA[Hey, A few weeks ago I entered the Ludum Dare game development contest and whipped together a fun game about defending off invading blobs using a spray can. I spent another week getting it polished up so it works on a ton of platforms. The game is &#8220;The Invasion of the Blobs&#8221; (iBLOBS for short). [...]]]></description>
			<content:encoded><![CDATA[<p>Hey,</p>
<p>A few weeks ago I entered the <a href="http://www.ludumdare.com">Ludum Dare</a> game development contest and whipped together a fun game about defending off invading blobs using a spray can.</p>
<p><a href="http://www.galcon.com/iblobs/"><img src="http://www.philhassey.com/blog/wp-content/uploads/2011/05/icon114.png" alt="" title="icon114" width="114" height="114" class="alignright size-full wp-image-927" /></a>I spent another week getting it polished up so it works on a ton of platforms.  The game is &#8220;The Invasion of the Blobs&#8221; (iBLOBS for short).  You can get it <a href="http://www.galcon.com/iblobs/">here</a>.  It&#8217;s available on iPhone/iPad, Android, PC, Linux, Mac, and pretty soon the Mac App Store.</p>
<p>The reason for the porting frenzy with this game is I&#8217;m working towards releasing an open source C++ toolkit for supporting all these platforms (and maybe a few more).  This is my first game release with this kit.  It uses code from all my recent games, but it finally puts that code into a clean and organized re-usable structure.  This is going to be super helpful for reducing bugs and improving game code across each platform.</p>
<p>Anyway, I hope you enjoy iBLOBS.  It&#8217;s totally free, so you might as well give it a whirl.  If you want to help out, please post a message here if there are any crashes or support issues on any platform, I want to get those ironed out best I can <img src='http://www.philhassey.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Have fun!<br />
-Phil</p>
<p>UPDATE: The <a href="https://market.android.com/details?id=com.galcon.ld20">Android port</a> has been giving quite a few people trouble.  If you are a dev with the Android dev kit, please do an &#8220;adb logcat&#8221; and post the results here, that would be a huge help!</p>
<p>UPDATE2: The Android build is so broken I took it down.  </p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<div class="d">
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.philhassey.com/blog/2011/05/20/invasion-of-the-blobs-dev-toolkit-in-the-works/&amp;title=Invasion+of+the+Blobs+%26%23038%3B+dev+toolkit+in+the+works" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.philhassey.com/blog/2011/05/20/invasion-of-the-blobs-dev-toolkit-in-the-works/&amp;title=Invasion+of+the+Blobs+%26%23038%3B+dev+toolkit+in+the+works" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.philhassey.com/blog/2011/05/20/invasion-of-the-blobs-dev-toolkit-in-the-works/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.philhassey.com/blog/2011/05/20/invasion-of-the-blobs-dev-toolkit-in-the-works/&amp;title=Invasion+of+the+Blobs+%26%23038%3B+dev+toolkit+in+the+works" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.philhassey.com/blog/2011/05/20/invasion-of-the-blobs-dev-toolkit-in-the-works/&amp;title=Invasion+of+the+Blobs+%26%23038%3B+dev+toolkit+in+the+works" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http://www.philhassey.com/blog/2011/05/20/invasion-of-the-blobs-dev-toolkit-in-the-works/&amp;title=Invasion+of+the+Blobs+%26%23038%3B+dev+toolkit+in+the+works" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.philhassey.com/blog/2011/05/20/invasion-of-the-blobs-dev-toolkit-in-the-works/&amp;title=Invasion+of+the+Blobs+%26%23038%3B+dev+toolkit+in+the+works" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.philhassey.com/blog/2011/05/20/invasion-of-the-blobs-dev-toolkit-in-the-works/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Invasion+of+the+Blobs+%26%23038%3B+dev+toolkit+in+the+works+@+http://www.philhassey.com/blog/2011/05/20/invasion-of-the-blobs-dev-toolkit-in-the-works/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.philhassey.com/blog/2011/05/20/invasion-of-the-blobs-dev-toolkit-in-the-works/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>FEAR THE PANDA</title>
		<link>http://www.philhassey.com/blog/2010/03/02/fear-the-panda/</link>
		<comments>http://www.philhassey.com/blog/2010/03/02/fear-the-panda/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 05:18:45 +0000</pubDate>
		<dc:creator>philhassey</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=304</guid>
		<description><![CDATA[Yeah, you better &#8230; This image represents the last few days of work.  I have ported some 3000 lines of python code to tinypyC++ code.  Fear it. -Phil]]></description>
			<content:encoded><![CDATA[<p>Yeah, you better &#8230;</p>
<p><a href="http://www.philhassey.com/blog/wp-content/uploads/2010/03/pandapromo.jpg"><img class="aligncenter size-full wp-image-305" title="pandapromo" src="http://www.philhassey.com/blog/wp-content/uploads/2010/03/pandapromo.jpg" alt="pandapromo" width="375" height="532" /></a></p>
<p>This image represents the last few days of work.  I have ported some 3000 lines of python code to tinypyC++ code.  Fear it.</p>
<p>-Phil</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<div class="d">
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.philhassey.com/blog/2010/03/02/fear-the-panda/&amp;title=FEAR+THE+PANDA" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.philhassey.com/blog/2010/03/02/fear-the-panda/&amp;title=FEAR+THE+PANDA" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.philhassey.com/blog/2010/03/02/fear-the-panda/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.philhassey.com/blog/2010/03/02/fear-the-panda/&amp;title=FEAR+THE+PANDA" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.philhassey.com/blog/2010/03/02/fear-the-panda/&amp;title=FEAR+THE+PANDA" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http://www.philhassey.com/blog/2010/03/02/fear-the-panda/&amp;title=FEAR+THE+PANDA" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.philhassey.com/blog/2010/03/02/fear-the-panda/&amp;title=FEAR+THE+PANDA" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.philhassey.com/blog/2010/03/02/fear-the-panda/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+FEAR+THE+PANDA+@+http://www.philhassey.com/blog/2010/03/02/fear-the-panda/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.philhassey.com/blog/2010/03/02/fear-the-panda/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>VisualC++ 2008 for gcc / SDL people</title>
		<link>http://www.philhassey.com/blog/2010/01/14/visualc-2008-for-gcc-sdl-people/</link>
		<comments>http://www.philhassey.com/blog/2010/01/14/visualc-2008-for-gcc-sdl-people/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 19:24:27 +0000</pubDate>
		<dc:creator>philhassey</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=266</guid>
		<description><![CDATA[I&#8217;ve had to port a project to VC 2008 from my usual mingw setup.  Here&#8217;s what I did.  This covers quite a few things, in particular where to find common GCC settings in VC land. Setting up the project New project Type: win32 Template: Win32 console if you want a console.  Or just Win32 Project [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had to port a project to VC 2008 from my usual mingw setup.  Here&#8217;s what I did.  This covers quite a few things, in particular where to find common GCC settings in VC land.</p>
<div><strong>Setting up the project</strong></div>
<ol>
<li>New project</li>
<li>Type: win32</li>
<li>Template: Win32 console if you want a console.  Or just Win32 Project if you don&#8217;t want the console to pop up.</li>
<li>Choose a name for your project</li>
<li>The solution name is the folder everything gets put in.  In VC, you can have several projects within a single solution.</li>
<li>On App settings, I choose Windows application, Empty project</li>
</ol>
<p><strong>Adding the source files</strong></p>
<ol>
<li>I right click on my project name and Add&gt;New filter, and use that to bundle a few different sets of source files together</li>
<li>This is done so that VC will compile the files, but keep in mind that the separations don&#8217;t seem to mean anything to VC.  It&#8217;s just for your visual convenience.</li>
<li>Note that if there are two files with the same base name &#8220;dostuff.c&#8221; and &#8220;dostuff.cc&#8221; this will cause VC to choke during compilation as it will create two .obj files with the same name and fail during linking.</li>
<li>VC doesn&#8217;t support C99 so any C99 files will have to be Right Click &gt; Properties &gt; C/C++ &gt; Advanced &gt; Compile as &gt; C++ Code</li>
</ol>
<p>Note: a Project can have a number Configurations (Debug, Release ..) If you are targeting a certain distribution site with some special requirements you can add more Configurations via Solution &gt; Properties &gt; Configuration Manager &gt;</p>
<p><strong>Compilation Options</strong></p>
<p>Adding some project compile time options (mainly -D and -I equivalents for specific defines and include folders.)  Keep in mind which Configuration you are modifying at all times.  You can also switch to &#8220;All Configurations&#8221; for global changes.</p>
<ol>
<li>(GCC -I)  To add in include folders, Project &gt; Configuration Properties &gt; C/C++ &gt; General &gt; Additional Include Directories &gt; &#8230; I found with include folders you often need to stack on a few ../../&#8217;s to get it to point at what you want it to point at.  (In my project I&#8217;ve got my VC project separate from all my source code, so everything is up and over a few folders.)</li>
<li>(GCC -D)  To add in defines, Project &gt; Configuration Properties &gt; C/C++ &gt; Preprocessor &gt; Preprocessor Definitions &gt; .. I often add a few of these to tell the code what build we&#8217;re doing.  (iPhone vs, Windows, vs Linux, etc)</li>
<li>(GCC -W)  Although warnings might be useful .. They made it impossible to see the errors.  You can turn down the warnings from level 3 to 1 in Project &gt; Configuration Properties &gt; C/C++ &gt; General &gt; Warning Level &gt;</li>
<li>(GCC -l)  Linked libraries are probably going to be needed.  Again in my project I&#8217;ve often got a few ../../&#8217;s in the paths.  Here&#8217;s where you add this stuff: Project &gt; Configuration Properties &gt; Linker &gt; Input &gt; Additional Dependencies &gt;</li>
<li>.. an alternate way is to add #pragma comment(lib,&#8221;MyLib.lib&#8221;) into your main.cpp.  By doing this you can refer to a lib right within your source if you prefer.</li>
<li>For whatever reason, you may need to exclude some libs from being compiled into your project.  (If you see errors like &#8220;_tolower already defined in MSVCRTD.lib, etc).  You can exclude a lib in Project &gt; Configuration Properties &gt; Linker &gt; Input &gt; Ignore Specific Library &gt; .. (in my case, I had to add msvcrt.lib and libcmt.lib)</li>
<li>For my project I needed to expand the size of my stack, due to having excessive amounts of static data compiled into the project.  You can do this via Project &gt; Config Properties &gt; Linker &gt; System &gt; Stack (Reserve&amp;Commit) Size &gt; .. I changed them both to 4000000 and things worked.</li>
</ol>
<p><strong>Final packaging</strong></p>
<p>I found that running right from VC didn&#8217;t always work. (Maybe I should find out why, but I haven&#8217;t.)  But I can run from the command-line.  Before doing so, I needed to:</p>
<ol>
<li>Copy in required dlls from SDL, etc</li>
<li>Copy in game data files</li>
<li>Copy in the VC Runtime files from: C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT</li>
<li>For a release build I&#8217;m sure to build against SDLmain_nostdio.lib so that the game won&#8217;t crash Vista/Win7 where writing out stdout.txt and stderr.txt may result in some kind of fail.</li>
</ol>
<p><strong>Saving to Your_Favorite_Version_Control_System</strong></p>
<ol>
<li>You may leave out all your &#8216;Debug&#8217; folders or other Configuration folders, those seem to only contain generated files.</li>
<li>You may leave out the .ncb and the .COMPUTER.username.blah file, they seem to be used by VC for stuff that can be regenerated, etc.</li>
</ol>
<p>Hopefully this will be helpful to anyone who does the same thing.  Between you and me, I found the install of VC 2008 to be pretty nice in comparison to trying to install mingw, which tends to require considerable muscling.  Also, since everyone provides their libs as MSVC libs, building against those vendor libs is not only easy, but possible.  (With mingw, many MSVC C++ libs are unusable due to binary incompatibility.)</p>
<p>-Phil</p>
<p><strong>P.S. Adding an Icon to your Project</strong></p>
<p>This is pretty easy.  Add a Project.rc to your project.  The Project.rc should include this line:</p>
<p>IDI_PROJECT       ICON         &#8220;path/to/icon256.ico&#8221;</p>
<p>You can create an Icon with <a href="http://icofx.ro/">IconFX</a> .</p>
<p><strong>P.S.S. Creating a windows Installer</strong></p>
<p>I&#8217;ve used <a href="http://www.jrsoftware.org/isinfo.php">Innosetup</a> in the past.  It seems to work.</p>
<p><strong>P.S.S.S. Dealing with LPCTSTR conversions</strong></p>
<p>If your whole project is using C-strings, you can go into Project &gt; Properties &gt; Configuration Properties &gt; General &gt; Character Set &gt; and change it to &#8220;Not Set&#8221; so that VC will no longer try and use Unicode strings to some of its functions (like ShellExecute.)</p>
<p><strong>P.S.S.S.S. Dealing with conflicting .obj files</strong></p>
<p>If you get a linking error about a bunch of undefined symbols and you have say &#8220;game.c&#8221; and &#8220;game.cpp&#8221; in your project, they are both being compiled down to &#8220;game.obj&#8221; .. To set one of them to compile to a different filename, say &#8220;mygame.obj&#8221;, you need to Right Click &gt; C/C++ &gt; Output Files &gt; Object File Name &gt; &#8220;$(IntDir)\mygame.obj&#8221;</p>
<p>Alternately, you can just rename some of your source files so there are no name conflicts by default. </p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<div class="d">
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.philhassey.com/blog/2010/01/14/visualc-2008-for-gcc-sdl-people/&amp;title=VisualC%2B%2B+2008+for+gcc+%2F+SDL+people" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.philhassey.com/blog/2010/01/14/visualc-2008-for-gcc-sdl-people/&amp;title=VisualC%2B%2B+2008+for+gcc+%2F+SDL+people" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.philhassey.com/blog/2010/01/14/visualc-2008-for-gcc-sdl-people/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.philhassey.com/blog/2010/01/14/visualc-2008-for-gcc-sdl-people/&amp;title=VisualC%2B%2B+2008+for+gcc+%2F+SDL+people" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.philhassey.com/blog/2010/01/14/visualc-2008-for-gcc-sdl-people/&amp;title=VisualC%2B%2B+2008+for+gcc+%2F+SDL+people" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http://www.philhassey.com/blog/2010/01/14/visualc-2008-for-gcc-sdl-people/&amp;title=VisualC%2B%2B+2008+for+gcc+%2F+SDL+people" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.philhassey.com/blog/2010/01/14/visualc-2008-for-gcc-sdl-people/&amp;title=VisualC%2B%2B+2008+for+gcc+%2F+SDL+people" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.philhassey.com/blog/2010/01/14/visualc-2008-for-gcc-sdl-people/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+VisualC%2B%2B+2008+for+gcc+%2F+SDL+people+@+http://www.philhassey.com/blog/2010/01/14/visualc-2008-for-gcc-sdl-people/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.philhassey.com/blog/2010/01/14/visualc-2008-for-gcc-sdl-people/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Exceptions and various compilation option speeds</title>
		<link>http://www.philhassey.com/blog/2010/01/06/exceptions-and-various-compilation-option-speeds/</link>
		<comments>http://www.philhassey.com/blog/2010/01/06/exceptions-and-various-compilation-option-speeds/#comments</comments>
		<pubDate>Thu, 07 Jan 2010 00:26:07 +0000</pubDate>
		<dc:creator>philhassey</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[tinypy]]></category>

		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=258</guid>
		<description><![CDATA[So after some discussion yesterday with a few folks about Exceptions in C++, I decided to add a compilation flag to disable the use of exceptions in tinypyC++.  The claim given to me was around these few items: 1. Exceptions slow your code down.  2. Exceptions aren&#8217;t cross-platform (in some cases).  3. Exceptions can easily [...]]]></description>
			<content:encoded><![CDATA[<p>So after some discussion yesterday with a few folks about Exceptions in C++, I decided to add a compilation flag to disable the use of exceptions in tinypyC++.  The claim given to me was around these few items: 1. Exceptions slow your code down.  2. Exceptions aren&#8217;t cross-platform (in some cases).  3. Exceptions can easily add in memory-leaks.</p>
<p>I can&#8217;t argue with #2, although it&#8217;s not completely relevant for the platforms I&#8217;m targeting right now.  #3, with the way tinypyC++ does reference counting, I wouldn&#8217;t be surprised if this could happen.  #1, I figured might be true, but I wanted to know how real #1 actually was.  So here are my results:</p>
<table border="1">
<tbody>
<tr>
<th>g++ flags</th>
<th>ms</th>
</tr>
<tr>
<td>(none)</td>
<td>894</td>
</tr>
<tr>
<td>-g</td>
<td>891</td>
</tr>
<tr>
<td>-O3</td>
<td>414</td>
</tr>
<tr>
<td>-DTP_NO_THROW -fno-exceptions</td>
<td>894</td>
</tr>
<tr>
<td>-g -DTP_NO_THROW -fno-exceptions</td>
<td>878</td>
</tr>
<tr>
<td>-O3 -DTP_NO_THROW -fno-exceptions</td>
<td>378</td>
</tr>
</tbody>
</table>
<p>In the first test I&#8217;m rendering a Julia fractal for 20 frames and averaging the time it takes to render.  In the second test (below) I&#8217;m doing the same test, but I did one code optimization to remove a new/delete that was happening for each pixel &#8211; by reusing the coordinates object.</p>
<table border="1">
<tbody>
<tr>
<th>g++ flags</th>
<th>ms</th>
</tr>
<tr>
<td>(none)</td>
<td>293</td>
</tr>
<tr>
<td>-g</td>
<td>290</td>
</tr>
<tr>
<td>-O3</td>
<td>153</td>
</tr>
<tr>
<td>-DTP_NO_THROW -fno-exceptions</td>
<td>304</td>
</tr>
<tr>
<td>-g -DTP_NO_THROW -fno-exceptions</td>
<td>303</td>
</tr>
<tr>
<td>-O3 -DTP_NO_THROW -fno-exceptions</td>
<td>112</td>
</tr>
</tbody>
</table>
<p>I found it interesting that in the 2nd test case I did, removing exceptions actually increased the time it took to render the fractal!  Not quite sure why .. hmmm.  (I tried it a few times and kept getting similar results too.)</p>
<p>What is clear in the second test is that the compiler is able to optimize the code much more aggressively.  I guess Exceptions choke up the optimizer.  In all cases it seems that adding on the -g flag seems to make the code run slightly faster, surprisingly enough!  (-g adds in debugger info.)  In all cases, the optimizer was able to roughly double the speed of the program, and when I disable exceptions it is able to throw in even more speed.</p>
<p>-Phil</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<div class="d">
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.philhassey.com/blog/2010/01/06/exceptions-and-various-compilation-option-speeds/&amp;title=Exceptions+and+various+compilation+option+speeds" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.philhassey.com/blog/2010/01/06/exceptions-and-various-compilation-option-speeds/&amp;title=Exceptions+and+various+compilation+option+speeds" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.philhassey.com/blog/2010/01/06/exceptions-and-various-compilation-option-speeds/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.philhassey.com/blog/2010/01/06/exceptions-and-various-compilation-option-speeds/&amp;title=Exceptions+and+various+compilation+option+speeds" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.philhassey.com/blog/2010/01/06/exceptions-and-various-compilation-option-speeds/&amp;title=Exceptions+and+various+compilation+option+speeds" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http://www.philhassey.com/blog/2010/01/06/exceptions-and-various-compilation-option-speeds/&amp;title=Exceptions+and+various+compilation+option+speeds" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.philhassey.com/blog/2010/01/06/exceptions-and-various-compilation-option-speeds/&amp;title=Exceptions+and+various+compilation+option+speeds" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.philhassey.com/blog/2010/01/06/exceptions-and-various-compilation-option-speeds/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Exceptions+and+various+compilation+option+speeds+@+http://www.philhassey.com/blog/2010/01/06/exceptions-and-various-compilation-option-speeds/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.philhassey.com/blog/2010/01/06/exceptions-and-various-compilation-option-speeds/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Seahorse Adventures &#8211; Loading TGAs (and more)</title>
		<link>http://www.philhassey.com/blog/2010/01/05/seahorse-adventures-loading-tgas-and-more/</link>
		<comments>http://www.philhassey.com/blog/2010/01/05/seahorse-adventures-loading-tgas-and-more/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 06:11:11 +0000</pubDate>
		<dc:creator>philhassey</dc:creator>
				<category><![CDATA[bugs]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[gamedev]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[pygame]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[tinypy]]></category>

		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=255</guid>
		<description><![CDATA[Here&#8217;s a screenshot.  This is my Ubuntu desktop of my work on a new iPhone game.  Take a look at it nice and big.  Below I&#8217;ll explain all of what is going on &#8230; In short, I&#8217;m working on porting my pyweek#3 team entry to the iPhone.  Here&#8217;s the details: Top left, you see Kate, [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a screenshot.  This is my Ubuntu desktop of my work on a new iPhone game.  Take a look at it nice and big.  Below I&#8217;ll explain all of what is going on &#8230;</p>
<p style="text-align: center;"><a href="http://www.philhassey.com/blog/wp-content/uploads/2010/01/bsa_dev1.png"><img class="size-medium wp-image-256 aligncenter" title="bsa_dev1" src="http://www.philhassey.com/blog/wp-content/uploads/2010/01/bsa_dev1-300x187.png" alt="bsa_dev1" width="300" height="187" /></a></p>
<p style="text-align: left;">In short, I&#8217;m working on porting my pyweek#3 team entry to the iPhone.  Here&#8217;s the details:</p>
<ul>
<li>Top left, you see Kate, my text editor.  You&#8217;ll notice I&#8217;ve got -what appears- to be python.  But that&#8217;s actually tinypyC++ code!  My converter still has some rough edges, but it&#8217;s starting to get pretty good.  If you weren&#8217;t looking to closely you might mistake that for ordinary python code!  (In fact, it should be 100% python parser friendly.)  You can see how I have to use a touch of annotation to make it all go.  But for the most part, the types get inferred.  (The C++ outputted is about 2x as long, so I&#8217;m saving a ton of keystrokes!)</li>
<li>Top right, you see the level being painted.  It isn&#8217;t all working yet, but those are the basic tiles.  Interesting bit about loading the level, when I created this game I used my own level editor and library I made with pygame.  To save on disk and time I save all the levels to .tga files.  Since I&#8217;m targeting the iPhone I need an easy way to read the data from .tga files.  I don&#8217;t have SDL_image available, so a friend pointed me towards <a href="http://www.nothings.org/">this great site</a>.  It appears to have some awesome bits of code, including very simple and easy to use image loader that can load tga/png/jpg/etc.  I think it has the most painless interface I&#8217;ve ever seen for a C-based image-loader.</li>
<li>Bottom right you can see me working on tinypyC++.  As I&#8217;m working on BSA, I&#8217;m always finding new bugs in it.  Lately most of the bugs have been of the &#8220;add more graceful error handling&#8221; nature.  tinypy will point out what line (and character) an error happened on, but with a bit of extra work I&#8217;m able to add in some coherent error messages to tell the user what is going on.  In this case it was to inform the user of an undefined module name.</li>
<li>Bottom left you can see the startup of the game.  I&#8217;m using <a href="http://www.ambiera.com/irrklang/">irrKlang for all my  game audio</a> now.  It is not open source, but it&#8217;s &#8220;free&#8221; to use for free games, and the price is quite reasonable for commercial projects.  irrKlang is not portable to the iPhone yet, so I have to have a separate driver for my iPhone audio.</li>
</ul>
<p>And that&#8217;s it for today&#8217;s report!</p>
<p>-Phil</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<div class="d">
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.philhassey.com/blog/2010/01/05/seahorse-adventures-loading-tgas-and-more/&amp;title=Seahorse+Adventures+%26%238211%3B+Loading+TGAs+%28and+more%29" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.philhassey.com/blog/2010/01/05/seahorse-adventures-loading-tgas-and-more/&amp;title=Seahorse+Adventures+%26%238211%3B+Loading+TGAs+%28and+more%29" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.philhassey.com/blog/2010/01/05/seahorse-adventures-loading-tgas-and-more/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.philhassey.com/blog/2010/01/05/seahorse-adventures-loading-tgas-and-more/&amp;title=Seahorse+Adventures+%26%238211%3B+Loading+TGAs+%28and+more%29" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.philhassey.com/blog/2010/01/05/seahorse-adventures-loading-tgas-and-more/&amp;title=Seahorse+Adventures+%26%238211%3B+Loading+TGAs+%28and+more%29" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http://www.philhassey.com/blog/2010/01/05/seahorse-adventures-loading-tgas-and-more/&amp;title=Seahorse+Adventures+%26%238211%3B+Loading+TGAs+%28and+more%29" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.philhassey.com/blog/2010/01/05/seahorse-adventures-loading-tgas-and-more/&amp;title=Seahorse+Adventures+%26%238211%3B+Loading+TGAs+%28and+more%29" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.philhassey.com/blog/2010/01/05/seahorse-adventures-loading-tgas-and-more/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Seahorse+Adventures+%26%238211%3B+Loading+TGAs+%28and+more%29+@+http://www.philhassey.com/blog/2010/01/05/seahorse-adventures-loading-tgas-and-more/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.philhassey.com/blog/2010/01/05/seahorse-adventures-loading-tgas-and-more/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Elephants!  First python + pygame game submitted to App Store :)</title>
		<link>http://www.philhassey.com/blog/2009/12/19/elephants-first-python-pygame-game-submitted-to-app-store/</link>
		<comments>http://www.philhassey.com/blog/2009/12/19/elephants-first-python-pygame-game-submitted-to-app-store/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 23:12:08 +0000</pubDate>
		<dc:creator>philhassey</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[crazy]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=237</guid>
		<description><![CDATA[So, I managed to submit a &#8220;python&#8221; app to the App Store &#8212; &#8220;Elephants!&#8221; Here&#8217;s a few crazy things I had to work out to get things going: I found that ObjC doesn&#8217;t care much for C++ objects that do their own reference counting.  To have a &#8220;Game&#8221; object at all, I had to use [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" src="http://www.galcon.com/games/elephant/imgs/160-icon.png" alt="" width="160" height="160" />So, I managed to submit a &#8220;python&#8221; app to the App Store &#8212; &#8220;Elephants!&#8221; Here&#8217;s a few crazy things I had to work out to get things going:</p>
<ul>
<li>I found that ObjC doesn&#8217;t care much for C++ objects that do their own reference counting.  To have a &#8220;Game&#8221; object at all, I had to use a pointer to my object instead of using my reference counting object.  It seems that during some of the &#8220;magic&#8221; of ObjC it copies objects without calling any of the C++ copying methods, so reference counting gets killed.</li>
<li>I ported a basic subset of pygame to tinypyC++ and made it work under openGL.  I don&#8217;t have this available in my tinypyC++ repository because it takes a good deal of prep-work to use (isn&#8217;t out-of-the-box) so it wouldn&#8217;t be generally useful to anyone yet.</li>
<li>I was able to get pause on call / resume working by saving the game state to a text file.  Since tab-separated files are so easy to create and parse in python this seemed to be the easiest route to getting the project done.</li>
<li>I learned a ton about C++ templates.  I still haven&#8217;t even touched the tip of the iceberg, and I&#8217;m not sure I want to, but at least I&#8217;m getting the basics down and that seems to be enough for me to stumble through this project with.</li>
</ul>
<p>You can check out my current progress at svn://www.imitationpickles.org/tinypy/branches/tinypy2 (in the tinypy/example folder you can check out a julia fractal demo.  It also includes a mini pygame module that depends on SDL not OpenGL, so it actually works out-of-the-box.)</p>
<p>Here are some things I&#8217;ve been adding this week in preparation for my next project:</p>
<ul>
<li>I&#8217;ve added &#8220;weak pointers&#8221; .. Since reference counting has the problem of cyclic references never getting collected, I had to do this for some use-cases.  In tinypyC++ weak pointers are just normal pointers, and if the object is collected, the pointer will be invalid, so be careful.  They are created by doing stuff like &#8220;x = ptr(GameData())&#8221;</li>
<li>I&#8217;ve added more C style types.  I&#8217;ve got uint16, cstr, Array, etc.  This all makes it possible for me to have a different kind of object &#8211; a struct in tinypyC++.  The struct is meant to be a C oriented type that can be saved directly to disk.  In Elephants I serialized via saving CSV data.  In the future, if I keep all the game state in C struct type data, I can just use a single simple line like &#8220;open(&#8216;data.txt&#8217;,'wb&#8217;).write(struct_dump(game_data)&#8221;</li>
<li>I found that STL extensions include a &#8220;hash_map&#8221; which turns out to be about 2x as fast as the normal &#8220;map&#8221;.  I&#8217;m using that now.</li>
</ul>
<p>I&#8217;m not entirely sure how useful this project is going to be for anyone else, or even for me for that matter.  But I think after my next game project I&#8217;ll have a much better feel for what the situation is.  TinypyC++ has some real tradeoffs in terms of being a bit of a hybrid of C++ and of python.  It doesn&#8217;t offer the full power of either language.  But I&#8217;m doing my best to capture a middle ground between them that will make my life easier.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<div class="d">
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.philhassey.com/blog/2009/12/19/elephants-first-python-pygame-game-submitted-to-app-store/&amp;title=Elephants%21++First+python+%2B+pygame+game+submitted+to+App+Store+%3A%29" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.philhassey.com/blog/2009/12/19/elephants-first-python-pygame-game-submitted-to-app-store/&amp;title=Elephants%21++First+python+%2B+pygame+game+submitted+to+App+Store+%3A%29" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.philhassey.com/blog/2009/12/19/elephants-first-python-pygame-game-submitted-to-app-store/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.philhassey.com/blog/2009/12/19/elephants-first-python-pygame-game-submitted-to-app-store/&amp;title=Elephants%21++First+python+%2B+pygame+game+submitted+to+App+Store+%3A%29" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.philhassey.com/blog/2009/12/19/elephants-first-python-pygame-game-submitted-to-app-store/&amp;title=Elephants%21++First+python+%2B+pygame+game+submitted+to+App+Store+%3A%29" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http://www.philhassey.com/blog/2009/12/19/elephants-first-python-pygame-game-submitted-to-app-store/&amp;title=Elephants%21++First+python+%2B+pygame+game+submitted+to+App+Store+%3A%29" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.philhassey.com/blog/2009/12/19/elephants-first-python-pygame-game-submitted-to-app-store/&amp;title=Elephants%21++First+python+%2B+pygame+game+submitted+to+App+Store+%3A%29" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.philhassey.com/blog/2009/12/19/elephants-first-python-pygame-game-submitted-to-app-store/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Elephants%21++First+python+%2B+pygame+game+submitted+to+App+Store+%3A%29+@+http://www.philhassey.com/blog/2009/12/19/elephants-first-python-pygame-game-submitted-to-app-store/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.philhassey.com/blog/2009/12/19/elephants-first-python-pygame-game-submitted-to-app-store/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Restricted tinypy to C++ compiler</title>
		<link>http://www.philhassey.com/blog/2009/12/01/restricted-tinypy-to-c-compiler/</link>
		<comments>http://www.philhassey.com/blog/2009/12/01/restricted-tinypy-to-c-compiler/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 22:18:38 +0000</pubDate>
		<dc:creator>philhassey</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[pygame]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[tinypy]]></category>

		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=233</guid>
		<description><![CDATA[I&#8217;ve spent the last week working on a tinypy to C++ converter.  It works!  See the screenshot to the right &#8211; I&#8217;ve managed to port a pygame game over to C++. Here&#8217;s how (and some of the catches): I require type annotation of all the functions and methods.  &#8221;def test(x:str)-&#62;str: return x&#8221; I do two [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-234" title="elephant1" src="http://www.philhassey.com/blog/wp-content/uploads/2009/12/elephant1-288x300.png" alt="elephant1" width="288" height="300" />I&#8217;ve spent the last week working on a tinypy to C++ converter.  It works!  See the screenshot to the right &#8211; I&#8217;ve managed to port a pygame game over to C++.</p>
<p>Here&#8217;s how (and some of the catches):</p>
<ul>
<li>I require type annotation of all the functions and methods.  &#8221;def test(x:str)-&gt;str: return x&#8221;</li>
<li>I do two passes on each file, the first pass to catch all the function types and class members, and the second pass to generate the code.</li>
<li>I generate C++ code that has automagic reference counting.  So you have to code your script so it won&#8217;t have any cyclic references if you want garbage collected for you.</li>
</ul>
<p>How is this different from shedskin (really cool project!)?</p>
<ul>
<li>Built-in reference counting, instead of using libgc.</li>
<li>I require the user to type annotate everything.</li>
<li>It only supports a subset of the tinypy subset of python.  Shedskin supports a much larger subset of python.</li>
</ul>
<p>So what&#8217;s the point?</p>
<ul>
<li>Well, I learned a lot about STL and C++.</li>
<li>I know it will produce iPhone friendly code, I&#8217;m pretty sure libgc isn&#8217;t iPhone friendly?  (At least, I haven&#8217;t found anything via a few searches&#8230;)</li>
<li>Way less magic.  Since everything is annotated, there are no surprises.</li>
<li>Implementing C++ modules is pretty easy &#8211; the code can be inlined within the python code and it just works.</li>
<li>This will make it easier for me to develop C++ games.</li>
</ul>
<p>Anyway, if you&#8217;re super brave, you can check out svn://www.imitationpickles.org/tinypy/branches/tinypy2 .. I don&#8217;t have the elephants example in there, but the pygame.py that I include gives you a pretty good example of a complex module.</p>
<p>I&#8217;m going to chat with the tinypy folks to see if we&#8217;ll merge this into the tinypy trunk or have it as a separate project.  I&#8217;m not quite sure what makes sense to everyone else <img src='http://www.philhassey.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   The nice bit about merging this in is that I could unify the test suites nicely.  And tinypy would still function as normal, just better tested, and with function annotation parsing supported.  All that said, I should make a tinypy module for tinypyC++ so that I can do some code evals!</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<div class="d">
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.philhassey.com/blog/2009/12/01/restricted-tinypy-to-c-compiler/&amp;title=Restricted+tinypy+to+C%2B%2B+compiler" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.philhassey.com/blog/2009/12/01/restricted-tinypy-to-c-compiler/&amp;title=Restricted+tinypy+to+C%2B%2B+compiler" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.philhassey.com/blog/2009/12/01/restricted-tinypy-to-c-compiler/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.philhassey.com/blog/2009/12/01/restricted-tinypy-to-c-compiler/&amp;title=Restricted+tinypy+to+C%2B%2B+compiler" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.philhassey.com/blog/2009/12/01/restricted-tinypy-to-c-compiler/&amp;title=Restricted+tinypy+to+C%2B%2B+compiler" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http://www.philhassey.com/blog/2009/12/01/restricted-tinypy-to-c-compiler/&amp;title=Restricted+tinypy+to+C%2B%2B+compiler" rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.philhassey.com/blog/2009/12/01/restricted-tinypy-to-c-compiler/&amp;title=Restricted+tinypy+to+C%2B%2B+compiler" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.philhassey.com/blog/2009/12/01/restricted-tinypy-to-c-compiler/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Restricted+tinypy+to+C%2B%2B+compiler+@+http://www.philhassey.com/blog/2009/12/01/restricted-tinypy-to-c-compiler/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.philhassey.com/blog/2009/12/01/restricted-tinypy-to-c-compiler/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Galcon Flash has arrived ..</title>
		<link>http://www.philhassey.com/blog/2009/06/23/galcon-flash-has-arrived/</link>
		<comments>http://www.philhassey.com/blog/2009/06/23/galcon-flash-has-arrived/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 21:39:05 +0000</pubDate>
		<dc:creator>philhassey</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[galcon]]></category>
		<category><![CDATA[gamedev]]></category>
		<category><![CDATA[languages]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.philhassey.com/blog/?p=217</guid>
		<description><![CDATA[So .. Yeah.  Check it out.  Realtime multi-player game .. in flash! So on a more technical note .. The game involves quite a number of technologies! AS3 &#8211; of course &#8211; for the Flash client itself C++ &#8211; for the server PHP &#8211; for the web API and rankings system python &#8211; for the [...]]]></description>
			<content:encoded><![CDATA[<p>So .. Yeah.  <a href="http://www.galcon.com/flash/">Check it out</a>.  Realtime multi-player game .. in flash!</p>
<p><a href="http://www.philhassey.com/blog/wp-content/uploads/2009/06/prepreload.jpg"><img class="alignnone size-medium wp-image-218" title="prepreload" src="http://www.philhassey.com/blog/wp-content/uploads/2009/06/prepreload-300x216.jpg" alt="" width="300" height="216" /></a></p>
<p>So on a more technical note .. The game involves quite a number of technologies!</p>
<ul>
<li>AS3 &#8211; of course &#8211; for the Flash client itself</li>
<li>C++ &#8211; for the server</li>
<li>PHP &#8211; for the web API and rankings system</li>
<li>python &#8211; for the bots</li>
</ul>
<p>If I did the project over, I&#8217;d probably do the server in python as well.  But all in all the project went pretty well.  After things were done, it only took me a morning to write up the python client.  There&#8217;s a very good chance I&#8217;ll release that code in a few weeks and let people try making bots for the game.</p>
<p>Anyway &#8211; have fun checking it out.  I&#8217;m a bit wiped out from wrapping all this up, so I&#8217;ll try and post some more interesting details later!</p>
<p>-Phil</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<div class="d">
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://www.philhassey.com/blog/2009/06/23/galcon-flash-has-arrived/&amp;title=Galcon+Flash+has+arrived+.." rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://www.philhassey.com/blog/2009/06/23/galcon-flash-has-arrived/&amp;title=Galcon+Flash+has+arrived+.." rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http://www.philhassey.com/blog/2009/06/23/galcon-flash-has-arrived/" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://www.philhassey.com/blog/2009/06/23/galcon-flash-has-arrived/&amp;title=Galcon+Flash+has+arrived+.." rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://www.philhassey.com/blog/2009/06/23/galcon-flash-has-arrived/&amp;title=Galcon+Flash+has+arrived+.." rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?url=http://www.philhassey.com/blog/2009/06/23/galcon-flash-has-arrived/&amp;title=Galcon+Flash+has+arrived+.." rel="nofollow" title="Add to&nbsp;Slashdot"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/slashdot.png" title="Add to&nbsp;Slashdot" alt="Add to&nbsp;Slashdot" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit.php?url=http://www.philhassey.com/blog/2009/06/23/galcon-flash-has-arrived/&amp;title=Galcon+Flash+has+arrived+.." rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://www.philhassey.com/blog/2009/06/23/galcon-flash-has-arrived/" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Galcon+Flash+has+arrived+..+@+http://www.philhassey.com/blog/2009/06/23/galcon-flash-has-arrived/" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.philhassey.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.philhassey.com/blog/2009/06/23/galcon-flash-has-arrived/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

