<?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>Crappy Coding &#187; C#</title>
	<atom:link href="http://www.crappycoding.com/category/csharp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.crappycoding.com</link>
	<description>Spreading the Geek</description>
	<lastBuildDate>Wed, 15 Jun 2011 22:34:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Animation With Timers</title>
		<link>http://www.crappycoding.com/2011/06/animation-with-timers/</link>
		<comments>http://www.crappycoding.com/2011/06/animation-with-timers/#comments</comments>
		<pubDate>Wed, 15 Jun 2011 22:31:39 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Game Programming]]></category>
		<category><![CDATA[XNA]]></category>
		<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://www.crappycoding.com/?p=361</guid>
		<description><![CDATA[Last time I talked about using timers for scheduling events by simply keeping track of a time limit and how much time elapsed. Another good use for timers is performing some action over time, such as modifying alpha to fade an object in or out, or sliding an object from one location to another. Let&#8217;s [...]]]></description>
		<wfw:commentRss>http://www.crappycoding.com/2011/06/animation-with-timers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Make Your Time!</title>
		<link>http://www.crappycoding.com/2011/06/make-your-time/</link>
		<comments>http://www.crappycoding.com/2011/06/make-your-time/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 01:43:15 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Game Programming]]></category>
		<category><![CDATA[WP7DEV]]></category>
		<category><![CDATA[XNA]]></category>
		<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://www.crappycoding.com/?p=349</guid>
		<description><![CDATA[It&#8217;s going on seven months since my last post, which is kind of pathetic. When finishing a large project, like the WP7 port of Guardian, my brain tends to shut down for awhile for recharging. That, on top of starting a new job back in November, lead to a much longer blogging hiatus than intended. [...]]]></description>
		<wfw:commentRss>http://www.crappycoding.com/2011/06/make-your-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WP7 Planet Defender Progress Video</title>
		<link>http://www.crappycoding.com/2010/09/wp7-planet-defender-progress-video/</link>
		<comments>http://www.crappycoding.com/2010/09/wp7-planet-defender-progress-video/#comments</comments>
		<pubDate>Fri, 24 Sep 2010 03:19:07 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Game Programming]]></category>
		<category><![CDATA[WP7DEV]]></category>
		<category><![CDATA[XNA]]></category>
		<category><![CDATA[XNA 4.0]]></category>
		<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://www.crappycoding.com/?p=296</guid>
		<description><![CDATA[I&#8217;ve been working on a Windows Phone 7 port of Guardian and finally have something to show for it. All of the systems are in place now, just need to do a lot of tuning and game play tweaking. Of course, at this point I have no idea how it&#8217;s going to perform on an [...]]]></description>
		<wfw:commentRss>http://www.crappycoding.com/2010/09/wp7-planet-defender-progress-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using CLR Profiler 2.0 with XNA 4.0</title>
		<link>http://www.crappycoding.com/2010/09/using-clr-profiler-2-0-with-xna-4-0/</link>
		<comments>http://www.crappycoding.com/2010/09/using-clr-profiler-2-0-with-xna-4-0/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 13:20:44 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[XNA 4.0]]></category>
		<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://www.crappycoding.com/?p=288</guid>
		<description><![CDATA[By default (at least on my computer, running Windows 7), CLR Profiler 2 won't work with new XNA apps since they utilize the new .NET framework.  It looks like it's working when you try it, but when it shows the final statistics window it's empty.  Fortunately, it's possible to enable support using the new profiler compatibility settings functionality, which for this case involves simply setting the COMPLUS_ProfAPI_ProfilerCompatibilitySetting environment variable before running CLR Profiler.]]></description>
		<wfw:commentRss>http://www.crappycoding.com/2010/09/using-clr-profiler-2-0-with-xna-4-0/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Texture Modification in XNA 3.1</title>
		<link>http://www.crappycoding.com/2010/09/texture-modification-in-xna-3-1/</link>
		<comments>http://www.crappycoding.com/2010/09/texture-modification-in-xna-3-1/#comments</comments>
		<pubDate>Sun, 05 Sep 2010 11:56:53 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Game Programming]]></category>
		<category><![CDATA[WP7DEV]]></category>
		<category><![CDATA[XNA]]></category>
		<category><![CDATA[XNA 3.1]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[SpriteBatch]]></category>

		<guid isPermaLink="false">http://www.crappycoding.com/?p=281</guid>
		<description><![CDATA[I&#8217;ve had a couple of questions about what changes are needed to get the texture modification tutorial to work in XNA 3.1. So, here&#8217;s a 3.1 version of the project, and a quick overview of the major things that need to change. You need to create the depth/stencil buffer yourself, set it on the GraphicsDevice [...]]]></description>
		<wfw:commentRss>http://www.crappycoding.com/2010/09/texture-modification-in-xna-3-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some Sugar with your Syntax?</title>
		<link>http://www.crappycoding.com/2010/08/some-sugar-with-your-syntax/</link>
		<comments>http://www.crappycoding.com/2010/08/some-sugar-with-your-syntax/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 11:43:35 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Crappy Code]]></category>
		<category><![CDATA[c#]]></category>

		<guid isPermaLink="false">http://www.crappycoding.com/?p=272</guid>
		<description><![CDATA[In the tutorial recently posted, I created the render state objects using some old-school syntax.

[csharp]
StencilAlways = new DepthStencilState();
StencilAlways.StencilEnable = true;
StencilAlways.StencilFunction = CompareFunction.Always;
StencilAlways.StencilPass = StencilOperation.Replace;
StencilAlways.ReferenceStencil = 1;
StencilAlways.DepthBufferEnable = false;
[/csharp]

You can do this in a much better way nowadays.

[csharp]
StencilAlways = new DepthStencilState()
{
  StencilEnable = true,
  StencilFunction = CompareFunction.Always,
  StencilPass = StencilOperation.Replace,
  ReferenceStencil = 1,
  DepthBufferEnable = false
};


I've seen this syntax before, but 20 years of habits die hard and I rarely remember to use it. Hopefully it will stick now, and make my crappy code that much less crappy.


[/csharp]]]></description>
		<wfw:commentRss>http://www.crappycoding.com/2010/08/some-sugar-with-your-syntax/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Texture Modification using Render Targets, with some Stencil Buffer Action</title>
		<link>http://www.crappycoding.com/2010/08/texture-modification-using-render-targets-with-some-stencil-buffer-action/</link>
		<comments>http://www.crappycoding.com/2010/08/texture-modification-using-render-targets-with-some-stencil-buffer-action/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 04:31:01 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Game Programming]]></category>
		<category><![CDATA[WP7DEV]]></category>
		<category><![CDATA[XNA]]></category>
		<category><![CDATA[XNA 4.0]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[graphics]]></category>

		<guid isPermaLink="false">http://www.crappycoding.com/?p=253</guid>
		<description><![CDATA[Sometimes you need to modify a texture while your game is running, and there are a number of ways to do this. One of the first things newer game programmers often try to do is use Texture2D.GetData to copy the texture data from the GPU to an array on the CPU, modify the bytes, and then send it back to the GPU with Texture2D.SetData.

This is a bad idea on many, levels. Beyond issues with pipeline stalls, GetData and SetData can be slow, especially when working with a large texture. Any time you’re tempted grab data from the GPU for use on the CPU you should very carefully consider all of your options. There are often other solutions that let you keep the data entirely on the GPU and accomplish the same thing.

This tutorial will use an example that could be solved with GetData and SetData, and show you another alternative using render targets and the stencil buffer that will let you perform the same function entirely on the GPU.
]]></description>
		<wfw:commentRss>http://www.crappycoding.com/2010/08/texture-modification-using-render-targets-with-some-stencil-buffer-action/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>GPU Geometry Map Rendering &#8211; Part 1</title>
		<link>http://www.crappycoding.com/2010/01/gpu-geometry-map-rendering-part-1/</link>
		<comments>http://www.crappycoding.com/2010/01/gpu-geometry-map-rendering-part-1/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 03:38:42 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Procedural Planet]]></category>
		<category><![CDATA[planet]]></category>
		<category><![CDATA[procedural]]></category>

		<guid isPermaLink="false">http://www.crappycoding.com/?p=143</guid>
		<description><![CDATA[I spent the past week moving my procedural planet renderer’s
geometry map creation code from the CPU to the GPU. It didn’t go as smoothly as
I would have liked, but in a way that was a good thing since I gained a much
deeper understanding of some render pipeline things that I had been taking for
granted.]]></description>
		<wfw:commentRss>http://www.crappycoding.com/2010/01/gpu-geometry-map-rendering-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Procedural Planet Engine Status</title>
		<link>http://www.crappycoding.com/2009/12/procedural-planet-engine-status/</link>
		<comments>http://www.crappycoding.com/2009/12/procedural-planet-engine-status/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 05:43:29 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Procedural Planet]]></category>
		<category><![CDATA[XNA]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[planet]]></category>
		<category><![CDATA[procedural]]></category>

		<guid isPermaLink="false">http://www.crappycoding.com/?p=130</guid>
		<description><![CDATA[Previously I mentioned I was going to do a mulligan on my procedural planet engine. The few hours I've worked on it so far have lead to a beautiful new architecture that's doing most of the same things as before, as well as some major new things, using about 25% of the code.]]></description>
		<wfw:commentRss>http://www.crappycoding.com/2009/12/procedural-planet-engine-status/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Sprite Sheet Creator</title>
		<link>http://www.crappycoding.com/2009/08/sprite-sheet-creator/</link>
		<comments>http://www.crappycoding.com/2009/08/sprite-sheet-creator/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 19:37:33 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Game Programming]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[XNA]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[graphics]]></category>

		<guid isPermaLink="false">http://www.crappycoding.com/?p=110</guid>
		<description><![CDATA[When developing the iPhone version of Guardian I manually created my sprite sheets.  I used individual sprites up until the end so everything was pretty much set in stone by the time I created the the sprite sheet.  Even then I ended up having to recreate the sprite sheet two or three times, and let me tell you, manually figuring out the texture coordinates isn't a particularly pleasant experience. In this case I believe I made the right choice.  There were few enough sprites that I would have spent more time creating the tool than I would have saved.]]></description>
		<wfw:commentRss>http://www.crappycoding.com/2009/08/sprite-sheet-creator/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

