<?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>Eirik Hoem&#039;s Blog</title>
	<atom:link href="http://blog.eirikhoem.net/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.eirikhoem.net</link>
	<description>PHP, AS3, Flex, Flash</description>
	<lastBuildDate>Mon, 08 Feb 2010 19:54:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Book review: Flex 3 with Java</title>
		<link>http://blog.eirikhoem.net/index.php/2010/02/08/book-review-flex-3-with-java/</link>
		<comments>http://blog.eirikhoem.net/index.php/2010/02/08/book-review-flex-3-with-java/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 19:54:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Book]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Review]]></category>

		<guid isPermaLink="false">http://blog.eirikhoem.net/?p=205</guid>
		<description><![CDATA[Book review: Flex 3 with Java (follow link to buy)
ISBN: 1847195342
ISBN: 13 978-1-847195-34-0
Publisher: Packt Publishing
Author: Satish Kore
Short version: If you are a Java / PHP developer seeking to get started with Flex, building on your skills as a server-side developer, this book will do you good. If you are new to software development, or just [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Book review:</strong> <a href="http://www.packtpub.com/flex-3-with-java/mid/150909eia64u?utm_source=blog.eirikhoem.net&amp;utm_medium=affiliate&amp;utm_content=blog&amp;utm_campaign=mdb_000615" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');">Flex 3 with Java</a> (follow link to buy)<br />
<strong>ISBN:</strong> 1847195342<br />
<strong>ISBN:</strong> 13 978-1-847195-34-0<br />
<strong>Publisher:</strong> <a href="http://www.packtpub.com" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');">Packt Publishing</a><br />
<strong>Author:</strong> <a href="http://blog.satishkore.com/" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/blog.satishkore.com');">Satish Kore</a></p>
<div id="attachment_147" class="wp-caption alignleft" style="width: 172px"><a href="http://www.packtpub.com/flex-3-with-java/mid/150909eia64u?utm_source=blog.eirikhoem.net&amp;utm_medium=affiliate&amp;utm_content=blog&amp;utm_campaign=mdb_000615" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');"><img title="Flex 3 with Java Cover" src="http://blog.eirikhoem.net/wp-content/uploads/2009/10/flex-3-with-java.jpg" alt="Flex 3 with Java Cover" width="162" height="200" /></a><p class="wp-caption-text">Flex 3 with Java Cover</p></div>
<p><strong>Short version: </strong>If you are a Java / PHP developer seeking to get started with Flex, building on your skills as a server-side developer, this book will do you good. If you are new to software development, or just started out I would recommend you check out Essential ActionScript 3.0 by Colin Mook, then come back to this book when you have some experience doing applications with AS3.</p>
<p><strong>Slightly longer version:</strong> Some time ago I reviewed Mastering phpMyAdmin 3.1 from Packt Publishing, and since they had some interesting books on Flash / Flex I volunteered to review a few more.<br />
First out is Flex 3 with Java. It&#8217;s a 300 page book, dealing with Flex, Java and how you can build solutions using BlazeDS as a backend.<br />
I first checked out Flex back when the Flex 3 beta came out. At that time I was doing PHP with the Prado Framework, and instantly felt like home within the Flex IDE. However, I never took the time to really get into Flex, and my knowledge of ActionScript was pretty limited at the time.<br />
I&#8217;ve now been working with AS3 for six months, and I&#8217;ve got a pretty solid grip on it. Most of the work I&#8217;m doing is pure AS3 (no Flash IDE, no Flex SDK), but I&#8217;ve got some very interesting side-projects built on Flex in the works as well.</p>
<p>The book assumes you have no experience with Flex / Actionscript from earlier. Now, it is clearly written for a more tech-savvy audience. You do not need to be a experienced developer to follow the subjects covered, but it will most certainly help to have done some software development before picking it up. The author gets a bit ahead of himself on some topics in the book, but it&#8217;s not a big problem. However, I would have liked to see a &#8220;who is this book for&#8221; section at the beginning, stating that this books is well suited for developers wanting to pick up Flex.<br />
As expected it spends the first few chapters dealing with installation on the Flex SDK / tools as well as a brief but good coverage of AS3 and the basics of MXML.</p>
<p>Going into this book I was expecting the majority of the contents to cover the actual interop between Java and Flex. The book clearly deals with much more than that. Given that I&#8217;ve been trough a number of Flex and AS3 books the last months I think I would have preferred a book that was focusing more of it&#8217;s energy on the core subject instead of peripheral topics such as styling, packaging and deployment and i18n support. I totally agree that these subjects are important to master, but I think it would have been better if the book focused more on the actual interops topics as mentioned above. For me the books falls a bit between two chairs, as it does not spend enough time on basics to give the complete beginner a deep enough intro to Flex and AS3, yet not enough on the heavier side for the more experienced developer.</p>
<p>Oh, the book is also available as PDF if you prefer that.</p>
<p><a href="http://blog.eirikhoem.net/wp-content/uploads/2009/10/flex-3-with-java_samplechapter.pdf">Download Chapter 5 &#8211; Working with XML</a></p>
<p><strong>PS: </strong>Check back soon as I will have a review of <a href="  	  http://www.packtpub.com/papervision3d-essentials/mid/15090958hmvy?utm_source=blog.eirikhoem.net&amp;utm_medium=affiliate&amp;utm_content=blog&amp;utm_campaign=mdb_000617" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');">Papervision3D Essentials</a> ready!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eirikhoem.net/index.php/2010/02/08/book-review-flex-3-with-java/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Evening reading #2</title>
		<link>http://blog.eirikhoem.net/index.php/2009/11/06/189/</link>
		<comments>http://blog.eirikhoem.net/index.php/2009/11/06/189/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 15:14:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Evening reading]]></category>

		<guid isPermaLink="false">http://blog.eirikhoem.net/?p=189</guid>
		<description><![CDATA[Tonight it&#8217;s time to get started on the Christmas beer. The Norwegian beer-club &#8220;Norøl&#8221; is hosting a Christmas beer festival tonight, which should be pretty good. Perfect warm-up for the Oslo Whiskyfestival tomorrow.  On a side-note, I picked up S.T.A.L.K.E.R. &#8211; Shadow of Chernobyl a couple of years back when it was first released. After [...]]]></description>
			<content:encoded><![CDATA[<p>Tonight it&#8217;s time to get started on the Christmas beer. The Norwegian beer-club &#8220;Norøl&#8221; is hosting a <a href="http://www.nor-ale.org/www/" title=" Norøls Juleølsfestival 2009" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.nor-ale.org');">Christmas beer festival tonight</a>, which should be pretty good. Perfect warm-up for the <a href="http://www.whiskyfestival.no/" title="Oslo Whiskyfestival" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.whiskyfestival.no');">Oslo Whiskyfestival</a> tomorrow.  On a side-note, I picked up S.T.A.L.K.E.R. &#8211; Shadow of Chernobyl a couple of years back when it was first released. After playing the first mission I was so disappointed that I uninstalled it. Last week I decided to give it another go, and I came across a mod called <a href="http://artistpavel.blogspot.com/2009/04/stalker-complete-2009.html" onclick="javascript:pageTracker._trackPageview ('/outbound/artistpavel.blogspot.com');">STALKER Complete 2009</a> which improves everything from game mechanics to graphics. The game is now very playable, and a perfect substitute for Fallout 3. If you are into that kind of thing, go pick it up. Steam has a 5 euro special on it these days, so there is no excuse to not get it. Also, check out &#8220;<a href="http://englishrussia.com/?p=5217" title="The real STALKER" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/englishrussia.com');">the real STALKER</a>&#8220;. Looks fun (if you don&#8217;t mind some radiation sickness).</p>
<p>Now, for some links:</p>
<ul>
<li><a href="http://tv.adobe.com/watch/adc-presents/introducing-browserlab" title="Adobe Browserlab" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/tv.adobe.com');">Adobe Browserlab</a></li>
<li><a href="http://www.chroniclelive.co.uk/north-east-news/todays-evening-chronicle/2009/11/04/batman-and-robin-in-drunken-bigg-market-brawl-72703-25090036/" title="Batman arrested in drunken Bigg Market brawl" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.chroniclelive.co.uk');">Batman arrested in drunken Bigg Market brawl</a></li>
<li><a href="http://www.dailymail.co.uk/news/article-1225423/Unveiled-Britains-2m-underground-mansion-designed-away-prying-eyes.html" title="Unveiled: The luxurious £2m underground mansion designed to keep away prying eyes" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.dailymail.co.uk');">Unveiled: The luxurious £2m underground mansion designed to keep away prying eyes</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.eirikhoem.net/index.php/2009/11/06/189/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Evening reading #1</title>
		<link>http://blog.eirikhoem.net/index.php/2009/11/05/evening-reading-1/</link>
		<comments>http://blog.eirikhoem.net/index.php/2009/11/05/evening-reading-1/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 16:05:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Evening reading]]></category>

		<guid isPermaLink="false">http://blog.eirikhoem.net/?p=186</guid>
		<description><![CDATA[After some time of inactivity I&#8217;ve decided to breath some life into this blog. This post is the first under the category &#8220;Evening reading&#8221;, which contains rambling on current events and some good reads I&#8217;ve come across. Expect more of these. As for content in general I&#8217;ve got a couple of book reviews lined up, [...]]]></description>
			<content:encoded><![CDATA[<p>After some time of inactivity I&#8217;ve decided to breath some life into this blog. This post is the first under the category &#8220;Evening reading&#8221;, which contains rambling on current events and some good reads I&#8217;ve come across. Expect more of these. As for content in general I&#8217;ve got a couple of book reviews lined up, some notes on my experiences with Actionscript3 and Flex, and a post on setting up your own dump of Geonames / GeoIP.</p>
<ul>
<li><a href="http://arstechnica.com/microsoft/news/2009/10/windows-7-had-8-million-testers-biggest-beta-ever.ars" title=" Windows 7 had 8 million testers, biggest beta ever" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/arstechnica.com');">Windows 7 had 8 million testers, biggest beta ever</a></li>
<li><a href="http://www.telegraph.co.uk/science/space/6500471/Darwinian-evolutionary-theory-will-help-find-alien-life-says-Nasa-scientist.html" title="Darwinian evolutionary theory will help find alien life, says Nasa scientist" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/www.telegraph.co.uk');">Darwinian evolutionary theory will help find alien life, says Nasa scientist</a></li>
<li><a href="http://io9.com/5391989/a-black-hole-engine-that-could-power-spaceships" title="A Black Hole Engine That Could Power Spaceships" target="_blank" onclick="javascript:pageTracker._trackPageview ('/outbound/io9.com');">A Black Hole Engine That Could Power Spaceships</a></li>
</ul>
<p>On a side note, I&#8217;m moving by the end of the month. Hooray for a new place!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eirikhoem.net/index.php/2009/11/05/evening-reading-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe CS4 can&#8217;t be installed on a case sensitive file system?!</title>
		<link>http://blog.eirikhoem.net/index.php/2009/10/07/adobe-cs4-cant-be-installed-on-a-case-sensitive-file-system/</link>
		<comments>http://blog.eirikhoem.net/index.php/2009/10/07/adobe-cs4-cant-be-installed-on-a-case-sensitive-file-system/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 13:00:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Apple]]></category>

		<guid isPermaLink="false">http://blog.eirikhoem.net/?p=176</guid>
		<description><![CDATA[So, Adobe CS4 suite apparently does not support case sensitive file systems. In this day and age this is plain out retarded. I wish Apple would make case sensitive the default FS when installing OSX. That would probably light a spark for Adobe.
]]></description>
			<content:encoded><![CDATA[<p>So, <a href="http://www.adobe.com/products/photoshop/photoshop/systemreqs/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.adobe.com');">Adobe CS4 suite apparently does not support case sensitive file systems</a>. In this day and age this is plain out retarded. I wish Apple would make case sensitive the default FS when installing OSX. That would probably light a spark for Adobe.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eirikhoem.net/index.php/2009/10/07/adobe-cs4-cant-be-installed-on-a-case-sensitive-file-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Book preview: Papervision3D Essentials and Flex 3 with Java</title>
		<link>http://blog.eirikhoem.net/index.php/2009/10/06/book-preview-papervision3d-essentials-and-flex-3-with-java/</link>
		<comments>http://blog.eirikhoem.net/index.php/2009/10/06/book-preview-papervision3d-essentials-and-flex-3-with-java/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 15:59:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Book]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Media]]></category>
		<category><![CDATA[Papervision]]></category>

		<guid isPermaLink="false">http://blog.eirikhoem.net/?p=149</guid>
		<description><![CDATA[Following my review of Mastering phpMyAdmin 3.1  Packt Publishing was kind enough to send me a couple of more books to review.  While I am waiting for these books to get here I have gotten my hands on some sample chapters. Check them out!
Papervision3D Essentials


Authors Jeff Winder, Paul Tondeur
ISBN 1847195725
ISBN 13: 978-1-847195-72-2
Download Chapter [...]]]></description>
			<content:encoded><![CDATA[<p>Following <a href="http://blog.eirikhoem.net/index.php/2009/09/12/book-review-mastering-phpmyadmin-31/">my review of Mastering phpMyAdmin 3.1</a>  <a href="http://www.packtpub.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');">Packt Publishing</a> was kind enough to send me a couple of more books to review.  While I am waiting for these books to get here I have gotten my hands on some sample chapters. Check them out!</p>
<h1>Papervision3D Essentials</h1>
<div id="attachment_148" class="wp-caption alignleft" style="width: 213px"><a href="http://www.packtpub.com/papervision3d-essentials/mid/15090958hmvy?utm_source=blog.eirikhoem.net&amp;utm_medium=affiliate&amp;utm_content=blog&amp;utm_campaign=mdb_000617" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');"><img class="size-full wp-image-148" title="Papervision3D Essentials Cover" src="http://blog.eirikhoem.net/wp-content/uploads/2009/10/papervision-3d-essentials.jpg" alt="Papervision3D Essentials Cover" width="203" height="250" /></a><p class="wp-caption-text">Papervision3D Essentials Cover</p></div>
<p>
<strong><br />
Authors</strong> Jeff Winder, Paul Tondeur<strong><br />
ISBN</strong> 1847195725<br />
<strong>ISBN 13:</strong> 978-1-847195-72-2</p>
<p><a href="http://blog.eirikhoem.net/wp-content/uploads/2009/10/papervision-3d-sample-chapter-8-external-models.pdf">Download Chapter 8 &#8211; External models</a>
</p>
<p><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/></p>
<h1>Flex 3 with Java</h1>
<div id="attachment_147" class="wp-caption alignleft" style="width: 172px"><a href="http://www.packtpub.com/flex-3-with-java/mid/150909eia64u?utm_source=blog.eirikhoem.net&amp;utm_medium=affiliate&amp;utm_content=blog&amp;utm_campaign=mdb_000615" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');"><img class="size-full wp-image-147" title="Flex 3 with Java Cover" src="http://blog.eirikhoem.net/wp-content/uploads/2009/10/flex-3-with-java.jpg" alt="Flex 3 with Java Cover" width="162" height="200" /></a><p class="wp-caption-text">Flex 3 with Java Cover</p></div>
<p>
<strong>Author</strong> Satish Kore<br />
<strong>ISBN</strong> 1847195342<br />
<strong>ISBN 13</strong> 978-1-847195-34-0</p>
<p><a href="http://blog.eirikhoem.net/wp-content/uploads/2009/10/flex-3-with-java_samplechapter.pdf">Download Chapter 5 &#8211; Working with XML</a>
</p>
<p><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eirikhoem.net/index.php/2009/10/06/book-preview-papervision3d-essentials-and-flex-3-with-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Book review: Mastering phpMyAdmin 3.1</title>
		<link>http://blog.eirikhoem.net/index.php/2009/09/12/book-review-mastering-phpmyadmin-31/</link>
		<comments>http://blog.eirikhoem.net/index.php/2009/09/12/book-review-mastering-phpmyadmin-31/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 14:30:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Review]]></category>

		<guid isPermaLink="false">http://blog.eirikhoem.net/?p=130</guid>
		<description><![CDATA[Book review: Mastering phpMyAdmin 3.1
ISBN: 9871847197863
Publisher: Packt Publishing
Author: Marc Delisle
I had pretty much forgotten phpMyAdmin when I got a mail from Swati at Packt Publishing asking me to review this book. It&#8217;s been a very long time since I last used phpMyAdmin. When I first started out with web development (under Windows) and PHP I [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_136" class="wp-caption alignleft" style="width: 172px"><a href="http://www.packtpub.com/mastering-phpmyadmin-3-1-fourth-edition/book/mid/260509je891v" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');"><img class="size-full wp-image-136" title="Mastering phpMyAdmin 3.1 Cover" src="http://blog.eirikhoem.net/wp-content/uploads/2009/09/mastering-phpmyadmin-311.jpg" alt="Mastering phpMyAdmin 3.1 Cover" width="162" height="200" /></a><p class="wp-caption-text">Mastering phpMyAdmin 3.1 Cover</p></div>
<p><strong>Book review:</strong> <a href="http://www.packtpub.com/mastering-phpmyadmin-3-1-fourth-edition/book/mid/260509je891v" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');">Mastering phpMyAdmin 3.1</a><br />
<strong>ISBN: </strong>9871847197863<br />
<strong>Publisher:</strong> <a href="http://www.packtpub.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.packtpub.com');">Packt Publishing</a><br />
<strong>Author:</strong> <a href="http://infomarc.info/" onclick="javascript:pageTracker._trackPageview ('/outbound/infomarc.info');">Marc Delisle</a></p>
<p>I had pretty much forgotten <a href="http://www.phpmyadmin.net/home_page/index.php" onclick="javascript:pageTracker._trackPageview ('/outbound/www.phpmyadmin.net');">phpMyAdmin </a>when I got a mail from Swati at Packt Publishing asking me to review this book. It&#8217;s been a very long time since I last used phpMyAdmin. When I first started out with web development (under Windows) and PHP I was hosted on a shared web host. They had phpMyAdmin installed as their main database management tool. With little to no knowledge on databases I was very happy to be able to do my basic list of operations to get stuff working. Needless to say I was a lightweight user.</p>
<p>Fast forward to today. I&#8217;ve moved on to Linux and the way of the command-line as many others, using the <a href="http://dev.mysql.com/downloads/gui-tools/5.0.html" onclick="javascript:pageTracker._trackPageview ('/outbound/dev.mysql.com');">MySQL Gui Tools</a> (Query Browser, Administrator) in addition. The tools from MySQL sure have their quirks and bugs, but they have mostly suited my needs for the last years. So, how does phpMyAdmin hold up, and is this the right book to get you started?</p>
<p>The book, written by <a href="http://infomarc.info/" onclick="javascript:pageTracker._trackPageview ('/outbound/infomarc.info');">Marc Delisle</a>, clocks in at 326 pages, split into 18 chapters. The topics range from basic installation and database / table management to the &#8220;Multi-Table Query Generator&#8221; amd &#8220;The Relational System&#8221;.</p>
<p>The first few pages of the first chapter explains a bit background info on the software, which is pretty much skim-though-if-interested. More interesting, it covers installation for various platforms. The coverage on the installation parts can be a bit short for new users, but should be sufficient in most cases.</p>
<p>I especially liked chapters 2 and 3. Chapter 2 deals with authentication, which is pretty well covered, and the features are surprisingly extensive. Previously I was a bit reluctant to use phpMyAdmin in a production environment due to the lack of proper authentication, but these added features grants it a new evaluation. In chapter 3 the author spends time explaining the GUI itself and how it can be customized. Some parts of this section will definitely be interesting for people doing web hosting as it allows some branding of the software itself as well as laying down some &#8216;ground rules&#8217; on the feature set to expose. In addition there are tips on user-centric adjustments for optimizing the work flow for the developer using the software. When using it on a regular basis this information is very nice to have.</p>
<p>Chapters 4 and 5 and 6 deals with database, table and data management. These chapters will probably be skim-trough material for most experienced developers, as the GUI is quite self-explanatory when it comes to these kind of actions. However, it&#8217;s worth mentioning that the author points out lots of configuration keys for controlling both the GUI, behavior and again features offered. Nothing is crucial for the lightweight user, but if phpMyAdmin is your main tool for the job you&#8217;d want to read these chapters in detail as well.</p>
<p>The coverage of exporting schemas and data is quite well done. Again I was surprised with the list of formats supported by phpMyAdmin. The author takes care to describe the various formats, as well as server-side requirements and how-to&#8217;s where applicable.</p>
<p>There is a chapter dedicated to searching, which I do not think needs a whole chapter on it&#8217;s own since it&#8217;s also very intuitive to use the GUI here. However, the chapter is quite short. The same goes for table and database operations which are also covered. Again I find the GUI clear enough for most of these tasks to be straight forward.</p>
<p>Chapter 11 deals with &#8216;The Relational System&#8217;, which I&#8217;ve never heard about. Turns out it&#8217;s pretty neat! The author does a good job of covering the tool and it&#8217;s features. It takes a bit of extra configuration to get it running (create the phpMyAdmin database). This is basically a tool that lets you work visually with your database, seeing relations between tables etc. I&#8217;ve mainly used MySQL Workbench when I&#8217;ve had to generate a model based on a database. This is a viable replacement. The chapter dealing with system documentation can come in handy if you like to document your schema.</p>
<p>There is also a chapter dedicated to MySql 5.0 and 5.1 features which may come in handy if you are up to date on that front.</p>
<p><strong>Conclusion</strong><br />
I&#8217;ve learned that phpMyAdmin has evolved quite a bit, especially in terms of authentication features and installation scripts. I was quite happy to set up the config by hand, but I think the guided setup script is a quite nice feature to new developers. My impression of phpMyAdmin has definitely changed. I used to view it as a &#8220;hobby-developers-tool&#8221; for database access, but I&#8217;ve come to realize that it offers a wast selection of features that might reduce both time and complexity for database management. For shared web-hosting and development environments it&#8217;s a really nice tool to have.</p>
<p>The book does a very good job at documenting phpMyAdmin. Some parts of the application are really too basic to describe in detail in a book, however the author has tackled this nicely by adding references to configuration tweaks and settings which makes these chapters interesting to the more advanced users.If phpMyAdmin is your weapon of choice when it comes to database management you&#8217;d definitely want to read this book. If you want to take it for a spin first, <a href="http://blog.eirikhoem.net/wp-content/uploads/2009/09/phpmyadmin_samplechapter.pdf" target="_blank">check out this sample chapter</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eirikhoem.net/index.php/2009/09/12/book-review-mastering-phpmyadmin-31/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Board migration &#8211; Discus 4.x to vBulletin</title>
		<link>http://blog.eirikhoem.net/index.php/2009/03/18/board-migration-discus-4x-to-vbulletin/</link>
		<comments>http://blog.eirikhoem.net/index.php/2009/03/18/board-migration-discus-4x-to-vbulletin/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 21:06:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Discus]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[vBulletin]]></category>

		<guid isPermaLink="false">http://blog.eirikhoem.net/?p=96</guid>
		<description><![CDATA[A short recap of my experiences with migrating a DiscusWare board to vBulletin]]></description>
			<content:encoded><![CDATA[<p>I just finished the initial trial migration of a <a href="http://www.discusware.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.discusware.com');">Discus v4.x</a> based board over to <a href="https://www.vbulletin.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.vbulletin.com');">vBulletin</a>.</p>
<p>Now, I&#8217;d like to write a few words on Discus. I cannot see why anyone looking to set up a new board would choose this software. It&#8217;s actually file based (!). Yes, you heard me. The posts, users and threads are stored in (plain) text files. I was quite surprised the first time I got around to checking out what I was supposed to migrate. If you head over to their site and check out a demo-site or two you&#8217;ll notice that the whole board seems a bit &#8230; unprofessional. It currently sells for 149 USD, which is quite amazing when you can get vBulletin for 180USD, or even <a href="http://www.phpbb.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.phpbb.com');">phpBB </a>for free. I went with vBulletin because they supported (at least partial) import from Discus, as well as the email based service in case I got stuck.</p>
<p>Now, the data migration. Upon purchasing vBulletin I got a migration utility called ImpEx which supports quite a number of boards to import from. Discus is listed as a tier 3 board, meaning it&#8217;s not actively supported anymore.. not a good sign, but still worth a shot.</p>
<p><strong>Here is a quick recap of the required actions:</strong></p>
<p>1. Download vBulletin and ImpEx from vBulletin.com<br />
2. Create a new database for vBulletin<br />
3. Install vBulletin <a href="http://www.vbulletin.com/docs/html/main/install" onclick="javascript:pageTracker._trackPageview ('/outbound/www.vbulletin.com');">as described here</a>.<br />
4. Install the ImpEx tool <a href="http://www.vbulletin.com/docs/html/main/impex_installation" onclick="javascript:pageTracker._trackPageview ('/outbound/www.vbulletin.com');">as described here</a>.<br />
5. Configure ImpEx <a href="http://www.vbulletin.com/docs/html/main/impex_config" onclick="javascript:pageTracker._trackPageview ('/outbound/www.vbulletin.com');">as described here</a>.<br />
6. Run the ImpEx tool for Discus</p>
<p>Now, in step 6 there are some modules to import. Some of them runs in a matter of seconds, while others takes up to 10 minutes in my case. I&#8217;m not sure if the script actually refreshes, so one might want to up maximum execution time for PHP to be safe.</p>
<p>To my surprise everything went absolutely fine. Not a single hickup in the migration scripts. After the data was imported I followed the <a href="http://www.vbulletin.com/docs/html/main/impex_cleanup" onclick="javascript:pageTracker._trackPageview ('/outbound/www.vbulletin.com');">post-migrate instructions</a> and did some data verification. Everything seemed to be present, but I was not able to see any threads in the forums. I could find them with searching, and when I opened a thread it clearly stated that it was belonging in the correct forum. After looking around for some time I discovered that the forums from Discus was now configured to act as categories. I solved this by going to <strong>Edit Forum -&gt; Act as Forum</strong> and set it to <strong>Yes</strong> for each forum. When I got back to the forum listing everything was in order.</p>
<p>The only things left is to move the forums around some, get a proper language pack and some other minor adjustments. All in I&#8217;m quite satisfied with the whole process. Kudos to vBulletin.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eirikhoem.net/index.php/2009/03/18/board-migration-discus-4x-to-vbulletin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FIX &#8211; Vista64 &#8211; Catalyst Install Manager has stopped working</title>
		<link>http://blog.eirikhoem.net/index.php/2009/03/09/fix-vista64-catalyst-install-manager-has-stopped-working/</link>
		<comments>http://blog.eirikhoem.net/index.php/2009/03/09/fix-vista64-catalyst-install-manager-has-stopped-working/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 22:02:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[ATI]]></category>
		<category><![CDATA[Driver]]></category>
		<category><![CDATA[Windows Vista]]></category>

		<guid isPermaLink="false">http://blog.eirikhoem.net/?p=90</guid>
		<description><![CDATA[A few days ago I saw that Unreal Tournament 3 was added to Steam, and that they also offered some new downloadable content. I decided to give it a spin, and activated my copy of UT3 in Steam. I had to download the whole 8gb game to play it, but on a 20mbps line that&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago I saw that <a href="http://www.unrealtournament3.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.unrealtournament3.com');">Unreal Tournament 3</a> was added to <a href="http://store.steampowered.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/store.steampowered.com');">Steam</a>, and that they also offered some new downloadable content. I decided to give it a spin, and activated my copy of UT3 in Steam. I had to download the whole 8gb game to play it, but on a 20mbps line that&#8217;s wasn&#8217;t a problem. When I came back from work today I decided to give it a spin. To my amazement it crashed on startup, only giving me &#8220;UT3.exe has stopped working&#8221;. I figured it was the ATI drivers, so I went over and grabbed the latest and greatest Catalyst package. Upon starting the installation that failed as well. I tried in safe mode, tried uninstalling (which failed) and googled my eyes out. After a while I found <a href="http://www.superwasp.net/weblog/2008/11/ati-catalyst-install-manager-has.htm" onclick="javascript:pageTracker._trackPageview ('/outbound/www.superwasp.net');">this post</a> from <a href="http://www.superwasp.net/weblog/default.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/www.superwasp.net');">SuperWasp</a> which explains how to run the ATI driver installer from command line. Basically, go to <strong>C:\ATI\Support\XX-driver-version\Driver\Bin64</strong> and run the command &#8220;<strong>atisetup.exe -Install -Output screen</strong>&#8220;. I did it from the Driver folder, where the Setup.exe is located by calling &#8220;<strong>setup.exe -Install -Output screen</strong>&#8221; which also worked fine. The process took a few minutes, but once I rebooted the driver was updated.</p>
<p>PS: Windows was stuck in &#8220;Windows is now rebooting&#8221; until I unplugged my iPhone <img src='http://blog.eirikhoem.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Now, this shows how to update the driver, but it does not explain the problem with both Unreal Tournament 3 and the driver setup software failing. I&#8217;ve looked around a bit, and based on what I&#8217;ve read it seems like the .NET Framework 2.0 files might have been damaged in some way. I tried running the &#8220;<strong>sfc /scannow</strong>&#8221; command (<a href="http://support.microsoft.com/kb/929833" onclick="javascript:pageTracker._trackPageview ('/outbound/support.microsoft.com');">some info on that tool here</a>) to let Windows search for corrupt or damaged system files, but no luck. Since .NET Framework 2.0 is an integrated part of Windows Vista I&#8217;m basically unable to uninstall it as well. If anyone has any suggestions on how to fix this I&#8217;d be really glad to hear from you.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eirikhoem.net/index.php/2009/03/09/fix-vista64-catalyst-install-manager-has-stopped-working/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>A neat weather widget for Windows Vista</title>
		<link>http://blog.eirikhoem.net/index.php/2009/03/02/a-neat-weather-widget-for-windows-vista/</link>
		<comments>http://blog.eirikhoem.net/index.php/2009/03/02/a-neat-weather-widget-for-windows-vista/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 09:35:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Widget]]></category>
		<category><![CDATA[Windows Vista]]></category>

		<guid isPermaLink="false">http://blog.eirikhoem.net/?p=86</guid>
		<description><![CDATA[Lars Olav Torvik has just posted a neat weather widget for Vista, using the norwegian weather service yr.no. Give it a spin!
Related posts:
Handy online regex tool for PHP, Perl, JS and Python
Technorati Tags: Windows Vista,  Widget
]]></description>
			<content:encoded><![CDATA[<p><a href="http://larsolavtorvik.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/larsolavtorvik.com');">Lars Olav Torvik</a> has just posted <a href="http://weather.larsolavtorvik.com/" onclick="javascript:pageTracker._trackPageview ('/outbound/weather.larsolavtorvik.com');">a neat weather widget for Vista</a>, using the <a href="http://www.yr.no/" onclick="javascript:pageTracker._trackPageview ('/outbound/www.yr.no');">norwegian weather service yr.no</a>. Give it a spin!</p>
<p><strong>Related posts:</strong></p>
<p><a href="http://blog.eirikhoem.net/index.php/2008/04/29/handy-online-regex-tool-for-php-perl-js-and-python/">Handy online regex tool for PHP, Perl, JS and Python</a></p>
<p>Technorati Tags: <a href="http://technorati.com/tag/Windows+Vista" rel="tag">Windows Vista</a>, <a href="http://technorati.com/tag/Widget" rel="tag"> Widget</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eirikhoem.net/index.php/2009/03/02/a-neat-weather-widget-for-windows-vista/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XNA Platformer Starter Kit &#8211; Falling Apples</title>
		<link>http://blog.eirikhoem.net/index.php/2009/03/01/xna-platformer-starter-kit-falling-apples/</link>
		<comments>http://blog.eirikhoem.net/index.php/2009/03/01/xna-platformer-starter-kit-falling-apples/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 20:03:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Frameworks]]></category>
		<category><![CDATA[Game Development]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://blog.eirikhoem.net/?p=67</guid>
		<description><![CDATA[



As I mentioned in this previous post I&#8217;ve started to play around with C# and XNA Game Studio, and it&#8217;s very entertaining. I started out using The Platformer Starter Kit , which is a basic platformer game that you can customize and base your game on. I followed the tutorials mentioned in the previous link, [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-0056923567680782";
/* default */
google_ad_slot = "6546082201";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>As <a href="http://blog.eirikhoem.net/index.php/2009/02/28/blog-refresh-playing-with-xna-game-studio/">I mentioned in this previous post</a> I&#8217;ve started to play around with C# and XNA Game Studio, and it&#8217;s very entertaining. I started out using <a href="http://msdn.microsoft.com/en-us/library/dd254918.aspx" onclick="javascript:pageTracker._trackPageview ('/outbound/msdn.microsoft.com');">The Platformer Starter Kit</a> , which is a basic platformer game that you can customize and base your game on. I followed the tutorials mentioned in the previous link, and everything just works pretty smooth. Very satisfying to see immediate results reflected in a working game. After finishing them I decided to add a new feature by myself, a falling apple which would kill the player (I&#8217;ve been playing <a href="http://kayin.pyoko.org/iwbtg/" onclick="javascript:pageTracker._trackPageview ('/outbound/kayin.pyoko.org');">I Wanna Be The Guy</a> lately). Hence, this post: XNA Platformer Starter Kit &#8211; Falling Apples. Now, this is a very basic feature. I just based my Apple on a copy of the Gem class, and did some minor modifications to allow them to fall down once the player walks under them, and if the player is hit he&#8217;ll die. A picture to show the final result:</p>
<div id="attachment_80" class="wp-caption alignnone" style="width: 310px"><img class="size-medium wp-image-80" title="Falling Apples" src="http://blog.eirikhoem.net/wp-content/uploads/2009/03/platformer1-300x272.jpg" alt="Falling Apples" width="300" height="272" /><p class="wp-caption-text">Falling Apples</p></div>
<p>Please bear in mind that this post is just a note of the changes I did to make this work, and should not be considered a full tutorial. I might end up doing more proper posts on XNA as I progress in my work with it.</p>
<p>So, here it goes!</p>
<p>First, create a new C# class. Just copy all the contents from the Gem class, and rename Gem to Apple (and gems to apples). Also, add the following line to the Apple constructor so that we can see the difference between apples and gems: <em>Color = Color.Red;</em></p>
<p>Now, remove the following lines, since we do not need them:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp"><span style="color: #0600FF;">private</span> SoundEffect collectedSound;
&nbsp;
<span style="color: #0600FF;">public</span> <span style="color: #0600FF;">readonly</span> <span style="color: #FF0000;">int</span> PointValue;</pre></div></div>

<p>And add these:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp"><span style="color: #0600FF;">private</span> <span style="color: #0600FF;">const</span> <span style="color: #FF0000;">float</span> GravityAcceleration = <span style="color: #FF0000;">6500</span>.0f;
<span style="color: #0600FF;">private</span> <span style="color: #0600FF;">const</span> <span style="color: #FF0000;">float</span> MaxFallSpeed = <span style="color: #FF0000;">600</span>.0f;
<span style="color: #0600FF;">private</span> <span style="color: #FF0000;">bool</span> isFalling;
&nbsp;
<span style="color: #0600FF;">public</span> Vector2 Velocity
<span style="color: #000000;">&#123;</span>
    get <span style="color: #000000;">&#123;</span> <span style="color: #0600FF;">return</span> velocity; <span style="color: #000000;">&#125;</span>
    set <span style="color: #000000;">&#123;</span> velocity = value; <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
Vector2 velocity;</pre></div></div>

<p>Now, since we want to be able to trigger the apples to fall when the player passes under them, we&#8217;ll need to create a bounding rectangle, which is taller than the actual apple. This will be the rectangle the player will collide with once he passes under the apple, and hence the apple will start falling.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp"><span style="color: #0600FF;">public</span> Rectangle TriggerRectangle
<span style="color: #000000;">&#123;</span>
    get
    <span style="color: #000000;">&#123;</span>
        <span style="color: #FF0000;">int</span> left = <span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span><span style="color: #000000;">&#41;</span>basePosition.<span style="color: #0000FF;">X</span>;
        <span style="color: #FF0000;">int</span> width = <span style="color: #FF0000;">32</span>;
        <span style="color: #FF0000;">int</span> top = <span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span><span style="color: #000000;">&#41;</span>basePosition.<span style="color: #0000FF;">Y</span>;
        <span style="color: #FF0000;">int</span> height = <span style="color: #FF0000;">200</span>;
        <span style="color: #0600FF;">return</span> <span style="color: #008000;">new</span> Rectangle<span style="color: #000000;">&#40;</span>left, top, width, height<span style="color: #000000;">&#41;</span>;
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>We need to implement some kind of basic physics to calculate how fast the apple should be falling. This is done by adding a new method called ApplyPhysics, which checks if the apple is falling, and if it is, it updates the velocity and position based on some simple calculations:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp"><span style="color: #0600FF;">private</span> <span style="color: #0600FF;">void</span> ApplyPhysics<span style="color: #000000;">&#40;</span>GameTime gameTime<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #FF0000;">float</span> elapsed = <span style="color: #000000;">&#40;</span><span style="color: #FF0000;">float</span><span style="color: #000000;">&#41;</span>gameTime.<span style="color: #0000FF;">ElapsedGameTime</span>.<span style="color: #0000FF;">TotalSeconds</span>;
    <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>isFalling<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        velocity.<span style="color: #0000FF;">Y</span> = MathHelper.<span style="color: #0000FF;">Clamp</span><span style="color: #000000;">&#40;</span>velocity.<span style="color: #0000FF;">Y</span> + GravityAcceleration * elapsed, -MaxFallSpeed, MaxFallSpeed<span style="color: #000000;">&#41;</span>;
        Position += velocity * elapsed;
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>To make sure it actually falls when triggered we need to update public void Update(GameTime gameTime) and add a call to the ApplyPhysics method we just created. The call can be added right after bounce, at the end of the method:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp">    bounce = <span style="color: #000000;">&#40;</span><span style="color: #FF0000;">float</span><span style="color: #000000;">&#41;</span>Math.<span style="color: #0000FF;">Sin</span><span style="color: #000000;">&#40;</span>t<span style="color: #000000;">&#41;</span> * BounceHeight * texture.<span style="color: #0000FF;">Height</span>;
    ApplyPhysics<span style="color: #000000;">&#40;</span>gameTime<span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>The last thing we need to do in the Apple class is to add a method for actually starting the fall:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp"><span style="color: #0600FF;">public</span> <span style="color: #0600FF;">void</span> OnRockFalling<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    isFalling = <span style="color: #0600FF;">true</span>;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Next up are some changes to the<strong> Level class</strong>. Find the line which creates the Gem array:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp"><span style="color: #0600FF;">private</span> List&amp;lt;Gem&amp;gt; gems = <span style="color: #008000;">new</span> List&amp;lt;Gem&amp;gt;<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</pre></div></div>

<p>And add a new array for the Apples:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp"><span style="color: #0600FF;">private</span> List&amp;lt;Apple&amp;gt; apples = <span style="color: #008000;">new</span> List&amp;lt;Apple&amp;gt;<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;</pre></div></div>

<p>Next up is the loading of the Apples. In the LoadTile method, add a new case statement as follows:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp">    <span style="color: #0600FF;">case</span> <span style="color: #808080;">'R'</span>:
        <span style="color: #0600FF;">return</span> LoadAppleTile<span style="color: #000000;">&#40;</span>x, y<span style="color: #000000;">&#41;</span>;</pre></div></div>

<p>This will load R&#8217;s in the level code as apples. We now need to create the LoadAppleTile method:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp"><span style="color: #0600FF;">private</span> Tile LoadApppleTile<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span> x, <span style="color: #FF0000;">int</span> y<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    Point position = GetBounds<span style="color: #000000;">&#40;</span>x, y<span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Center</span>;
    apples.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><span style="color: #008000;">new</span> Apple<span style="color: #000000;">&#40;</span><span style="color: #0600FF;">this</span>, <span style="color: #008000;">new</span> Vector2<span style="color: #000000;">&#40;</span>position.<span style="color: #0000FF;">X</span>, position.<span style="color: #0000FF;">Y</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
    <span style="color: #0600FF;">return</span> <span style="color: #008000;">new</span> Tile<span style="color: #000000;">&#40;</span><span style="color: #0600FF;">null</span>, TileCollision.<span style="color: #0000FF;">Passable</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Almost there! We need to create a few news method for getting the apples to work. The first is called UpdateApples, which checks the collisions with the player:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp"><span style="color: #0600FF;">private</span> <span style="color: #0600FF;">void</span> UpdateApples<span style="color: #000000;">&#40;</span>GameTime gameTime<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #0600FF;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span> i = <span style="color: #FF0000;">0</span>; i &amp;lt; apples.<span style="color: #0000FF;">Count</span>; ++i<span style="color: #000000;">&#41;</span>
    <span style="color: #000000;">&#123;</span>
        Apple apple = apples<span style="color: #000000;">&#91;</span>i<span style="color: #000000;">&#93;</span>;
        apple.<span style="color: #0000FF;">Update</span><span style="color: #000000;">&#40;</span>gameTime<span style="color: #000000;">&#41;</span>;
        <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>apple.<span style="color: #0000FF;">BoundingCircle</span>.<span style="color: #0000FF;">Intersects</span><span style="color: #000000;">&#40;</span>Player.<span style="color: #0000FF;">BoundingRectangle</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
            OnPlayerKilled<span style="color: #000000;">&#40;</span><span style="color: #0600FF;">null</span><span style="color: #000000;">&#41;</span>;
        <span style="color: #000000;">&#125;</span>
        <span style="color: #0600FF;">else</span> <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>apple.<span style="color: #0000FF;">TriggerRectangle</span>.<span style="color: #0000FF;">Intersects</span><span style="color: #000000;">&#40;</span>Player.<span style="color: #0000FF;">BoundingRectangle</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
            OnAppleFalling<span style="color: #000000;">&#40;</span>apple<span style="color: #000000;">&#41;</span>;
        <span style="color: #000000;">&#125;</span>
    <span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Next up is the OnAppleFalling method, which in turn calls OnAppleFalling in the Apple class.</p>

<div class="wp_syntax"><div class="code"><pre class="csharp"><span style="color: #0600FF;">private</span> <span style="color: #0600FF;">void</span> OnAppleFalling<span style="color: #000000;">&#40;</span>Apple apple<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    apple.<span style="color: #0000FF;">OnAppleFalling</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Now we just need to insert calls for these methods in the correct places. First up is the UpdateApples method. This is called from the Update method. Just find the following line:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp">    UpdateGems<span style="color: #000000;">&#40;</span>gameTime<span style="color: #000000;">&#41;</span>;</pre></div></div>

<p>and insert the UpdateApples call under it:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp">    UpdateApples<span style="color: #000000;">&#40;</span>gameTime<span style="color: #000000;">&#41;</span>;</pre></div></div>

<p>The last change is to the Draw method. You&#8217;ll see there is two lines used to draw the gems, and that&#8217;s what we need to do for our apples. Insert the two following lines after the code for the gems:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp"><span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span>Apple apple <span style="color: #0600FF;">in</span> apples<span style="color: #000000;">&#41;</span>
    apple.<span style="color: #0000FF;">Draw</span><span style="color: #000000;">&#40;</span>gameTime, spriteBatch<span style="color: #000000;">&#41;</span>;</pre></div></div>

<p>Now, to give this a spin, open the 0.txt level file and place some R&#8217;s here and there. When you start up the game you should see some red gems which falls down when you pass under them.</p>
<p>PS: A more clever approach here would be to create a base class for these classes, which would hold all the shared logic and methods, but the goal for this tutorial is to show how to implement the new feature as easily as possible.</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/C%23" rel="tag">C#</a>, <a href="http://technorati.com/tag/XNA" rel="tag">XNA</a>, <a href="http://technorati.com/tag/Game+Development" rel="tag">Game Development</a></p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-0056923567680782";
/* default */
google_ad_slot = "6546082201";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.eirikhoem.net/index.php/2009/03/01/xna-platformer-starter-kit-falling-apples/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
