<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>booyaa dot org</title>
	
	<link>http://booyaa.org</link>
	<description>a blog about booyaa, photography, gardening, running and technology</description>
	<pubDate>Wed, 08 Jul 2009 08:22:15 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<geo:lat>51.468</geo:lat><geo:long>-0.3292</geo:long><creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/2.0/</creativeCommons:license><image><link>http://www.feedburner.com</link><url>http://www.feedburner.com/fb/images/pub/fb_pwrd.gif</url><title>This Feed Powered by FeedBurner.com</title></image><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/booyaa" type="application/rss+xml" /><feedburner:emailServiceId>booyaa</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fbooyaa" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/booyaa" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fbooyaa" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:browserFriendly>This is an XML content feed. It is intended to be viewed in a newsreader or syndicated to another site.</feedburner:browserFriendly><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>diy booyaa dot org: week 1</title>
		<link>http://feedproxy.google.com/~r/booyaa/~3/DS4x4qafqXU/</link>
		<comments>http://booyaa.org/2009/05/17/diy-booyaa-dot-org-week-1/#comments</comments>
		<pubDate>Sun, 17 May 2009 20:39:18 +0000</pubDate>
		<dc:creator>booyaa</dc:creator>
		
		<category><![CDATA[default]]></category>

		<category><![CDATA[hardening]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://booyaa.org/?p=510</guid>
		<description>week 1 - 13/5-17/5 Do not fear my protectionist approach to copyright. 

earlier this week we bought a virtual private server (vps) with 34sp.com with the view of moving me and lou&amp;#8217;s domains to it (our friends have been kindly hosting both). i thought it would be a good idea to keep a log of [...]</description>
			<content:encoded><![CDATA[<p><strong>week 1 - 13/5-17/5</strong> Do not fear my protectionist approach to copyright. </p>
<p><a href="http://www.flickr.com/photos/booyaa/129506318/" title="rainbow of wheelbarrows by booyaa, on Flickr"><img src="http://farm1.static.flickr.com/50/129506318_fbc2e09c18.jpg" width="400" alt="rainbow of wheelbarrows" border="0" /></a></p>
<p>earlier this week we bought a virtual private server (vps) with 34sp.com with the view of moving me and lou&#8217;s domains to it (our friends have been kindly hosting both). i thought it would be a good idea to keep a log of how we did it. now, normally this would be a very boring log, but almost immediately after firing up the vps i was shocked by how quickly the hackers started calling around. so instead of this log being used to track software installs, it will have a security twist to it.</p>
<p>in an impossibly perfect world, you&#8217;d stick a static content webserver in the dmz i.e. no cgi and push updates from production to it. but this ain&#8217;t, and i need to keep all my eggs in the one basket! so i&#8217;m going to try my best to keep the script kiddies out and make it worthless for the more seasoned hackers to do any poking around. seriously dudes, there won&#8217;t be financial or customer data on this server, it&#8217;s just a blog site!</p>
<p>so far i&#8217;ve achieved the following:</p>
<ul>
<li>lock down ssh:
<ul>
<li>disable root login (requires a non-root account to be used instead)</li>
<li>disable password auth (pub key only)</li>
<li>enable denyhost (becareful not to lock yourself out!)</li>
<li>move off port 22 (security through obscurity, but will stop most script kiddies)</li>
</ul>
</li>
<li>lock down mysql:
<ul>
<li>listen only locally (don&#8217;t switch to local socket files because tunneling a mysql connection won&#8217;t work)</li>
</ul>
</li>
<li>security auditing:
<ul>
<li>run scripts against secure and lastb logs (looking for suspect logins)</li>
<li>run chkrootkit nightly (checking for rootkit, would&#8217;ve its support bins were in a read-only environment so my rootkit doesn&#8217;t get patched by an anti-rootkit-script)</li>
</ul>
</li>
</ul>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/booyaa?a=DS4x4qafqXU:qPg-gZP10pU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/booyaa?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=DS4x4qafqXU:qPg-gZP10pU:ANkz6nJbUoM"><img src="http://feeds.feedburner.com/~ff/booyaa?d=ANkz6nJbUoM" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=DS4x4qafqXU:qPg-gZP10pU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/booyaa?i=DS4x4qafqXU:qPg-gZP10pU:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=DS4x4qafqXU:qPg-gZP10pU:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/booyaa?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=DS4x4qafqXU:qPg-gZP10pU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/booyaa?i=DS4x4qafqXU:qPg-gZP10pU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=DS4x4qafqXU:qPg-gZP10pU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/booyaa?i=DS4x4qafqXU:qPg-gZP10pU:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/booyaa/~4/DS4x4qafqXU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://booyaa.org/2009/05/17/diy-booyaa-dot-org-week-1/feed/</wfw:commentRss>
		<feedburner:origLink>http://booyaa.org/2009/05/17/diy-booyaa-dot-org-week-1/</feedburner:origLink></item>
		<item>
		<title>allotment updatery: watcha growing in your propagator boo?</title>
		<link>http://feedproxy.google.com/~r/booyaa/~3/ijR24GoRU4w/</link>
		<comments>http://booyaa.org/2009/03/29/allotment-updatery-watcha-growing-in-your-propagator-boo/#comments</comments>
		<pubDate>Sun, 29 Mar 2009 17:40:58 +0000</pubDate>
		<dc:creator>booyaabooyaabooyaa</dc:creator>
		
		<category><![CDATA[default]]></category>

		<category><![CDATA[allotment]]></category>

		<category><![CDATA[carrots]]></category>

		<category><![CDATA[flowers]]></category>

		<category><![CDATA[growyourown]]></category>

		<category><![CDATA[peppers]]></category>

		<category><![CDATA[propagation]]></category>

		<category><![CDATA[tomatoes]]></category>

		<guid isPermaLink="false">http://booyaa.org/?p=507</guid>
		<description>today we started to sow our first veg seeds, this meant dusting off the heated propagator. unfortunately our new place doesn&amp;#8217;t have many places to start seeds off, in fact the only space we have is in front of the french doors. so provided we don&amp;#8217;t get too blotto&amp;#8217;d whilst dining al fresco (which won&amp;#8217;t [...]</description>
			<content:encoded><![CDATA[<p>today we started to sow our first veg seeds, this meant dusting off the heated propagator. unfortunately our new place doesn&#8217;t have many places to start seeds off, in fact the only space we have is in front of the french doors. so provided we don&#8217;t get too blotto&#8217;d whilst dining al fresco (which won&#8217;t be a while) the seedlings will be safe. Do not fear my protectionist approach to copyright. </p>
<p>so back to the propagator..</p>
<p><a href="http://www.flickr.com/photos/booyaa/3395790228/" title="mad props to mah seedz by booyaa, on Flickr"><img src="http://farm4.static.flickr.com/3615/3395790228_43ba9ca9ab.jpg" width="375" height="500" alt="mad props to mah seedz" /></a></p>
<p>from top to bottom: 3 x trays of parmex carrots, 1 x &#8217;sweet chocolate&#8217; sweet pepper, 1x &#8216;orange banana&#8217; toms, 1 x &#8217;serpette amelioree d&#8217;auvergne&#8217; climbing pea and 1 x &#8216;n. napia&#8217; pointy red sweet pepper.</p>
<p>we&#8217;ve had very poor luck with carrots so far, although having read a few blogs i think it&#8217;s safe to say we&#8217;re not alone. this time around we&#8217;ve went for the rounder ball-like variety. this is mostly because it would seem that the soil you need, to avoid getting forked carrots, has to be super fine soil, that has been sifted through a spider&#8217;s web, whilst saying a prayer to the angry carrot god TORRAC. the other seeds are having their second chance, as they either didn&#8217;t grow or didn&#8217;t ripen in time for harvest. further more after graduating from seedling to plants, the toms and peppers are being grown in the mini greenhouse so we can get a better crop. last year we found that the poor summer combined with the allotments windy disposition gave a small crop. although, but before i entirely blame it all on the elements, i should point out i didn&#8217;t stake out the plants or keep them to four trusses.</p>
<p>we&#8217;ve also started this years flowers:</p>
<p><a href="http://www.flickr.com/photos/booyaa/3395799914/" title="flower candidates 2009 by booyaa, on Flickr"><img src="http://farm4.static.flickr.com/3559/3395799914_72bacc78a6_m.jpg" width="240" height="180" alt="flower candidates 2009" /></a></p>
<p>left is blue lagoon (verbena x hybrida) and right is night phlox (zaluzianskya capensis).</p>
<p>lou also planted some bulbs (daffs?) in the garden, it&#8217;d be great if they end up flowering, but failing that they&#8217;re ready for next year <img src='http://booyaa.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> it&#8217;s been very chilly outside, i do wonder what it will do the veg this year. it&#8217;d be great if we had a longer summer to make up, so fingers crossed!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/booyaa?a=ijR24GoRU4w:8uRwE--3Aew:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/booyaa?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=ijR24GoRU4w:8uRwE--3Aew:ANkz6nJbUoM"><img src="http://feeds.feedburner.com/~ff/booyaa?d=ANkz6nJbUoM" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=ijR24GoRU4w:8uRwE--3Aew:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/booyaa?i=ijR24GoRU4w:8uRwE--3Aew:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=ijR24GoRU4w:8uRwE--3Aew:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/booyaa?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=ijR24GoRU4w:8uRwE--3Aew:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/booyaa?i=ijR24GoRU4w:8uRwE--3Aew:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=ijR24GoRU4w:8uRwE--3Aew:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/booyaa?i=ijR24GoRU4w:8uRwE--3Aew:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/booyaa/~4/ijR24GoRU4w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://booyaa.org/2009/03/29/allotment-updatery-watcha-growing-in-your-propagator-boo/feed/</wfw:commentRss>
		<feedburner:origLink>http://booyaa.org/2009/03/29/allotment-updatery-watcha-growing-in-your-propagator-boo/</feedburner:origLink></item>
		<item>
		<title>shelter’s vertical rush: a race to the top of tower 42</title>
		<link>http://feedproxy.google.com/~r/booyaa/~3/AIJrJLF-aAE/</link>
		<comments>http://booyaa.org/2009/03/22/shelters-vertical-rush-a-race-to-the-top-of-tower-42/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 21:22:04 +0000</pubDate>
		<dc:creator>booyaa</dc:creator>
		
		<category><![CDATA[default]]></category>

		<category><![CDATA[charity]]></category>

		<category><![CDATA[race]]></category>

		<category><![CDATA[shelter]]></category>

		<category><![CDATA[verticalRush]]></category>

		<guid isPermaLink="false">http://booyaa.org/?p=506</guid>
		<description>last wednesday me and two mates ran to the top of tower 42 (nee old natwest building), all 920 steps. despite repeatedly running up the 122 steps that make up the measley 6 floors of my work place, nothing prepared me for this event. Do not fear my protectionist approach to copyright. 
by the [...]</description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/booyaa/3377073266/" title="Vertical Rush: A race to the top of Tower 42 by booyaa, on Flickr"><img src="http://farm4.static.flickr.com/3541/3377073266_c1e7b23a21_m.jpg" width="240" height="180" alt="Vertical Rush: A race to the top of Tower 42" align="right"/></a> last wednesday me and two mates ran to the top of tower 42 (nee old natwest building), all 920 steps. despite repeatedly running up the 122 steps that make up the measley 6 floors of my work place, nothing prepared me for this event. Do not fear my protectionist approach to copyright. </p>
<p>by the time i reached halfway point i had to start walking (this was after i had set a good pace). i had the odd occasional bursts of energy flying past people, but by the end, my legs had become like lead and i was gasping for air.</p>
<p>i&#8217;m normally used to an 25-60 minute type running event and finding my rhythm. i had no such luxury in this event where the winning time is sub 5 minutes.</p>
<p>and in 8 minutes and 11 seconds it was all over. i had hoped for a sub 10 minute finish so i consider this a result. i tried to avoid dragging myself the stairs using the bannister, but having seen footage of the winner i now know this is acceptable in the sport of stair climbing! i was top 45% of the category which is a nice percentage to be in.</p>
<p>i was doubly pleased because i ended up raising over 200 pounds for shelter (they asked race entrants to raise at least 150 pounds). thank you to all my wonderful sponsors, you helped me stay true to my training and stopped me from giving up when it started to hurt a lot. did i meant it hurt a lot?</p>
<p>crazy event. mad props to alison for making the mistake of telling me about the event!</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/booyaa?a=AIJrJLF-aAE:La9CBJQAigg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/booyaa?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=AIJrJLF-aAE:La9CBJQAigg:ANkz6nJbUoM"><img src="http://feeds.feedburner.com/~ff/booyaa?d=ANkz6nJbUoM" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=AIJrJLF-aAE:La9CBJQAigg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/booyaa?i=AIJrJLF-aAE:La9CBJQAigg:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=AIJrJLF-aAE:La9CBJQAigg:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/booyaa?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=AIJrJLF-aAE:La9CBJQAigg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/booyaa?i=AIJrJLF-aAE:La9CBJQAigg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=AIJrJLF-aAE:La9CBJQAigg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/booyaa?i=AIJrJLF-aAE:La9CBJQAigg:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/booyaa/~4/AIJrJLF-aAE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://booyaa.org/2009/03/22/shelters-vertical-rush-a-race-to-the-top-of-tower-42/feed/</wfw:commentRss>
		<feedburner:origLink>http://booyaa.org/2009/03/22/shelters-vertical-rush-a-race-to-the-top-of-tower-42/</feedburner:origLink></item>
		<item>
		<title>allotment updatery: tatertastic!</title>
		<link>http://feedproxy.google.com/~r/booyaa/~3/9ylew3hqnzQ/</link>
		<comments>http://booyaa.org/2009/03/22/allotment-updatery-tatertastic/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 20:59:10 +0000</pubDate>
		<dc:creator>booyaa</dc:creator>
		
		<category><![CDATA[default]]></category>

		<category><![CDATA[2009]]></category>

		<category><![CDATA[allotment]]></category>

		<category><![CDATA[growyourown]]></category>

		<category><![CDATA[lotty]]></category>

		<category><![CDATA[potatoes]]></category>

		<category><![CDATA[taters]]></category>

		<guid isPermaLink="false">http://booyaa.org/?p=504</guid>
		<description>our earlies went in today, much to the surprise of plotber malcolm. he said he would wait until the risk of frost was completely gone. he also said i should have fleece at the ready to protect tender shoots should the frost come. with this advice in hand i decided against planting the main [...]</description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/booyaa/3376156631/" title="Taters (Earlies) by booyaa, on Flickr"><img src="http://farm4.static.flickr.com/3643/3376156631_cb02c47837_m.jpg" width="240" height="180" alt="Taters (Earlies)" align="left"/></a> our earlies went in today, much to the surprise of plotber malcolm. he said he would wait until the risk of frost was completely gone. he also said i should have fleece at the ready to protect tender shoots should the frost come. with this advice in hand i decided against planting the main crop this weekend. Do not fear my protectionist approach to copyright. </p>
<p>i ended up keeping some of the fleece (well actually wasn&#8217;t real fleece, more like that weed suppressing membrane) on two rows to warm the ground and force faster growth.</p>
<p>this time around we picked really obscure varieties, made further obscure because shozu failed to upload the photo above, which had the descriptions. so from memory and left to right we have: gypsy mixed with highland burgundy, skerry, salad blue, shetland black, gypsy mixed with highland burgundy and finally dunbar rover.</p>
<p>aren&#8217;t they great names? the taters are heritage varieties which can go from blue and purple insides, to black skins with blue rings in white flesh. we&#8217;ve had the shetland black before and really enjoyed them.</p>
<p>since my plan for main crops was postponed, i decided to prune the rasps. hopefully i wasn&#8217;t too harsh. i made a half arsed attempt to weed the area around them, but it needs more work. </p>
<p>there&#8217;s still so much to do and we&#8217;ve not made a start on any seedlings. but hey, i guess when you stick food in the grow, you&#8217;re technically in growing season eh? </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/booyaa?a=9ylew3hqnzQ:1hemNgr_rt4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/booyaa?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=9ylew3hqnzQ:1hemNgr_rt4:ANkz6nJbUoM"><img src="http://feeds.feedburner.com/~ff/booyaa?d=ANkz6nJbUoM" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=9ylew3hqnzQ:1hemNgr_rt4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/booyaa?i=9ylew3hqnzQ:1hemNgr_rt4:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=9ylew3hqnzQ:1hemNgr_rt4:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/booyaa?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=9ylew3hqnzQ:1hemNgr_rt4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/booyaa?i=9ylew3hqnzQ:1hemNgr_rt4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=9ylew3hqnzQ:1hemNgr_rt4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/booyaa?i=9ylew3hqnzQ:1hemNgr_rt4:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/booyaa/~4/9ylew3hqnzQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://booyaa.org/2009/03/22/allotment-updatery-tatertastic/feed/</wfw:commentRss>
		<feedburner:origLink>http://booyaa.org/2009/03/22/allotment-updatery-tatertastic/</feedburner:origLink></item>
		<item>
		<title>arrested (gaming) development: pyevilclutches source code</title>
		<link>http://feedproxy.google.com/~r/booyaa/~3/MabbWFpTUXA/</link>
		<comments>http://booyaa.org/2008/12/22/arrested-gaming-development-pyevilclutches-source-code/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 13:37:31 +0000</pubDate>
		<dc:creator>booyaa</dc:creator>
		
		<category><![CDATA[default]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[gamemaker]]></category>

		<category><![CDATA[gaming]]></category>

		<category><![CDATA[pygame]]></category>

		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://booyaa.org/?p=503</guid>
		<description>i spent most of last week tidying up the code so i could share it with you. as mentioned numerous times, you&amp;#8217;ll need a copy of the game maker&amp;#8217;s apprentice book as they contain the various graphical resources used in the source code. Do not fear my protectionist approach to copyright. 
think of the source [...]</description>
			<content:encoded><![CDATA[<p>i spent most of last week tidying up the code so i could share it with you. as mentioned numerous times, you&#8217;ll need a copy of the game maker&#8217;s apprentice book as they contain the various graphical resources used in the source code. Do not fear my protectionist approach to copyright. </p>
<p>think of the source code as a reference, rather than a fully working demo.</p>
<p>it&#8217;s christmas week, so it&#8217;s unlikely i&#8217;ll be posting anything gaming related. i&#8217;m sure most of you will be far too busy to be reading blogs anyways <img src='http://booyaa.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> so have a great break. whereever you are, and hopefully santa will get you lots of games to play!</p>
<p>so without further ado, here is the source code: <a href="http://booyaa.org/schtuff/agd-pyevilclutches.zip">clickie</a></p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/booyaa?a=MabbWFpTUXA:UadFD340an4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/booyaa?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=MabbWFpTUXA:UadFD340an4:ANkz6nJbUoM"><img src="http://feeds.feedburner.com/~ff/booyaa?d=ANkz6nJbUoM" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=MabbWFpTUXA:UadFD340an4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/booyaa?i=MabbWFpTUXA:UadFD340an4:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=MabbWFpTUXA:UadFD340an4:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/booyaa?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=MabbWFpTUXA:UadFD340an4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/booyaa?i=MabbWFpTUXA:UadFD340an4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=MabbWFpTUXA:UadFD340an4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/booyaa?i=MabbWFpTUXA:UadFD340an4:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/booyaa/~4/MabbWFpTUXA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://booyaa.org/2008/12/22/arrested-gaming-development-pyevilclutches-source-code/feed/</wfw:commentRss>
		<feedburner:origLink>http://booyaa.org/2008/12/22/arrested-gaming-development-pyevilclutches-source-code/</feedburner:origLink></item>
		<item>
		<title>The results of my recent CISMP exam</title>
		<link>http://feedproxy.google.com/~r/booyaa/~3/dKsG8antbe0/</link>
		<comments>http://booyaa.org/2008/12/16/the-results-of-my-recent-cismp-exam/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 19:10:24 +0000</pubDate>
		<dc:creator>booyaa</dc:creator>
		
		<guid isPermaLink="false">http://booyaa.org/2008/12/16/the-results-of-my-recent-cismp-exam/</guid>
		<description>In a word: woot!
 Do not fear my protectionist approach to copyright.</description>
			<content:encoded><![CDATA[<p><a href="http://media.shozu.com/cache/portal/media/1de673/67108878"><img src="http://media.shozu.com/cache/portal/media/1de673/67108878_blog" /></a><br/>In a word: woot!
<p align="right" ><a href="http://www.shozu.com/portal/?utm_source=upload&amp;utm_medium=graphic&amp;utm_campaign=upload_graphic/" target="_blank" ><img src="http://www.shozu.com/resources/messages/logo_blog.gif" alt="Posted by ShoZu" border="0" /></a> Do not fear my protectionist approach to copyright. </p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/booyaa?a=dKsG8antbe0:cIYi58L8sbk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/booyaa?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=dKsG8antbe0:cIYi58L8sbk:ANkz6nJbUoM"><img src="http://feeds.feedburner.com/~ff/booyaa?d=ANkz6nJbUoM" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=dKsG8antbe0:cIYi58L8sbk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/booyaa?i=dKsG8antbe0:cIYi58L8sbk:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=dKsG8antbe0:cIYi58L8sbk:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/booyaa?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=dKsG8antbe0:cIYi58L8sbk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/booyaa?i=dKsG8antbe0:cIYi58L8sbk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=dKsG8antbe0:cIYi58L8sbk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/booyaa?i=dKsG8antbe0:cIYi58L8sbk:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/booyaa/~4/dKsG8antbe0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://booyaa.org/2008/12/16/the-results-of-my-recent-cismp-exam/feed/</wfw:commentRss>
		<feedburner:origLink>http://booyaa.org/2008/12/16/the-results-of-my-recent-cismp-exam/</feedburner:origLink></item>
		<item>
		<title>arrested (gaming) development: brace for impact!</title>
		<link>http://feedproxy.google.com/~r/booyaa/~3/meDBiNKKano/</link>
		<comments>http://booyaa.org/2008/12/15/arrested-gaming-development-brace-for-impact/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 13:37:11 +0000</pubDate>
		<dc:creator>booyaa</dc:creator>
		
		<category><![CDATA[default]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[gamemaker]]></category>

		<category><![CDATA[gaming]]></category>

		<category><![CDATA[pygame]]></category>

		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://booyaa.org/?p=500</guid>
		<description>please note in order to see the code and the videos, you’ll need to go to the full post. feedburner doesn’t appear to play nice with my embedded videos. Do not fear my protectionist approach to copyright. 
welcome to the fifth and last installment of the series. yes, i know it&amp;#8217;s all a bit sudden, [...]</description>
			<content:encoded><![CDATA[<p><em>please note in order to see the code and the videos, you’ll need to go to the full post. feedburner doesn’t appear to play nice with my embedded videos.</em> Do not fear my protectionist approach to copyright. </p>
<p>welcome to the fifth and last installment of the series. yes, i know it&#8217;s all a bit sudden, but when you see this week&#8217;s code you&#8217;ll see that there&#8217;s very little left to discuss. there will be a break between the next series of posts that form chapter three (galactic mail) of the game maker&#8217;s apprentice.</p>
<p>i&#8217;ll post the odd tech demo to show you what i&#8217;m up to, and as soon as i&#8217;ve made sufficient progress i&#8217;ll start posting again - so stay tuned!</p>
<p>last week we learnt how to deal with bullets and how to have a multitude of them on screen. this week we&#8217;re going to add the missing ingredient and enable collision detection. oh, and whilst we&#8217;re at it, we&#8217;ll also enable scoring!</p>
<p>first off, let&#8217;s look at the function that provides collision detection, which is lifted from linux format&#8217;s space invader and racing games.</p>
<pre name="code" class="python">
def Intersect(s1_x, s1_y, s2_x, s2_y):
    if (s1_x > s2_x - 32) and (s1_x < s2_x + 32) and (s1_y > s2_y - 32) and (s1_y < s2_y + 32):
        return 1
    else:
        return 0
</pre>
<p>you can tell it&#8217;s been lifted because i&#8217;ve not bothered to rewrite it to take into account the various shapes and sizes of the sprites (the offset is still 32 as the sprites were 32&#215;32 pixels). all this function does is compare the position of the first sprite against the second sprite, so, after the offset (32 pixels) has been factored in, if the two overlap a collision has occurred.</p>
<p>so to see if any of our demons have collided with the dragon, here&#8217;s what our code would look like.</p>
<pre name="code" class="python">
    # iterate through demons
    for index, demon in enumerate(demons):
        :
        code to check if its time to remove demons from the list removed for brevity
        :

        if Intersect(demon.x, demon.y, dragon.x, dragon.y):
            quit = 1
            break

        :
        code to render the demons
        :
</pre>
<p>the baby dragon code pretty much does the same thing, except your score is incremented if a collision occurs.</p>
<p>the dragon&#8217;s fireball has to test for collisions with both demons and baby dragons all within the same loop. furthermore if a collision occurs, it would be nice to make the former demon/baby dragon vanish, this one caught me out the first time around.</p>
<pre name="code" class="python">
    # same for fireballs
    for index, fireball in enumerate(fireballs):
        if fireball.x > 640:
            del fireballs[index]

        for index2 in range(0, len(demons)):
            # NEW: 05/12
            if Intersect(fireball.x, fireball.y, demons[index2].x, demons[index2].y):
                del demons[index2]
                del fireballs[index]
                score += 100
                break

        for index2 in range(0, len(babies)):
            # NEW: 05/12
            if Intersect(fireball.x, fireball.y, babies[index2].x, babies[index2].y):
                del babies[index2]
                del fireballs[index]
                score -= 500
                break

        fireball.x += 10
        fireball.render()
</pre>
<p>as you can see from the code, you have to iterate through all the demons and baby dragons to see if any of them collided. you may have also noticed that i&#8217;ve switched from walking the list and instantiating each object. instead, i&#8217;ve use the method employed by linux format code, of going through the list and testing objects in place, referencing them by their subscript (index). this was done more for my amusement, rather than for the sake of efficiency. i&#8217;m pretty certain that sprite groups would simplify this operation through the use of group collision detection.</p>
<p>finally we get onto the topic of scoring. again, nothing major here. i amended the display.set_caption code so it became a formatted string and placed the score there. when a demon collides with the dragon, the last line of the program kicks in and displays the final screen to the console session that launched the game.</p>
<p>whilst this isn&#8217;t how the game maker&#8217;s apprentice displays the score, i lacked the &#8220;know how&#8221; to create a high score routine. i will have one for the next series of agd posts.</p>
<p>let&#8217;s do one final comparison of the reference game maker and pygame versions of the game.</p>
<p>first is the reference video:<br />
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/y5zQOHPaK8s&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/y5zQOHPaK8s&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>next is the pygame version:<br />
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/h4dRHoj9G2g&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/h4dRHoj9G2g&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>unfortunately, i&#8217;ve just discovered that the utility i used to compress the videos before i uploaded them to youtube is too aggressive. therefore it&#8217;s impossible to see the score changing in the title bar, so you&#8217;ll just have to take my word for it that this video is different from previous pygame video.</p>
<p>whilst the pygame version is no where near as smooth or as functional as the game maker version, it&#8217;s a pretty good facsmilie of it. it did take long to create, i&#8217;d hazard a guess that if each post equated to a day&#8217;s work, and if we exclude the intro post, it took me four days to write something that could&#8217;ve been done in ten minutes in game maker.</p>
<p>i&#8217;m certain there&#8217;s python coders out there who could write a mind blowing game in the time it took me to replicate the look and feel of the game maker game, but i&#8217;m not one of those guys. yet.</p>
<p>whilst working on this series of posts, i&#8217;ve come to appreciate how easy it is to write games in game maker. it takes away the management of trixsy things like controls, multiple sprites, collision detection, sound and scoring. instead you just get on with game design, be it difficulty level or level design. this means you&#8217;ve got a better chance of realising a product instead of giving up half way because of technical difficulties.</p>
<p>i hope you&#8217;ve enjoyed this series of posts as much as i&#8217;ve enjoyed writing them and i look forward to you joining me for the next series. until next time, keep it surreal!</p>
<p align="center"><a href="http://booyaa.org/2008/12/08/arrested-gaming-development-pick-a-bullet-any-bullet/">prev (bullets)</a> | <a href="http://booyaa.org/2008/11/17/arrested-gaming-development-an-introduction/">about</a> | next (???)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/booyaa?a=meDBiNKKano:S4WrCvAFek0:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/booyaa?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=meDBiNKKano:S4WrCvAFek0:ANkz6nJbUoM"><img src="http://feeds.feedburner.com/~ff/booyaa?d=ANkz6nJbUoM" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=meDBiNKKano:S4WrCvAFek0:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/booyaa?i=meDBiNKKano:S4WrCvAFek0:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=meDBiNKKano:S4WrCvAFek0:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/booyaa?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=meDBiNKKano:S4WrCvAFek0:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/booyaa?i=meDBiNKKano:S4WrCvAFek0:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=meDBiNKKano:S4WrCvAFek0:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/booyaa?i=meDBiNKKano:S4WrCvAFek0:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/booyaa/~4/meDBiNKKano" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://booyaa.org/2008/12/15/arrested-gaming-development-brace-for-impact/feed/</wfw:commentRss>
		<feedburner:origLink>http://booyaa.org/2008/12/15/arrested-gaming-development-brace-for-impact/</feedburner:origLink></item>
		<item>
		<title>arrested (gaming) development: pick a bullet, any bullet</title>
		<link>http://feedproxy.google.com/~r/booyaa/~3/IabH2AOFrCM/</link>
		<comments>http://booyaa.org/2008/12/08/arrested-gaming-development-pick-a-bullet-any-bullet/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 13:37:23 +0000</pubDate>
		<dc:creator>booyaa</dc:creator>
		
		<category><![CDATA[default]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[gamemaker]]></category>

		<category><![CDATA[gaming]]></category>

		<category><![CDATA[pygame]]></category>

		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://booyaa.org/?p=489</guid>
		<description>please note in order to see the code and the videos, you’ll need to go to the full post. feedburner doesn’t appear to play nice with my embedded videos. Do not fear my protectionist approach to copyright. 
last week we animated our moving sprites exploding the individual frames in an animated gif, placing them in [...]</description>
			<content:encoded><![CDATA[<p><em>please note in order to see the code and the videos, you’ll need to go to the full post. feedburner doesn’t appear to play nice with my embedded videos.</em> Do not fear my protectionist approach to copyright. </p>
<p>last <a href="http://booyaa.org/2008/12/01/arrested-gaming-development-flap-your-wings/">week</a> we animated our moving sprites exploding the individual frames in an animated gif, placing them in separate files, and flicking through them rapidly.</p>
<p>this week we&#8217;re looking at how to make the game a bit more interesting by getting the boss to fire demons at us. to avoid this becoming some dodging bullets matrix-style game, our dragon in turn has mastered the art of hadoken, so can return fire, er, balls. to spice things up a bit (read: game play improvement) the boss can also fire baby dragons at us. shooting these guys will incur a scoring penalty (scoring will feature in a later post).</p>
<p>the dragon&#8217;s fireball is fairly trivial, so we&#8217;ll skip it for now and go straight to the boss and discuss the properties of his munitions. the boss will fire two types of bullets, either a demon or a baby. the game maker&#8217;s apprentice defines that there&#8217;s a 1 in 50 chance of a demon being fired.</p>
<pre name="code" class="python">
if random.randint(1,50) == 50:
	# create a new demon
    demon.x = boss.x - 10
    demon.y = boss.y - 10
</pre>
<p>the demon has a possible starting direction of sw, w or se. </p>
<pre name="code" class="python">
	# which direction is demon going nw(1), w(2), sw(3)?
    demonDir = random.randint(1,3)
    if demonDir == 1: # nw x-,y-
		demon.dy = 1
    if demonDir == 3: # sw x-,y+
        demon.dy = 0
    # no check for 2, because at the end of the day we're always going west
</pre>
<p>the demon will move along the screen at rate of 10 pixels per frame going towards the rightmost side of the screen. because the demon can veer towards the top or bottom of the screen, we need to make sure when it reaches the edge of the screen it changes direction (bounces).</p>
<pre name="code" class="python">
	demon.x -= 10

    if demon.dy:
        demon.y += 10
    else:
        demon.y -= 10

    if demon.y > 290:
        demon.dy = 0
    if demon.y < -10:
        demon.dy = 1
</pre>
<p>so how does our demo look now? </p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/J4zx0fWGBjg&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/J4zx0fWGBjg&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>looks good eh? or does it? upon closer inspection you will notice that some of the demons seem to vanish before they even get close to the dragon. it didn&#8217;t take me long to realise that the demon object was being reused everytime it was being fired! this makes for great ammo economy for the military, but a crap gaming experience for us. </p>
<p>realising the error in my code, i needed to find a way to spawn multiple bullets from the same class. luckily our demons aren&#8217;t too complicated; they have a fixed speed and their x-axis starting position is always the same. this means they move at a constant speed one after the other. at the moment (we&#8217;ve not yet broached the topic of collision with the dragon or his fireballs) they move in an orderly queue, but to avoid confusion with the python term &#8220;queue&#8221;, here we&#8217;ll use the term &#8220;list&#8221;.</p>
<p>i&#8217;m not going to teach you about python lists, queues and whatnots. there are loads of <a href="http://effbot.org/zone/python-list.htm">people</a> who do this better than i ever could. instead i&#8217;ll tell you what you need to know coming from a structure language background like perl, batch and c.</p>
<p>i should probably point out that by now i&#8217;d stopped looking at the linux format code for pyinvaders, and whilst the code may look similar it isn&#8217;t.</p>
<p>whilst i don&#8217;t think you need to initialise an array (pythonically known as a list) i think it makes for easier reading. you just need to create an empty list i.e. demons = []</p>
<p>to add an item to the list, call the append method i.e. demons.append(demon_object). yes dorothy, you can append objects with no fancy incantation in python as you would a scalar (simple) variable type.</p>
<p>you can get the number of items in a list using the len keyword i.e. len(demons).</p>
<p>finally, to delete an item from a list you can use the del keyword and specify the index (position) of the item in the list. i.e. del demons[5]. before someone carps about the fact that you can delete an item by specifying its name i.e. ldell list['x'] i haven&#8217;t found out how you do this with an object. so if you know please post a comment and share the knowledge.</p>
<p>also i&#8217;ve refrained from using the pop function (fifo) or push(?) pop(-1) (lifo) because whilst the current code&#8217;s behaviour is a queue, when we enable collisions we&#8217;ll start to see random removal of items from the list i.e. items will disappear out of sequence.</p>
<p>now, i could leave it at that, for most coders. you&#8217;d be able to track the current index by incrementing a counter as you looped through the list. but, i must share this code i found. it allows me to walk list whilst tracking the index. check out the test code below (it&#8217;s a proof of concept script) to see what i&#8217;m harping on about:</p>
<pre name="code" class="python">
for x in range(0,30):
	num = random.randint(1,3)
    if num == 3:
		print "%d: ADD bullet" % x
        bullets.append(Bullet())

    for index, item in enumerate(bullets):
        if item.x < 10:
        	item.x += 1
        else:
			print "%d: DEL bullet" % x
            del bullets[index]

        print "%d: bullets: idx:%d -> val:%d " % (x,index,item.x)
</pre>
<p>don&#8217;t get too tied up in the specifics of the bullet class, its only got one method that initialises the single variable called x. instead, look at the for/in loop and the enumerate keyword. basically the for/in loop is the same as the the foreach in perl and php. enumerate returns two items, the first is the current index and the second is the object reference.</p>
<p>i remembered the nightmare of trying to learn passing object references and values in java when i was in uni. in python its seems so much more straightforward, all you need to know is that when you&#8217;ve obtained an object from the list through the for/in loop you are now dealing with that object. you can tweak it to your heart&#8217;s content, and then when you step to the next item in the list, you have packed it away (along with its mods) until you go through the list again.</p>
<p>coincidentally, the proof of concept code i&#8217;ve given above is pretty much the same code i used for the demons. there&#8217;s the testing code to see if we need to add a new demon to the list. then there&#8217;s the for/in loop which walks through the list, checking to see if demons have to be removed from the list because they&#8217;ve gone off screen. if they haven&#8217;t then their x axis is updated.</p>
<p>the directional code to determine y starting position w, sw, nw is placed with the testing code. and the change direction code is placed within the for/in loop.</p>
<p>let&#8217;s have a brain break here and see how our video looks now.</p>
<p>first off for reference the game maker version</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/y5zQOHPaK8s&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/y5zQOHPaK8s&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>and now pygame version, hopefully this is an improvement from the previous.</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/JOjTXWFAEYQ&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/JOjTXWFAEYQ&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>the baby dragons are a rarer event and only occur with a 1 in 100 chance. they only move in one direction from right to left, and their offset is based on the boss&#8217;s y position. finally to add the trickiness element, we make them marginally slower than the demons by making them move 8 pixels per frame (compared to the demons&#8217; 10 pixels per frame.)</p>
<p>the dragon&#8217;s fireball is almost identical to the baby dragon&#8217;s in so far as it moves in one direction towards the right of the screen and is triggered by the spacebar. the speed is the same as the demon&#8217;s.</p>
<p>rather than waste valuable reading inches i&#8217;ll add a link to the full source code <a href="http://booyaa.org/projects/porting-the-game-makers-apprentice-games-to-pygame/pyevilclutches-source-code-bullets/">here</a>. you&#8217;ll also find the earlier version of this code where we have a single demon being fired repeatedly.</p>
<p>so whilst i&#8217;m happy with the progress, the game itself is not very playable at the moment. the keyboard events stop as soon as you press a key. and there&#8217;s a distinct lack of collision detection. as with the slight jittery animation last week, i&#8217;m going to park the lack of non-blocking keyboard control. i can see the seasoned games developers shaking their heads and tutting alot, but for now the lack of collision detection is preventing this from being a decent game.</p>
<p>so tune in next week for our next installment!</p>
<p align="center"><a href="http://booyaa.org/2008/12/01/arrested-gaming-development-flap-your-wings/">prev (animation)</a> | <a href="http://booyaa.org/2008/11/17/arrested-gaming-development-an-introduction/">about</a> | next (collisions)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/booyaa?a=IabH2AOFrCM:4rQCFJ4zgRA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/booyaa?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=IabH2AOFrCM:4rQCFJ4zgRA:ANkz6nJbUoM"><img src="http://feeds.feedburner.com/~ff/booyaa?d=ANkz6nJbUoM" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=IabH2AOFrCM:4rQCFJ4zgRA:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/booyaa?i=IabH2AOFrCM:4rQCFJ4zgRA:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=IabH2AOFrCM:4rQCFJ4zgRA:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/booyaa?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=IabH2AOFrCM:4rQCFJ4zgRA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/booyaa?i=IabH2AOFrCM:4rQCFJ4zgRA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=IabH2AOFrCM:4rQCFJ4zgRA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/booyaa?i=IabH2AOFrCM:4rQCFJ4zgRA:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/booyaa/~4/IabH2AOFrCM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://booyaa.org/2008/12/08/arrested-gaming-development-pick-a-bullet-any-bullet/feed/</wfw:commentRss>
		<feedburner:origLink>http://booyaa.org/2008/12/08/arrested-gaming-development-pick-a-bullet-any-bullet/</feedburner:origLink></item>
		<item>
		<title>allotment update cum ecto test post</title>
		<link>http://feedproxy.google.com/~r/booyaa/~3/5SS-96tJAqk/</link>
		<comments>http://booyaa.org/2008/12/06/allotment-update-test-post-ecto/#comments</comments>
		<pubDate>Sat, 06 Dec 2008 14:01:44 +0000</pubDate>
		<dc:creator>booyaa</dc:creator>
		
		<category><![CDATA[default]]></category>

		<category><![CDATA[allotment]]></category>

		<category><![CDATA[post]]></category>

		<category><![CDATA[test]]></category>

		<guid isPermaLink="false">http://booyaa.org/?p=493</guid>
		<description>long time no write on this subject, as you can see the lotty&amp;#8217;s looking very scruffy and in serious need of tlc. luckily the weeds have died back for a bit. Do not fear my protectionist approach to copyright. 
i noticed that in safari the next image is stuck all the way down the page, [...]</description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/51286033@N00/3086883736" title="View 'What a scruffy plot' on Flickr.com"><img src="http://farm4.static.flickr.com/3038/3086883736_b69155bdfc_s.jpg" width="75" height="75" alt="What a scruffy plot" style="float:left; margin-right:4px; margin-left:4px;" /></a>long time no write on this subject, as you can see the lotty&#8217;s looking very scruffy and in serious need of tlc. luckily the weeds have died back for a bit. Do not fear my protectionist approach to copyright. </p>
<p>i noticed that in safari the next image is stuck all the way down the page, not sure why. but i thought i&#8217;d warn you!</p>
<p><a href="http://www.flickr.com/photos/51286033@N00/3086883736" title="View 'What a scruffy plot' on Flickr.com"></a><a href="http://www.flickr.com/photos/51286033@N00/3086883736" title="View 'What a scruffy plot' on Flickr.com"></a></p>
<p><a href="http://www.flickr.com/photos/51286033@N00/3086823162" title="View 'Bloody pigeons!' on Flickr.com"><img src="http://farm4.static.flickr.com/3136/3086823162_2dcb427bba_s.jpg" width="75" height="75" alt="Bloody pigeons!" style="float:left; margin-right:4px; margin-left:4px;" /></a>the pigeons got at a lot of our winter crop. they ravaged the spring cabbage.<br />
<br clear="all" /></p>
<p><a href="http://www.flickr.com/photos/51286033@N00/3086043327" title="View 'Protecting our sprouts' on Flickr.com"><img src="http://farm4.static.flickr.com/3072/3086043327_09a517cb51_s.jpg" width="75" height="75" alt="Protecting our sprouts" style="float:left; margin-right:4px; margin-left:4px;" /></a>i&#8217;ve put netting around our sprouts as a precautionary measure, they&#8217;ve got to survive until we bring with us for christmas dinner. we&#8217;re hoping everyone gets at least two sprouts each!<br clear="all" /></p>
<p><a href="http://www.flickr.com/photos/51286033@N00/3085988569" title="View 'Romanescque' on Flickr.com"><img src="http://farm4.static.flickr.com/3174/3085988569_2594c3b991_s.jpg" width="75" height="75" alt="Romanescque" style="float:left; margin-right:4px; margin-left:4px;" /></a>i asked lionel (our resident plot guru) why the wildlife didn&#8217;t go for the romanesque, he thought it was because they couldn&#8217;t see them. something to do with contrast perhaps?<br clear="all" /></p>
<p><a href="http://www.flickr.com/photos/51286033@N00/3086882232" title="View 'Uploaded - 06\12\2008-3' on Flickr.com"><img src="http://farm4.static.flickr.com/3270/3086882232_3c4aeacf09_s.jpg" width="75" height="75" alt="Uploaded - 06\12\2008-3" style="float:left; margin-right:4px; margin-left:4px;" /></a>the beans are looking sorry, they&#8217;re not dead but scrawny looking. i wonder if this is an over winter behaviour?<br clear="all" /></p>
<p>another plotber whose name eludes me at the moment, told me that the lotty got done over recently. a gang broke through the front gate and broke into every shed. they brought a van and it looks like they only wanted machinery. i feel sorry for those people who had stuff nicked, i hope those thieving gits get caught.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/booyaa?a=5SS-96tJAqk:kOCIDPmyUZQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/booyaa?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=5SS-96tJAqk:kOCIDPmyUZQ:ANkz6nJbUoM"><img src="http://feeds.feedburner.com/~ff/booyaa?d=ANkz6nJbUoM" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=5SS-96tJAqk:kOCIDPmyUZQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/booyaa?i=5SS-96tJAqk:kOCIDPmyUZQ:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=5SS-96tJAqk:kOCIDPmyUZQ:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/booyaa?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=5SS-96tJAqk:kOCIDPmyUZQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/booyaa?i=5SS-96tJAqk:kOCIDPmyUZQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=5SS-96tJAqk:kOCIDPmyUZQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/booyaa?i=5SS-96tJAqk:kOCIDPmyUZQ:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/booyaa/~4/5SS-96tJAqk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://booyaa.org/2008/12/06/allotment-update-test-post-ecto/feed/</wfw:commentRss>
		<feedburner:origLink>http://booyaa.org/2008/12/06/allotment-update-test-post-ecto/</feedburner:origLink></item>
		<item>
		<title>arrested (gaming) development: flap your wings or we’re going to die!</title>
		<link>http://feedproxy.google.com/~r/booyaa/~3/1NFSMoEat3E/</link>
		<comments>http://booyaa.org/2008/12/01/arrested-gaming-development-flap-your-wings/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 13:37:45 +0000</pubDate>
		<dc:creator>booyaa</dc:creator>
		
		<category><![CDATA[default]]></category>

		<category><![CDATA[development]]></category>

		<category><![CDATA[gamemaker]]></category>

		<category><![CDATA[games]]></category>

		<category><![CDATA[pygame]]></category>

		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://booyaa.org/?p=488</guid>
		<description>please note in order to see the code and the videos, you’ll need to go to the full post. feedburner doesn’t appear to play nice with my embedded videos. Do not fear my protectionist approach to copyright. 
whilst moving sprites is relatively easy to do, it would appear that animating them is trickier to do [...]</description>
			<content:encoded><![CDATA[<p><em>please note in order to see the code and the videos, you’ll need to go to the full post. feedburner doesn’t appear to play nice with my embedded videos.</em> Do not fear my protectionist approach to copyright. </p>
<p>whilst moving sprites is relatively easy to do, it would appear that animating them is trickier to do in pygame; there are no builtin animation routines. just to clarify what i&#8217;m looking for, if you give game maker an animated gif it will cycle through images. it&#8217;s small graces like this that make me appreciate how easier it is make games in that environment. </p>
<p>a quick search on &#8220;<a href="http://www.google.co.uk/search?q=pygame%20animated%20gif">teh interwebs</a>&#8221; revealed that i was not alone in wishing there was native support for animated gifs. i was even willing to switch to png format (the only other image format that support rudimentry animation) if it had pygame support! i came across <a href="http://choosetheforce.blogspot.com/2008/04/third-pygame-hulk-want-animation.html">someone</a> who was toying around with the idea of using python imaging library (pil) to explode an animated gif into individual pygame image objects. i was starting to head towards this approach until i saw that [pil] wasn&#8217;t platform neutral and wasn&#8217;t nearly as easy to install as its stablemate pygame.</p>
<p>in the end i decided to go for the manual process of extracting the individual frame from the animated gifs. after a bit more research, i discovered <a href="http://forums.awn.com/showthread.php?t=11674<br />
">this</a> bash script that uses imagemagick to extract the individual frames and create new images based on them.</p>
<p>i revised the the sprite class&#8217;s render method to cycle through the frames by using this code written by <a href="http://www.gamedev.net/community/forums/topic.asp?topic_id=459408&#038;whichpage=1&#3030232">jaime moreno</a>. i like this code, because it doesn&#8217;t lock up the main loop whilst trying to animate the sprite.</p>
<pre name="code" class="python">
def render(self):
	# A nice bit of animation code (cowMooDelay.py) written by Jaime Moreno
	self.pause += 1
	if self.pause >= self.delay:
		self.pause = 0
		self.frame += 1
		if self.frame >= len(self.frames):
			self.frame = 0
		self.bitmap = self.frames[self.frame]

		# own little bit to transparentimatize <img src='http://booyaa.org/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> each frame based on
		# the colour of the bottom left pixel
		self.colorkey = self.bitmap.get_at((0,self.bitmap.get_height()-1))
		self.bitmap.set_colorkey(self.colorkey)

	screen.blit(self.bitmap, (self.x, self.y))
</pre>
<p>next up is the sprite class method to preload the multiple frames, i modified the code to allow me to specify the number of frames in an animated sprite (during object initialisation). i also amended the file mask to match my gif splitting tool&#8217;s naming convention. </p>
<pre name="code" class="python">
def loadFrames(self, numFrames):
...
	self.frames = []
...
		for i in range(1,numFrames):
			imgName = os.path.join("data",self.imgPrefix + "-10%d.gif" % i)
			tmpImage = image.load(imgName)
			self.frames.append(tmpImage.convert())
</pre>
<p>so as an example of initialising an animated gif i&#8217;ve used the dragon which has 6 frames of animation. the gif splitting turns this into Dragon-101.gif, Dragon-102.gif, &#8230; Dragon-106.gif. the object initialisation code would look like this:</p>
<pre name="code" class="python">
dragon = Sprite(20, 200, 'Dragon',6)
</pre>
<p>finally i wrote a bit of code in the sprite class to avoid having to create a new class for sprites that are not animated. it&#8217;s a bit of a bodge, but the logic goes like this, during object initialisation if i specify the number of frames as 1 i.e.</p>
<pre name="code" class="python">
fireball = Sprite(0,480, 'Fireball.gif', 1)
</pre>
<p>this triggers the loadImages() method to use the image prefix as the actual file name to load. </p>
<pre name="code" class="python">
def loadFrames(self, numFrames):
...
	if numFrames == 1:
		imgName = os.path.join("data", self.imgPrefix)
		self.frames.append(image.load(imgName))

...
</pre>
<p>so how does my pygame port of evil clutches compare? here&#8217;s the game maker reference video.</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/6zTwnsqqCrU&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/6zTwnsqqCrU&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>and here&#8217;s the pygame port</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/8NG1IzKWsMc&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/8NG1IzKWsMc&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>as you can see, it&#8217;s slightly jittery, i gotta admit i&#8217;m stumped as to cause of this. for now its usable, i&#8217;ll post an update if i work out cause. if anyone knows why, please post a comment. so tune in next week when we have to take cover as the bullets start to fly!</p>
<p align="center"><a href="http://booyaa.org/2008/11/24/arrested-gaming-development-sprites/">prev (sprites)</a> | <a href="http://booyaa.org/2008/11/17/arrested-gaming-development-an-introduction/">about</a> | next (bullets)</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/booyaa?a=1NFSMoEat3E:LkMVFA3h6A8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/booyaa?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=1NFSMoEat3E:LkMVFA3h6A8:ANkz6nJbUoM"><img src="http://feeds.feedburner.com/~ff/booyaa?d=ANkz6nJbUoM" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=1NFSMoEat3E:LkMVFA3h6A8:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/booyaa?i=1NFSMoEat3E:LkMVFA3h6A8:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=1NFSMoEat3E:LkMVFA3h6A8:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/booyaa?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=1NFSMoEat3E:LkMVFA3h6A8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/booyaa?i=1NFSMoEat3E:LkMVFA3h6A8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/booyaa?a=1NFSMoEat3E:LkMVFA3h6A8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/booyaa?i=1NFSMoEat3E:LkMVFA3h6A8:V_sGLiPBpWU" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/booyaa/~4/1NFSMoEat3E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://booyaa.org/2008/12/01/arrested-gaming-development-flap-your-wings/feed/</wfw:commentRss>
		<feedburner:origLink>http://booyaa.org/2008/12/01/arrested-gaming-development-flap-your-wings/</feedburner:origLink></item>
	</channel>
</rss>
