<?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>MikeCann.co.uk &#187; XNA - MikeCann.co.uk - mikey see, mikey do!</title>
	<atom:link href="http://mikecann.co.uk/category/programming/xna/feed/" rel="self" type="application/rss+xml" />
	<link>http://mikecann.co.uk</link>
	<description>mikey see, mikey do!</description>
	<lastBuildDate>Sat, 28 Jan 2012 13:10:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Shader Based 2D Shadowing</title>
		<link>http://mikecann.co.uk/programming/shader-based-2d-shadowing/</link>
		<comments>http://mikecann.co.uk/programming/shader-based-2d-shadowing/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 11:10:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[HLSL]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[XNA]]></category>
		<category><![CDATA[2d]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[hlsl]]></category>
		<category><![CDATA[shader]]></category>
		<category><![CDATA[shadow]]></category>
		<category><![CDATA[university]]></category>

		<guid isPermaLink="false">http://mikecann.co.uk/?p=1206</guid>
		<description><![CDATA[Those who know me know I used to do quite abit of development in c# using Microsoft&#8217;s XNA platform. Well I like to check back in every now and then with some of the big players in the community to see what&#8217;s going on. One of those players is Catalin Zima, who is famous for producing many [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mikecann.co.uk/wp-content/uploads/2010/08/11_scene.png"><img class="alignnone size-full wp-image-1207" title="11_scene" src="http://mikecann.co.uk/wp-content/uploads/2010/08/11_scene.png" alt="" width="560" height="420" /></a></p>
<p>Those who know me know I used to do <a href="http://mikecann.co.uk/?s=xna">quite abit of development</a> in c# using Microsoft&#8217;s XNA platform.</p>
<p>Well I like to check back in every now and then with some of the big players in the community to see what&#8217;s going on.</p>
<p>One of those players is <a href="http://www.catalinzima.com/">Catalin Zima</a>, who is famous for producing many great shader and effect samples.</p>
<p>One of Catalin&#8217;s reccent project particularly caught my eye however as I had tried to tackle the same problem several years ago when I was in my final year of university. That is, Dynamic 2D Shadows Calculated on the GPU (<a href="http://mikecann.co.uk/university-projects/shadowshader-in-rendermonkey/">http://mikecann.co.uk/university-projects/shadowshader-in-rendermonkey/</a>)</p>
<p><a href="http://www.catalinzima.com/2010/07/my-technique-for-the-shader-based-dynamic-2d-shadows/">Catalin&#8217;s approac</a>h to the problem is far more elegant that my brute force iterative approach. He uses a clever technique of distorting the desired casting image about the light in such a way as not to require iterative pixel lookups.</p>
<p>If you are interested in the more details in the technique I encourage you to check it out over on Catalin&#8217;s blog: <a href="http://www.catalinzima.com/2010/07/my-technique-for-the-shader-based-dynamic-2d-shadows/">http://www.catalinzima.com/2010/07/my-technique-for-the-shader-based-dynamic-2d-shadows/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/programming/shader-based-2d-shadowing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XNA Archive</title>
		<link>http://mikecann.co.uk/fun-videos/xna-archive/</link>
		<comments>http://mikecann.co.uk/fun-videos/xna-archive/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 08:39:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Fun & Videos]]></category>
		<category><![CDATA[HLSL]]></category>
		<category><![CDATA[J2ME]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[Personal Projects]]></category>
		<category><![CDATA[Photos & Personal]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[University Projects]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.mikecann.co.uk/?p=365</guid>
		<description><![CDATA[I just realised some of my old XNAGPUParticles project videos have gone walkies. So I have reposted them on youtube. These are my old projects from my final year of uni, binary and source code can be found in the relevant post for each video. http://www.mikecann.co.uk/?p=163 httpvh://www.youtube.com/watch?v=vxrg1YavBIg http://www.mikecann.co.uk/?p=169 httpvh://www.youtube.com/watch?v=3wdIiCCAb9U I have another reason for these [...]]]></description>
			<content:encoded><![CDATA[<p>I just realised some of my old XNAGPUParticles project videos have gone walkies. So I have reposted them on youtube. These are my old projects from my final year of uni, binary and source code can be found in the relevant post for each video.</p>
<p><a href="http://www.mikecann.co.uk/?p=163">http://www.mikecann.co.uk/?p=163</a><br />
httpvh://www.youtube.com/watch?v=vxrg1YavBIg<br />
<a href="http://www.mikecann.co.uk/?p=169"><br />
http://www.mikecann.co.uk/?p=169</a><br />
httpvh://www.youtube.com/watch?v=3wdIiCCAb9U</p>
<p>I have another reason for these old re-posts, something a little more flash orientated.. Stay tuned for more info <img src='http://mikecann.co.uk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/fun-videos/xna-archive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PlaceEd 3</title>
		<link>http://mikecann.co.uk/commercial-projects/placeed-3/</link>
		<comments>http://mikecann.co.uk/commercial-projects/placeed-3/#comments</comments>
		<pubDate>Sun, 03 Feb 2008 12:50:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Commercial Projects]]></category>
		<category><![CDATA[Personal Projects]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.artificial-studios.co.uk/?p=232</guid>
		<description><![CDATA[Recently I have been working on some small tools for the lads at work to aid them in designing mobile phone games. One project I have been working on for a while (in my spare time at work and in the evenings at home) is a new version of PlaceEd. PlaceEd is a small app [...]]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal">Recently I have been working on some small tools for the lads at work to aid them in designing mobile phone games.</p>
<p class="MsoNormal">One project I have been working on for a while (in my spare time at work and in the evenings at home) is a new version of PlaceEd. PlaceEd is a small app used by people at work who need to design levels with objects and paths in them.</p>
<p class="MsoNormal">The reason for making this new version was because the original was starting to show its age and after several modifications to customise it to certain projects it has become unreliable. A second version (PlaceEd2) was half coded by one of the other employees at rockpool though they ran out of time and didn&rsquo;t complete it.</p>
<p class="MsoNormal">So that&rsquo;s where I come in, and I wrote from scratch a new app and called it PlaceEd 3 (even though there wasn&rsquo;t really a fully released version of PlaceEd 2).<br />
<span id="more-232"></span><img src="http://mikecann.co.uk/wp-content/uploads/2008/02/placeed3out01.png" alt="" /></p>
<p class="MsoNormal">PlaceEd3 lets the user create a new project. This project can have levels added to it. Each level can have a certain number of layers. Layers can be either one large image or a tileset and tileset data. The user can then create objects and give them variables that can either be static (global to all objects of that type) or they can be local which means each object has its own value for that variable. Objects can then be placed on the level and moved and dragged about. Paths can also be placed on the level, this is useful for games that need to script specific movement sequences.</p>
<p class="MsoNormal">Once a level has been designed it can then be exported as a single binary file that is easily compressed and a java source file that gives a demonstration of how to load the binary data file.</p>
<p class="MsoNormal">The whole app is written in C# using WeifenLuo docking panels. For the rendering of the level I have integrated an XNA 2.0 panel for speed it gives.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/commercial-projects/placeed-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>XNALiquids 03</title>
		<link>http://mikecann.co.uk/personal-projects/xnaliquids-03/</link>
		<comments>http://mikecann.co.uk/personal-projects/xnaliquids-03/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 20:56:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Personal Projects]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.artificial-studios.co.uk/?p=230</guid>
		<description><![CDATA[Well i was just thinking in work today that it may be possible to detect the bounds of the the particle &#34;clusters&#34; and then line drawing the boundry and then you wouldnt notice the compression that the particles tend to suffer from. When i got home i tested out my theroy and the results can [...]]]></description>
			<content:encoded><![CDATA[<p>Well i was just thinking in work today that it may be possible to detect the bounds of the the particle &quot;clusters&quot; and then line drawing the boundry and then you wouldnt notice the compression that the particles tend to suffer from.</p>
<p>When i got home i tested out my theroy and the results can be seen below. Its pretty obvious that its not perfect but as i say it was just me messing.</p>
<p>Oh BTW grant kot has been working on his polluted planet some more, and its starting to look quite impressive now its over in XNA: <a href="http://kotsoft.googlepages.com/multifluidvideo1.html">link1</a>, <a href="http://kotsoft.googlepages.com/">link2</a></p>
<p>
<flv autostart="false" height="375" width="500" href="http://www.mikecann.co.uk/Files/Upload/files/xnaLiquid03.flv"></flv></p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/personal-projects/xnaliquids-03/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.artificial-studios.co.uk/Files/Upload/files/xnaLiquid03.flv" length="0" type="video/x-flv" />
		</item>
		<item>
		<title>XNALiquids02</title>
		<link>http://mikecann.co.uk/lieroxna/xnaliquids02/</link>
		<comments>http://mikecann.co.uk/lieroxna/xnaliquids02/#comments</comments>
		<pubDate>Thu, 17 Jan 2008 20:38:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[LieroXNA]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.artificial-studios.co.uk/?p=228</guid>
		<description><![CDATA[Okay well i have been playing around with my particles AGAIN I started this time from some work done by the CUDA team over at NVidia. As im running windows Vista i couldnt get CUDA to work so i read through the source and adapted it to my needs. As you can see from the [...]]]></description>
			<content:encoded><![CDATA[<p>Okay well i have been playing around with my particles <strong>AGAIN </strong> <img src='http://mikecann.co.uk/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p>I started this time from some work done by the <a href="http://www.nvidia.com/object/cuda_get_samples.html">CUDA</a> team over at NVidia. As im running windows Vista i couldnt get CUDA to work so i read through the source and adapted it to my needs.</p>
<p>As you can see from the video below its better than my last attempt but still not perfect, it also still runs on  the CPU on a single core and has had no optomisations applied to it.</p>
<p>Hopefully tho i can build on this to make it better.</p>
<p><object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/9-Y3S5j90tE&amp;hl=en_GB&amp;fs=1?rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/9-Y3S5j90tE&amp;hl=en_GB&amp;fs=1?rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/lieroxna/xnaliquids02/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XNALiquids 01</title>
		<link>http://mikecann.co.uk/personal-projects/xnaliquids-01/</link>
		<comments>http://mikecann.co.uk/personal-projects/xnaliquids-01/#comments</comments>
		<pubDate>Sat, 05 Jan 2008 19:08:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Personal Projects]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.artificial-studios.co.uk/?p=227</guid>
		<description><![CDATA[Well after seeing what Polluted Planet did with large numbers of interactive particles in java, it got me interested. So i have decided to have a go at implementing it myself in XNA. So here it is, my first attempt at it. Currently the algorithm is very rough as you can see from the video [...]]]></description>
			<content:encoded><![CDATA[<p>Well after seeing what <a href="http://www.mikecann.co.uk/?p=226">Polluted Planet</a> did with large numbers of interactive particles in java, it got me interested.</p>
<p>So i have decided to have a go at implementing it myself in XNA.</p>
<p>So here it is, my first attempt at it. Currently the algorithm is very rough as you can see from the video there are still some problems that cause the particle to behave a little&#8230; umm.. erratic <img src='http://mikecann.co.uk/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Hopefully with abit more time and effort ill get it sorted. At the moment there are 5000 interacting particle on one CPU, hopefully i will beable to push that figue up soon and take advantage of my quad-core system <img src='http://mikecann.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/dvkUKYwgsj4&amp;hl=en_GB&amp;fs=1?rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/dvkUKYwgsj4&amp;hl=en_GB&amp;fs=1?rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/personal-projects/xnaliquids-01/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>XNA 2.0 &amp;&amp; Silicon Minds</title>
		<link>http://mikecann.co.uk/personal-projects/xna-20-silicon-minds/</link>
		<comments>http://mikecann.co.uk/personal-projects/xna-20-silicon-minds/#comments</comments>
		<pubDate>Tue, 18 Dec 2007 11:26:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Personal Projects]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.artificial-studios.co.uk/?p=223</guid>
		<description><![CDATA[Well its that time again. XNA 2.0 has been released and with it a new Dream Build Play competition. As a warm up to the competition Microsoft have launched a smaller contest named Silicon Minds. The central idea behind this contest is to encourage A.I. in games and as such 60% of the marks will [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://mikecann.co.uk/wp-content/uploads/2007/12/xna.jpg" alt="" /></p>
<p>Well its that time again. XNA 2.0 <a href="http://creators.xna.com/Education/GettingStarted.aspx">has been released</a> and with it a new <a href="http://creators.xna.com/Themes/default/images/horizontal-web-DBP_banner.png">Dream Build Play competition</a>.</p>
<p>As a warm up to the competition Microsoft have launched a smaller contest named Silicon Minds. The central idea behind this contest is to encourage A.I. in games and as such 60% of the marks will be given to the quality of the AI in the game a further 20% given to how fun the game is and a final 20% given to the polish of the game.</p>
<p>I have been wracking my brain trying to think of a good project to do for this contest, some of the ideas i came up with were:</p>
<ul>
<li>Bee Swarm Game</li>
<li>Dynamic FPS Difficulty</li>
<li>Particle Flocking</li>
<li>Learning Geometry Wars</li>
<li>Predictive Multiplayer</li>
<li>Adaptive Level Design</li>
<li>DNA Designer</li>
<li>Design a Positronic Brain</li>
</ul>
<p>In the end i decided that due to how short the competition is (ends jan 27th) and my lack of any A.I. experience I would stick with what I have learnt in the past and develop on that. So using the work i have done on LieroXNA so far im planning on writing an A.I. for a deformable 2d landscape.</p>
<p>Sorry i cant say any more at this stage but stay tuned and ill update in the near future.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/personal-projects/xna-20-silicon-minds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Project Technology (Deformable Terrains)</title>
		<link>http://mikecann.co.uk/lieroxna/project-technology-deformable-terrains/</link>
		<comments>http://mikecann.co.uk/lieroxna/project-technology-deformable-terrains/#comments</comments>
		<pubDate>Wed, 05 Dec 2007 21:25:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[LieroXNA]]></category>
		<category><![CDATA[Personal Projects]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.artificial-studios.co.uk/?p=214</guid>
		<description><![CDATA[Well i got asked a question in a comment on how the terrains work in the LieroXNA project so I thought i would do a quick post on this rather than reply in the comments. The way the terrains work has changed a few times over the course of development of the project for various [...]]]></description>
			<content:encoded><![CDATA[<p>Well i got asked a question <a href="http://www.mikecann.co.uk/?p=208#comment-1333">in a comment</a> on how the terrains work in the LieroXNA project so I thought i would do a quick post on this rather than reply in the comments.</p>
<p>The way the terrains work has changed a few times over the course of development of the project for various reasons mostly related to the incompatabilities of the 360 and my previous methods. I wont go into those previous methods here but if anyone reading this has any questions dont hesitate to ask in a comment or email me. I would also like to say this may not be the most efficient method as I was only getting the terrains up as a proof of concept first then was planning on refining later.</p>
<p><span id="more-214"></span></p>
<p>Before i can explain how the terrain is deformed i must first talk about how the terrain is composed. There are currently three layers to the level, an indestuctable layer, a destructable layer and a background layer.</p>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td>
<p align="center"><img alt="" src="http://mikecann.co.uk/wp-content/uploads/2007/12/test02_destr.png" /></p>
<p align="center">Destructable Layer</p>
</td>
<td align="center">
<p><img alt="" src="http://mikecann.co.uk/wp-content/uploads/2007/12/test02_indestr.png" /></p>
<p>Indestructable Layer</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;There is also a &quot;destroyed mask&quot; that is used to create areas at the start that have already been destroyed. This is mainly used so that you dont have to burrow for ages at the start to get to your opposition. Combined together you end up with the final result below.</p>
<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
<tbody>
<tr>
<td>
<p align="center"><img src="http://mikecann.co.uk/wp-content/uploads/2007/12/tempmask01.png" alt="" /></p>
<p align="center">Destroyed Mask</p>
</td>
<td align="center">
<p><img alt="" src="http://mikecann.co.uk/wp-content/uploads/2007/12/test03_final.png" /></p>
<p>Final Result</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;Each texture layer at the moment is 2048&#215;2048 (which is the maximum texture resolution the 360 supports) and is in the format Color (8bpp). The indestructable and the destructable layer are then sent to the GPU for use in rendering and particle collisions by the GPU particle system.</p>
<p>Objects such as players and weapons that are updated by the CPU however cannot perform collision checks on a texture that is on the GPU (without calling getData() which causes read-back which is horribly slow). So the destructable and the instructable layers are duplicated in the initial load of the level and saved as a large two dimensional array of Colors on the CPU.</p>
<p>You may ask why waste memory by storing the full Color component on the CPU when only a single bit is required per pixel to determaine if the terrain is solid or not. The reason for this is that by storing the full color component exploded particles can become the colour of the terrain that they exploded from rather than all of them being the same color.</p>
<p>When an explosion occurs a few things need to take place to make the terrain deform correctly. A hole of the correct size must be cut away from the Texture on the GPU so that the particles react correctly to the deformed terrain, also this new hole must be mirrored in the collision data on the CPU so that the player doesnt collide with things they think are destroyed terrain.</p>
<p>Another 2048&#215;2048 &quot;explosion map&quot; texture is used to handle the deformation of the GPU texture. A series of explosion masks have been created that represent each explosion size:</p>
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td align="center">
<p><img alt="" src="http://mikecann.co.uk/wp-content/uploads/2007/12/explosion32.png" /></p>
<p>Exp32</p>
</td>
<td align="center">
<p><img alt="" src="http://mikecann.co.uk/wp-content/uploads/2007/12/explosion64.png" /></p>
<p>Exp64</p>
</td>
<td align="center">
<p><img alt="" src="http://mikecann.co.uk/wp-content/uploads/2007/12/explosion128.png" /></p>
<p>Exp128</p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;When an explosion occurs it is added to a list of other explosions that have occured that frame. When the render of the level is called the list of explosions that have happened that frame are iterated through and rendered to the 2048&#215;2048 &quot;explosion map&quot; map texture in the correct world location that the explosion occured. This &quot;explosion map&quot; is then passed to a texture render shader which using render targets updates the terrain texture:</p>
<p>float4 PixelShader(float2 texCoord : TEXCOORD0) : COLOR0<br />
{</p>
<p>&nbsp;&nbsp; &nbsp;float4 outCol = float4(1,0,0,0);<br />
&nbsp;&nbsp; &nbsp;float4 explosinCol = tex2D(ExplosionSampler, texCoord);<br />
&nbsp;&nbsp; &nbsp;if (explosinCol.x!=0)<br />
&nbsp;&nbsp; &nbsp;{<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;outCol = tex2D(TextureSampler, texCoord);<br />
&nbsp;&nbsp; &nbsp;}</p>
<p>
&nbsp;&nbsp;&nbsp; float4 indestr = tex2D(IndestructableSampler, texCoord);<br />
&nbsp;&nbsp;&nbsp; if (indestr.w!=0){ outCol = indestr;&nbsp; }<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp;&nbsp; return outCol;<br />
}</p>
<p>Note how the shader takes into account the indestructable layer so that the explosion doest destroy parts of the indestructable level.</p>
<p>The CPU collision data &#8216;texture&#8217; is updated at the time of the explosion. When game loads each explosion mask is duplicated on the CPU much in the same way the indestructable and the destructable layers are. When an explosion occurs each pixel in the CPU explosion mask is compared against the CPU destructable layer and depending if the pixel is &quot;indestructable&quot; or not the pixel is set to be destroyed.</p>
<p>If you remember from back at the start I talked about the &quot;Destroyed Mask&quot; but didnt explain how it destroyed the terrain. Well it basically acts as a large explosion mask. At the init of the level the Destroyed Mask is rendered to the &quot;explosion map&quot; giving it an initial destroyed appearence. The same is applied to the CPU.</p>
<p>And thats about it for how the terrain deformation works in the project at the moment. As i said i played around with many differnt ways of doing it including negative rendering and methods that dont involve using a 2048&#215;2048 temporary buffer texture but for now this is the method that it uses.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/lieroxna/project-technology-deformable-terrains/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Project Update</title>
		<link>http://mikecann.co.uk/lieroxna/project-update/</link>
		<comments>http://mikecann.co.uk/lieroxna/project-update/#comments</comments>
		<pubDate>Sun, 11 Nov 2007 21:07:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[LieroXNA]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.artificial-studios.co.uk/?p=208</guid>
		<description><![CDATA[Well its been a while since i have posted an update regarding the LieroXNA project. I havent been slacking.&#160; I have been spending the majority of my time getting it to run on the 360. I ran into many problems, the majority of which were due to the different ways render targets work on the [...]]]></description>
			<content:encoded><![CDATA[<p>Well its been a while since i have posted an update regarding the LieroXNA project. I havent been slacking.&nbsp;</p>
<p>I have been spending the majority of my time getting it to run on the 360. I ran into many problems, the majority of which were due to the different ways render targets work on the 360 and the fact that you cant use 128bit floating point textures (Vector4 textures).</p>
<p>Ill be going into more depth on the problems i faced on the 360 in a different post. But what i can say is that it works almost perfectly on the 360 now and im very happy with it.</p>
<p>For now you can see a new video of the engine with some fancy bloom effects added <img src='http://mikecann.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/MocF1IU-5dc&amp;hl=en_GB&amp;fs=1?rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/MocF1IU-5dc&amp;hl=en_GB&amp;fs=1?rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/lieroxna/project-update/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>LieroXNA &#8211; Improvements and Additions</title>
		<link>http://mikecann.co.uk/lieroxna/lieroxna-improvements-and-additions/</link>
		<comments>http://mikecann.co.uk/lieroxna/lieroxna-improvements-and-additions/#comments</comments>
		<pubDate>Sun, 30 Sep 2007 18:36:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[LieroXNA]]></category>
		<category><![CDATA[Personal Projects]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.artificial-studios.co.uk/?p=198</guid>
		<description><![CDATA[Been a while since I have posted about LieroXNA but I havent been doing nothing. Changes and things: + Added a destroyed layer to the game which is just the initial map but darker. + Added a shadow to the foreground to give it a more 3D appearence. + Added an indestructable layer, so that [...]]]></description>
			<content:encoded><![CDATA[<p>Been a while since I have posted about LieroXNA but I havent been doing nothing. Changes and things:</p>
<p>+ Added a destroyed layer to the game which is just the initial map but darker.<br />
+ Added a shadow to the foreground to give it a more 3D appearence.<br />
+ Added an indestructable layer, so that maps can have abit of structure even after a long battle.<br />
+ Added the ability to zoom in and out. This was a big one and took most of last weekend to sort out. <br />
+ Added player spawning.<br />
+ Added the ability to control the player with the 360 controller.<br />
+ Started to add other gameplay features such as player jumps, crosshair, weapon switching things and others.</p>
<p>Anyways you can see all these new features in action in the video below. Again, you can download a higher quality one if you wish: <code>[download#1]</code></p>
<p><<object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/Ph1Gyrda0UU&amp;hl=en_GB&amp;fs=1?rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Ph1Gyrda0UU&amp;hl=en_GB&amp;fs=1?rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://mikecann.co.uk/lieroxna/lieroxna-improvements-and-additions/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

