<?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>xnaFan&#039;s Blog</title>
	<atom:link href="http://xnafan.net/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://xnafan.net</link>
	<description>Life is a game ... have fun!</description>
	<lastBuildDate>Fri, 30 Apr 2010 19:04:17 +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>Protect your Carrot</title>
		<link>http://xnafan.net/?p=203</link>
		<comments>http://xnafan.net/?p=203#comments</comments>
		<pubDate>Fri, 30 Apr 2010 18:34:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Game Jams]]></category>
		<category><![CDATA[Game]]></category>
		<category><![CDATA[Game Jam]]></category>
		<category><![CDATA[Protect your carrot]]></category>

		<guid isPermaLink="false">http://xnafan.net/?p=203</guid>
		<description><![CDATA[
Just finished attending Indie9000 gamejam here in Aalborg. We had a lot of fun. The theme (revealed friday evening) was Rabbits.
We were intent on making a combined "Shoot-the-little-varmints" and Tower Defense game where we would partly shoot the little rodents with a shotgun (instant gratisfaction  ) and partly set up traps and obstacles to [...]]]></description>
			<content:encoded><![CDATA[<div><img style="float:left;margin:10px;" title="protect your carrot" src="http://xnafan.net/http://xnafan.net/wp-content/uploads/2010/04/protect-your-carrot-300x225.png" alt="" width="300" height="225" /><br />
Just finished attending Indie9000 gamejam here in Aalborg. We had a lot of fun. The theme (revealed friday evening) was Rabbits.<br />
We were intent on making a combined "Shoot-the-little-varmints" and Tower Defense game where we would partly shoot the little rodents with a shotgun (instant gratisfaction <img src='http://xnafan.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ) and partly set up traps and obstacles to keep them out of the garden.<br />
In the end we only implemented the shoot-em-up part, but had great fun getting there.<br />
One thing we laughed a lot about was the fact that we had to implement some censorship. We wanted the rabbits to be able to "spawn" new rabbits when amorous feelings arose. But they had very few inhibitions. To begin with we found out that they were jumping members of their own sex. While we have nothing morally against that - it didn't lead to offspring (which was our intention to begin with) so we put a stop to that.<br />
Then we found out that they were copulating with the deceased which we also chose to stop, and finally when all was well and dandy and little rabbitcouples were having rabbit offspring we saw some deviants sexually assaulting the babies. So finally, after three "censorship IF-sentences" we got the game up and running <img src='http://xnafan.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .<br />
<img style="float:left;margin:10px;" title="protect your carrot 2" src="http://xnafan.net/http://xnafan.net/wp-content/uploads/2010/04/protect-your-carrot-2-300x225.png" alt="" width="300" height="225" /><br />
There were a lot of other very well made games and we saw our chances of winning any of the categories as very slim <img src='http://xnafan.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .<br />
One thing we were very happy about was making a score system to tempt the good gamers into making the game harder for themselves: We awarded the player 1 point for every kill. But if you kept shooting at the rabbitcorpse you got additional points. Two points for the next shot, then three, four, etc. for the entire two seconds before the corpse was removed from the playingfield. this makes it possible to get up around 1+2+3+.....+15+16 points if you go on a splatterspree <img src='http://xnafan.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . This also lets the other rabbits get closer to your carrot, gives them time to make new rabbits and even more rabbits are spawned from the rabbitholes around the border of the playing board.<br />
The judges apparently thought this was a great balancer for the game - and also liked how easy the game was to learn (and addictive - we had to wait for one of the judges to beat our highscore <img src='http://xnafan.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ).<br />
<img style=float:left;margin:10px;" title="protectyourcarrot_splatterspree" src="http://xnafan.net/http://xnafan.net/wp-content/uploads/2010/04/protectyourcarrot_splatterspree-203x300.png" alt="" width="203" height="300" /><br />
If you want to play the game - it's available for download <a title="Playable version of Protect your Carrot" href="http://www.xnafan.net/downloads/protectyourcarrot/protect_your_carrot.zip" target="_blank"><img style="border:none;" src="http://xnafan.net/http://xnafan.net/wp-content/uploads/2010/01/floppy.png"> here</a>.</p>
<p>You need the <a title="The XNA 3.1 redistributable" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=53867a2a-e249-4560-8011-98eb3e799ef2&amp;displaylang=en" target="_blank">XNA redistributable</a> if you don't already have the XNA framework installed.</p>
<p>The sourcecode will be available soon, it's being beautified *G*.</p>
<p>Enjoy!</p></div>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/_h8wZQmXGRM&#038;hl=da_DK&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/_h8wZQmXGRM&#038;hl=da_DK&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://xnafan.net/?feed=rss2&amp;p=203</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Small project to show drawing items with the mouse in XNA</title>
		<link>http://xnafan.net/?p=196</link>
		<comments>http://xnafan.net/?p=196#comments</comments>
		<pubDate>Wed, 03 Feb 2010 21:07:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Codesamples]]></category>
		<category><![CDATA[Beginner]]></category>
		<category><![CDATA[code sample]]></category>

		<guid isPermaLink="false">http://xnafan.net/?p=196</guid>
		<description><![CDATA[I saw a post today on the XNA Community Forums asking how to give a player the possibility of adding things to a game, and storing the position of the added images.
I made a little project to show how to do this. Basically it adds a Vector2 to a generic List when the left mouse [...]]]></description>
			<content:encoded><![CDATA[<p>I saw a post today on the <a href="http://forums.xna.com/forums/">XNA Community Forums</a> asking how to give a player the possibility of adding things to a game, and storing the position of the added images.</p>
<p>I made a <a href="http://www.xnafan.net/downloads/tutorials/smallxnadrawinggame.zip"><img src="http://xnafan.net/http://xnafan.net/wp-content/uploads/2010/01/floppy.png" alt="Download" title="Download" width="32" height="32" class="alignnone size-full wp-image-135" />little project</a> to show how to do this. Basically it adds a Vector2 to a generic List when the left mouse button is pressed and removes a Vector2 when the right mousebutton is pressed.</p>
<p>Here's a small demo:<br />
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/ObysApEnTTY&#038;hl=en_US&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/ObysApEnTTY&#038;hl=en_US&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<pre class="brush: c#">using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;

namespace SmallXNADrawingGame
{
    /// &lt;summary&gt;
    /// Small class to show how to be able to draw and store objects in XNA.
    ///
    /// Jakob &quot;XNAFAN&quot; Krarup - February 2010
    /// http://www.xnafan.net
    /// &lt;/summary&gt;
    public class Game1 : Microsoft.Xna.Framework.Game
    {
        GraphicsDeviceManager graphics;
        SpriteBatch spriteBatch;

        //a list to store the dots in
        List&lt;Vector2&gt; positionOfDots = new List&lt;Vector2&gt;();

        //the dot to use for drawing
        Texture2D textureDot;

        //stores half the size of the dot for centering the texture
        Vector2 halfSizeOfDot;

        //stores the current and previous states of the mouse
        //they are used to compare in Update() to make sure
        //a mouseclick is a new one and not just the button being held
        MouseState currentMouse, oldMouse;

        //font for writing instructions
        SpriteFont defaultFont;

        public Game1()
        {
            graphics = new GraphicsDeviceManager(this);
            //set size of screen
            graphics.PreferredBackBufferHeight = 600;
            graphics.PreferredBackBufferWidth = 800;
            Content.RootDirectory = &quot;Content&quot;;

            //make sure to display mouse cursor
            this.IsMouseVisible = true;
        }

        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            textureDot = Content.Load&lt;Texture2D&gt;(&quot;dot&quot;);
            //calculate half the size of a dot and store it
            //for drawing the dot centered on the mouseclick (se Draw())
            halfSizeOfDot = new Vector2(textureDot.Width / 2, textureDot.Height / 2);

            //load the font
            defaultFont = Content.Load&lt;SpriteFont&gt;(&quot;DefaultFont&quot;);
        }

        protected override void Update(GameTime gameTime)
        {
            //store the current state of the mouse (buttons, position, etc.)
            currentMouse = Mouse.GetState();

            //if the mousebutton was pressed between this and last update...
            //this check makes certain that one click doesn&#039;t create multiple dots because the button is held down
            if (currentMouse.LeftButton == ButtonState.Pressed &amp;&amp; oldMouse.LeftButton == ButtonState.Released)
            {
                positionOfDots.Add(new Vector2(currentMouse.X, currentMouse.Y));
            }

            //if right mousebutton was pressed
            if (currentMouse.RightButton == ButtonState.Pressed &amp;&amp; oldMouse.RightButton == ButtonState.Released)
            {
                //and there are still dots left
                if (positionOfDots.Count &gt; 0)
                {
                    //remove the last
                    //&quot;-1&quot; is because the list i zero-indexed,
                    //so a count of 1 would remove the dot at position 1-1 (zero).
                    positionOfDots.RemoveAt(positionOfDots.Count - 1);
                }
            }

            base.Update(gameTime);

            //store the current state in oldMouse
            //to be able to determine when buttons have JUST been pressed
            //by comparing the two states in an update
            oldMouse = currentMouse;
        }

        protected override void Draw(GameTime gameTime)
        {
            GraphicsDevice.Clear(Color.CornflowerBlue);
            spriteBatch.Begin();

            //write instructions
            spriteBatch.DrawString(defaultFont, &quot;Left mousebutton to draw dot&quot;, new Vector2(20, 20), Color.White);
            spriteBatch.DrawString(defaultFont, &quot;Right mousebutton to delete dots&quot;, new Vector2(20, 40), Color.White);

            foreach (Vector2 position in positionOfDots)
            {
                //draw the dot centered on the position of the mouse
                //by subtracting the Vector
                //which has half the textures width for X and half the textures height for Y
                //from the position stored.
                spriteBatch.Draw(textureDot, position - halfSizeOfDot, Color.White);

                //draw the dot&#039;s position
                spriteBatch.DrawString(defaultFont, position.ToString(), position, Color.White);
            }
            base.Draw(gameTime);
            spriteBatch.End();
        }
    }
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://xnafan.net/?feed=rss2&amp;p=196</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>We won a &#8220;Juror&#8217;s Special Pick&#8221; award!!</title>
		<link>http://xnafan.net/?p=186</link>
		<comments>http://xnafan.net/?p=186#comments</comments>
		<pubDate>Wed, 03 Feb 2010 15:36:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[chasing dots]]></category>
		<category><![CDATA[nordic game jam]]></category>
		<category><![CDATA[WIN]]></category>

		<guid isPermaLink="false">http://xnafan.net/?p=186</guid>
		<description><![CDATA[I had to leave Nordic Game Jam before the votes were counted in the semifinals. Apparently we first made it to the finals and then were picked by the juror Thor Frølich (Graphics Designer and Ninja Extraordinaire from IO Interactive). He liked the simplicity - that the game had one core gameconcept chase and the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://ioi.dk"><img src="http://xnafan.net/http://xnafan.net/wp-content/uploads/2010/02/hitman-200x300.jpg" alt="" title="hitman" width="200" height="300" class="alignleft size-medium wp-image-189" /></a>I had to leave Nordic Game Jam before the votes were counted in the semifinals. Apparently we first made it to the finals and then were picked by the juror Thor Frølich (Graphics Designer and Ninja Extraordinaire from <a href="http://www.ioi.dk/">IO Interactive</a>). He liked the simplicity - that the game had one core gameconcept chase and the simplistic graphical expression.<br />
Apparently (I wasn't there, but Rasmus was) suddenly everybody could see the benefits in our simple game as opposed to the graphically superior games <img src='http://xnafan.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
GREAT <img src='http://xnafan.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://xnafan.net/?feed=rss2&amp;p=186</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Chasing Dots &#8211; Our contribution to Global Game Jam 2010</title>
		<link>http://xnafan.net/?p=175</link>
		<comments>http://xnafan.net/?p=175#comments</comments>
		<pubDate>Sun, 31 Jan 2010 14:18:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Game Jams]]></category>
		<category><![CDATA[chasing dots]]></category>
		<category><![CDATA[Game Jam]]></category>

		<guid isPermaLink="false">http://xnafan.net/?p=175</guid>
		<description><![CDATA[
This is the game we created at the Nordic Game Jam 2010.
Finally ... after liters of chocolate milk, coffee and chocolate.
After playtesting, debugging, playtesting, debugging.... etc for 48 hours - we finally have a playable version out.
The theme for this years Game Jam was "Deception" and there was a constraint saying that you had to [...]]]></description>
			<content:encoded><![CDATA[<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/UypakYGDarw&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/UypakYGDarw&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object><br />
This is the game we created at the Nordic Game Jam 2010.<br />
Finally ... after liters of chocolate milk, coffee and chocolate.<br />
After playtesting, debugging, playtesting, debugging.... etc for 48 hours - we finally have a playable version out.<br />
The theme for this years Game Jam was "Deception" and there was a constraint saying that you had to have a DonKEY, a MonKEY or a KEY in your game.</p>
<p>We chose to make a little player-vs-player maze game. The hunter (black) is faster than the hunted (white) but the hunted can spawn clones of himself.<br />
The KEY is used to unlock the teleports (red squares).</p>
<p>We are considering selling the game on Xbox Live Marketplace, but let's see <img src='http://xnafan.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.xnafan.net/Downloads/chasingdots.zip">Here's a demo of the game </a>- have fun and let me know what you think.<br />
You will probably need to install the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=53867a2a-e249-4560-8011-98eb3e799ef2&#038;displaylang=en">XNA 3.1 framework redistributable</a> first, if you don't already develop XNA games.<br />
Credits:</p>
<p>Project Manager/Music<br />
Lars Nysom</p>
<p>Audio/Concept/Leveldesign<br />
Rasmus Lønne</p>
<p>Code<br />
<a href="http://www.maltehansen.com">Malte Baden Hansen</a><br />
<a href="http://blog.eibx.dk">Jesper Eiby</a><br />
Jakob Lund Krarup</p>
]]></content:encoded>
			<wfw:commentRss>http://xnafan.net/?feed=rss2&amp;p=175</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Fanpic with Peter Molyneux :)</title>
		<link>http://xnafan.net/?p=170</link>
		<comments>http://xnafan.net/?p=170#comments</comments>
		<pubDate>Sat, 30 Jan 2010 12:15:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Game Jams]]></category>
		<category><![CDATA[Game Jam]]></category>

		<guid isPermaLink="false">http://xnafan.net/?p=170</guid>
		<description><![CDATA[I am attending the Nordic Game Jam chapter of the Global Game Jam that is going on this weekend in all timezones.
The keynote speaker is Peter Molyneux - and since I got the chance to meet a legend I just HAD to brag.
]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_171" class="wp-caption aligncenter" style="width: 460px"><img src="http://xnafan.net/http://xnafan.net/wp-content/uploads/2010/01/peter_jakob_450.jpg" alt="" title="Peter Molyneux and I" width="450" height="314" class="size-full wp-image-171" /><p class="wp-caption-text">The Legendary Games Creator and a great fan!</p></div>I am attending the Nordic Game Jam chapter of the Global Game Jam that is going on this weekend in all timezones.<br />
The keynote speaker is Peter Molyneux - and since I got the chance to meet a legend I just HAD to brag.</p>
]]></content:encoded>
			<wfw:commentRss>http://xnafan.net/?feed=rss2&amp;p=170</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>To all the Teenage-Game-Tycoons out there :)</title>
		<link>http://xnafan.net/?p=159</link>
		<comments>http://xnafan.net/?p=159#comments</comments>
		<pubDate>Thu, 28 Jan 2010 18:37:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://xnafan.net/?p=159</guid>
		<description><![CDATA[About keeping up spirits while developing games.]]></description>
			<content:encoded><![CDATA[<div style="display:block;"><a href="http://www.amazon.co.uk/Building-XNA-2-0-Games-Professionals/dp/1430209798/ref=sr_1_2?ie=UTF8&amp;s=books&amp;qid=1264703515&amp;sr=8-2"><img src="http://xnafan.net/http://xnafan.net/wp-content/uploads/2010/01/dontbeatgt.png" alt="" title="Don&#039;t be a TGT" width="373" height="196" class="alignleft size-full wp-image-160" /></a><br />
 Someone posted on the <a href="http://forums.xna.com/forums/">XNA Forums</a> about how all of his projects gradually slowed down and finally ground to a halt far from being finished and far from being anything like what he was striving for.</p>
<p>The original post was deleted while I was responding - but since I know there are many <span title="Phrase possibly coined in James Silva's book 'Building XNA 2.0 Games'" style="color:maroon;font-weight:bold;">TGT's</span> out there I thought I'd post it here.<br />
If you're a TGT - this one's for you!</div>
<blockquote><p>"Well if you want to hear my solution:</p>
<p><strong>Do a little and do it well</strong><br />
Start out simple - but finish it!<br />
If you have to create XNA-tic-tac-toe or XNA-Pong for you to finish a complete game including titlescreen, options and help, then by all means DO THAT <img src='http://xnafan.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Better to have a fully finished game to show off, expand and learn from than 20 barely-begun projects laying around.</p>
<p><strong>Be proud of what you do - because YOU did it!</strong><br />
This has worked for me in many endeavors.<br />
Continually praise yourself saying "well done - you finished another sprite/method/class/level" and remind yourself of how far you've gotten on this project.<br />
It is really a benefit to have high thoughts about what YOU produce - even despite what others may think or compare your games to. <img src='http://xnafan.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Join hands - it just makes for better results <img src='http://xnafan.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </strong><br />
Only start something by yourself if you are content with failure or another "draft-gone-prealpha-gone-stale" <img src='http://xnafan.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Find someone on the forums to make your first little game with. All gameprogrammers started small, but very few got to where they are today without the moraleboost of being in a group.</p>
<p><em>Go get'em tiger!</em></p>
<p>Kind regards - Jakob "xnaFan" Krarup"
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://xnafan.net/?feed=rss2&amp;p=159</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Nordic Game Jam this weekend &#8211; yay! :)</title>
		<link>http://xnafan.net/?p=149</link>
		<comments>http://xnafan.net/?p=149#comments</comments>
		<pubDate>Wed, 27 Jan 2010 09:26:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Game Jams]]></category>
		<category><![CDATA[Game Jam]]></category>

		<guid isPermaLink="false">http://xnafan.net/?p=149</guid>
		<description><![CDATA[
This weekend a buddy of mine and I are driving to Copenhagen to participate in Nordic Game Jam.
The sign-up closed at 260 participants, that will be my biggest jam yet  .
For those of you who haven't participated in a Game Jam yet - DO IT!
Here's a short excerpt from the NGJ webpage about why [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://nordicgamejam.org/"><img src="http://xnafan.net/http://xnafan.net/wp-content/uploads/2010/01/nordicgamejamlogo.png" alt="" title="nordicgamejamlogo" width="376" height="61" class="alignnone size-full wp-image-150" /></a></p>
<p>This weekend a buddy of mine and I are driving to Copenhagen to participate in <a href="http://nordicgamejam.org/">Nordic Game Jam</a>.<br />
The sign-up closed at 260 participants, that will be my biggest jam yet <img src='http://xnafan.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .<br />
For those of you who haven't participated in a Game Jam yet - DO IT!<br />
Here's a short excerpt from the NGJ webpage about why you should try it. It sums it up pretty well:</p>
<blockquote><p>But why participate in a game jam? And why go through 48 hours of: very little sleep, hard work, great ideas, crunching, problem solving &#038; technical issues? Because a game jam encourages innovation and experimentation. It is one of the vehicles behind the new generation of game developers that can experiment with platforms and game ideas in an intense and yet still informal atmosphere. This is the space where the new generation of talents can be found.</p>
<p>If you urge to create a game, collaborate and meet other game developers - then Nordic Game Jam is the perfect place for you. As a participant at the Nordic Game Jam you will be part of a global event of creativity and fun.</p>
<p>The Nordic Game Jam 2010 will follow the same format like previous years, as an event where students, hobbyists and professional game developers, meet up for a weekend to develop and experiment with new and innovative game ideas.</p></blockquote>
<p>My version of the 10 second pitch sounds like this:<br />
"It's an excellent chance to pick up new skills and friends while doing what you like best - code XNA <img src='http://xnafan.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ."</p>
<p><img src="http://xnafan.net/http://xnafan.net/wp-content/uploads/2010/01/PeterMolyneux.png" alt="" title="Peter Molyneux" width="120" height="164" class="alignleft size-full wp-image-155" />Nordic Game Jam will be opened by Carina Christensen, Danish Minister of Culture - which I think is a proper recognition for the role games play in the development of a common culture.<br />
But more importantly:  Peter Molyneux, yes <a href="http://en.wikipedia.org/wiki/Peter_Molyneux">THE Peter "Populous-DungeonKeeper-Black and White" Molyneux</a> will be doing the Keynote speech.<br />
To me Peter is synonymous with Artificial Intelligence. Like no other he made me believe that the characters you saw on the screen had a life of their own, even after turning off the PC <img src='http://xnafan.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Can hardly wait!</p>
]]></content:encoded>
			<wfw:commentRss>http://xnafan.net/?feed=rss2&amp;p=149</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>XNA extension methods page</title>
		<link>http://xnafan.net/?p=140</link>
		<comments>http://xnafan.net/?p=140#comments</comments>
		<pubDate>Sun, 24 Jan 2010 10:20:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Extension Methods]]></category>

		<guid isPermaLink="false">http://xnafan.net/?p=140</guid>
		<description><![CDATA[Just a short note to let you know that I will gather my extensionmethods on a separate page with sample usage for handy reference.
]]></description>
			<content:encoded><![CDATA[<p>Just a short note to let you know that I will gather my extensionmethods on a <a href="http://xnafan.net/?page_id=124">separate page</a> with sample usage for handy reference.</p>
]]></content:encoded>
			<wfw:commentRss>http://xnafan.net/?feed=rss2&amp;p=140</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>XNA Pixel Robots library</title>
		<link>http://xnafan.net/?p=93</link>
		<comments>http://xnafan.net/?p=93#comments</comments>
		<pubDate>Wed, 20 Jan 2010 22:00:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Codesamples]]></category>
		<category><![CDATA[PixelRobots]]></category>
		<category><![CDATA[PixelSpaceships]]></category>

		<guid isPermaLink="false">http://xnafan.net/?p=93</guid>
		<description><![CDATA[A while ago I came across Dave Bollinger's PixelRobots and PixelSpaceships.


He has invented a way of generating simple, random robot-like or spaceship-like sprites. He has implemented his code in Java, and you can try out an applet there that will generate many different versions of the millions and millions of possible variations.
I really liked the [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago I came across <a href="http://www.davebollinger.com/">Dave Bollinger</a>'s <a href="http://www.davebollinger.com/works/pixelrobots/">PixelRobots </a>and <a href="http://www.davebollinger.com/works/pixelspaceships/">PixelSpaceships</a>.</p>
<p><a href="http://www.davebollinger.com/works/pixelrobots/"><img src="http://xnafan.net/http://xnafan.net/wp-content/uploads/2010/01/pixelRobots_dump.png" alt="" title="pixelRobots_dump" width="300" height="313"/></a><br />
<a href="http://www.davebollinger.com/works/pixelspaceships/"><img src="http://xnafan.net/http://xnafan.net/wp-content/uploads/2010/01/pixelSpaceships_dump.png" alt="" title="pixelSpaceships_dump" width="300" height="253"  /></a></p>
<p>He has invented a way of generating simple, random robot-like or spaceship-like sprites. He has implemented his code in Java, and you can try out an applet there that will generate many different versions of the millions and millions of possible variations.<br />
I really liked the idea, and thought that it would be very nice to have an XNA implementation for anyone who needed generic spaceships or robots in a game.<br />
So I created an XNA version from his description.</p>
<p>Before you go any further I suggest you go and read about <a href="http://www.davebollinger.com/works/pixelrobots/">PixelRobots</a> and <a href="http://www.davebollinger.com/works/pixelspaceships/">PixelSpaceships</a>, so you understand what the basic functionality of the API is.<br />
You don't have to understand the internals of my API to use it, as everything is wrapped up in simple methods. But all the helpermethods and variables are available for use if you want to create something more advanced.</p>
<p>It can be as simple as this:</p>
<pre class="brush: c#">using System.Drawing;
using PixelRobots;

namespace XNAFAN.Net
{
    class Sample
    {
        public void Main()
        {
            //create two bitmaps scaled by 5 with different colors
            Bitmap spaceship = PixelMaskGenerator.GetCompletedRandomSpaceshipImage(5, Color.CornflowerBlue);
            Bitmap robot = PixelMaskGenerator.GetCompletedRandomRobotImage(5, Color.LightGreen);
        }
    }
}</pre>
<p>The above code would generate the following two images:<br />
<img src="http://xnafan.net/http://xnafan.net/wp-content/uploads/2010/01/spaceship.png" alt="" title="spaceship" width="60" height="60" class="alignnone size-full wp-image-101" /><br />
<img src="http://xnafan.net/http://xnafan.net/wp-content/uploads/2010/01/robot.png" alt="" title="robot" width="35" height="55" class="alignnone size-full wp-image-102" /></p>
<p>If you'd rather generate SpriteSheets and then use them as Content files instead of creating the spaceships runtime there's also support for that. The spritesheet below was created with the following code:</p>
<pre class="brush: c#">//create spritesheet
//scaled 3 times, 10 rows and 10 columns
//using spaceships in CornFlowerBlue
Bitmap spritesheet =
    PixelMaskGenerator.GenerateRandomSample(3, 10, PixelMaskType.SpaceShip, Color.CornFlowerBlue);
spritesheet.Save(@&quot;C:\spritesheet.png&quot;);
spritesheet.Dispose();
</pre>
<p><img src="http://xnafan.net/http://xnafan.net/wp-content/uploads/2010/01/samplespaceships.png" alt="Samples spaceships" title="Samples spaceships" width="441" height="441" class="aligncenter size-full wp-image-114" /></p>
<p>And then if you need to convert the Bitmaps to Texture2D runtime, it can be done using Cristopher M. Park's excellent method:</p>
<pre class="brush: c#">//Converts a Bitmap to a Texture2D
//Code found here:
//http://christophermpark.blogspot.com/2008/10/converting-systemdrawingbitmap-to-xna.html
Texture2D BitmapToTexture2D(Bitmap bmp)
{
    Texture2D tx = null;
    using (MemoryStream s = new MemoryStream())
    {
        bmp.Save(s, System.Drawing.Imaging.ImageFormat.Png);
        s.Seek(0, SeekOrigin.Begin); //must do this, or error is thrown in next line
        tx = Texture2D.FromFile(GraphicsDevice, s);
    }
    return tx;
}</pre>
<p><strong>Code</strong><br />
The <a href="http://xnafan.net/Downloads/pixelrobots.zip"><img src="http://xnafan.net/http://xnafan.net/wp-content/uploads/2010/01/floppy.png" alt="Download" title="Download" width="32" height="32" style="border:none;" /> code is available here</a>.<br />
The solution includes three projects:<br />
<img src="http://xnafan.net/http://xnafan.net/wp-content/uploads/2010/01/Projects.png" alt="" title="Projects" width="214" height="118" class="alignnone size-full wp-image-110" /><br />
<strong>PixelRobots</strong> is the main project is the project which contains all the code needed to generate SpaceShips, Robots and SpinedRobots (robots that are ensured a cohesive spine) for your game.<br />
<strong>ConsoleTester</strong> is a consoleproject which goes through step-by-step what is done behind the curtains. It saves the generated images to disk and displays them in an HTML page.<br />
<strong>TestingPixelRobotsInXNA</strong> is a little XNA demo which lets you generate spaceships with the left mousebutton and robots with the right mousebutton.<br />
<div id="attachment_112" class="wp-caption alignnone" style="width: 250px"><img src="http://xnafan.net/http://xnafan.net/wp-content/uploads/2010/01/xnapixelrobots_demo.png" alt="TestingPixelRobotsInXNA" title="TestingPixelRobotsInXNA" width="240" height="183" class="size-full wp-image-112" /><p class="wp-caption-text">Screenshot from the running TestingPixelRobotsInXNA project</p></div></p>
<p>I made <a href='http://xnafan.net/http://xnafan.net/wp-content/uploads/2010/01/PixelRobotsDemo.wmv'>a short video</a> presenting the API in use in TestingPixelRobotsInXNA:<br />
<object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/c2Tlrd1uLG0&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/c2Tlrd1uLG0&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>Hope it is of use to somebody - it was fun making <img src='http://xnafan.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
If you use it for something I'd love to see for what.</p>
<p><strong>More links</strong><br />
Want your own <a href="http://www.cafepress.com/davebollinger.63458801">PixelRobot Tee?</a><br />
Want the code in <a href="http://forums.digitalpoint.com/showthread.php?t=1620590">PHP for your website?</a><br />
Want to see <a href="http://www.ludumdare.com/compo/2009/07/26/the-wanderer/">the PixelRobot idea used in a windowsgame?</a> (non-XNA)</p>
]]></content:encoded>
			<wfw:commentRss>http://xnafan.net/?feed=rss2&amp;p=93</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://xnafan.net/http://xnafan.net/wp-content/uploads/2010/01/PixelRobotsDemo.wmv" length="4150034" type="video/x-ms-wmv" />
		</item>
		<item>
		<title>MouseState ExtensionMethod</title>
		<link>http://xnafan.net/?p=83</link>
		<comments>http://xnafan.net/?p=83#comments</comments>
		<pubDate>Wed, 20 Jan 2010 07:24:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Codesamples]]></category>
		<category><![CDATA[Extension Methods]]></category>
		<category><![CDATA[MouseState]]></category>

		<guid isPermaLink="false">http://xnafan.net/?p=83</guid>
		<description><![CDATA[Just a little helpermethod to get the mouse's position as a Vector2.
For those of you who still haven't gotten started with extension methods here's a quick writeup'n'sample
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;

namespace XNAFAN
{
    public static class MouseStateExtensionMethods
    {

        /// &#60;summary&#62;
      [...]]]></description>
			<content:encoded><![CDATA[<p>Just a little helpermethod to get the mouse's position as a Vector2.</p>
<p>For those of you who still haven't gotten started with extension methods <a title="Extension method introduction" href="http://csharp.net-tutorials.com/csharp-3.0/extension-methods/">here's a quick writeup'n'sample</a></p>
<pre class="brush: c#">using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;

namespace XNAFAN
{
    public static class MouseStateExtensionMethods
    {

        /// &lt;summary&gt;
        /// Returns the mouseposition as a Vector2
        /// &lt;/summary&gt;
        /// &lt;param name=&quot;mouse&quot;&gt;The current MouseState&lt;/param&gt;
        /// &lt;returns&gt;The mouseposition as a Vector2&lt;/returns&gt;
        public static Vector2 GetPosition(this MouseState mouse)
        {
            return new Vector2(mouse.X, mouse.Y);
        }
    }
}</pre>
<p>This way you don't have to convert x and y every time along the lines of </p>
<pre class="brush: c#">MouseState mouseState = Mouse.GetState();
Vector2 position = new Vector2(mouseState.X, mouseState.Y);</pre>
<p>Instead you just add a reference to the code with the extensionmethod and this enables you to write:</p>
<pre class="brush: c#">Vector2 position = mouseState.GetPosition();</pre>
<p>Nifty - eh...? <img src='http://xnafan.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://xnafan.net/?feed=rss2&amp;p=83</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
