<?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>Doolwind&#039;s Game Coding Blog &#187; Game Engine</title>
	<atom:link href="http://www.doolwind.com/blog/tag/game-engine/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.doolwind.com/blog</link>
	<description>Pragmatic Thoughts On Game Development</description>
	<lastBuildDate>Mon, 16 Aug 2010 23:19:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Best Graphics Programming and Game Programming Blogs</title>
		<link>http://www.doolwind.com/blog/best-graphics-programming-and-game-programming-blogs/</link>
		<comments>http://www.doolwind.com/blog/best-graphics-programming-and-game-programming-blogs/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 06:15:57 +0000</pubDate>
		<dc:creator>Doolwind</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[Game Engine]]></category>
		<category><![CDATA[Game Programming]]></category>
		<category><![CDATA[Graphics Programming]]></category>

		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=455</guid>
		<description><![CDATA[Below are a collection of Blogs relating to game development, primarily graphics programming. Use your favourite reader (eg Google Reader) to read them.  Know of any blogs not on the list that you can recommend? Add a comment and I&#8217;ll add them to the list. Big thanks to Damian Trebilco for help with the list.  The [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.doolwind.com/images/blog/rssfeed.jpg"><img class="alignright" title="RSS Feed" src="http://www.doolwind.com/images/blog/rssfeed.jpg" alt="" width="130" height="119" /></a>Below are a collection of Blogs relating to game development, primarily graphics programming.  Use your favourite reader (eg <a href="http://www.google.com/reader">Google Reader</a>) to read them.  Know of any blogs not on the list that you can recommend? Add a comment and I&#8217;ll add them to the list. Big thanks to <a href="http://glintercept.nutty.org/">Damian Trebilco</a> for help with the list.  The blogs are listed alphabetically rather than by any preference of mine.</p>
<p><span id="more-455"></span></p>
<p>.mischief.mayhem.soap.<br />
<a href="http://msinilo.pl/blog/?feed=rss2"> http://msinilo.pl/blog/?feed=rss2</a></p>
<p>Atom<br />
<a href="http://farrarfocus.blogspot.com/feeds/posts/default "> http://farrarfocus.blogspot.com/feeds/posts/default </a></p>
<p>Beautiful Pixels<br />
<a href="http://feeds.feedburner.com/BeautifulPixels"> http://feeds.feedburner.com/BeautifulPixels</a></p>
<p>Dead Voxels<br />
<a href="http://deadvoxels.blogspot.com/feeds/posts/default"> http://deadvoxels.blogspot.com/feeds/posts/default</a></p>
<p>Diary of a Graphics Programmer<br />
<a href="http://diaryofagraphicsprogrammer.blogspot.com/feeds/posts/default"> http://diaryofagraphicsprogrammer.blogspot.com/feeds/posts/default</a></p>
<p>direct to video<br />
<a href="http://directtovideo.wordpress.com/feed/"> http://directtovideo.wordpress.com/feed/</a></p>
<p>Gamasutra<br />
<a href="http://feeds.feedburner.com/GamasutraNews">http://feeds.feedburner.com/GamasutraNews</a></p>
<p>Game Angst<br />
<a href="http://gameangst.com/?feed=rss2">http://gameangst.com/?feed=rss2</a></p>
<p>Game Rendering<br />
<a href="http://www.gamerendering.com/feed/"> http://www.gamerendering.com/feed/</a></p>
<p>GameArchitect<br />
<a href="http://gamearchitect.net/feed/"> http://gamearchitect.net/feed/</a></p>
<p>GameDev.Net<br />
<a href="http://www.gamedev.net/xml/">http://www.gamedev.net/xml/</a></p>
<p>Geeks3D Forums &#8211; 3D-Tech News Around The Web<br />
<a href="http://feeds2.feedburner.com/Geeks3DTechNewsForum">http://feeds2.feedburner.com/Geeks3DTechNewsForum</a></p>
<p>GPGPU» :: GPGPU.org<br />
<a href="http://www.gpgpu.org/cgi-bin/blosxom.cgi/index.rss">http://www.gpgpu.org/cgi-bin/blosxom.cgi/index.rss</a></p>
<p>Graphic Rants<br />
<a href="http://graphicrants.blogspot.com/feeds/posts/default"> http://graphicrants.blogspot.com/feeds/posts/default</a></p>
<p>Graphics Size Coding<br />
<a href="http://sizecoding.blogspot.com/feeds/posts/default"> http://sizecoding.blogspot.com/feeds/posts/default</a></p>
<p>Humus<br />
<a href="http://www.humus.name/rss.xml"> http://www.humus.name/rss.xml</a></p>
<p>Ignacio Castaño<br />
<a href="http://castano.ludicon.com/blog/feed/"> http://castano.ludicon.com/blog/feed/</a></p>
<p>John Ratcliff&#8217;s Code Suppository<br />
<a href="http://codesuppository.blogspot.com/feeds/posts/default"> http://codesuppository.blogspot.com/feeds/posts/default</a></p>
<p>level of detail<br />
<a href="http://www.jshopf.com/blog/?feed=rss2"> http://www.jshopf.com/blog/?feed=rss2</a></p>
<p>Level of Detail<br />
<a href="http://levelofdetail.wordpress.com/feed/"> http://levelofdetail.wordpress.com/feed/</a></p>
<p>Lost in the Triangles<br />
<a href="http://feeds.feedburner.com/LostInTheTriangles"> http://feeds.feedburner.com/LostInTheTriangles</a></p>
<p>Make It Big In Games<br />
<a href="http://makeitbigingames.com/feed/">http://makeitbigingames.com/feed/</a></p>
<p>meshula.net<br />
<a href="http://meshula.net/wordpress/?feed=rss2"> http://meshula.net/wordpress/?feed=rss2</a></p>
<p>OpenGL News<br />
<a href="http://www.opengl.org/news/rss_2.0/"> http://www.opengl.org/news/rss_2.0/</a></p>
<p>NVIDIA Developer News<br />
<a href="http://news.developer.nvidia.com/rss.xml"> http://news.developer.nvidia.com/rss.xml</a></p>
<p>Outside Hollywood<br />
<a href="http://www.outside-hollywood.com/feed/"> http://www.outside-hollywood.com/feed/</a></p>
<p>Real-Time Rendering<br />
<a href="http://www.realtimerendering.com/blog/feed/"> http://www.realtimerendering.com/blog/feed/</a></p>
<p>realtimecollisiondetection.net &#8211; the blog<br />
<a href="http://realtimecollisiondetection.net/blog/?feed=rss2"> http://realtimecollisiondetection.net/blog/?feed=rss2</a></p>
<p>Sanders&#8217; blog<br />
<a href="http://sandervanrossen.blogspot.com/feeds/posts/default"> http://sandervanrossen.blogspot.com/feeds/posts/default</a></p>
<p>Scattered Pixels<br />
<a href="http://feeds.feedburner.com/ScatteredPixels"> http://feeds.feedburner.com/ScatteredPixels</a></p>
<p>Solid Angle<br />
<a href="http://solid-angle.blogspot.com/feeds/posts/default"> http://solid-angle.blogspot.com/feeds/posts/default</a></p>
<p>The Hacks of Life<br />
<a href="http://hacksoflife.blogspot.com/feeds/posts/default"> http://hacksoflife.blogspot.com/feeds/posts/default</a></p>
<p>w00t<br />
<a href="http://bpeers.com/blog/xml-rss2.php"> http://bpeers.com/blog/xml-rss2.php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.doolwind.com/blog/best-graphics-programming-and-game-programming-blogs/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Why You Should Use C# For Your Scripting Language</title>
		<link>http://www.doolwind.com/blog/why-you-should-use-csharp-for-your-scripting-language/</link>
		<comments>http://www.doolwind.com/blog/why-you-should-use-csharp-for-your-scripting-language/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 21:37:59 +0000</pubDate>
		<dc:creator>Doolwind</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Game Engine]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Scripting Language]]></category>

		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=240</guid>
		<description><![CDATA[I&#8217;ve used a lot of scripting languages over the years when developing games.  For my latest engine, I decided I’d use C# as the scripting language.  I’ve been amazed by how well C# works as a scripting language so I thought I’d share my experiences.  The technique I’m about to discuss gives game designers access to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.doolwind.com/images/blog/csharp.jpg"><img class="alignright" title="C#" src="http://www.doolwind.com/images/blog/csharp.jpg" alt="" width="154" height="96" /></a>I&#8217;ve used a lot of scripting languages over the years when developing games.  For my latest engine, I decided I’d use C# as the scripting language.  I’ve been amazed by how well C# works as a scripting language so I thought I’d share my experiences.  The technique I’m about to discuss gives game designers access to a fully-featured language and IDE with compile-time checking all while allowing run-time changes.  I use run-time compilation to achieve the flexibility of a scripting language combined with the power of a .NET language.</p>
<p><span id="more-240"></span></p>
<p><strong>Advantages</strong></p>
<p>There are a number of key advantages to using C# as a scripting language in your game engine.  I’ll list these first then describe how I achieve them.</p>
<ul>
<li><strong>Designers use Visual Studio.</strong> Most designers are stuck using notepad (or similar) when writing      their scripts.  With my technique,      designers can use Visual Studio, gaining the full power of the IDE.  Including:<strong> </strong>
<ul>
<li><strong>Intellisense</strong>. Letting them know what functions exist on all       of the objects you’ve exposed, as well as documentation you’ve provided       in code.<strong> </strong></li>
<li><strong>Compilation</strong>.<strong> </strong>Designers can compile their scripts       while making changes to catch any compile-time problems.<strong> </strong></li>
<li><strong>Full Debugging Support. </strong>Another       area lacking in most scripting languages is the debugging support.  Designers have access to all of Visual       Studios debugging functionality to help them find and fix issues with       their code.<strong> </strong></li>
</ul>
</li>
<li><strong>Run-Time Changes.</strong> Designers still have complete control to change their scripts at      run-time.  Scripts can be reloaded      automatically when files are changed, or (more likely) a “reset” button      can be exposed in the game engine that allows them to reset the level and reload      all scripts.<strong></strong></li>
<li><strong>Compile scripts into the executable for release.</strong> You have the option to use the scripts      compiled into the executable if you prefer, protecting your files.<strong></strong></li>
<li><strong>Complete Access to game objects, or whatever you want designers to      access.</strong> Designers are working      in the same language you are developing in.  They have full access to the game      objects or to a subset you decide on.       I use an interface and expose what I want them to use.<strong></strong></li>
<li><strong>FAST Run-time performance. </strong> The C# code is compiled not interpreted      meaning the run-time performance is as good as the rest of the engine.  The slight performance bottleneck of      reflecting the function can be removed by compiling scripts into      executable if required.<strong></strong></li>
<li><strong>No Binding Required.</strong> Binding is automatic between the game engine and the script.  You don’t need to write any plumbing and      exposing a new function is as easy as adding it to the engine.<strong></strong></li>
</ul>
<p><strong>How It Works</strong></p>
<p>The setup is surprisingly easy, designers follow these steps and their up and running:</p>
<ol>
<li>Add the script file to the      Visual Studio project (preferably in its own directory)</li>
<li>Create an Init() function      in the script class which will automatically be called by the engine</li>
<li>Create callbacks for events      and implement the game logic</li>
<li>Run the game and make      changes to scripts in real-time as needed</li>
</ol>
<p>I use the run-time compilation functionality of the .NET framework to compile and run the code on- the-fly.  This has a small performance hit during compilation however the run-time performance is excellent.</p>
<p><strong>Some Examples</strong></p>
<p>Below are a few examples I put together today to show the power of the system.</p>
<p>The first script below creates an entity at the beginning of the game and then sets up a callback that will fire every 5 seconds.  The TestScript object’s lifetime is until the scripting system is reset allowing stateful object creation.</p>
<pre class="csharpcode"><span class="csharp05">public</span><span class="csharp00"> </span><span class="csharp05">class</span><span class="csharp00"> </span>TestScript<span class="csharp00"> </span><span class="csharp10">:</span><span class="csharp00"> </span>BaseScript<span class="csharp00">
</span><span class="csharp10">{</span><span class="csharp00">
    </span><span class="csharp05">int</span><span class="csharp00"> </span>team<span class="csharp00"> </span><span class="csharp10">=</span><span class="csharp00"> </span><span class="csharp04">1</span><span class="csharp10">;</span><span class="csharp00">
    </span><span class="csharp05">int</span><span class="csharp00"> </span>xPos<span class="csharp00"> </span><span class="csharp10">=</span><span class="csharp00"> </span><span class="csharp04">15</span><span class="csharp10">;</span><span class="csharp00">
    </span><span class="csharp05">int</span><span class="csharp00"> </span>yPos<span class="csharp00"> </span><span class="csharp10">=</span><span class="csharp00"> </span><span class="csharp04">2</span><span class="csharp10">;</span><span class="csharp00">

    </span><span class="csharp05">public</span><span class="csharp00"> </span><span class="csharp05">void</span><span class="csharp00"> </span>Init<span class="csharp10">()</span><span class="csharp00">
    </span><span class="csharp10">{</span><span class="csharp00">
        </span>script<span class="csharp10">.</span>CreateEntity<span class="csharp10">(</span><span class="csharp06">"Healer"</span><span class="csharp10">,</span><span class="csharp00"> </span>team<span class="csharp10">,</span><span class="csharp00"> </span>xPos<span class="csharp10">,</span><span class="csharp00"> </span>yPos<span class="csharp10">);</span><span class="csharp00">
        </span>script<span class="csharp10">.</span>CallEveryXSeconds<span class="csharp10">(</span>MyCallback<span class="csharp10">,</span><span class="csharp00"> </span><span class="csharp04">5</span><span class="csharp10">);</span><span class="csharp00">
    </span><span class="csharp10">}</span><span class="csharp00">

    </span><span class="csharp05">public</span><span class="csharp00"> </span><span class="csharp05">void</span><span class="csharp00"> </span>MyCallback<span class="csharp10">()</span><span class="csharp00">
    </span><span class="csharp10">{</span><span class="csharp00">
        </span>script<span class="csharp10">.</span>CreateEntity<span class="csharp10">(</span><span class="csharp06">"Tank"</span><span class="csharp10">,</span><span class="csharp00"> </span>team<span class="csharp10">,</span><span class="csharp00"> </span>xPos<span class="csharp10">,</span><span class="csharp00"> </span>yPos<span class="csharp10">++);</span><span class="csharp00">
    </span><span class="csharp10">}</span><span class="csharp00">
</span><span class="csharp10">}</span><span class="csharp00">
</span></pre>
<p>The next script shows how simple customizing a game entity can be.  Whenever an effect is added or removed from a game entity, the following two functions are called allowing designers complete control over gameplay.  Notice the designer is given access only to what they need while still having complete control to change any settings or values of the entity.  An interface could be used to restrict what operations can be performed on entities as required.</p>
<pre class="csharpcode"><span class="csharp05">class</span><span class="csharp00"> </span>SpeedUpEffect<span class="csharp00">
</span><span class="csharp10">{</span><span class="csharp00">
    </span><span class="csharp05">public</span><span class="csharp00"> </span><span class="csharp05">void</span><span class="csharp00"> </span>AddEffect<span class="csharp10">(</span>GameEntity<span class="csharp00"> </span>entity<span class="csharp10">)</span><span class="csharp00">
    </span><span class="csharp10">{</span><span class="csharp00">
        </span>entity<span class="csharp10">.</span>Speed<span class="csharp00"> </span><span class="csharp10">+=</span><span class="csharp00"> </span><span class="csharp04">1</span><span class="csharp10">;</span><span class="csharp00">
    </span><span class="csharp10">}</span><span class="csharp00">

    </span><span class="csharp05">public</span><span class="csharp00"> </span><span class="csharp05">void</span><span class="csharp00"> </span>RemoveEffect<span class="csharp10">(</span>GameEntity<span class="csharp00"> </span>entity<span class="csharp10">)</span><span class="csharp00">
    </span><span class="csharp10">{</span><span class="csharp00">
        </span>entity<span class="csharp10">.</span>Speed<span class="csharp00"> </span><span class="csharp10">-=</span><span class="csharp00"> </span><span class="csharp04">1</span><span class="csharp10">;</span><span class="csharp00">
    </span><span class="csharp10">}</span><span class="csharp00">
</span><span class="csharp10">}</span><span class="csharp00">
</span></pre>
<p><strong>Conclusion</strong></p>
<p>As I said, I was amazed both at how simple all of this was to set up (only a few hours) and how powerful the system is.  If anyone is interested I’d be happy to share the source code for how I achieved this.  As I continue development of my engine I will be experimenting more with this scripting system and will release more information as I develop it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doolwind.com/blog/why-you-should-use-csharp-for-your-scripting-language/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Unified Game Development Scripting Language</title>
		<link>http://www.doolwind.com/blog/unified-game-development-scripting-language/</link>
		<comments>http://www.doolwind.com/blog/unified-game-development-scripting-language/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 23:55:13 +0000</pubDate>
		<dc:creator>Doolwind</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Game Development]]></category>
		<category><![CDATA[Game Engine]]></category>
		<category><![CDATA[Game Programming]]></category>
		<category><![CDATA[Scripting Language]]></category>
		<category><![CDATA[Unreal]]></category>

		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=194</guid>
		<description><![CDATA[What is the best scripting language for game development?  Every different game engine has its own scripting language making for a difficult choice.  Game programmers have a unified language in C++ however game designers are left with whatever language their engine supports.  I propose a unified scripting language that all engines/platforms can share. Problem When [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.doolwind.com/images/blog/scriptinglanguages.jpg"><img class="alignright" title="Scripting Languages" src="http://www.doolwind.com/images/blog/scriptinglanguages.jpg" alt="" width="86" height="75" /></a>What is the best scripting language for game development?  Every different game engine has its own scripting language making for a difficult choice.  Game programmers have a unified language in C++ however game designers are left with whatever language their engine supports.  I propose a unified scripting language that all engines/platforms can share.</p>
<p><span id="more-194"></span></p>
<p><strong>Problem</strong></p>
<p>When you chose an engine or platform to develop for, you’re locking yourself into its scripting language.  This has the following core problems:</p>
<ul>
<li><strong>Difficult cross platform development</strong>.  Cross platform development is hard      enough without the worry of porting gameplay code.  Gameplay code should not be platform      specific, and therefore there is no reason to have a different language      per platform/engine.</li>
<li><strong>Immature languages</strong>.       With each company re-inventing the wheel when they implement a new      language designers are left with immature languages.</li>
<li><strong>Too many languages</strong>.       Designers must learn a new language whenever they develop for a new      engine/platform.  This increases      development time and reduces fluency in a language.  A designer cannot be free to fully      express themselves until they are fluent in the language they describe      their gameplay in.</li>
</ul>
<p><strong>Solution</strong></p>
<p>The solution to these problems is to have a unified scripting language shared by all engines/platforms.  Written specifically for game development it would take the best of current scripting languages.  The games industry as a whole would “own” the language allowing it to evolve with the needs of the industry as each new generation of hardware is released.</p>
<p><strong>Advantages</strong></p>
<p>There are a number of key advantages for moving towards a unified scripting language.</p>
<ul>
<li><strong>Single gameplay codebase</strong>.       Gameplay doesn’t change dramatically between similar platforms      (e.g. 360 and PS3 or flash and iPhone).       A unified language would allow a single codebase to kept across      multiple platforms helping with porting and maintenance.</li>
<li><strong>Specific to game development needs</strong>.  A language created specifically for game      development could cater to the needs of the industry.</li>
<li><strong>Single language for designers to use.</strong> Small nuances in existing languages can      create major issues for non-programmer designers.  A single unified language reduces these      problems and makes the learning path for students clearer.</li>
<li><strong>Less Wheel Re-Invention</strong>.       An open-source unified scripting language would allow anyone to      submit changes to the language to improve it, rather than re-inventing a      whole new language.</li>
<li><strong>Unified Toolset</strong>.  A      unified set of tools could sit on top of a unified scripting language.<strong></strong></li>
</ul>
<p><strong>Genre Specific</strong></p>
<p>The core language will hold the basic building blocks for all games.  In the future, small libraries can be built by studios or the community for each specific genre.  For example a library of functions common to most FPS or RTS games could be created and shared between developers.   A unified scripting language makes this sharing possible and encourages people to develop well thought out, robust libraries they can reuse from engine to engine.  It also serves to soften the blow for designers when changing engines as their common set of functions will move across with them.</p>
<p><strong>How</strong></p>
<p>There are two main options for the creation of a new unified scripting language:</p>
<ul>
<li><strong>Large studio forks their current language</strong>.  For example Epic could open up Unreal      Script and give out the source code for its implementation (let&#8217;s call it      OpenUnrealScript).</li>
<li><strong>Community Driven</strong>.  A      simple codeplex/google code project with a couple of leaders and a team of      developers would allow for rapid development, while meeting the needs of      multiple teams.  Early adopters      would drive the initial feature-set and help to drive its development.<strong></strong></li>
</ul>
<p><strong>Conclusion</strong></p>
<p>My dream is to see the next generation of consoles and other platforms (PC, iPhone, Flash) all supporting a unified language.  I&#8217;m interested in people&#8217;s thoughts on this idea and candidates for which language to use.  It&#8217;s less about language features and just agreeing on a core language everyone can use to develop games and bring all developers onto the same page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doolwind.com/blog/unified-game-development-scripting-language/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Model View Controller (MVC) Game Engine</title>
		<link>http://www.doolwind.com/blog/model-view-controller-mvc-game-engine/</link>
		<comments>http://www.doolwind.com/blog/model-view-controller-mvc-game-engine/#comments</comments>
		<pubDate>Wed, 23 Sep 2009 21:38:47 +0000</pubDate>
		<dc:creator>Doolwind</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[Game Engine]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=186</guid>
		<description><![CDATA[The Model View Controller (MVC) pattern has been used with great success in business software development for years.  Despite this, it has never fully been picked up by the games industry.  Today I&#8217;m going to discuss why the MVC pattern is perfect for game development. Introduction The Model View Controller pattern isolates gameplay logic from [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.doolwind.com/images/blog/MVC.png"><img class="alignright" title="MVC" src="http://www.doolwind.com/images/blog/MVC.png" alt="" width="130" height="133" /></a>The Model View Controller (MVC) pattern has been used with great success in business software development for years.  Despite this, it has never fully been picked up by the games industry.  Today I&#8217;m going to discuss why the MVC pattern is perfect for game development.<span id="more-186"></span></p>
<h2><strong>Introduction</strong></h2>
<p>The Model View Controller pattern isolates gameplay logic from input and rendering.  This &#8220;Separation of Concerns&#8221; allows each layer to be developed, tested and maintained independently.  Graphics programmers work solely on rendering, gameplay programmers or designers work on gameplay and whoever&#8217;s left can work on input.</p>
<p>Model &#8211; Gameplay (game entities, eg. Player, Sword)<br />
View &#8211; Rendering<br />
Controller &#8211; Input and non-gameplay flow (menu&#8217;s etc)</p>
<p>The controller takes input from the player and changes the model.  The controller then passes the model (and any other relevant information) to the view to be rendered.</p>
<h2><strong>Advantages</strong></h2>
<p><strong>Cleaner Code</strong>.  Large teams can work independently on each layer of the application without conflict.  Clear interfaces are used to define communication across layer boundaries.  As the engine grows, this separation of concerns helps to minimize complexity.</p>
<p><strong>Better Cross Platform Support</strong>.  Gameplay is separate and not reliant on platform specific technology.  Rendering and input (both heavily platform specific) are separate and can easily be changed.</p>
<p><strong>Decoupled Rendering.</strong>  In most engines the game world and renderer are tightly coupled.  MVC decouples the game world (and input) from the rendering.  Rather than calling &#8220;Render&#8221; of each game entity the rendering system uses the model when rendering.  This also simplifies the process of adding multi-threaded support to the game or renderer.</p>
<p>I&#8217;ve used this technique in my latest engine and it feels so much more natural.  Rather than blurring the line between gameplay and rendering they are distinct and the renderer is responsible for bringing them together.</p>
<p><strong>Scripting/Designers</strong>.  All changes made to the model by the controller are through a known interface.  This interface can be exposed to designers/modders through a scripting language giving them greater flexibility and control.</p>
<h2><strong>Conclusion</strong></h2>
<p>I won&#8217;t go into implementation details right now.  If anyone is interested, I&#8217;ll put together a blog on implementation and look at releasing the MVC framework I created in XNA.  Let me know your thoughts, where you see there might be problems and if you&#8217;re interested in me discussing this further.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doolwind.com/blog/model-view-controller-mvc-game-engine/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Are Game Programmers Good Enough?</title>
		<link>http://www.doolwind.com/blog/are-game-programmers-good-enough/</link>
		<comments>http://www.doolwind.com/blog/are-game-programmers-good-enough/#comments</comments>
		<pubDate>Fri, 26 Jan 2007 04:28:45 +0000</pubDate>
		<dc:creator>Doolwind</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Game Engine]]></category>
		<category><![CDATA[Game Programming]]></category>

		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=72</guid>
		<description><![CDATA[Computer Gaming Weekly released their first 100 magazines for free download on the net a while back.  I was reading through the first issue (November 1981) and I stumbled across an article containing a section entitled “Programmers: Are They Good Enough”.  While this is a nostalgic and interesting read, it begs the question: 25 years [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align: left;"><a href="http://www.doolwind.com/images/blog/programmersgoodenough.jpg"><img src="http://www.doolwind.com/images/blog/programmersgoodenough_sm.jpg" alt="" align="right" /></a>Computer Gaming Weekly released their first 100 magazines for free download on the net a while back.  I was reading through the first issue (November 1981) and I stumbled across an article containing a section entitled “Programmers: Are They Good Enough”.  While this is a nostalgic and interesting read, it begs the question: 25 years later, are programmers good enough?</div>
<p><span id="more-72"></span></p>
<p><a href="http://www.doolwind.com/images/blog/programmersgoodenough.jpg">Read the article here first.</a></p>
<p><strong>A bit of background</strong><br />
Game programming is one of the hardest forms of software development I’ve worked on.  From my experience, most poor saps can’t even program, let alone create complex games.  I used to work as a business applications programmer and I’ve found that games have one particular ingredient that makes them far harder to develop than most other apps.  That ingredient is ‘fun’.  You can’t easily measure it, set up a list of requirements nor do test cases to make sure it’s there.</p>
<p>Another area to discuss is languages.  The article talks about Basic and Assembly, and thankfully we’ve moved on from these horrid things.  While it’s great fun to hack away in close to machine language, the fact we have much higher level languages means we can spend more time making the game, and less making the computer do what we want.  Many people believe that C++ is old and useless; however it’s still the best choice for making games.  While it’s better than assembly, it’s still quite low level, allowing us to directly access memory and have lots of fun with raw pointers.  Many people still can’t get their head around such things (they’re called Information Systems majors).  While java and .net may be good for beginners, all the work they abstract or hide means the programmer doesn’t fully know or control what’s going on.  Don’t get me wrong, I’d love to start using a language like C# to make games, however at this point it isn’t really an option, but that’s for another blog.  Enough background, lets get on with the real story.</p>
<p><strong>The Good News</strong><br />
A lot of the game programmers I’ve worked with have been up to the challenge.  Game programming is still in its infancy and we have much to learn from general software engineering practices.  A lot of the proven techniques to help with the complex task of developing software aren’t that difficult to learn, we just need to devote some time to learning them.  One of the hopes of this blog is to share some of the general software engineering principles I’ve learnt and share them with the game programming community.</p>
<p>The other good news is that not every position requires a John Carmack.  Even with little 3D and complex math skills there are plenty of areas of games development that programmers can work on to make successful games.  For every one hardcore engine coder on a project there are many gameplay, UI, script, etc programmers who must rely on creativity more than just pure programming skills.  With engines such as <a href="http://www.unrealtechnology.com/html/technology/ue30.shtml">Unreal 3</a>, a lot of the complex work is done for programmers, leaving them with the task of making a fun game, rather than writing the fastest rendering system they can.</p>
<p><strong>The Bad News</strong><br />
While I’ve met many good programmers they are, unfortunately, few and far between.  There are plenty of programmers out there that can’t even put simple desktop applications together.  While making games sounds like fun, it’s also extremely complex, and a lot of these useless programmers just can’t hack it (if you’ll excuse the pun).  If you haven’t been coding since you were knee height to a grass hopper then you’re in for a long ride.  Programming is one of those things that people either get, or they never will.  Even if they ‘get’ it, games are so complex there’s a high chance they won’t be good enough to understand all the complexities.  It’s one thing to write code that performs a desired task, a lot of programmers can do that, but to write it efficiently enough that the game can still run &gt;30 frames a second is a hard task.  It takes only one piece of poor code within the inner game loop to be slow and the entire game will bog down.  This is only getting worse as games become larger and more complex.  Add to this the fact each different console comes with its own complexities, pitfalls and challenges means that programmers must be completely comfortable with their language and general programming skills.</p>
<p>As game programming requires only the elite of the programming world there is an unfortunate side effect, the ego.  Game programming is one of those jobs that nearly any kid would love to have, and with so many people not being good enough, some game programmers take that as an opportunity to think they are the most amazing people in the world.  They often forget that their colleagues are in a similar situation and instead think they are better than everyone around them.  This is often called the “<a href="http://www.gignews.com/fdloriginalten.htm">Prima Donna Syndrome</a>” and I’ve seen it all too often from game programmers.  Awesome game programmers are like good looking people, it doesn’t matter how good they are, if they think they are the best, and act that way then it basically negates all of their ‘goodness’.  The problem here is that game development is a team exercise.  Programming is only part of the puzzle and people need to communicate well if the team is to succeed.  Within the small group of good enough programmers, there’s an even smaller group that can communicate well and don’t think they are God’s gift to the game development world.</p>
<p><strong>The Pay Problem</strong><br />
Back in the beginning of game development, programmers were paid less than their regular counterparts.  The article paints a pretty picture of how it will be in the future (now) though.  Aren’t we lucky then that games are pulling in billions of dollars around the world?  Surely things would have changed since 1981 and this complex profession of ours would be receiving the remuneration we deserve, unfortunately not.</p>
<p>The majority of game programmers I know would take a massive pay rise if they left the games industry and used their genius elsewhere.  Combine this with much overtime, poor working conditions and generally badly run companies and there&#8217;s little incentive to stay in the industry these days.  Why else would the average years in the industry be as low as 5 these days?  Without having the pay to back it up, the industry is only ever going to get diehard gamers who wouldn&#8217;t dream of doing anything else.  Thankfully I&#8217;m one of them, and the current shortage in good programmers works out well for my peers and I, however for the industry in general it&#8217;s a problem. This pay problem is only making it harder to find programmers that are good enough.  A large chunk of the programmer market is simply not interested in the low pay and bad working conditions a lot of studios make them put up with.</p>
<p><strong>Conclusion</strong><br />
So the simple answer is, yes, programmers these days are good enough.  The long answer is &#8216;kinda, it depends who you ask&#8217;.  There are plenty of Carmack style genius&#8217;s around at the moment.  There&#8217;s also plenty of people looking to the future of games from <a href="http://en.wikipedia.org/wiki/Tim_Sweeney_(game_developer)">Tim Sweeney</a> to David Jewsbury (<a href="http://www.doolwind.com/Audio/ChallengingTheGiven_Jewsbury.mp3">who gave an excellent speech at game connect</a>).  We have some excellent tools at our disposal, many different languages to choose from and an ever increasing budget to work with.  While I&#8217;ve met countless bad programmers, I&#8217;ve also met enough awesome ones to know that the games for at least the next five years are in good hands.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doolwind.com/blog/are-game-programmers-good-enough/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
<enclosure url="http://www.doolwind.com/Audio/ChallengingTheGiven_Jewsbury.mp3" length="28402207" type="audio/mpeg" />
		</item>
		<item>
		<title>Game Connect Asia Pacific Audio Recordings</title>
		<link>http://www.doolwind.com/blog/game-connect-asia-pacific-audio-recordings/</link>
		<comments>http://www.doolwind.com/blog/game-connect-asia-pacific-audio-recordings/#comments</comments>
		<pubDate>Sun, 03 Dec 2006 03:29:03 +0000</pubDate>
		<dc:creator>Doolwind</dc:creator>
				<category><![CDATA[Game Development]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Game Engine]]></category>
		<category><![CDATA[Game Programming]]></category>

		<guid isPermaLink="false">http://www.doolwind.com/blog/?p=68</guid>
		<description><![CDATA[Over the past two days the first Game Connect Asia Pacific Conference has been held in Brisbane, Australia. It replaced Australian Game Developers Conference (AGDC) which was closed down earlier this year. I went along to the conference and found it quite informative. I took my iRiver with me and recorded the speeches I went [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past two days the first Game Connect Asia Pacific Conference has been held in Brisbane, Australia. It replaced Australian Game Developers Conference (AGDC) which was closed down earlier this year. I went along to the conference and found it quite informative. I took my iRiver with me and recorded the speeches I went to. I have uploaded them so anyone that didn&#8217;t make it to the conference can also learn from what the speakers had to say. The quality isn&#8217;t the greatest however I&#8217;ve used my decidedly lacking audio skills to touch them up as best I can. Do please be careful if listening to them on earphones as even though I&#8217;ve taken out all the clapping there may be a few points where it&#8217;s a little loud. If anyone is able to touch them up a little better please let me know and I&#8217;d be happy to upload them again.</p>
<p><span id="more-68"></span></p>
<p><span style="font-weight: bold;"><a href="http://www.doolwind.com/Audio/C++NewArchitectures_Mathe.mp3">C++ For New Architectures</a><br />
Zsolt Mathe, Software Design Engineer, Microsoft Game Technology Group</span></p>
<p>This was a great speech about tricks and techniques to get C++ code running efficiently on new hardware such as XBox360 and 64-bit processors. There were quite a few code snippets which he used, however you should be able to pick up most of his points just by listening.</p>
<p><a href="http://www.doolwind.com/Audio/ChallengingTheGiven_Jewsbury.mp3"><span style="font-weight: bold;">Challenging The Given: Is There A Better Language</span> </a><span style="font-weight: bold;"><a href="http://www.doolwind.com/Audio/ChallengingTheGiven_Jewsbury.mp3">Solution For Programmers?</a><br />
David Jewsbury, IR Gurus</span></p>
<p>This was my favourite speech of the conference. As David states, it&#8217;s more philosophical than specifically answering questions. I think it raises some interesting points and while some of them are quite ambitious, I think even having dialog about such things will help to stimulate growth in this area.</p>
<p><a href="http://www.doolwind.com/Audio/Medieval2_Turner.mp3"><span style="font-weight: bold;">Medieval 2: Total War: Postmortem</span> </a><br />
<span style="font-weight: bold;">Ken Turner, Creative Assembly</span></p>
<p>Ken gives an excellent talk about the sequel to one of my favourite series of all time, the Total War Series. He talks about a wide range of topics from processes in place to dealing with legacy code and general discussions about what went right and wrong with Medieval 2: Total War. I found this to be the most informative speech at the talk with excellent advice on so many topics.</p>
<p><span style="font-weight: bold;"><a href="http://www.doolwind.com/Audio/UserTestingFeedback_Ford2.mp3">How To Use Testing Feedback To Shape Your Game Design</a><br />
Matthew Ford, Auran</span><br />
I recommend Matthew&#8217;s speech to anyone working on games at the moment. Matt was my project manager for a game a while ago so I have first hand experience with his techniques and can attest to how well they work. This speech was the best presented with clear, concise information, and lots of it, while being fun and engaging the whole time. There&#8217;s a large Q&amp;A part at the end which gave even more information and showed that Matt really knows what he&#8217;s talking about.</p>
<p><span style="font-weight: bold;"><a href="http://www.doolwind.com/Audio/InteractiveStorytelling_Avellone.mp3">Interactive Storytelling</a><br />
Chris Avellone, Obsidian Entertainment</span></p>
<p>Chris has worked on some of the best games ever made. From the fallout series, to Planescape: Torment up to the latest Neverwinter Nights 2 (which just happens to be sitting on my desk in front of me right now). Chris has some great stories about his time working on these games and gives some great advice to any designer/writer who wants to make great RPG&#8217;s.</p>
<p><span style="font-weight: bold;"><a href="http://www.doolwind.com/Audio/SPUProgramming_Hughes.mp3">SPU Programming for PS3</a><br />
Colin Hughes, Sony Computer Entertainment Europe</span></p>
<p>I won&#8217;t say too much about this speech as I&#8217;m not a fan of the PS3 nor developing for it. There are some interesting points Colin brings up however I found the speech quite dry and boring. If you&#8217;re a PS3 developer or passionate about new hardware then give this speech a listen however be warned, there is a LOT of content.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.doolwind.com/blog/game-connect-asia-pacific-audio-recordings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.doolwind.com/Audio/C++NewArchitectures_Mathe.mp3" length="22775013" type="audio/mpeg" />
<enclosure url="http://www.doolwind.com/Audio/ChallengingTheGiven_Jewsbury.mp3" length="28402207" type="audio/mpeg" />
<enclosure url="http://www.doolwind.com/Audio/Medieval2_Turner.mp3" length="29713763" type="audio/mpeg" />
<enclosure url="http://www.doolwind.com/Audio/UserTestingFeedback_Ford2.mp3" length="27427317" type="audio/mpeg" />
<enclosure url="http://www.doolwind.com/Audio/InteractiveStorytelling_Avellone.mp3" length="27463888" type="audio/mpeg" />
<enclosure url="http://www.doolwind.com/Audio/SPUProgramming_Hughes.mp3" length="33115533" type="audio/mpeg" />
		</item>
	</channel>
</rss>
