<?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>MQuandt.Blog &#187; Michael</title>
	<atom:link href="http://mquandt.com/blog/author/chr0n1x/feed/" rel="self" type="application/rss+xml" />
	<link>http://mquandt.com/blog</link>
	<description></description>
	<lastBuildDate>Wed, 09 May 2012 12:16:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
<cloud domain='mquandt.com' port='80' path='/blog/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>ScriptTD v2 Progress and Thoughts</title>
		<link>http://mquandt.com/blog/2012/05/scripttd-v2-progress-and-thoughts/</link>
		<comments>http://mquandt.com/blog/2012/05/scripttd-v2-progress-and-thoughts/#comments</comments>
		<pubDate>Wed, 09 May 2012 12:16:54 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[DirectX]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[WP7]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://mquandt.com/blog/?p=186</guid>
		<description><![CDATA[Recently I haven&#8217;t been able to work on ScriptTD as much as I want to because of University assignments and work, however I do still think about what can be done to make v2 even better. Currently there is a list on Trello with some previously suggested ideas, including some of my own. (Trello list &#8230; <a href="http://mquandt.com/blog/2012/05/scripttd-v2-progress-and-thoughts/">Read more <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently I haven&#8217;t been able to work on ScriptTD as much as I want to because of University assignments and work, however I do still think about what can be done to make v2 even better. Currently there is a list on Trello with some previously suggested ideas, including some of my own. (Trello list here: <a href="https://trello.com/board/scripttd/4eb9c108b4a843a14b053155">https://trello.com/board/scripttd/4eb9c108b4a843a14b053155</a>)</p>
<p>However I recently thought about the feasibility of adding Windows 8 support to ScriptTD with SharpDX. Right now ScriptTD is written using XNA, and for the phone this is the only option. If the core of ScriptTD can be separated from the XNA libraries with appropriate wrapping, it will certainly be possible to add simultaneous support for both systems, and right now this looks like the best way forward.</p>
<p>That all said, this means that work will need to be done on the wrapping layers, and I will need to talk to Microsoft about the idea, to see if they want to help create or extend the sample for Windows 8, as this would require higher resolution art assets for the generally higher resolutions Windows 8 enjoys.</p>
<p>Thankfully Alexandre (the creator of SlimDX) has announced that SlimDX 2.1 would go live this week, so I can start working against that version soon.</p>
<p>More progress as it happens, hopefully sooner rather than later.</p>
]]></content:encoded>
			<wfw:commentRss>http://mquandt.com/blog/2012/05/scripttd-v2-progress-and-thoughts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MoneyTrack</title>
		<link>http://mquandt.com/blog/2011/12/moneytrack/</link>
		<comments>http://mquandt.com/blog/2011/12/moneytrack/#comments</comments>
		<pubDate>Sun, 25 Dec 2011 14:58:06 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[WP7]]></category>

		<guid isPermaLink="false">http://mquandt.com/blog/?p=172</guid>
		<description><![CDATA[I didn&#8217;t post about this when I first released the app, but now is a good time. MoneyTrack is a small app I made for myself that allows me to track my spending when I&#8217;m out, in a really simple way. I&#8217;ve noticed expense apps and other systems require a lot of extra information that &#8230; <a href="http://mquandt.com/blog/2011/12/moneytrack/">Read more <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://mquandt.com/blog/wp-content/uploads/2011/12/Screen3.png"><img class="alignleft size-medium wp-image-173" title="MoneyTrack Screenshot" src="http://mquandt.com/blog/wp-content/uploads/2011/12/Screen3-180x300.png" alt="" width="180" height="300" /></a>I didn&#8217;t post about this when I first released the app, but now is a good time. MoneyTrack is a small app I made for myself that allows me to track my spending when I&#8217;m out, in a really simple way. I&#8217;ve noticed expense apps and other systems require a lot of extra information that I really don&#8217;t have time to input when I&#8217;m at a shop, so I threw together something that lets me quickly note down my spending with the intention of logging that info later on. (or never)</p>
<p>Accounts in the app don&#8217;t need a specific type, so they can be used for Cash, Credit Cards, Keycards, and even Gift Cards. (A great way to track how much you have on that gift card you received for Christmas)</p>
<p>The app makes use of live tiles which let you see how much remains in each account from your Start Screen, and you can email yourself a list of the transactions you recently made, so it is easier to note these down in whatever application you use to track your overall spending.</p>
<p>I recently submitted a 1.1 update to fix a rare crash I noticed on AppHub, as well as a light re-style to take into account things like the accent colour. (Hopefully this lets my app fit the Metro theme a bit more)</p>
<p>Any and all feedback is welcome. The official support email is mtsupport at mquandt dot com, or you can post in the comments here, or contact me via Twitter. <img src='http://mquandt.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>This time around the app will be released in all regions as well. (I must have missed that setting before)</p>
]]></content:encoded>
			<wfw:commentRss>http://mquandt.com/blog/2011/12/moneytrack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kinect: Reprojecting the Depth Stream</title>
		<link>http://mquandt.com/blog/2011/12/kinect-reprojecting-the-depth-stream/</link>
		<comments>http://mquandt.com/blog/2011/12/kinect-reprojecting-the-depth-stream/#comments</comments>
		<pubDate>Fri, 09 Dec 2011 15:27:05 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://mquandt.com/blog/?p=164</guid>
		<description><![CDATA[Recently I was looking into a Kinect idea for work and needed to re-project the depth map into a point cloud that we could further process. I found it is hard to get information on how to do this properly with the data given by the official SDK, so I thought I would put this &#8230; <a href="http://mquandt.com/blog/2011/12/kinect-reprojecting-the-depth-stream/">Read more <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently I was looking into a Kinect idea for work and needed to re-project the depth map into a point cloud that we could further process. I found it is hard to get information on how to do this properly with the data given by the official SDK, so I thought I would put this up here for future reference.</p>
<p>I found that to get the correct X/Y/Z values, you need to make use of a constant defined in the C++ SDK, called the Inverse Focal Length, which is defined in pixels for our purposes.</p>
<pre class="brush: c#">float invFocalLength = 3.501e-3f;</pre>
<p>Once you have this, you need to go through every pixel in the depth map, and first divide the depth value by 1000 to take it from mm to meters. Then you use the following expressions to get your X and Y values:</p>
<pre class="brush: c#">z = inputZ / 1000.0f;
outputX = (inputX - 0.5f) * (invFocalLength * z);
outputY = (0.5f - inputY) * (invFocalLength * z);</pre>
<p>If you want to use this directly in a 3D scene, it is recommended that you multiply the resulting values by 320 and 240 for X and Y respectively; if you just want to process it, you should leave the data as is.</p>
<p>Note that the X and Y input values are normalised in the range [0, 1] before being used in that equation.</p>
]]></content:encoded>
			<wfw:commentRss>http://mquandt.com/blog/2011/12/kinect-reprojecting-the-depth-stream/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ScriptTD v2 Planning</title>
		<link>http://mquandt.com/blog/2011/11/scripttd-v2-planning/</link>
		<comments>http://mquandt.com/blog/2011/11/scripttd-v2-planning/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 12:18:42 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[WP7]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://mquandt.com/blog/?p=161</guid>
		<description><![CDATA[Just a quick post to mention that I&#8217;m currently planning out features for ScriptTD version 2.0. so far I have some input from the discussion boards on the Codeplex site, and I&#8217;ve placed all of that into a Trello board that will let me plan out the roadmap for this version and future versions. If &#8230; <a href="http://mquandt.com/blog/2011/11/scripttd-v2-planning/">Read more <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Just a quick post to mention that I&#8217;m currently planning out features for ScriptTD version 2.0. so far I have some input from the discussion boards on the <a href="http://scripttd.codeplex.com" target="_blank">Codeplex </a>site, and I&#8217;ve placed all of that into a <a href="https://trello.com/board/scripttd/4eb9c108b4a843a14b053155" target="_blank">Trello board</a> that will let me plan out the roadmap for this version and future versions.</p>
<p>If you have anything you want to see in v2 or in the future, please head over to the discussion board, specifically this post: <a href="http://scripttd.codeplex.com/discussions/277634" target="_blank">http://scripttd.codeplex.com/discussions/277634</a> and give your feedback. I probably won&#8217;t do anything too unique as this is still supposed to be a general engine, but if you feel there were features important to the Tower Defense genre that were missing from v1.x, please let me know, and vote in the Trello board if they&#8217;re already there.</p>
]]></content:encoded>
			<wfw:commentRss>http://mquandt.com/blog/2011/11/scripttd-v2-planning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ScriptTD</title>
		<link>http://mquandt.com/blog/2011/10/scripttd/</link>
		<comments>http://mquandt.com/blog/2011/10/scripttd/#comments</comments>
		<pubDate>Sun, 09 Oct 2011 13:41:46 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[XNA]]></category>
		<category><![CDATA[channel 9]]></category>
		<category><![CDATA[channel9]]></category>
		<category><![CDATA[coding4fun]]></category>
		<category><![CDATA[msdn]]></category>
		<category><![CDATA[scripttd]]></category>
		<category><![CDATA[tower defense]]></category>
		<category><![CDATA[windows phone 7]]></category>
		<category><![CDATA[wp7]]></category>

		<guid isPermaLink="false">http://mquandt.com/blog/?p=148</guid>
		<description><![CDATA[I just realised I never posted about this. ScriptTD is a project I have been working on for the past year now, although we officially launched a couple of months ago, I&#8217;m still working on v2.0. The goal was to create a Tower Defense game engine for Windows Phone 7, allowing people with no coding &#8230; <a href="http://mquandt.com/blog/2011/10/scripttd/">Read more <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I just realised I never posted about this. <img src='http://mquandt.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>ScriptTD is a project I have been working on for the past year now, although we officially launched a couple of months ago, I&#8217;m still working on v2.0. The goal was to create a Tower Defense game engine for Windows Phone 7, allowing people with no coding knowledge to change the data files and art/sounds to create their own Tower Defense game. This was an interesting challenge to work on, and I&#8217;m reasonably happy with the first result, however there is still plenty to add and refine. <img src='http://mquandt.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://scripttd.codeplex.com/"><img class="aligncenter" title="ScriptTD" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/HomeScreen_thumb%5B1%5D.png" alt="" width="300" height="180" /></a>You can get the source code for the project at <a href="http://scripttd.codeplex.com/" target="_blank">http://scripttd.codeplex.com/</a> and there is quite a bit of information about what each XML file does. I also wrote an article which is located at <a href="http://channel9.msdn.com/coding4fun/articles/ScriptTD-Tower-Defense-Made-Easy" target="_blank">http://channel9.msdn.com/coding4fun/articles/ScriptTD-Tower-Defense-Made-Easy</a> and covers how to extend the code (C#) to create a new weapon type.</p>
<p>For those interested in trying out the game on their Windows Phone 7 devices, you can get it from the following marketplace link:</p>
<p><a href="http://www.windowsphone.com/en-GB/apps/ee836335-27a7-e011-986b-78e7d1fa76f8" target="_blank">http://www.windowsphone.com/en-GB/apps/ee836335-27a7-e011-986b-78e7d1fa76f8</a></p>
<p>Be aware: it is quite challenging, but free for everyone. The game is compiled for WP7.0, so you don&#8217;t have to have Mango to run it.</p>
<p><img class="aligncenter" title="ScriptTD Screenshot 1" src="http://files.channel9.msdn.com/wlwimages/1932b237046e4743a4e79e6800c0220f/gamePlay_thumb%5B5%5D.png" alt="" width="300" height="180" /></p>
]]></content:encoded>
			<wfw:commentRss>http://mquandt.com/blog/2011/10/scripttd/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Blender 2.57b Tutorial</title>
		<link>http://mquandt.com/blog/2011/05/blender-2-57b-tutorial/</link>
		<comments>http://mquandt.com/blog/2011/05/blender-2-57b-tutorial/#comments</comments>
		<pubDate>Thu, 26 May 2011 13:09:57 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://mquandt.com/blog/?p=143</guid>
		<description><![CDATA[Charles Humphrey (Nemo Krad) has started a tutorial on the 2.57b release of Blender &#8211; the free and open source 3D modelling tool. He focuses on blender, but covers how you can use Blender to create content for XNA; and in future he plans to create content on working with Dual Textures and Skinned Animation. &#8230; <a href="http://mquandt.com/blog/2011/05/blender-2-57b-tutorial/">Read more <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Charles Humphrey (Nemo Krad) has started a tutorial on the 2.57b release of Blender &#8211; the free and open source 3D modelling tool. He focuses on blender, but covers how you can use Blender to create content for XNA; and in future he plans to create content on working with Dual Textures and Skinned Animation.</p>
<p>He currently has two parts complete, covering the UI and UV Mapping, with more on the way.</p>
<p>You can read the series at his blog on the XNA UK User Group here:</p>
<p><a href="http://xna-uk.net/blogs/randomchaos/archive/2011/05/23/blender-2-57b-amp-xna-4-0-part-i.aspx" target="_blank">Part I &#8211; UI and Exporting</a></p>
<p><a href="http://xna-uk.net/blogs/randomchaos/archive/2011/05/26/blender-2-57b-amp-xna-4-0-part-ii.aspx" target="_blank">Part II &#8211; UV Mapping</a></p>
<p><a href="http://xna-uk.net/blogs/randomchaos/archive/2011/05/26/blender-2-57b-amp-xna-4-0-part-iii.aspx" target="_blank">Part III &#8211; Normal Maps</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mquandt.com/blog/2011/05/blender-2-57b-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XNA Cross-Platform Editing in Real-time</title>
		<link>http://mquandt.com/blog/2011/04/xna-cross-platform-editing-in-real-time/</link>
		<comments>http://mquandt.com/blog/2011/04/xna-cross-platform-editing-in-real-time/#comments</comments>
		<pubDate>Sun, 10 Apr 2011 05:00:52 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[XNA]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[sample code]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[xbox 360]]></category>

		<guid isPermaLink="false">http://mquandt.com/blog/?p=129</guid>
		<description><![CDATA[One of the cool new features appearing in a lot of modern engines is the ability to work in an editor on the PC and have the level changes replicate on a running console build of the game in real-time. For commercial games this often happens over the high speed USB connection, however due to &#8230; <a href="http://mquandt.com/blog/2011/04/xna-cross-platform-editing-in-real-time/">Read more <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the cool new features appearing in a lot of modern engines is the ability to work in an editor on the PC and have the level changes replicate on a running console build of the game in real-time. For commercial games this often happens over the high speed USB connection, however due to the cross platform support in XNA, we can replicate this [in single player games/modes] using a System-Link connection and the XNA networking libraries.</p>
<p>The first step is deciding which side will create the session and which side will join. Considering we only have the option of working with the Xbox 360, and you might not want to include any debug views or information in your Xbox code, the option I chose is to have the Xbox create the session. The code is compatible on both platforms so if you&#8217;re willing to add some system to find and join an active session, you can easily change this to create the session on the PC. For the purposes of this article the session will only contain two &#8220;Players&#8221; and the Xbox will create whilst the PC side joins.</p>
<h2><span id="more-129"></span>Creating</h2>
<p>We start by creating a session, in XNA you can do this with the <a href="http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.net.networksession.create.aspx" target="_blank">NetworkSession.Create()</a> command, which creates a <a href="http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.net.networksession.aspx" target="_blank">NetworkSession</a> object that maintains the session. Then specify session.AllowJoinInProgress to be true, this lets you create the session and at any time join or rejoin from the PC side.</p>
<pre class="brush: csharp;">_session = NetworkSession.Create(NetworkSessionType.SystemLink, 1, 2);
_session.AllowJoinInProgress = true;</pre>
<p>Another key thing to note here is that you will want to specify the network session type as SystemLink, this lets you sign in with your Creators Club gamer tag on the Xbox, and use a local player on the PC side &#8211; no extra accounts!<br />
We then specify a maximum of one local gamer on the Xbox side, and a total of two gamers in the session. (Change as needed)<br />
Finally we handle the session.GamerJoined event and in the handler we start the game if the current session state is set to Lobby.</p>
<h2>Receiving</h2>
<p>At this time you might want to also create a PacketReader and PacketWriter, as we will be using these to do our communication. These can be created at any time, and are not tied to a session, so it is a good idea to create them once and re-use over multiple sessions/games.</p>
<p>How you want to receive the data is up to you, however I chose to allow the Xbox game to register some callbacks for named commands. That way the PC side can specify the name of the command and send data along, which can be passed through as a byte array. This is rather simple to setup, you simply maintain a Dictionary&lt;string, Action&lt;byte[]&gt;&gt; that contains all of the callback delegates and names. Then when a packet comes in it will have the name of the callback as well as the byte[] data, which lets you gets the callback from the Dictionary and call it, passing in the data as is.</p>
<p>On the PC side you simply send the callback name, length of the byte array and the bytes themselves, ready for the Xbox to accept and use.</p>
<p>I further split this into &#8220;Commands&#8221; and &#8220;Data&#8221;, to provide a clear separation of things like console commands, and raw data, but both use the same system of a Action&lt;byte[]&gt; delegate callback.</p>
<h2>Joining</h2>
<p>When joining, the PC needs to do two things:</p>
<ol>
<li>Search for sessions</li>
<li>Join a chosen session</li>
</ol>
<p>The <a href="http://msdn.microsoft.com/en-us/library/bb975501.aspx" target="_blank">NetworkSession.Find()</a> method provides a list of available sessions currently running over SystemLink, which is usually going to be just one, however if you&#8217;re working in a larger team with multiple systems on the same network, you might want to list them and display the host gamertag, so that you can choose the right one.</p>
<p>Once you have chosen the network session, you pass that to <a href="http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.net.networksession.join.aspx" target="_blank">NetworkSession.Join()</a> which creates a NetworkSession object that you can use just like you do on the server &#8211; except this time you don&#8217;t worry about starting the game.</p>
<h2>Updating</h2>
<p>Once the session has been created and is up and running, on both platforms you need to call session.Update() in your update loop. This handles the networking side of things and gets/sends the packets as needed.</p>
<p>Once you have updated, you can make use of the PacketReader and PacketWriter objects to receive and send packets respectively. To receive the data, you need to first check if there is data available by checking the session.LocalGamers[0].IsDataAvailable flag. If there is data available, you can call session.LocalGamers[0].ReceiveData() passing in the PacketReader which you can then use to parse the packet and call the appropriate callback.</p>
<p>If you have data you want to send, you just need to call session.LocalGamers[0].SendData(), and pass in the PacketWriter with the data you want to send.</p>
<p>In the background XNA handles the network magic, so you just have to worry about handling the data on either end.</p>
<h2>Code</h2>
<p>I didn&#8217;t have time to put up a complete code sample for this article, however I hope you understand the general technique. Code for something like this really needs to be tailored to your purpose. If you are just writing a debug console or tweak system, you can just use the command system mentioned below. However if you want to write a sync system for your editor, with camera sync and everything else, you will probably want to change how you send and receive data to optimise for what you are sending.</p>
<h3>Create</h3>
<pre class="brush:csharp;">_session = NetworkSession.Create(NetworkSessionType.SystemLink, 1, 2);
_session.AllowHostMigration = false;
_session.AllowJoinInProgress = true;
_session.GamerJoined += (s, e) =&gt;
{
    if (_session.SessionState == NetworkSessionState.Lobby)
        _session.StartGame();
};
_session.GamerLeft += (s, e) =&gt; _session.EndGame();</pre>
<h3>Find</h3>
<pre class="brush:csharp;">AvailableNetworkSessionCollection sessions = NetworkSession.Find(NetworkSessionType.SystemLink, 1, null);</pre>
<h3>Join</h3>
<p>(&#8216;session&#8217; is an AvailableNetworkSession taken from the collection in Find)</p>
<pre class="brush:csharp;">_session = NetworkSession.Join(session);</pre>
<h3>Update</h3>
<pre class="brush:csharp;">if (_session != null)
{
    _session.Update();
    if (_writer.Length &gt; 0)
        _session.LocalGamers[0].SendData(_writer, SendDataOptions.None);
    while (_session != null &amp;&amp; _session.LocalGamers[0].IsDataAvailable)
    {
        NetworkGamer sender;
        int numBytes = _session.LocalGamers[0].ReceiveData(_reader, out sender);
        if (numBytes &gt; 0 &amp;&amp; !sender.IsLocal)
        {
            string methodName = _reader.ReadString();
            int numBytes = _reader.ReadInt32();
            var data = _reader.ReadBytes(numBytes);
            Action method;
            if (!string.IsNullOrEmpty(methodName) &amp;&amp; _commands.TryGetValue(methodName, out method))
                method(data);
        }
    }
}</pre>
<h3>Sending</h3>
<pre class="brush:csharp;">public void SendCommand(string methodName, byte[] data)
{
    _writer.Write(methodName.ToLower());
    if (data != null)
    {
        _writer.Write(data.Length);
        _writer.Write(data);
    }
    else
    {
        _writer.Write(0);
    }
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://mquandt.com/blog/2011/04/xna-cross-platform-editing-in-real-time/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>IC Game Design &#8211; A Key Tip for Success</title>
		<link>http://mquandt.com/blog/2011/03/ic-game-design-a-key-tip-for-success/</link>
		<comments>http://mquandt.com/blog/2011/03/ic-game-design-a-key-tip-for-success/#comments</comments>
		<pubDate>Sun, 27 Mar 2011 04:18:20 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[game design]]></category>
		<category><![CDATA[imagine cup]]></category>
		<category><![CDATA[imaging cup game design]]></category>

		<guid isPermaLink="false">http://mquandt.com/blog/?p=126</guid>
		<description><![CDATA[Recently I have had the pleasure of helping to judge the entries for the 2011 Imagine Cup Game Design competition. The quality of some of the entries assigned to me was quite high, however there were some issues that prevented me from experiencing some of the games as intended. So I decided to write this &#8230; <a href="http://mquandt.com/blog/2011/03/ic-game-design-a-key-tip-for-success/">Read more <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img style="background-image: none; border-right-width: 0px; margin: 0px 5px 5px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="emulator" border="0" alt="emulator" align="left" src="http://mquandt.com/blog/wp-content/uploads/2011/03/emulator.png" width="200" height="354" />Recently I have had the pleasure of helping to judge the entries for the 2011 Imagine Cup Game Design competition. The quality of some of the entries assigned to me was quite high, however there were some issues that prevented me from experiencing some of the games as intended. So I decided to write this post to outline how to ensure the judge gets the best experience possible, and consequently help your chances of making it to the finals.</p>
<p>When judging I attempt the following:</p>
<ol>
<ol>
<ol>
<li>
<div align="left">Test on Phone (HTC Mozart) </div>
</li>
<li>
<div align="left">If that fails, Test in Emulator </div>
</li>
<li>
<div align="left">If that fails, Watch Video </div>
</li>
</ol>
</ol>
</ol>
<p>Now obviously the further I go along that list, the less you will receive in the polish section, and that varies based on which round it is, and when the game fails. (A game that times out during first load will lose more than a game that randomly crashes mid-game, my phone isn’t wildly different from most other phones out at the moment)</p>
<p>Now this is all well and fine you say, it works on my phone and unexpected crashes can occur early on in development. Sure, no problem, I can always test in the emulator, except of course if you put the game into the Games Hub. Whilst that will work on my phone, this unfortunately does not work on the stock emulator, which lacks the games hub. That means that it is impossible for me to test your game, and you will lose quite a bit more as I have to try and figure out the scores based off your gameplay video submission. It is after all impossible to get a good feel for the fun in a game from just a video. (or am I too jaded after many trailers that hype up modern games past their real level of fun?)</p>
<p>So please, if you’re developing a game for the competition, <strong>do *NOT* put your game into the games hub</strong>, because your game might crash, and I can only play (and judge) what is accessible.</p>
]]></content:encoded>
			<wfw:commentRss>http://mquandt.com/blog/2011/03/ic-game-design-a-key-tip-for-success/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XNA Tip #1</title>
		<link>http://mquandt.com/blog/2011/01/xna-tip-1/</link>
		<comments>http://mquandt.com/blog/2011/01/xna-tip-1/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 14:15:13 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[XNA]]></category>
		<category><![CDATA[alpha blending]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://mquandt.com/blog/2011/01/xna-tip-1/</guid>
		<description><![CDATA[This is the first in what will probably be a random series of small posts about tips and tricks, and other notes about xna. When implementing the light pre-pass algorithm in XNA 4.0, I found that the alpha channel was messing around with my intermediate render targets. To resolve this, you need to create a &#8230; <a href="http://mquandt.com/blog/2011/01/xna-tip-1/">Read more <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><i>This is the first in what will probably be a random series of small posts about tips and tricks, and other notes about xna.</i></p>
<p>When implementing the light pre-pass algorithm in XNA 4.0, I found that the alpha channel was messing around with my intermediate render targets.    <br />To resolve this, you need to create a custom blend state object (cache it) with the colour and alpha destination and blend states set to BlendState.One.</p>
<p>This should prevent any modulation based on the alpha value in a texture when sampling.</p>
<p>*<strong>Edit</strong>* Small code sample:</p>
<pre class="brush: csharp;">var _alphaBlend = new BlendState()
            {
                AlphaDestinationBlend = Blend.One,
                AlphaSourceBlend = Blend.One,
                ColorDestinationBlend = Blend.One,
                ColorSourceBlend = Blend.One
            };</pre>
]]></content:encoded>
			<wfw:commentRss>http://mquandt.com/blog/2011/01/xna-tip-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TechEd 2010 Academic Day Slides</title>
		<link>http://mquandt.com/blog/2010/08/teched-2010-academic-day-slides/</link>
		<comments>http://mquandt.com/blog/2010/08/teched-2010-academic-day-slides/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 00:06:55 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Students]]></category>
		<category><![CDATA[TechEd]]></category>
		<category><![CDATA[XNA]]></category>
		<category><![CDATA[academic day]]></category>
		<category><![CDATA[presentations]]></category>
		<category><![CDATA[slides]]></category>
		<category><![CDATA[teched 2010]]></category>
		<category><![CDATA[teched australia]]></category>
		<category><![CDATA[windows phone 7]]></category>

		<guid isPermaLink="false">http://mquandt.com/blog/2010/08/teched-2010-academic-day-slides/</guid>
		<description><![CDATA[As promised, here are my slides for my presentation on Windows Phone 7 during Academic Day at TechEd 2010.]]></description>
			<content:encoded><![CDATA[<p>As promised, here are my slides for my presentation on Windows Phone 7 during Academic Day at TechEd 2010.</p>
<p><iframe style="padding-bottom: 0px; background-color: #fcfcfc; padding-left: 0px; width: 98px; padding-right: 0px; height: 115px; padding-top: 0px" title="Preview" marginheight="0" src="http://cid-670fd4ae41402e8a.office.live.com/embedicon.aspx/MSP/TechEd2010^_WP7^_Academic.pptx" frameborder="0" marginwidth="0" scrolling="no"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://mquandt.com/blog/2010/08/teched-2010-academic-day-slides/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

