<?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>Geek Powers</title>
	<atom:link href="http://www.geekpowers.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.geekpowers.com</link>
	<description>XNA, C#, code, games, and other ramblings of a super nerd.</description>
	<lastBuildDate>Fri, 25 Jun 2010 14:04:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>This blog was mentioned in XNA Club Communique 46</title>
		<link>http://www.geekpowers.com/?p=83</link>
		<comments>http://www.geekpowers.com/?p=83#comments</comments>
		<pubDate>Fri, 25 Jun 2010 14:04:19 +0000</pubDate>
		<dc:creator>Domenic</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.geekpowers.com/?p=83</guid>
		<description><![CDATA[I know I read this one, but I completely missed my own name in it: http://blogs.msdn.com/b/xna/archive/2010/03/18/creators-club-communiqu-46.aspx Pretty amazing, and I only saw it thanks to a pingback. Now I have to get back into XNA&#8230; I miss it and I haven&#8217;t posted anything here since March. I think that&#8217;s when I started playing WoW again. [...]]]></description>
			<content:encoded><![CDATA[<p>I know I read this one, but I completely missed my own name in it:<br />
<a href="http://blogs.msdn.com/b/xna/archive/2010/03/18/creators-club-communiqu-46.aspx">http://blogs.msdn.com/b/xna/archive/2010/03/18/creators-club-communiqu-46.aspx</a></p>
<p>Pretty amazing, and I only saw it thanks to a <a href="http://www.geekpowers.com/?p=69&amp;cpage=1#comment-12">pingback</a>. Now I have to get back into XNA&#8230; I miss it and I haven&#8217;t posted anything here since March. I think that&#8217;s when I started playing <a href="http://www.worldofwarcraft.com">WoW</a> again.</p>
<p>A coworker recently shared a game called <a href="http://www.yvoschaap.com/chainrxn/">Chain Reaction</a> with me that I think would translate well into XNA. Better yet, the graphics are easy to build from scratch, which tends to be one big reason I abandon projects. I&#8217;m not even a shred of an artist or digital music producer (I can lay tracks, but they aren&#8217;t good), so there is a lack of content there that makes indie dev difficult for me. I might give this game a go and see how it turns out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geekpowers.com/?feed=rss2&amp;p=83</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>IGameActionManager interface for simplifying input management.</title>
		<link>http://www.geekpowers.com/?p=69</link>
		<comments>http://www.geekpowers.com/?p=69#comments</comments>
		<pubDate>Fri, 12 Mar 2010 20:57:35 +0000</pubDate>
		<dc:creator>Domenic</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.geekpowers.com/?p=69</guid>
		<description><![CDATA[While reading all the latest WP7 buzz, I got to thinking that I am going to need some way of managing input between devices so as not to have a billion #if WINDOWS_PHONE or #if XBOX preprocessor statements all over my game logic. The solution is a pretty simple yet elegant abstracted IGameActionManager interface. Here [...]]]></description>
			<content:encoded><![CDATA[<p>While reading all the latest WP7 buzz, I got to thinking that I am going to need some way of managing input between devices so as not to have a billion #if WINDOWS_PHONE or #if XBOX preprocessor statements all over my game logic. The solution is a pretty simple yet elegant abstracted IGameActionManager interface.</p>
<p>Here is the interface I have defined so far:</p>
<pre name="code" class="csharp">
    public interface IGameActionManager
    {
        bool IsJumping();
        bool IsMovingRight();
        bool IsMovingLeft();
        bool IsMovingUp();
        bool IsMovingDown();

        bool IsIdle();
        bool IsFiring();

        void GetNewState();
    }
</pre>
<p>Each function corresponds to a typical game action, and the GetNewState() function gets the state for all input devices associated with the implented class itself. Knowing nothing of the implementation, other than which one you want, your game logic would look something like this:</p>
<pre name="code" class="csharp">
    IGameActionManager actionManager = new WindowsGameActionManager();

    // somewhere in your update method:
    actionManager.GetNewState();
    if (actionManager.IsJumping())
    {
        // Do your jump logic here
    }
    if (actionManager.IsMovingLeft())
    {
        // Do your move left logic here
    }
</pre>
<p>That eliminates code like:</p>
<pre name="code" class="csharp">
    #if !XBOX
    KeyboardState keyboardState = Keyboard.GetState();
    if (keyboardState.IsKeyDown(Keys.Space) &#038;&#038; previousKeyboardState.IsKeyUp(Keys.Space))
    #else
    GamePadState gamePadState = GamePad.GetState();
    if (gamePadState.DPad.Up == ButtonState.Pressed)
    #endif
    {
        // Do your jump logic here
    }
</pre>
<p>The result is less clutter in your game code itself, but more importantly, your code is more game related. You are now worrying about things like &#8220;Is the player trying to jump&#8221; instead of &#8220;is the player pressing the key that I designated to jump?&#8221;</p>
<p>I&#8217;m still working out exactly how to handle previous state code within the class, but for now you would probably have to declare a previous IGameActionManager object and get a new state at the appropriate time. The code is still cleaner than worrying about actual key presses throughout still, though.</p>
<p>Here is a windows implementation example for the IGameActionManager:</p>
<pre name="code" class="csharp">
    public class WindowsGameActionManager : IGameActionManager
    {
        KeyboardState keyboardState;
        GamePadState gamepadState;

        public WindowsGameActionManager()
        {
            GetNewState();
        }

        #region IGameActionManager Members

        public bool IsJumping()
        {
            return keyboardState.IsKeyDown(Keys.Space) ||
                gamepadState.DPad.Up == ButtonState.Pressed;
        }

        public bool IsMovingRight()
        {
            return (keyboardState.IsKeyDown(Keys.Right) &#038;&#038;
                keyboardState.IsKeyUp(Keys.Left)) ||
                (gamepadState.DPad.Right == ButtonState.Pressed &#038;&#038;
                gamepadState.DPad.Left == ButtonState.Released);
        }

        public bool IsMovingLeft()
        {
            return (keyboardState.IsKeyDown(Keys.Left) &#038;&#038;
                keyboardState.IsKeyUp(Keys.Right)) ||
                (gamepadState.DPad.Left == ButtonState.Pressed &#038;&#038;
                gamepadState.DPad.Right == ButtonState.Released);
        }

        public bool IsIdle()
        {
            return !IsMovingDown() &#038;&#038; !IsMovingLeft() &#038;&#038; !IsMovingRight() &#038;&#038; !IsMovingUp();
        }

        public bool IsFiring()
        {
            return keyboardState.IsKeyDown(Keys.RightControl) ||
                gamepadState.Triggers.Right > 0.0f;
        }

        public bool IsMovingUp()
        {
            return (keyboardState.IsKeyDown(Keys.Up) &#038;&#038; keyboardState.IsKeyUp(Keys.Down)) ||
                (gamepadState.DPad.Up == ButtonState.Pressed &#038;&#038; gamepadState.DPad.Down == ButtonState.Released);
        }

        public bool IsMovingDown()
        {
            return (keyboardState.IsKeyDown(Keys.Down) &#038;&#038; keyboardState.IsKeyUp(Keys.Up)) ||
                (gamepadState.DPad.Down == ButtonState.Pressed &#038;&#038; gamepadState.DPad.Up == ButtonState.Released);
        }

        public void GetNewState()
        {
            keyboardState = Keyboard.GetState();
            gamepadState = GamePad.GetState(PlayerIndex.One);
        }

        #endregion
    }
</pre>
<p>Please drop a comment if you find this useful, or send me a tweet: <a href="http://twitter.com/DomenicDatti">@DomenicDatti</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.geekpowers.com/?feed=rss2&amp;p=69</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>XNA and Silverlight coming to Windows Mobile!</title>
		<link>http://www.geekpowers.com/?p=63</link>
		<comments>http://www.geekpowers.com/?p=63#comments</comments>
		<pubDate>Fri, 05 Mar 2010 16:09:57 +0000</pubDate>
		<dc:creator>Domenic</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Tech News]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.geekpowers.com/?p=63</guid>
		<description><![CDATA[I purchased an HTC Ozone (upgradable to WM6.5), and a couple months later the Droid came to Verizon. Needless to say, I was upset, but there was nothing I could do about it. Enter Microsoft: http://www.engadget.com/2010/03/04/microsoft-talks-windows-phone-7-series-development-ahead-of-gdc/ http://blogs.msdn.com/ckindel/archive/2010/03/04/different-means-better-with-the-new-windows-phone-developer-experience.aspx That&#8217;s right&#8230; XNA and Silverlight are coming to Windows Mobile 7. Before now, I was just counting the [...]]]></description>
			<content:encoded><![CDATA[<p>I purchased an HTC Ozone (upgradable to WM6.5), and a couple months later the Droid came to Verizon. Needless to say, I was upset, but there was nothing I could do about it.</p>
<p>Enter Microsoft:<br />
<a href="http://www.engadget.com/2010/03/04/microsoft-talks-windows-phone-7-series-development-ahead-of-gdc/">http://www.engadget.com/2010/03/04/microsoft-talks-windows-phone-7-series-development-ahead-of-gdc/<br />
</a><a href="http://blogs.msdn.com/ckindel/archive/2010/03/04/different-means-better-with-the-new-windows-phone-developer-experience.aspx">http://blogs.msdn.com/ckindel/archive/2010/03/04/different-means-better-with-the-new-windows-phone-developer-experience.aspx</a></p>
<p>That&#8217;s right&#8230; <a href="http://creators.xna.com">XNA </a>and <a href="http://silverlight.net/">Silverlight </a>are coming to Windows Mobile 7. Before now, I was just counting the days until my current Verizon contract was up so that I could get my hands on a Droid. That would&#8217;ve meant learning a whole new set of development tools, and possibly a new language altogether (I&#8217;m not too sure what development for the Android OS is all about). Now, though, my current .NET &amp; XNA skills should be transferable!</p>
<blockquote><address>A quote from the Engadget article:<br />
&#8230;[Charlie] Kindel boldly proclaims that &#8220;If you are Silverlight or XNA developer today you&#8217;re gonna be really happy.&#8221; </address>
</blockquote>
<p><strong>I sure am.</strong></p>
<p>I can&#8217;t wait to see what all the great XNA devs come up with for the gaming side of things, and it should be pretty interesting to see what type of apps are made using Silverlight. The possibilities are endless and exciting.</p>
<p>My only hope is that they build upon the successes of the Xbox Live Indie Games platform and allow independent game developers to distribute their games and make some cash. Every other similar phone has a market place right now, and to not include that capability would be a devastating mistake on Microsoft&#8217;s part. Without the ability to buy a phone, search for fun apps &amp; games, buy, and play with them immediately, I don&#8217;t believe that anyone could look at all their options (e.g. iPhone and Droid) and choose a &#8220;crippled&#8221; Windows Mobile 7 phone over them.<br />
<strong>Update: <a href="http://twitter.com/wp7dev/status/10005356682">http://twitter.com/wp7dev/status/10005356682</a> </strong>there will be a marketplace. WOOT!</p>
<p>All in all, it&#8217;s an extremely exciting announcement, and I hope that everyone sees the potential like I do.</p>
<p>I leave you with a demo of the Windows Mobile 7 phone:</p>
<p>http://www.youtube.com/watch?v=7IOTrqlz4jo</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geekpowers.com/?feed=rss2&amp;p=63</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Two useful classes from Nick Gravelyn</title>
		<link>http://www.geekpowers.com/?p=61</link>
		<comments>http://www.geekpowers.com/?p=61#comments</comments>
		<pubDate>Sat, 23 Jan 2010 17:34:35 +0000</pubDate>
		<dc:creator>Domenic</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.geekpowers.com/?p=61</guid>
		<description><![CDATA[Nick Gravelyn posted something that I thought people might find useful: http://nickgravelyn.com/2010/01/using-interpolators-and-timers/ Using this code would nearly trivialize the use of interpolating intro/outro type  effects. I like it!]]></description>
			<content:encoded><![CDATA[<p>Nick Gravelyn posted something that I thought people might find useful:</p>
<p><a href="http://nickgravelyn.com/2010/01/using-interpolators-and-timers/">http://nickgravelyn.com/2010/01/using-interpolators-and-timers/</a></p>
<p>Using this code would nearly trivialize the use of interpolating intro/outro type  effects. I like it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geekpowers.com/?feed=rss2&amp;p=61</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crontab script generator</title>
		<link>http://www.geekpowers.com/?p=58</link>
		<comments>http://www.geekpowers.com/?p=58#comments</comments>
		<pubDate>Mon, 11 Jan 2010 03:49:50 +0000</pubDate>
		<dc:creator>Domenic</dc:creator>
				<category><![CDATA[Servers & Hosting]]></category>
		<category><![CDATA[Shell Scripting]]></category>

		<guid isPermaLink="false">http://www.geekpowers.com/?p=58</guid>
		<description><![CDATA[I was making a crontab script for a customer today when I got the inspiration to finally do what I have been wanting to do for a while. I wrote a script to write the script for me. This handy script reads in 4 parameters: The working directory (where to cd to) A binary file [...]]]></description>
			<content:encoded><![CDATA[<p>I was making a crontab script for a customer today when I got the inspiration to finally do what I have been wanting to do for a while. <a href="http://www.geekpowers.com/crongen">I wrote a script to write the script for me.</a> This handy script reads in 4 parameters:</p>
<ol>
<li>The working directory (where to cd to)</li>
<li>A binary file (or command to run)</li>
<li>A file containing the PID of the process to restart</li>
<li>An output file to save the script to.</li>
</ol>
<p>This generates a script that can be run from anywhere, like the crontab which will check to make sure the process is running. It will restart the process if not by running the binary file parameter.</p>
<p>The generated script is based on the Unreal3.2 ircdchk script, with some slight modifications. I hope someone finds it useful&#8230; if you do, drop a comment here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geekpowers.com/?feed=rss2&amp;p=58</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Server crash, backup fail, manual account restorations.</title>
		<link>http://www.geekpowers.com/?p=49</link>
		<comments>http://www.geekpowers.com/?p=49#comments</comments>
		<pubDate>Tue, 05 Jan 2010 15:45:57 +0000</pubDate>
		<dc:creator>Domenic</dc:creator>
				<category><![CDATA[Servers & Hosting]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[CPanel]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.geekpowers.com/?p=49</guid>
		<description><![CDATA[It happens to everyone in the hosting industry: hard drive failure. It happened to me on New Year&#8217;s Eve. Worst of all, I had not been watching my backups properly. We use cPanel, and its backups are amazing, but sometimes they are too amazing, because you don&#8217;t have to watch them. They are reliable in [...]]]></description>
			<content:encoded><![CDATA[<p>It happens to everyone in the hosting industry: hard drive failure. It happened to me on New Year&#8217;s Eve. Worst of all, I had not been watching my backups properly. We use cPanel, and its backups are amazing, but sometimes they are too amazing, because you don&#8217;t have to watch them. They are reliable in that you can just restore them and have a fully functional website back in seconds. Been there done that, and I had set cPanel to backup accounts a long time ago and just assumed they were working well. In fact, the backup drive was filling up and not all accounts on the server were being backed up properly. Needless to say, when the hard drive failed enough to cause kernel panics in FreeBSD, our only option was to reinstall on a new drive. That is when the fun started.</p>
<p>Once the system was reinstalled, and cPanel was installed, I had the chance to look at the backup situation. The situation was grim, and there was a lot of work to be done. Of the 70+ accounts on this server, 29 were not backed up properly via cPanel. The 40+ accounts that had cPanel backups were restored in minutes with no data loss, but the other 29 were not so lucky, and this website was one of those.</p>
<p>cPanel backs up roughly the following:</p>
<ul>
<li>Home directory</li>
<li>public_html directory</li>
<li>MySQL data including databases, users, tables, and the data in the tables</li>
<li>Subdomains, parked domains, and addon domains (like geekpowers.com)</li>
<li>Email accounts</li>
<li>Ftp accounts</li>
</ul>
<p>None of that was backed up in a restorable package, so the process was as follows:</p>
<ol>
<li>Create the account manually via our billing system, which creates the cPanel account (luckily the billing system&#8217;s account had a healthy backup!).</li>
<li>Copy the /home directory and public_html directory from the old hard drive (luckily it was still usable)</li>
<li>Restore all subdomains and addon domains, pointing them to the proper directory under public_html</li>
<li>Add all databases by looking in /var/db/mysql for the username_ prefix (luckily cPanel prefixes databases with the username).</li>
<li>Copy the /oldvar/db/mysql/username_database/ contents into the matching database location in /var/db/mysql/username_database.</li>
<li>Search through the user files for the database name, and look at config files for the username &amp; password to set as having access to the newly created databases.</li>
</ol>
<p>Unfortunately, there was nothing to be done for email accounts and ftp accounts&#8230; that data was lost, and there was nothing for me to look at to refer to for restoring them.</p>
<p>I am simply amazed that the process above seemed to work. It felt so hopeless for a couple days, and I was really dreading the thought of telling customers that their data was just gone&#8230; customers that have been with me for almost 8 years. Thanks to a little ingenuity and a lot of luck, though, that did not have to happen, and we were able to restore all accounts.</p>
<p>Lesson learned: do not take backups for granted. I am already in talks with my datacenter about an external backup solution they offer which runs RAID 6. I don&#8217;t ever want to feel dread when a hardware failure occurs again. I want to be prepared to be back up in the shortest amount of time possible by keeping the most solid backups I can.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><a class="zemanta-pixie-a" title="Reblog this post [with Zemanta]" href="http://reblog.zemanta.com/zemified/7a28def2-7a21-47bc-b043-884fc4d134da/"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/reblog_e.png?x-id=7a28def2-7a21-47bc-b043-884fc4d134da" alt="Reblog this post [with Zemanta]" /></a><span class="zem-script more-related pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
]]></content:encoded>
			<wfw:commentRss>http://www.geekpowers.com/?feed=rss2&amp;p=49</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>BeatPong beat triggered particle systems</title>
		<link>http://www.geekpowers.com/?p=44</link>
		<comments>http://www.geekpowers.com/?p=44#comments</comments>
		<pubDate>Tue, 22 Dec 2009 03:45:14 +0000</pubDate>
		<dc:creator>Domenic</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.geekpowers.com/?p=44</guid>
		<description><![CDATA[No video this time (yet), but I wanted to post to let anyone who is interested know that I have been making some slow progress with BeatPong. I just committed revision 20 which  showcases a single particle system that is triggered on a beat. The new XML beat element format is: &#60;Beat effect=&#8221;smoke&#8221; duration=&#8221;00:00:05.0000000&#8243;&#62;00:00:12.8150000&#60;/Beat&#62; The [...]]]></description>
			<content:encoded><![CDATA[<p>No video this time (yet), but I wanted to post to let anyone who is interested know that I have been making some slow progress with BeatPong. I just committed revision 20 which  showcases a single particle system that is triggered on a beat.</p>
<p>The new XML beat element format is:<br />
&lt;Beat effect=&#8221;smoke&#8221; duration=&#8221;00:00:05.0000000&#8243;&gt;00:00:12.8150000&lt;/Beat&gt;<br />
The new effect attribute specifies a name for the particle system, and the duration specifies how long the particle system will be on for. The inner text still specifies the time of the beat. This particular beat would occur at 12.815 seconds into the song, and the smoke effect would last for 5 seconds.</p>
<p>Right now it&#8217;s pretty basic&#8230; with every beat, if the beat has an effect attribute,  a function is called to add the DateTime object which specifies when the specified particle system should stop emitting particles. The times are stored in a Dictionary&lt;ParticleSystem, DateTime&gt; object. The UpdateSmokeParticles() function checks the DateTime for the smoke particle system every time the update runs (60 per second by default in XNA), and if the current time is less than or equal to the end time in the dictionary, it emits a particle. Plain and simple right? I forgot that the emitter is also moved along with the ball, and the ball is made invisible, so you get the effect of smoke coming out where the ball should be.</p>
<p>The code can be found here:<br />
<a href="http://code.google.com/p/beatpong/source/browse/trunk/Screens/GameplayScreen.cs#210">http://code.google.com/p/beatpong/source/browse/trunk/Screens/GameplayScreen.cs#210<br />
</a><a href="http://code.google.com/p/beatpong/source/browse/trunk/Screens/GameplayScreen.cs#328">http://code.google.com/p/beatpong/source/browse/trunk/Screens/GameplayScreen.cs#328</a></p>
<p>I&#8217;m pretty excited about this, as it lays the framework for other beat triggered events, and it will be the foundation for all the particle effects that need to be beat synchronized.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geekpowers.com/?feed=rss2&amp;p=44</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BeatPong gameplay demo</title>
		<link>http://www.geekpowers.com/?p=27</link>
		<comments>http://www.geekpowers.com/?p=27#comments</comments>
		<pubDate>Thu, 10 Dec 2009 05:19:57 +0000</pubDate>
		<dc:creator>Domenic</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.geekpowers.com/?p=27</guid>
		<description><![CDATA[I have been hard at work on BeatPong, recently adding a menu system and a score reading at the top. I took the menu system from an XNA creators club example and adapted it to BeatPong. The example can be found here:http://creators.xna.com/en-US/samples/gamestatemanagement. Obviously, if you download the code as is, you will see that the [...]]]></description>
			<content:encoded><![CDATA[<p>I have been hard at work on BeatPong, recently adding a menu system and a score reading at the top. I took the menu system from an XNA creators club example and adapted it to BeatPong. The example can be found here:<a href="http://creators.xna.com/en-US/samples/gamestatemanagement">http://creators.xna.com/en-US/samples/gamestatemanagement</a>. Obviously, if you download the code as is, you will see that the options menu is completely bogus still, so it&#8217;s definitely a work in progress.</p>
<p>I think the coolest thing about how this was integrated is that the menu pause works by pausing the game update method essentially and pausing the music simultaneously. It&#8217;s a pretty basic function, but one of those things that just feels great to see in your own project.</p>
<p>Also important to note is that the player 2 paddle (right) is controlled by AI. If the ball is above the paddle, it moves up, and if the ball is below the paddle, it moves down. The speed of the paddle is limited to the same speed as the left side&#8217;s paddle, making it possible to score.</p>
<p>Here is the video:<br />
<a href="http://www.youtube.com/watch?v=ozl3Xzu7hk8">http://www.youtube.com/watch?v=ozl3Xzu7hk8</a></p>
<p><object width="500" height="400"><param name="movie" value="http://www.youtube.com/v/ozl3Xzu7hk8&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/ozl3Xzu7hk8&#038;fs=1" type="application/x-shockwave-flash" width="500" height="400" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.geekpowers.com/?feed=rss2&amp;p=27</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Domain name registered &#8211; geekpowers.com</title>
		<link>http://www.geekpowers.com/?p=23</link>
		<comments>http://www.geekpowers.com/?p=23#comments</comments>
		<pubDate>Wed, 09 Dec 2009 04:01:50 +0000</pubDate>
		<dc:creator>Domenic</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.geekpowers.com/?p=23</guid>
		<description><![CDATA[Well the site is now official! I registered geekpowers.com today, and I&#8217;m super stoked that I was able to find what I believe to be a great domain name. The site map is registered with Google, so now I just have to crank out some useful content, and maybe it will attract some readers. It [...]]]></description>
			<content:encoded><![CDATA[<p>Well the site is now official! I registered geekpowers.com today, and I&#8217;m super stoked that I was able to find what I believe to be a great domain name. The site map is registered with Google, so now I just have to crank out some useful content, and maybe it will attract some readers.</p>
<p>It should work fine&#8230; after all, I have geek powers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geekpowers.com/?feed=rss2&amp;p=23</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BeatPong</title>
		<link>http://www.geekpowers.com/?p=7</link>
		<comments>http://www.geekpowers.com/?p=7#comments</comments>
		<pubDate>Tue, 08 Dec 2009 05:23:12 +0000</pubDate>
		<dc:creator>Domenic</dc:creator>
				<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://kain.users.the-irc.com/blog/?p=7</guid>
		<description><![CDATA[I&#8217;ve been working on a game that, in concept, would synchronize the horizontal velocity of a pong ball to music. The ultimate goal is of course to do this in real time, but for a proof of concept I have started developing the idea with an XML file which signifies the beats of a song. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on a game that, in concept, would synchronize the horizontal velocity of a pong ball to music. The ultimate goal is of course to do this in real time, but for a proof of concept I have started developing the idea with an XML file which signifies the beats of a song. Here is what I have so far:</p>
<p>First video: <a href="http://www.youtube.com/watch?v=yyaUibyrigg">http://www.youtube.com/watch?v=yyaUibyrigg</a></p>
<p>Second video:<br />
<a title="http://www.youtube.com/watch?v=FadV-tHOkqU" href="http://www.youtube.com/watch?v=FadV-tHOkqU">http://www.youtube.com/watch?v=FadV-tHOkqU</a></p>
<p><object width="500" height="400"><param name="movie" value="http://www.youtube.com/v/FadV-tHOkqU&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/FadV-tHOkqU&#038;fs=1" type="application/x-shockwave-flash" width="500" height="400" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>This video shows the ball with a locked vertical velocity for the sake of the demonstration. Prior to making this video, I used the record mode that I made. The song plays in the background, and I hit the spacebar on every beat. All the beats that I laid out with this method were then stored into an xml file (format shown @ <a href="http://xml.pastebin.com/f1e5cbe33">http://xml.pastebin.com/f1e5cbe33</a>). This video shows the playback of that XML file while the song plays in the background. Every time the ball hits a paddle, the horizontal velocity is adjusted so that it will hit the other paddle at the time when the next beat occurs.</p>
<p>Up to date code can be found here: <a href="http://code.google.com/p/beatpong/">http://code.google.com/p/beatpong/</a></p>
<p>I think it&#8217;s pretty slick&#8230; I hope others do too <img src='http://www.geekpowers.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  More to come!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geekpowers.com/?feed=rss2&amp;p=7</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
