<?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>Sgt. Conker &#187; &#8220;Absolutely fine&#8221;</title>
	<atom:link href="http://www.sgtconker.com/category/general/absolutely-fine/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sgtconker.com</link>
	<description>We are &#34;absolutely fine&#34;</description>
	<lastBuildDate>Wed, 06 Jul 2011 13:29:44 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Things go wrong! and now the news.</title>
		<link>http://www.sgtconker.com/2011/03/things-go-wrong-and-now-the-news/</link>
		<comments>http://www.sgtconker.com/2011/03/things-go-wrong-and-now-the-news/#comments</comments>
		<pubDate>Sun, 27 Mar 2011 10:44:41 +0000</pubDate>
		<dc:creator>Sgt. Conker</dc:creator>
				<category><![CDATA["Absolutely fine"]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[XNA]]></category>
		<category><![CDATA[#neoforce]]></category>
		<category><![CDATA[#ploobs]]></category>
		<category><![CDATA[#towerdefense]]></category>
		<category><![CDATA[Sunburn]]></category>
		<category><![CDATA[VoteForGeorge]]></category>

		<guid isPermaLink="false">http://www.sgtconker.com/2011/03/things-go-wrong-and-now-the-news/</guid>
		<description><![CDATA[Recently the Sgt. Conker server had a bit of a hiccup, our e-mails were getting clogged up and we missed a few things.
No major damage was done, and no soldiers were harmed in this unfortunate outbreak.
And now the news.
George continues his onslaught of posting all things XNA News by bringing you XNA Notes 012.
Ploobs Game [...]]]></description>
			<content:encoded><![CDATA[<p>Recently the Sgt. Conker server had a bit of a hiccup, our e-mails were getting clogged up and we missed a few things.</p>
<p>No major damage was done, and no soldiers were harmed in this unfortunate outbreak.</p>
<p>And now the news.</p>
<p><a href="http://geekswithblogs.net/clingermangw/archive/2011/03/25/144513.aspx" target="_blank">George continues</a> his onslaught of posting all things XNA News by bringing you XNA Notes 012.</p>
<p><a href="http://ploobsengine.codeplex.com/" target="_blank">Ploobs Game Engine</a> - another open source XNA Engine. The engine boasts a huge list of features which you can see just under the screenshots on the codeplex page.    <br />Unfortunately it’s for XNA 3.1, but it looks pretty, and hopefully wouldn’t take much to upgrade to XNA 4.0. Thanks go to Thiago Dias Pastor for bringing this to our attention. He also made me aware of a <a href="http://www.codeplex.com/Project/Download/FileDownload.aspx?ProjectName=ploobsengine&amp;DownloadId=217469" target="_blank">downloadable document here</a> which is an extensive explanation of the techniques used in the engine. Unfortunately it’s in Portuguese which limits the audience some what.</p>
<p><a href="http://bobscodingcorner.blogspot.com/" target="_blank">Optimizing Bounding Boxes in XNA</a> – Robert Walter brings a decent article on how to optimize bounding box collisions in XNA.</p>
<p><a href="http://xnatd.blogspot.com/" target="_blank">Tower Defense Tutorials</a> -&#160; This website has 14.5 articles on how to build an XNA Tower Defense game. Looks like a nice resource. </p>
<p><a href="http://neoforce.codeplex.com/" target="_blank">Neoforce controls</a> – This is something I completely missed. A skinnable GUI library for XNA 4. Looks stunning, possibly a bit overkill but still … worth a try at least.    <br />Disclaimer : this project is no longer maintained or developed (but it’s open source)</p>
<p>And lastly, some support for a very cool XNA engine.</p>
<p><a href="http://www.synapsegaming.com/" target="_blank">SunBurn Game Engine is looking HOT!</a> – Here’s some news from the Synapse Gaming team.</p>
<p><strong>SunBurn Game Engine: Full Windows Phone 7 Support</strong></p>
<p>Synapse Gaming’s SunBurn Game Engine has led the pack when it comes to technology for XNA. And our latest SunBurn update solidifies that commitment with full support for Windows Phone 7.</p>
<p>This is not some add-on or a small subset of the engine. Instead it includes all of the features and systems the hardware is capable of supporting, and using the same api, content pipeline, and design as on Windows and Xbox. This allows a game to run across all three platforms without any modifications, while still being able to take advantage of SunBurn's advanced features like deferred rendering, HDR, and more on Windows and Xbox.</p>
<p>Windows Phone 7 features in SunBurn include:</p>
<ul>
<li>Diffuse and emissive mapping </li>
<li>Volume lighting </li>
<li>Bloom / post-processing </li>
<li>Baked-down lighting on static objects (see below) </li>
<li>Composite lighting on dynamic objects (see below) </li>
<li>Collisions </li>
<li>Use the same scenes, light rigs, code, tools, and api on Windows, Xbox, and Windows Phone 7 </li>
</ul>
<p>SunBurn 2.0 also includes in-editor baked-down lighting, which generates light maps that render with none of the overhead of the real-time lighting (rendering nearly for free). This makes highly detailed lighting and shadows possible on Windows Phone 7 (which does not support dynamic lighting and shadows).</p>
<p>To learn more, and see SunBurn WP7 games and demos in action, go to <a href="http://www.synapsegaming.com/blogs/johnk/archive/2010/11/16/sunburn-2-0-goes-mobile-on-windows-phone-7.aspx">http://www.synapsegaming.com/blogs/johnk/archive/2010/11/16/sunburn-2-0-goes-mobile-on-windows-phone-7.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sgtconker.com/2011/03/things-go-wrong-and-now-the-news/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ITS COMMIN!!!</title>
		<link>http://www.sgtconker.com/2010/12/its-commin/</link>
		<comments>http://www.sgtconker.com/2010/12/its-commin/#comments</comments>
		<pubDate>Wed, 01 Dec 2010 01:15:28 +0000</pubDate>
		<dc:creator>Sgt. Conker</dc:creator>
				<category><![CDATA["Absolutely fine"]]></category>
		<category><![CDATA[ITS COMMING!!!]]></category>
		<category><![CDATA[George Clingerman For CM]]></category>
		<category><![CDATA[Indie Games]]></category>
		<category><![CDATA[VoteForGeorge]]></category>
		<category><![CDATA[Winter Uprising]]></category>
		<category><![CDATA[XBLIG]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.sgtconker.com/?p=1897</guid>
		<description><![CDATA[The Indie Games Winter Uprising
GO INDIES!!
http://www.indiegames-uprising.com/

]]></description>
			<content:encoded><![CDATA[<p>The Indie Games Winter Uprising</p>
<p>GO INDIES!!</p>
<p><a href="http://www.indiegames-uprising.com/">http://www.indiegames-uprising.com/</a></p>
<p><iframe src="http://player.vimeo.com/video/17314563?byline=0&amp;portrait=0" width="400" height="225" frameborder="0"></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sgtconker.com/2010/12/its-commin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>XBLIG.Saved();</title>
		<link>http://www.sgtconker.com/2010/11/xblig-saved/</link>
		<comments>http://www.sgtconker.com/2010/11/xblig-saved/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 15:37:47 +0000</pubDate>
		<dc:creator>w0rd-driven</dc:creator>
				<category><![CDATA["Absolutely fine"]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[XNA]]></category>
		<category><![CDATA[XBLIG]]></category>

		<guid isPermaLink="false">http://www.sgtconker.com/?p=1875</guid>
		<description><![CDATA[Thanks to everyone who voted on the XBLIG placement on the new dash in this post: http://www.sgtconker.com/2010/11/savetehxblig/.
Microsoft listened and Indie Games are now a part of the Games &#38; Demos section again but they are apparently omitted from searches according to this post on the forums: http://forums.create.msdn.com/forums/t/65669.aspx.
Hugs all around fo sho.
]]></description>
			<content:encoded><![CDATA[<p>Thanks to everyone who voted on the XBLIG placement on the new dash in this post: <a href="http://www.sgtconker.com/2010/11/savetehxblig/">http://www.sgtconker.com/2010/11/savetehxblig/</a>.</p>
<p>Microsoft listened and Indie Games are now a part of the Games &amp; Demos section again but they are apparently omitted from searches according to this post on the forums: <a href="http://forums.create.msdn.com/forums/t/65669.aspx">http://forums.create.msdn.com/forums/t/65669.aspx</a>.</p>
<p>Hugs all around fo sho.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sgtconker.com/2010/11/xblig-saved/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Let the voting begin!</title>
		<link>http://www.sgtconker.com/2010/09/let-the-voting-begin/</link>
		<comments>http://www.sgtconker.com/2010/09/let-the-voting-begin/#comments</comments>
		<pubDate>Tue, 21 Sep 2010 20:37:43 +0000</pubDate>
		<dc:creator>Captain ZSquare</dc:creator>
				<category><![CDATA["Absolutely fine"]]></category>
		<category><![CDATA[Contest]]></category>
		<category><![CDATA[Absolutely Fine Tutorial Contest]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[Voting]]></category>

		<guid isPermaLink="false">http://www.sgtconker.com/?p=1797</guid>
		<description><![CDATA[We've finally managed to upload all 20 entries in our 'Absolutely Fine XNA Tutorial Contest' and prepare them for your viewing pleasure.
First, we want to start with a big Thank You! to all our entrants for their effort. We really appreciate your hard work, and your desire to enter our contest.
Thank You!
The full list of [...]]]></description>
			<content:encoded><![CDATA[<p>We've finally managed to upload all 20 entries in our 'Absolutely Fine XNA Tutorial Contest' and prepare them for your viewing pleasure.</p>
<p>First, we want to start with a big Thank You! to all our entrants for their effort. We really appreciate your hard work, and your desire to enter our contest.</p>
<h1>Thank You!</h1>
<p>The full list of entries submitted to the article is below:</p>
<ul>
<li><a href="http://www.sgtconker.com/2010/09/article-arbitrarily-shaped-secondary-2d-viewports/">Arbitrary Shaped Secondary 2D Viewports</a>, by Harry Trautmann</li>
<li><a href="http://www.sgtconker.com/2010/09/article-character-movement/">Character Movement</a>, by David Kendall</li>
<li><a href="http://www.sgtconker.com/2010/08/article-derived-effect-classes-in-xna-4/">Derived Effect Classes in XNA 4.0</a>, by Dave Carlile</li>
<li><a href="../2010/08/article-input-playback/">Input Playback</a>, by Jesse Chounard</li>
<li><a href="http://www.sgtconker.com/2010/09/article-multiple-columns-with-game-state-management/">Multiple columns with Game State Management</a>, by Jeff Brown</li>
<li><a href="http://www.sgtconker.com/2010/09/article-node-based-scripting/">Node-Based Scripting</a>, by Blecki</li>
<li><a href="http://www.sgtconker.com/2010/08/programming-your-first-xna-4-game-pong/">Programming your first XNA 4.0 game for PC, Xbox 360 &amp; Windows Phone 7: Pong</a>, by Thomas "Mister Helmut" Altenburger</li>
<li><a href="http://www.sgtconker.com/2010/09/article-rolling-world-tutorial/">Rolling World Tutorial</a>, by Christian Schlager</li>
<li><a href="http://www.sgtconker.com/2010/09/article-scripting-on-the-xbox-360-windows-phone-and-beyond/">Scripting on the Xbox 360, Windows Phone and Beyond!</a>, by UberGeekGames</li>
<li><a href="http://www.sgtconker.com/2010/09/article-shaders-introduction/">Shaders - Introduction</a>, by Daniel Greenheck</li>
<li><a href="http://www.sgtconker.com/2010/09/article-shaders-ambient-lighting/">Shaders - Ambient Lighting</a>, by Daniel Greenheck</li>
<li><a href="http://www.sgtconker.com/2010/09/article-shaders-diffuse-lighting-2/">Shaders - Diffuse Lighting</a>, by Daniel Greenheck</li>
<li><a href="http://www.sgtconker.com/2010/09/article-shaders-specular-lighting/">Shaders - Specular Lighting</a>, by Daniel Greenheck</li>
<li><a href="http://www.sgtconker.com/2010/09/article-shaders-texturing/">Shaders - Texturing</a>, by Daniel Greenheck</li>
<li><a href="http://www.sgtconker.com/2010/09/article-shaders-rim-lighting/">Shaders - Rim Lighting</a>, by Daniel Greenheck</li>
<li><a href="http://www.sgtconker.com/2010/09/article-simple-3d-camera-in-xna/">Simple 3D Camera in XNA</a>, by Pete Street</li>
<li><a href="http://www.sgtconker.com/2010/08/article-texture-modification-using-render-targets-with-some-stencil-buffer-action/">Texture Modification using Render Targets, with some Stencil Buffer Action</a>, by Dave Carlile</li>
<li><a href="http://www.sgtconker.com/2010/09/article-vacant-skies-action-rpg-tutorial-series/">Vacant Skies - Action RPG Tutorial Series</a>, by Aaron T Foley</li>
<li><a href="http://www.sgtconker.com/2010/09/article-wcf-on-the-windows-phone-7%E2%80%93the-how-to-guide/">WCF on the Windows Phone 7 - The How-To Guide</a>, by Simon Jackson</li>
<li><a href="http://www.sgtconker.com/2010/09/article-xna-farseer-platform-physics-tutorial/">XNA Farseer Platform Physics Tutorial</a>, by Roy Triesscheijn</li>
</ul>
<p>And now it's your chance to play favorites!</p>
<p>Besides the judges from inside our barracks, we will let the community act as a judge also. You can contribute to the community vote by sending an email to <a href="mailto:contest@sgtconker.com">contest@sgtconker.com</a> with your Top 3 favorite articles from the above list, <strong>in the order of preference</strong>. We know you like them all... We know you want everyone to win... But this time, you have to choose!</p>
<p>We will leave the voting channels open until<strong> Thursday, September 30th 23:59 GMT</strong>!</p>
<p>Have fun reading the articles and voting for them, and may the best articles win!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sgtconker.com/2010/09/let-the-voting-begin/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Life still goes on</title>
		<link>http://www.sgtconker.com/2010/09/life-still-goes-on/</link>
		<comments>http://www.sgtconker.com/2010/09/life-still-goes-on/#comments</comments>
		<pubDate>Mon, 06 Sep 2010 23:03:44 +0000</pubDate>
		<dc:creator>Sgt. Conker</dc:creator>
				<category><![CDATA["Absolutely fine"]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[ITS COMMING!!!]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Absolutely Fine Tutorial Contest]]></category>
		<category><![CDATA[XNA]]></category>

		<guid isPermaLink="false">http://www.sgtconker.com/?p=1723</guid>
		<description><![CDATA[A brief update from the barracks...
Absolutely fine tutorial contest
Hope you're all enjoying the Articles that have been posted recently.
You can find all the current entries to the absolutely fine tutorial contest here [there's still some more coming, we're hard at work formatting them]
I can has platformer

We have 2 new entries to the I Can Haz Platformer Series

Part [...]]]></description>
			<content:encoded><![CDATA[<p>A brief update from the barracks...</p>
<p><strong>Absolutely fine tutorial contest</strong><br />
Hope you're all enjoying the Articles that have been posted recently.<br />
You can find all the current entries to the <a href="http://www.sgtconker.com/tag/absolutely-fine-tutorial-contest/"><em>absolutely fine tutorial contest here</em></a> [there's still some more coming, we're hard at work formatting them]</p>
<p><strong>I can has platformer</strong></p>
<p><img class="alignnone" title="ICHP" src="http://www.sgtconker.com/wp-content/uploads/2010/09/ICHP4_FinalImage.png" alt="" width="374" height="218" /></p>
<p>We have 2 new entries to the <a href="http://www.sgtconker.com/tag/icanhasplatformer/">I Can Haz Platformer Series</a></p>
<ul>
<li><a href="http://www.sgtconker.com/2010/09/article-i-can-has-platformer-part-4/">Part 4</a></li>
<li><a href="http://www.sgtconker.com/2010/09/article-i-can-has-platformer-part-5/">Part 5</a></li>
</ul>
<p><strong>!!NEW!!</strong></p>
<p><strong><img class="alignnone" title="ColorPicker" src="http://jemgine.omnisu.com/projects/ColorPicker.jpg" alt="" width="277" height="176" /></strong></p>
<p>And life still goes on. Sgt. Conker fails to stop people writing for fun.<br />
Here's a new post from our favourite <a href="http://jemgine.omnisu.com/">Blecki</a><br />
<a href="http://jemgine.omnisu.com/?page_id=417">Direct Link</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sgtconker.com/2010/09/life-still-goes-on/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Article: Node-Based Scripting</title>
		<link>http://www.sgtconker.com/2010/09/article-node-based-scripting/</link>
		<comments>http://www.sgtconker.com/2010/09/article-node-based-scripting/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 19:36:55 +0000</pubDate>
		<dc:creator>Absolutely Fine Tutorial Contest</dc:creator>
				<category><![CDATA["Absolutely fine"]]></category>
		<category><![CDATA[2010 Contest Entries]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[Contest]]></category>
		<category><![CDATA[Absolutely Fine Tutorial Contest]]></category>
		<category><![CDATA[Blecki]]></category>
		<category><![CDATA[JEmgine]]></category>
		<category><![CDATA[node-based scripting]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.sgtconker.com/?p=1641</guid>
		<description><![CDATA[by Blecki

Node-based scripting is not a traditional scripting language. And it's not a new idea, though it seems like people have forgotten about it. New systems appear - see Unreal Engine's Kismet - which people think are amazing new technologies. They aren't new; just amazing. I first encountered this scripting system in the quake engine. [...]]]></description>
			<content:encoded><![CDATA[<h4 style="text-align: center;">by <a href="http://jemgine.omnisu.com/">Blecki</a></h4>
<p style="text-align: center;"><img class="aligncenter" src="http://www.sgtconker.com/wp-content/uploads/contest/2010/blecki/MoveEntityNode.jpg" alt="Node Based Scripting" /></p>
<p>Node-based scripting is not a traditional scripting language. And it's not a new idea, though it seems like people have forgotten about it. New systems appear - see Unreal Engine's Kismet - which people think are amazing new technologies. They aren't new; just amazing. I first encountered this scripting system in the quake engine. It was very crude, and limited, but it had all the basic properties of the system I am about to describe.</p>
<p>A brief note : Throughout this article, I use my own engine, Jemgine, and it's level editor for my examples. Jemgine is available at <a href="http://jemgine.codeplex.com">http://jemgine.codeplex.com</a> You'll need to have XNA Gamestudio 3.1 installed to compile it, and to run the editor.</p>
<p>The target user of a node-based scripting system isn't the programmer, it's the level designer. The level designer might not know how to program. They might be constantly bothering a programmer to write scripts for them. Node-based scripting is an attempt to give the non-programmer level designer tools they understand and can use to create interesting behavior in a level without involving the programmer, and without having to learn a complex scripting language.</p>
<p><span id="more-1641"></span></p>
<p>Node-based scripting is a visual programming language. Most visual programming languages make the same mistake. They try and present the nuts and bolts of programming in a visual manner. Programs are still made of for loops and variables, only they're little boxes on the screen instead of text. They require the same skill set as programming in a text editor, except it takes longer to put the program together. Understandably, they aren't terribly usefull languages. The target audience doesn't know how to program - getting rid of the text editor doesn't change that. And those that do know how to program aren't going to give up the text editor for a less productive environment. Node-based scripting doesn't have to fall into this trap.</p>
<p>First, what is a node? A node is a little atom of behavior. It's an action that can be applied to the objects in the game world, or a chunk of logic. It's important to strike a balance somewhere between the low level and the high level. If your nodes represent loops and variables and conditions, you'll fall into that trap I described earlier. Make the nodes too high level, and you'll lose their flexibility. It can be beneficial to have some of those low level constructs, and some of the high level. Focus on the middle ground, but understand that you're going to end up with a fair mix of both.</p>
<p>Nodes have inputs and outputs. These are represented by terminals. Output terminals are connected to input terminals. Nodes also have references. These reference terminals are connected to other nodes or game objects. For example, the node 'MoveGameObject' has one input to trigger the action. It has two outputs - Began and Arrived, which are triggered when the movement begins and when it ends, respectively. It also has two references. One that's connected to the game object that needs moving, and another that's connected to the waypoint to move it to.</p>
<p><img class="alignnone" title="Move Entity Node" src="http://www.sgtconker.com/wp-content/uploads/contest/2010/blecki/MoveEntityNode.jpg" alt="" width="256" height="256" /></p>
<p>A node can be as simple in code as a list of terminals and a virtual function. Like this.</p>
<pre class="brush: csharp; title: ;">
public class Input
{
	public Node Owner;
}

public class Output
{
	public Input Target;
}

public class Reference
{
	public Node Target;
}

public class Node
{
	public List&lt;Input&gt; Inputs;
	public List&lt;Output&gt; Outputs;
	public List&lt;Reference&gt; References;

	public virtual void FireInput(Input Input, ScriptContext Context) {}
}
</pre>
<p>You'll need a way to create the script. You can do it in code, or you can do it in XML, but since the whole point of this system is to make it easy for your level designers to use, you should do it in your level editor. The level editor only needs to support two basic operations. Creating nodes, and connecting terminals.</p>
<p>You can see this in action within the Jemgine level editor. In the editor, press Alt+S to create a new script node. Then, with that node selected, hold alt and left click and drag an output terminal to connect it to an input terminal. This is probably the most important part of the system, so why aren't I spending more time on it? Because it's a terribly complex system and it's way beyond the scope of this article. But, I do suply a reference implementation in the form of the Jemgine level Editor.</p>
<p>The other half of the system is the engine that executes a script in the game. At first blush it seems that this would be very complicated, but it turns out it's the simplest piece of the puzzle. Because it's so simple, here is the entire implementation.</p>
<pre class="brush: csharp; title: ;">
public class ScriptDriver
{
	class FireEvent
	{
		internal Output Output;
		internal ScriptContext Context;
	}

	List&lt;FireEvent&gt; FireEvents = new List&lt;FireEvent&gt;();

	public void FireOutput(Output Output, ScriptContext Context)
	{
		FireEvents.Add(new FireEvent { Output = Output, Context = Context });
	}

	public void Update(int Cycles)
	{
		while (Cycles &gt; 0)
		{
			--Cycles;

			var LocalList = new List&lt;FireEvents&gt;(FireEvents);
			FireEvents.clear();
			foreach (var FireEvent in LocalList)
				if (FireEvent.Output.Target != null)
					FireEvent.Output.Target.Owner.FireInput(FireEvent.Output.Target, FireEvent.Context);
		}
	}
}
</pre>
<p>You might not need a script engine at all. When a script is fired, you could just call FireInput on it yourself. The benefit of a scripting engine is that it can delay the execution of a fired input until the next update cycle, which will prevent a bad script from creating an infinite script loop and freezing the game. This is why the Update function makes a copy of the fire list.</p>
<p>The only piece of the puzzle left is getting these scripts from the editor to the game. I use XNA's built in XML serializer. Actually, this is the only part of the article that actually depends on XNA. The XML Serializer is great, and it's already integrated into the content pipeline. But it has a few flaws. Notably, our script is a graph, and the XML Serializer can't handle a graph. We have to flatten it first, by which I mean replace all the references with simple indicies we can use to restore the references at load time. You could keep the script in a flat format all the time, but I found it was easier to flatten and restore than to work with the flat format all the time.</p>
<p>Flattening isn't complicated. First, assign all the objects an id. Then, copy the id of the referenced object into the terminal. The XML Serializer can be setup to serialize that id, and not the reference.</p>
<p>If game objects and entity components are themselves script nodes, this will allow you to attach scripts to all sorts of things. A health component, for example, could have an output terminal that it fires when the game object it is attached to dies. Now a script can be attached to an object's death very easily.</p>
<p>In a traditional scripting system, it can be pretty hard to tell what's going on in a level, especially if you aren't the level designer that built it. A node-based scripting system solves this problem. In a traditional system, what you see in the level editor is a filename. With this node-based system, the script is right there, in the level. This can be a disadvantage too.</p>
<p>It's a pain to build a complex script over and over for different levels, so the editor should be able to import a script into the level. The Jemgine level editor can import entire levels into another, so I can create a level that includes not just the script but the objects it operates on. This solves one of the disadvantages, but if there is an error in the original script, fixing that script won't fix every level that uses it. We've traded this 'fix in one place' for a bit of additional flexibility. Because the script is copied into the level, we can make customizations to the script specific to that level.</p>
<p>When you first start working with a scripting system like this, it's going to seem like there is no advantage at all. You'll still have level designers taking up valuable programmer time, but instead of scripts the programmers will be writing nodes. Eventually you'll build up a large library of script nodes and the level designers will find fewer and fewer things to bug the programmers about.</p>
<p>At first, the level designers just won't get it. You probably won't get it either. But after you write a few scripts, after you solve a few problems, it will click, and soon your level designers will be doing things you had never imagined.</p>
<p>This is a script for a door I created in the Jemgine level Editor.</p>
<p><img src="http://www.sgtconker.com/wp-content/uploads/contest/2010/blecki/DoorScript.jpg" alt="Door Script" /></p>
<p>In this script, there are two game objects. One is the door itself, the other implements the trigger zone for the door's button. The nodes labelled 'PolygonPhysics' are entity components attached to the game objects that interact with the engine's physics sub system. When the player touches the trigger zone, the PolygonPhysics component fires it's OnContact output. This is connected to a UseAction node, which will wait until the player presses a button before firing it's output. So if the player is touching the trigger zone, and presses the button, the UseAction node will fire that relay, which fires four other nodes. MoveEntity does exactly what you would expect. Disable disables the original switch, so the player can't press it again. Show and Hide work together with two other game objects (Switch On, and Switch Off) to change the switch graphic. Finally, MoveEntity plays some sounds.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sgtconker.com/2010/09/article-node-based-scripting/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Submissions Closed</title>
		<link>http://www.sgtconker.com/2010/09/submissions-closed/</link>
		<comments>http://www.sgtconker.com/2010/09/submissions-closed/#comments</comments>
		<pubDate>Wed, 01 Sep 2010 06:23:25 +0000</pubDate>
		<dc:creator>Captain ZSquare</dc:creator>
				<category><![CDATA["Absolutely fine"]]></category>
		<category><![CDATA[Contest]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Absolutely Fine Tutorial Contest]]></category>
		<category><![CDATA[End of Submissions]]></category>

		<guid isPermaLink="false">http://www.sgtconker.com/?p=1638</guid>
		<description><![CDATA[Yeah, as pointed out in the comments, the deadline was sooner than I actually said in my last email.
The submission for the 'Absolutely Fine' XNA Tutorial Contest is now closed.
We'll soon be starting formatting the rest of the articles, posting them, and then posting a master list of all entries. After that, judging and voting [...]]]></description>
			<content:encoded><![CDATA[<p>Yeah, as pointed out in the comments, the deadline was sooner than I actually said in my last email.<br />
The submission for the <a href="http://www.sgtconker.com/2010/07/the-sgt-conker-xna-tutorial-contest-2">'Absolutely Fine' XNA Tutorial Contest</a> is <strong>now</strong> closed.</p>
<p>We'll soon be starting formatting the rest of the articles, posting them, and then posting a master list of all entries. After that, judging and voting will begin.</p>
<p>Meanwhile, enjoy our news feed <img src='http://www.sgtconker.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.sgtconker.com/2010/09/submissions-closed/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>1 Day remaining</title>
		<link>http://www.sgtconker.com/2010/08/1-day-remaining/</link>
		<comments>http://www.sgtconker.com/2010/08/1-day-remaining/#comments</comments>
		<pubDate>Tue, 31 Aug 2010 19:26:00 +0000</pubDate>
		<dc:creator>Captain ZSquare</dc:creator>
				<category><![CDATA["Absolutely fine"]]></category>
		<category><![CDATA[Contest]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Absolutely Fine Tutorial Contest]]></category>
		<category><![CDATA[deadline]]></category>

		<guid isPermaLink="false">http://www.sgtconker.com/?p=1635</guid>
		<description><![CDATA[Quick reminder for our 'Absolutely Fine' XNA Tutorial Contest: The deadline is about 1 day away, so if you want to enter the contest, send us your entry!
At the moment, we have 4 published entries, and another around 14 entries that we're preparing for publishing.
Good luck!
]]></description>
			<content:encoded><![CDATA[<p>Quick reminder for our <a href="http://www.sgtconker.com/2010/07/the-sgt-conker-xna-tutorial-contest-2/">'Absolutely Fine' XNA Tutorial Contest</a>: The deadline is about 1 day away, so if you want to enter the contest, <a href="http://www.sgtconker.com/2010/07/the-sgt-conker-xna-tutorial-contest-2/">send us your entry</a>!</p>
<p>At the moment, we have 4 published entries, and another around 14 entries that we're preparing for publishing.</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sgtconker.com/2010/08/1-day-remaining/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Contest deadline approaching!</title>
		<link>http://www.sgtconker.com/2010/08/contest-deadline-approaching/</link>
		<comments>http://www.sgtconker.com/2010/08/contest-deadline-approaching/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 16:46:47 +0000</pubDate>
		<dc:creator>Captain ZSquare</dc:creator>
				<category><![CDATA["Absolutely fine"]]></category>
		<category><![CDATA[Contest]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[XNA]]></category>
		<category><![CDATA[Absolutely Fine Tutorial Contest]]></category>
		<category><![CDATA[deadline]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.sgtconker.com/?p=1619</guid>
		<description><![CDATA[Hi all,
Just a reminder that the deadline for our 'Absolutely Fine' XNA Tutorial Contest is closing in, and you have about 1 week to send your entries into the contest.
If you forgot the details of the contest, feel free to refresh your memory.
We're currently hard at work to get the rest of the entries online [...]]]></description>
			<content:encoded><![CDATA[<p>Hi all,</p>
<p>Just a reminder that the deadline for our<a href="http://www.sgtconker.com/2010/07/the-sgt-conker-xna-tutorial-contest-2/"> 'Absolutely Fine' XNA Tutorial Contest</a> is closing in, and you have about 1 week to send your entries into the contest.</p>
<p>If you forgot the details of the contest, feel free to <a href="http://www.sgtconker.com/2010/07/the-sgt-conker-xna-tutorial-contest-2/">refresh your memory</a>.</p>
<p>We're currently hard at work to get the rest of the entries online for your reading pleasure.</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sgtconker.com/2010/08/contest-deadline-approaching/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First two entries to our contest are online!</title>
		<link>http://www.sgtconker.com/2010/08/first-two-entries-to-our-contest-are-online/</link>
		<comments>http://www.sgtconker.com/2010/08/first-two-entries-to-our-contest-are-online/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 05:13:28 +0000</pubDate>
		<dc:creator>Captain ZSquare</dc:creator>
				<category><![CDATA["Absolutely fine"]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Absolutely Fine Tutorial Contest]]></category>

		<guid isPermaLink="false">http://www.sgtconker.com/?p=1588</guid>
		<description><![CDATA[Hi all,
Two fine entries into our contest are now online.
Input Playback, by Jesse Chounard
Derived Effect Classes in XNA 4.0, by Dave Carlile
Do you like them? Submit your own! 
Have a nice reading!
]]></description>
			<content:encoded><![CDATA[<p>Hi all,</p>
<p>Two fine entries into our contest are now online.</p>
<p><a href="http://www.sgtconker.com/2010/08/article-input-playback/">Input Playback, by Jesse Chounard</a><br />
<a href="http://www.sgtconker.com/2010/08/article-derived-effect-classes-in-xna-4/">Derived Effect Classes in XNA 4.0, by Dave Carlile</a></p>
<p>Do you like them? <a href="http://www.sgtconker.com/2010/07/the-sgt-conker-xna-tutorial-contest-2/">Submit your own!</a> <img src='http://www.sgtconker.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Have a nice reading!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sgtconker.com/2010/08/first-two-entries-to-our-contest-are-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

