<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Groovy Invaders</title>
	<atom:link href="http://codeforfun.wordpress.com/2006/07/31/groovy-invaders/feed/" rel="self" type="application/rss+xml" />
	<link>http://codeforfun.wordpress.com/2006/07/31/groovy-invaders/</link>
	<description>Java development with an iPhone touch pad for the Atari 2600 from an urban hip-hop perspective</description>
	<lastBuildDate>Thu, 03 Dec 2009 06:18:31 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Cliff</title>
		<link>http://codeforfun.wordpress.com/2006/07/31/groovy-invaders/#comment-2452</link>
		<dc:creator>Cliff</dc:creator>
		<pubDate>Wed, 18 Apr 2007 12:46:13 +0000</pubDate>
		<guid isPermaLink="false">https://codeforfun.wordpress.com/2006/07/31/groovy-invaders/#comment-2452</guid>
		<description>You&#039;re welcome, though the topic is still incomplete. I&#039;ll get back to this I promise...</description>
		<content:encoded><![CDATA[<p>You&#8217;re welcome, though the topic is still incomplete. I&#8217;ll get back to this I promise&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://codeforfun.wordpress.com/2006/07/31/groovy-invaders/#comment-2451</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Wed, 18 Apr 2007 08:41:25 +0000</pubDate>
		<guid isPermaLink="false">https://codeforfun.wordpress.com/2006/07/31/groovy-invaders/#comment-2451</guid>
		<description>Thank You</description>
		<content:encoded><![CDATA[<p>Thank You</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Can&#8217;t see nothing but the source code &#187; Groovy Invaders IV</title>
		<link>http://codeforfun.wordpress.com/2006/07/31/groovy-invaders/#comment-160</link>
		<dc:creator>Can&#8217;t see nothing but the source code &#187; Groovy Invaders IV</dc:creator>
		<pubDate>Thu, 17 Aug 2006 17:19:55 +0000</pubDate>
		<guid isPermaLink="false">https://codeforfun.wordpress.com/2006/07/31/groovy-invaders/#comment-160</guid>
		<description>[...] You can copy these class definitions into corresponding files. Extra points goes to the one who can modify the write method in my script to make it write the source code to the file system in the appropriate place. Initializing our game will require that all of our entities be created and stored in instance variables so they can be managed in other methods in our Game object. We use our entities list declared at the top of Game.groovy to hold all of our entities. We want to treat the ShipEntity special as it also gets its own individual instance variable. We&#8217;ll want to provide user control over the ship so we don&#8217;t want to lose it in the list of other entities. Put a call to initEntities() method at the end of the Game constructor, define a ship instance variable and an alien counter before filling out the initEntities() method definition. In initEntities() we instantiate a ShipEntity and instantiate 60 AlienEntity objects laying the ship at the bottom center of the screen and arranging the aliens in 5 rows at the top of the screen. &#160;&#160;&#160;&#160;private&#160;void&#160;initEntities() &#160;&#160;&#160;&#160;{ &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;//&#160;create&#160;the&#160;player&#160;ship&#160;and&#160;place&#160;it&#160;roughly&#160;in&#160;the&#160;center&#160;of&#160;the&#160;screen &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;ship&#160;=&#160;new&#160;ShipEntity(this,&quot;sprites/ship.gif&quot;,370,550) &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;entities.add(ship) &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;def&#160;game&#160;=&#160;this &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;//&#160;create&#160;a&#160;block&#160;of&#160;aliens&#160;(5&#160;rows,&#160;by&#160;12&#160;aliens,&#160;spaced&#160;evenly) &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;5.times&#160;{&#160;row&#160;-&gt; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;12.times&#160;{&#160;col&#160;-&gt; &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;Entity&#160;alien&#160;=&#160;new&#160;AlienEntity(game, &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#8221;sprites/alien.gif&#8221;, &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;100+(col*50), &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;(50)+row*30) &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;entities.add(alien) &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;alienCount++ &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;} &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;} &#160;&#160;&#160;&#160;}  Now here comes the hard part. I have references to gif files and they need to be available at runtime. You&#8217;ll need put these gif files into your project first. Then you&#8217;ll need to figure out how to make them available during runtime. How you make it work will depend on your development environment. For the purpose of the tutorial (and for the purpose of showing readers how I can mix a bunch of technologies in one tutorial and explain them all at once) I&#8217;m using Maven2 to build groovy-invaders. Because Groovy is a pseudo-interpreted language (it interprets and compiles source as it runs) you don&#8217;t need a build step. If you are using an IDE and you&#8217;re savvy enough with the Groovy plugins you may be able to run the project without compiling. (If so please tell me how to.) In general, you want to make the graphics available in the classpath under a folder called sprites so that the above code will work. I&#8217;ve updated part I in my series so you can referr there to see how my folders and files are laid out. If you follow suit then you should be able to create a sprites folder under the resources folder and drop the graphics in there. After copying the graphics into your project you should be able to run &#8220;mvn test&#8221; one the command line and then you&#8217;ll have an output folder full of everything you need to see our first screen. Run the Game class with the &#8220;java&#8221; command including the groovy-all-jsr-xx.jar in the classpath and you should see a window with the ship at the bottom and 60 aliens in formation at the top. (I lean on my IDE here and create a run configuration that includes the project classpath and the Game class as the main entry point.) That&#8217;ll do it for today. I gotta get some real work done. Take a moment to peruse the code and improve if you will. Until next time you can use the little box below to drop it like it&#8217;s hot&#8230; [...]</description>
		<content:encoded><![CDATA[<p>[...] You can copy these class definitions into corresponding files. Extra points goes to the one who can modify the write method in my script to make it write the source code to the file system in the appropriate place. Initializing our game will require that all of our entities be created and stored in instance variables so they can be managed in other methods in our Game object. We use our entities list declared at the top of Game.groovy to hold all of our entities. We want to treat the ShipEntity special as it also gets its own individual instance variable. We&#8217;ll want to provide user control over the ship so we don&#8217;t want to lose it in the list of other entities. Put a call to initEntities() method at the end of the Game constructor, define a ship instance variable and an alien counter before filling out the initEntities() method definition. In initEntities() we instantiate a ShipEntity and instantiate 60 AlienEntity objects laying the ship at the bottom center of the screen and arranging the aliens in 5 rows at the top of the screen. &nbsp;&nbsp;&nbsp;&nbsp;private&nbsp;void&nbsp;initEntities() &nbsp;&nbsp;&nbsp;&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;create&nbsp;the&nbsp;player&nbsp;ship&nbsp;and&nbsp;place&nbsp;it&nbsp;roughly&nbsp;in&nbsp;the&nbsp;center&nbsp;of&nbsp;the&nbsp;screen &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ship&nbsp;=&nbsp;new&nbsp;ShipEntity(this,&#8221;sprites/ship.gif&#8221;,370,550) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;entities.add(ship) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def&nbsp;game&nbsp;=&nbsp;this &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;create&nbsp;a&nbsp;block&nbsp;of&nbsp;aliens&nbsp;(5&nbsp;rows,&nbsp;by&nbsp;12&nbsp;aliens,&nbsp;spaced&nbsp;evenly) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5.times&nbsp;{&nbsp;row&nbsp;-&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;12.times&nbsp;{&nbsp;col&nbsp;-&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Entity&nbsp;alien&nbsp;=&nbsp;new&nbsp;AlienEntity(game, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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sp;&nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;}  Now here comes the hard part. I have references to gif files and they need to be available at runtime. You&#8217;ll need put these gif files into your project first. Then you&#8217;ll need to figure out how to make them available during runtime. How you make it work will depend on your development environment. For the purpose of the tutorial (and for the purpose of showing readers how I can mix a bunch of technologies in one tutorial and explain them all at once) I&#8217;m using Maven2 to build groovy-invaders. Because Groovy is a pseudo-interpreted language (it interprets and compiles source as it runs) you don&#8217;t need a build step. If you are using an IDE and you&#8217;re savvy enough with the Groovy plugins you may be able to run the project without compiling. (If so please tell me how to.) In general, you want to make the graphics available in the classpath under a folder called sprites so that the above code will work. I&#8217;ve updated part I in my series so you can referr there to see how my folders and files are laid out. If you follow suit then you should be able to create a sprites folder under the resources folder and drop the graphics in there. After copying the graphics into your project you should be able to run &#8220;mvn test&#8221; one the command line and then you&#8217;ll have an output folder full of everything you need to see our first screen. Run the Game class with the &#8220;java&#8221; command including the groovy-all-jsr-xx.jar in the classpath and you should see a window with the ship at the bottom and 60 aliens in formation at the top. (I lean on my IDE here and create a run configuration that includes the project classpath and the Game class as the main entry point.) That&#8217;ll do it for today. I gotta get some real work done. Take a moment to peruse the code and improve if you will. Until next time you can use the little box below to drop it like it&#8217;s hot&#8230; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Can&#8217;t see nothing but the source code &#187; Groovy Invaders II</title>
		<link>http://codeforfun.wordpress.com/2006/07/31/groovy-invaders/#comment-134</link>
		<dc:creator>Can&#8217;t see nothing but the source code &#187; Groovy Invaders II</dc:creator>
		<pubDate>Tue, 08 Aug 2006 12:44:41 +0000</pubDate>
		<guid isPermaLink="false">https://codeforfun.wordpress.com/2006/07/31/groovy-invaders/#comment-134</guid>
		<description>[...] Yesterday I began a trail on my development of the classic Space Invaders using Groovy. So far I only shared my Maven &#8220;pom.xml&#8221; which I will use to build my final project. I&#8217;d eventually like to execute the project with Maven if possible/practical but since I&#8217;m still a newbie I&#8217;ll stay content with a basic Maven build. Let&#8217;s move onto the code for the game. I explained yesterday that if you wanted to follow along you should create a folder named groovy-invaders somewhere on your hard drive to hold all of our hard work. It doesn&#8217;t need to be called groovy-invaders at all; you can call it whatever you wish. (Name the folder &#8220;crap-that-occupies-my-time-when-i-should-be-working&#8221; if your operating system supports really long folder names.) The code in my little series is all based on code found in a tutorial here. [...]</description>
		<content:encoded><![CDATA[<p>[...] Yesterday I began a trail on my development of the classic Space Invaders using Groovy. So far I only shared my Maven &#8220;pom.xml&#8221; which I will use to build my final project. I&#8217;d eventually like to execute the project with Maven if possible/practical but since I&#8217;m still a newbie I&#8217;ll stay content with a basic Maven build. Let&#8217;s move onto the code for the game. I explained yesterday that if you wanted to follow along you should create a folder named groovy-invaders somewhere on your hard drive to hold all of our hard work. It doesn&#8217;t need to be called groovy-invaders at all; you can call it whatever you wish. (Name the folder &#8220;crap-that-occupies-my-time-when-i-should-be-working&#8221; if your operating system supports really long folder names.) The code in my little series is all based on code found in a tutorial here. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Blog Yellek &#187; Blog Archive &#187; Groovy Invaders</title>
		<link>http://codeforfun.wordpress.com/2006/07/31/groovy-invaders/#comment-133</link>
		<dc:creator>Blog Yellek &#187; Blog Archive &#187; Groovy Invaders</dc:creator>
		<pubDate>Tue, 08 Aug 2006 03:37:44 +0000</pubDate>
		<guid isPermaLink="false">https://codeforfun.wordpress.com/2006/07/31/groovy-invaders/#comment-133</guid>
		<description>[...] Clifton Craig has started an interesting series over on his blog called Groovy Invaders where he is attempting to write a space invaders game in Groovy using JOGL for the graphics routines. [...]</description>
		<content:encoded><![CDATA[<p>[...] Clifton Craig has started an interesting series over on his blog called Groovy Invaders where he is attempting to write a space invaders game in Groovy using JOGL for the graphics routines. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
