<?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>Utter Randomness &#187; PGD2009</title>
	<atom:link href="http://matt-shaffer.com/blog/category/pgd2009/feed/" rel="self" type="application/rss+xml" />
	<link>http://matt-shaffer.com/blog</link>
	<description></description>
	<lastBuildDate>Wed, 10 Feb 2010 01:57:43 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Sun Defender: Progress #2</title>
		<link>http://matt-shaffer.com/blog/2009/07/20/sun-defender-progress-2/</link>
		<comments>http://matt-shaffer.com/blog/2009/07/20/sun-defender-progress-2/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 09:59:27 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[PGD2009]]></category>

		<guid isPermaLink="false">http://matt-shaffer.com/blog/2009/07/20/sun-defender-progress-2/</guid>
		<description><![CDATA[<br/>Oh, good! I&#8217;ve been able to split up my sources into different units happily so far. I&#8217;m using a simple technique I developed when working with Java; passing the drawing context to other functions in other files to allow them to draw. And this is helping my organization a ton.
Now, I&#8217;ve got a bit much [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Oh, good! I&#8217;ve been able to split up my sources into different units happily so far. I&#8217;m using a simple technique I developed when working with Java; passing the drawing context to other functions in other files to allow them to draw. And this is helping my organization a ton.</p>
<p>Now, I&#8217;ve got a bit much to do.. first of all, it&#8217;s <a href="http://kingoflands.com">King of Lands</a>&#8216; birthday on July 30th, and I like to make big updates for it. On top of that, I&#8217;ve got 2 books to read + 200 pages from another random book for school, and somehow I have to squeeze in time to make Sun Defender.</p>
<p><img src="http://imgur.com/jixP9.png" alt="" /></p>
<p>The above screenshot is probably the sum of another chunk of 3+ hours of work, and it&#8217;s glitchy. For some ODD reason, key up events are being thrown when no key is released&#8230; On top of that, with pascal I can&#8217;t find a &#8220;isKeyDown&#8221; function; so the movement of that ship (it&#8217;s currently controllable) is jerky as well.</p>
<p>Of course, there&#8217;s some more problems to be worked out if I find a isKeyDown function, like keeping consistent timing across different computers&#8230; then I&#8217;ll have to redesign my current system <img src='http://matt-shaffer.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  but it would totally be worth it if I find that eluding function + a way to keep the key down events @ the same intervals across all computers&#8230;</p>
<p>Now, I also had to hack up the sound system a <strong>lot </strong>to get it to work the way I wanted. First of all, it&#8217;s audioOut.loop didn&#8217;t work. So I have to check when the audio is done playing, what screen it&#8217;s on, and decide if the music should loop or not. I&#8217;d also like to note that when in game (Currently, just not the menu), it&#8217;ll select a random song to play and when that&#8217;s done it&#8217;ll pick another random song.</p>
<p>Getting the random song system to work was also quite problematic, but I got it done. It was ridiculous, the system I eventually slapped down to get the job done involves a timer waiting 100ms before playing the next random song, because even though the darn thing gets out of the while(componentIsBusy) loop, it&#8217;s, guess what, <strong>still busy </strong>for a while longer.</p>
<p>In the screenshot pictured way above, the fire follows the ship of course, but what you can&#8217;t tell is that the ship is animated. Got that done too; and I have an idea for the art style of the game. One problem currently is that bullets aren&#8217;t ever destroyed yet <img src='http://matt-shaffer.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Gotta make my own garbage collection system, and maybe learn up on lists or something.. because I desperately need something similar to Java&#8217;s vectors to manage these bullets.</p>
<p>I&#8217;ve also got this thing fairly customizable already. There&#8217;s a settings.txt file, that reads whether or not to go full screen, whether or not to mute, and all of the player controls. The menu and ship are controlled by what keys are specified in the file.</p>
]]></content:encoded>
			<wfw:commentRss>http://matt-shaffer.com/blog/2009/07/20/sun-defender-progress-2/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Sun Defender: Progress #1</title>
		<link>http://matt-shaffer.com/blog/2009/07/13/sun-defender-progress-1/</link>
		<comments>http://matt-shaffer.com/blog/2009/07/13/sun-defender-progress-1/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 18:00:48 +0000</pubDate>
		<dc:creator>Matt</dc:creator>
				<category><![CDATA[PGD2009]]></category>

		<guid isPermaLink="false">http://matt-shaffer.com/blog/2009/07/13/sun-defender-progress-1/</guid>
		<description><![CDATA[<br/>So as stated in my last blog entry roughly 2 minutes ago, I&#8217;ll be posting progress of my game on this blog as well as over at pascal game dev.
In this first progress snapshot, I&#8217;ve got some super basics done:

A compressed, encrypted datafile system
Music / sound support
Particle effects!  
Just a title screen


It&#8217;s a start, [...]]]></description>
			<content:encoded><![CDATA[<br/><p>So as stated in my last blog entry roughly 2 minutes ago, I&#8217;ll be posting progress of my game on this blog as well as over at <a href="http://pascalgamedevelopment.com">pascal game dev</a>.</p>
<p>In this first progress snapshot, I&#8217;ve got some super basics done:</p>
<ol>
<li>A compressed, encrypted datafile system</li>
<li>Music / sound support</li>
<li>Particle effects! <img src='http://matt-shaffer.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </li>
<li>Just a title screen</li>
</ol>
<p><a href="http://imgur.com/V9447.png"><img src="http://imgur.com/V9447l.png" border="0" alt="" /></a></p>
<p>It&#8217;s a start, and I&#8217;m fairly new to pascal although I&#8217;m loving it and hating it. I come from a Java / PHP background and I use TONS of different include files. For the life of me, I cannot learn to use pascal&#8217;s units efficiently. It&#8217;s not like Java and PHP where you can have File 1 including file 2 and file 2 including file 1 at the same time &#8212; pascal just doesn&#8217;t let ya do it. Because of this, I cannot continue with my current coding style and it&#8217;s throwing me off &#8211; bad. I&#8217;ve only got 2 units so far, and I foresee this game being 1 big fat hunkin&#8217; 200kb unit with that random 3kb unit.</p>
<p>By the way, the FPS is capped off at 60 FPS, but it&#8217;ll still run +- 5 FPS to that, as seen in the screenshot. Aside from that, it appears the engine I&#8217;m using, Andorra, uses VSync (good), so depending on your monitor&#8217;s refresh rate the FPS could vary, but should generally stick around 60-65 FPS max.</p>
<p>The game also runs at 800&#215;600 resolution, and if you enable fullscreen (which will be the default), it won&#8217;t change your refresh rate or depth&#8230; I hate games that do that &#8217;cause it screws over my monitor.</p>
<p>Now, what exactly is the game made with?</p>
<ul>
<li>Freepascal 2.2.4</li>
<li>Lazarus .9.27</li>
<li>Andorra 2d .4.51</li>
<li>OpenGL for graphics, DirectX for sound</li>
<li>Images created with GIMP</li>
</ul>
<p>Seeing as this is my first ever pascal game, this will be fun. (And extremely poorly coded woopie). The good news is, you will probably never find out just how poorly coded :p</p>
]]></content:encoded>
			<wfw:commentRss>http://matt-shaffer.com/blog/2009/07/13/sun-defender-progress-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
