<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Create-ivity</title>
	<atom:link href="http://createivity.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://createivity.wordpress.com</link>
	<description>A game-developer&#039;s blog</description>
	<lastBuildDate>Mon, 23 May 2011 20:17:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='createivity.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Create-ivity</title>
		<link>http://createivity.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://createivity.wordpress.com/osd.xml" title="Create-ivity" />
	<atom:link rel='hub' href='http://createivity.wordpress.com/?pushpress=hub'/>
		<item>
		<title>haXe preloader</title>
		<link>http://createivity.wordpress.com/2010/01/15/haxe-preloader/</link>
		<comments>http://createivity.wordpress.com/2010/01/15/haxe-preloader/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 23:20:21 +0000</pubDate>
		<dc:creator>Pieter Witvoet</dc:creator>
				<category><![CDATA[Flash games]]></category>
		<category><![CDATA[Game development]]></category>
		<category><![CDATA[HaXe]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[preloader]]></category>
		<category><![CDATA[swfmill]]></category>

		<guid isPermaLink="false">http://createivity.wordpress.com/?p=144</guid>
		<description><![CDATA[2 years ago I tried to create a preloader in haXe, but whatever I tried, nothing worked. Today, I had to create a preloader for a project at work. Needless to say, I wasn&#8217;t too happy, with that first experience in mind. I did some Googling and found various forum and blog posts, but whatever [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=createivity.wordpress.com&amp;blog=206960&amp;post=144&amp;subd=createivity&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>2 years ago I tried to create a preloader in haXe, but whatever I tried, nothing worked. Today, I had to create a preloader for a project at work. Needless to say, I wasn&#8217;t too happy, with that first experience in mind.</p>
<p>I did some Googling and found various forum and blog posts, but whatever I tried, nothing seemed to work. <a href="http://www.mindless-labs.com/blog/archive/2009/01/09/True_one-file_Haxe_preloader_u">Mindless Labs</a> suggested using mxmlc to embed the game .swf into an Actionscript preloader, but mxmlc couldn&#8217;t digest our game .swf. <a href="http://gamehaxe.com/2009/02/04/haxe-preloader-for-flash-written-in-haxe/">Game Haxe</a> had another approach, but apparently that one broke when haXe 2.03 got released. Using the MochiAd preloader didn&#8217;t work out of the box either, because that one would only be run after the whole .swf was loaded. So I was thinking towards creating a separate preloader .swf that would load the main game .swf &#8211; it&#8217;s a messy, multi-file solution, but at least it&#8217;s a solution.</p>
<p>However, I talked about it to a coworker, asking how this would be done in ActionScript. The standard approach is to move all assets to a later frame, and to put some preloader code and assets in the first frame. I decided to give it a try &#8211; mind you, the same thing had failed me 2 years ago &#8211; and suprizingly, it worked! Back then, the assets had been inaccessible, but some haXe and swfmill versions later it works like a charm.</p>
<p>Here&#8217;s how my swfmill .xml file looks like now:</p>
<p><pre class="brush: xml;">&lt;?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot; ?&gt;
&lt;movie version=&quot;9&quot; width=&quot;600&quot; height=&quot;400&quot; framerate=&quot;30&quot;&gt;
    &lt;background color=&quot;#FFFFFF&quot;/&gt;
    &lt;frame /&gt; &lt;!-- add one empty frame --&gt;
    &lt;frame&gt;
        &lt;library&gt;
            &lt;clip id='image' import='images/image.png' /&gt;
            &lt;font name='font' import='fonts/font.ttf' /&gt;
        &lt;/library&gt;
    &lt;/frame&gt;
&lt;/movie&gt;</pre></p>
<p>Line 4 is important: it adds an empty frame, into which the haXe code is compiled. The second frame contains all the heavy-duty assets, which will be available once the whole .swf has been downloaded.</p>
<p>My main function now looks like this:<br />
<pre class="brush: as3; wrap-lines: false;">package ;
import flash.events.Event;
import flash.Lib;
import haxe.Log;
import game.Game;

class Main
{
    static function main()
    {
        Log.trace(&quot;Starting preloader&quot;);
        Lib.current.root.addEventListener(Event.ENTER_FRAME, onEnterFrame);
    }
    
    static function onEnterFrame(event : Event)
    {
        Log.trace(&quot;Downloaded &quot; + Lib.current.root.loaderInfo.bytesLoaded + &quot; of &quot; + Lib.current.root.loaderInfo.bytesTotal + &quot; bytes&quot;);
        
        if (Lib.current.root.loaderInfo.bytesLoaded &gt;= Lib.current.root.loaderInfo.bytesTotal)
        {
            Lib.current.root.removeEventListener(Event.ENTER_FRAME, onEnterFrame);
            Log.trace(&quot;Preloading finished&quot;);
            
            // The Game class adds images to the screen, sets up listeners, etc.
            var gameInstance : Game = new Game();
        }
    }
}</pre><br />
Normally, I would&#8217;ve created a Game instance immediately within the main function, but the assets only become available once the whole .swf is loaded, so it&#8217;s a smart idea to wait until the number of bytes loaded matches the total number of bytes. ;)</p>
<p>I hope this post is useful to those who are looking for a haXe preloader. :)</p>
<div id="_mcePaste" style="overflow:hidden;position:absolute;left:-10000px;top:0;width:1px;height:1px;">&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;iso-8859-1&#8243; ?&gt;<br />
&lt;movie version=&#8221;9&#8243; width=&#8221;600&#8243; height=&#8221;400&#8243; framerate=&#8221;30&#8243;&gt;<br />
&lt;background color=&#8221;#FFFFFF&#8221;/&gt;<br />
&lt;frame /&gt; &lt;!&#8211; add one empty frame &#8211;&gt;<br />
&lt;frame&gt;<br />
&lt;library&gt;<br />
&lt;clip id=&#8217;image&#8217; import=&#8217;images/image.png&#8217; /&gt;<br />
&lt;font name=&#8217;font&#8217; import=&#8217;fonts/font.ttf&#8217; /&gt;<br />
&lt;/library&gt;<br />
&lt;/frame&gt;<br />
&lt;/movie&gt;</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/createivity.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/createivity.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/createivity.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/createivity.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/createivity.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/createivity.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/createivity.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/createivity.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/createivity.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/createivity.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/createivity.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/createivity.wordpress.com/144/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/createivity.wordpress.com/144/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/createivity.wordpress.com/144/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=createivity.wordpress.com&amp;blog=206960&amp;post=144&amp;subd=createivity&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://createivity.wordpress.com/2010/01/15/haxe-preloader/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/933022d04c0bafa19b8bb86a8f52fcc8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Captain P</media:title>
		</media:content>
	</item>
		<item>
		<title>MochiAds in haXe</title>
		<link>http://createivity.wordpress.com/2010/01/12/mochiads-in-haxe/</link>
		<comments>http://createivity.wordpress.com/2010/01/12/mochiads-in-haxe/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 19:34:46 +0000</pubDate>
		<dc:creator>Pieter Witvoet</dc:creator>
				<category><![CDATA[Flash games]]></category>
		<category><![CDATA[Game development]]></category>
		<category><![CDATA[HaXe]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[mochiads]]></category>
		<category><![CDATA[swfmill]]></category>

		<guid isPermaLink="false">http://createivity.wordpress.com/?p=137</guid>
		<description><![CDATA[I&#8217;ve been using haXe at work for a current project, and while things have been working pretty well so far, one thing proved to be a little more troublesome than we expected. We tried integrating MochiAds highscore API  into the game, following hesselboom&#8217;s guide, but whatever we did, all we got was a broken game. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=createivity.wordpress.com&amp;blog=206960&amp;post=137&amp;subd=createivity&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using haXe at work for a current project, and while things have been working pretty well so far, one thing proved to be a little more troublesome than we expected. We tried integrating MochiAds highscore API  into the game, following <a title="hesselboom's guide" href="http://hesselboom.com/mochi/">hesselboom&#8217;s guide</a>, but whatever we did, all we got was a broken game. No MochiAd pre-game ad, nothing, just a white screen. That&#8217;s not a good thing, considering that integrating it into an Actionscript project is supposedly a 5-minute job.</p>
<p>To give a little more insight, all game assets are packed into a .swf file using swfmill. The process is automated with a Python script, so all images, sounds and fonts are lumped together into archive.swf. When compiling the haXe code, this .swf file is passed along, so the code gets compiled into the .swf, to produce the final game .swf. Hesselboom&#8217;s guide suggested embedding the mochi library and the assets .swfs into one archive .swf. We first tried to just embed the mochi library .swf into our archive .swf, but that didn&#8217;t work. We then tried embedding both into a new .swf, but that didn&#8217;t work either.</p>
<p>My coworker did get MochiAds working in a new project though, just not in the actual game. So I started analyzing the swfmill output and I noticed something interesting. The fonts were giving trouble. Apparently swfmill can&#8217;t handle the case where an embedded .swf file contains already embedded fonts. However, embedding the fonts into the final .swf didn&#8217;t solve the problem&#8230;</p>
<p><strong>In the end, I tried something silly: changing the embedding order of the library and the assets .swf. Guess what? It worked!</strong></p>
<p>So just in case you&#8217;re working with haXe and integrating MochiAds fails &#8211; swapping two lines in your swfmill xml file might just do the trick. :)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/createivity.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/createivity.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/createivity.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/createivity.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/createivity.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/createivity.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/createivity.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/createivity.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/createivity.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/createivity.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/createivity.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/createivity.wordpress.com/137/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/createivity.wordpress.com/137/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/createivity.wordpress.com/137/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=createivity.wordpress.com&amp;blog=206960&amp;post=137&amp;subd=createivity&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://createivity.wordpress.com/2010/01/12/mochiads-in-haxe/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/933022d04c0bafa19b8bb86a8f52fcc8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Captain P</media:title>
		</media:content>
	</item>
		<item>
		<title>Fixed download links</title>
		<link>http://createivity.wordpress.com/2009/09/17/fixed-download-links/</link>
		<comments>http://createivity.wordpress.com/2009/09/17/fixed-download-links/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 22:49:37 +0000</pubDate>
		<dc:creator>Pieter Witvoet</dc:creator>
				<category><![CDATA[Other]]></category>

		<guid isPermaLink="false">http://createivity.wordpress.com/?p=132</guid>
		<description><![CDATA[Just a quick update: I fixed the download links for AI Wars and dm_mudanchee &#8211; due to a change in webhosts they went dead for a while. Enjoy! :)<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=createivity.wordpress.com&amp;blog=206960&amp;post=132&amp;subd=createivity&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just a quick update: I fixed the download links for <a href="http://createivity.wordpress.com/2008/03/01/ai-wars-released/">AI Wars</a> and <a href="http://createivity.wordpress.com/2008/05/10/a-little-bit-of-level-design-in-between/">dm_mudanchee</a> &#8211; due to a change in webhosts they went dead for a while.</p>
<p>Enjoy! :)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/createivity.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/createivity.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/createivity.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/createivity.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/createivity.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/createivity.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/createivity.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/createivity.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/createivity.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/createivity.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/createivity.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/createivity.wordpress.com/132/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/createivity.wordpress.com/132/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/createivity.wordpress.com/132/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=createivity.wordpress.com&amp;blog=206960&amp;post=132&amp;subd=createivity&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://createivity.wordpress.com/2009/09/17/fixed-download-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/933022d04c0bafa19b8bb86a8f52fcc8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Captain P</media:title>
		</media:content>
	</item>
		<item>
		<title>Free-form level editor</title>
		<link>http://createivity.wordpress.com/2009/09/03/free-form-level-editor/</link>
		<comments>http://createivity.wordpress.com/2009/09/03/free-form-level-editor/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 19:33:35 +0000</pubDate>
		<dc:creator>Pieter Witvoet</dc:creator>
				<category><![CDATA[Game development]]></category>
		<category><![CDATA[Level-design]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://createivity.wordpress.com/?p=120</guid>
		<description><![CDATA[The last week or two I&#8217;ve been working on a 2D level editor. I can drag and drop images onto it to create free-form levels (beware, placeholder art): It&#8217;s meant for a platformer game, but it&#8217;s fairly easy to use the output for a different kind of game. Like, say, a strategy game, or just [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=createivity.wordpress.com&amp;blog=206960&amp;post=120&amp;subd=createivity&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The last week or two I&#8217;ve been working on a 2D level editor. I can drag and drop images onto it to create free-form levels (beware, placeholder art):</p>
<p><img class="alignnone size-full wp-image-127" title="19_papernode_editor" src="http://createivity.files.wordpress.com/2009/09/19_papernode_editor1.png?w=550&#038;h=450" alt="19_papernode_editor" width="550" height="450" /></p>
<p>It&#8217;s meant for a platformer game, but it&#8217;s fairly easy to use the output for a different kind of game. Like, say, a strategy game, or just as a title screen layout file.</p>
<p>On the right side, there&#8217;s the bare-bone UI: the layer selection and visibility toggle buttons, the delete-this-layer button, and of course a button for adding layers. The red lines are collision lines &#8211; I&#8217;ve experimented with that a while ago and it turned out to work pretty well, so I&#8217;m migrating parts of my collision-line editor/test program to this new editor. On the right side, you can(&#8216;t) see a hidden layer. The blue lines are the grid &#8211; which can be toggled and it&#8217;s granularity can be fine-tuned. It&#8217;s not used for snapping yet, so it&#8217;s mostly there to give me some sense of place and size.</p>
<p>I&#8217;m still working on various features, but it&#8217;s already a useful tool. I wrote it in Python, using Pygame (for the rendering and input handling), pgu (for the buttons) and pywin32 (for the drag and drop support). It has taken me 4 or 5 days so far, a couple of hours each day. :)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/createivity.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/createivity.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/createivity.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/createivity.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/createivity.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/createivity.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/createivity.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/createivity.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/createivity.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/createivity.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/createivity.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/createivity.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/createivity.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/createivity.wordpress.com/120/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=createivity.wordpress.com&amp;blog=206960&amp;post=120&amp;subd=createivity&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://createivity.wordpress.com/2009/09/03/free-form-level-editor/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/933022d04c0bafa19b8bb86a8f52fcc8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Captain P</media:title>
		</media:content>

		<media:content url="http://createivity.files.wordpress.com/2009/09/19_papernode_editor1.png" medium="image">
			<media:title type="html">19_papernode_editor</media:title>
		</media:content>
	</item>
		<item>
		<title>Programming in Python is fun!</title>
		<link>http://createivity.wordpress.com/2008/10/10/programming-in-python-is-fun/</link>
		<comments>http://createivity.wordpress.com/2008/10/10/programming-in-python-is-fun/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 17:04:56 +0000</pubDate>
		<dc:creator>Pieter Witvoet</dc:creator>
				<category><![CDATA[Game development]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://createivity.wordpress.com/?p=100</guid>
		<description><![CDATA[The last few months I&#8217;ve been doing more and more with Python. While the games I work on are mostly written in C++, there&#8217;s still a lot of room for me to use Python. For example, when dealing with file conversions, data checking, automating processes, and so on. Two weeks ago, I wrote a tool [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=createivity.wordpress.com&amp;blog=206960&amp;post=100&amp;subd=createivity&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The last few months I&#8217;ve been doing more and more with Python. While the games I work on are mostly written in C++, there&#8217;s still a lot of room for me to use Python. For example, when dealing with file conversions, data checking, automating processes, and so on.</p>
<p>Two weeks ago, I wrote a tool that packs smaller images into larger ones. I first prototyped the packing algorithm in Python and then translated it to C#, which I used for the tool itself.</p>
<p>Last week, within a few days, I was able to process, verify and preview almost 2000 files for one of our games, converting them from XML into a tight binary format, all packed into custom archive files to keep things easy for the file-system. I spent most of my time thinking about the file formats and the required checks. Writing the tools took little time.<span id="more-100"></span></p>
<p>Just today I set up a few automation scripts for one of our artists. I introduced him to SVN, but, considering he&#8217;s an artist, I decided to make things as easy as possible. I wrote a few batch files that took care of updating and committing the files he needs to work with, and another batch file for converting the art. That batch file calls a Python script that generates some information based on the new art, and another script that checks for new files, which are automatically added to SVN. All he has to do now is make art, click a few batch files and press a few Ok buttons.</p>
<p>I&#8217;ve also been using Python to prototype a collision system for a spare-time project and to solve some logic problems, as I recently discovered a site called <a href="http://projecteuler.net/">Project Euler.net</a>. Quite fun! Someone also pointed me at the <a href="http://code.google.com/codejam/contest">Google Code Jam</a>, that also contains some interesting problems. How about path-finding with portals?</p>
<p>In other words, I&#8217;ve come to like Python more and more. It&#8217;s still just one of several languages that I use and it&#8217;s not the best for every situation, but I do notice how much more productive I&#8217;ve become by embracing it. <img class="alignnone size-full wp-image-87" title="happy" src="http://createivity.files.wordpress.com/2008/03/happy.gif?w=550" alt=""   /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/createivity.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/createivity.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/createivity.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/createivity.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/createivity.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/createivity.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/createivity.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/createivity.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/createivity.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/createivity.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/createivity.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/createivity.wordpress.com/100/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/createivity.wordpress.com/100/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/createivity.wordpress.com/100/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=createivity.wordpress.com&amp;blog=206960&amp;post=100&amp;subd=createivity&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://createivity.wordpress.com/2008/10/10/programming-in-python-is-fun/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/933022d04c0bafa19b8bb86a8f52fcc8?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Captain P</media:title>
		</media:content>

		<media:content url="http://createivity.files.wordpress.com/2008/03/happy.gif" medium="image">
			<media:title type="html">happy</media:title>
		</media:content>
	</item>
	</channel>
</rss>
