<?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>devmag.org.za</title>
	<atom:link href="http://devmag.org.za/feed/" rel="self" type="application/rss+xml" />
	<link>http://devmag.org.za</link>
	<description>A game development magazine</description>
	<lastBuildDate>Tue, 02 Apr 2013 23:59:28 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>How to Choose Colours Procedurally (Algorithms)</title>
		<link>http://devmag.org.za/2012/07/29/how-to-choose-colours-procedurally-algorithms/</link>
		<comments>http://devmag.org.za/2012/07/29/how-to-choose-colours-procedurally-algorithms/#comments</comments>
		<pubDate>Sun, 29 Jul 2012 12:19:29 +0000</pubDate>
		<dc:creator>Herman Tulleken</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[colour]]></category>
		<category><![CDATA[palette]]></category>
		<category><![CDATA[procedural content]]></category>

		<guid isPermaLink="false">http://devmag.org.za/?p=4948</guid>
		<description><![CDATA[<img src="http://devmag.org.za/blog/wp-content/uploads/2010/12/devmag_orange_b.png" width="71" height="71" alt="Development" title="Development" /><br/>This article gives a set of algorithms for choosing colours procedurally.<div class='yarpp-related-rss'>
<h2>Related posts:</h2>
<ol>
<li><a href='http://devmag.org.za/2011/06/23/bzier-path-algorithms/' rel='bookmark' title='B&eacute;zier Path Algorithms'>B&eacute;zier Path Algorithms</a> <small>This tutorial provides some algorithms useful for working with Bézier...</small></li>
<li><a href='http://devmag.org.za/2011/02/23/quadtrees-implementation/' rel='bookmark' title='Quadtrees: Implementation'>Quadtrees: Implementation</a> <small>Quadtrees are 2D data structures, useful for efficient representation of...</small></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<img src="http://devmag.org.za/blog/wp-content/uploads/2010/12/devmag_orange_b.png" width="71" height="71" alt="Development" title="Development" /><br/><p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="colours" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/colours.jpg" alt="colours" width="680" height="340" border="0" /></p>
<p>Changing the colours of art can be a great way to increase the amount of content in your game, and add variety and richness. It is relatively easy to implement. What is not always as easy is to get a set of colours that looks <em>nice</em>. This article gives some ideas for choosing colour palettes that look nice.<span id="more-4948"></span></p>
<h3><a name="h.qma71twn8t4c"></a>A few things about colour</h3>
<p>Colour is surprisingly complex. How colour works is determined by the physics of light and materials, the biology of our eyes and brains, mixed with a bit of psychology.</p>
<p>Although you don’t need to know <em>all </em>about the physics, biology, and psychology of colour vision, it is useful to have some background information (which you can find references to at the end of this article).</p>
<p>For palette choosing, there are a few important points.</p>
<p><strong>Digital colour theory differs considerably from theories based on pigments (or chemicals, or metals in crystals).</strong> In fact, no system of colour mixing can produce all colours that occur in nature. You can buy a dark very bright green from a paint shop, but the closest colour your screen can reproduce will look desaturated (just look at <a href="https://www.google.co.za/search?q=painted+colour+wheel&amp;hl=en&amp;safe=off&amp;prmd=imvns&amp;source=lnms&amp;tbm=isch&amp;sa=X&amp;ei=_KgNUOiJLsWChQfzjuD7CQ&amp;ved=0CE0Q_AUoAQ&amp;biw=1920&amp;bih=947">images of painted colour wheels</a>). When you research colour for algorithms, make sure that they apply to digital RGB colour.</p>
<p><strong>Vector distances in RGB and many other colour models don’t correspond to differences in perception.</strong></p>
<p><em>Brightness</em><br />
<img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="grey" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/grey.png" alt="grey" width="680" height="78" border="0" /><br />
These greys are equally spaced. But notice how much easier it is to distinguish between lighter greys.</p>
<p><em>Hue differentiation.</em><br />
<img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="heu" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/heu.png" alt="heu" width="680" height="206" border="0" /><br />
In each row, the hue differs by 5%. Notice that certain colours cannot be distinguished. Also notice that it is different depending on the brightness. Lighter blues is more distinguishable than darker blues, while darker magentas are more distinguishable than lighter ones.</p>
<p>This fact becomes important when you try to select colours that look “equally” far apart; in general, it cannot be done without using a perception-based colour space (such as LAB colours), or making appropriate adjustments in other colour spaces.</p>
<p>Here is a bit more on the matter:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Color_difference#Tolerance">http://en.wikipedia.org/wiki/Color_difference#Tolerance</a></li>
</ul>
<p>Here is an a way of computing a useful colour distance that may come in handy later:</p>
<ul>
<li><a href="http://www.emanueleferonato.com/2009/08/28/color-differences-algorithm/">http://www.emanueleferonato.com/2009/08/28/color-differences-algorithm/</a></li>
<li><a href="http://www.emanueleferonato.com/2009/09/08/color-difference-algorithm-part-2/">http://www.emanueleferonato.com/2009/09/08/color-difference-algorithm-part-2/</a></li>
</ul>
<p><a href="http://en.wikipedia.org/wiki/Lab_color_space">Lab colour spaces</a> are intended to be perceptually more uniform, and may be the basis of colour selection algorithms that give visually more pleasing results. (Photoshop gurus will know that hue adjustments have fewer artefacts when manipulating LAB channels and not RGB channels).</p>
<p><strong>Colour perception is not absolute.</strong> Colours appear differently depending on surrounding colours. This is an important factor when selecting colour palettes that work with existing palettes, or combining more than one palette.</p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-top: 0px; border: 0px;" title="color_relavance" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/color_relavance.png" alt="color_relavance" width="240" height="240" border="0" /></p>
<p>Here is more information on colour contrast effects:</p>
<ul>
<li><a href="http://www.uxmatters.com/mt/archives/2006/01/color-theory-for-digital-displays-a-quick-reference-part-ii.php#colorContrastEffects">http://www.uxmatters.com/mt/archives/2006/01/color-theory-for-digital-displays-a-quick-reference-part-ii.php#colorContrastEffects</a></li>
</ul>
<p><strong>Colour harmony theory.</strong> Although why certain combinations of colours look better than others is somewhat of a mystery, theories of colour harmony is a good place to start understanding many good-looking palettes.</p>
<p>See for example:</p>
<ul>
<li>Basic overview <a href="http://www.malanenewman.com/color_theory_color_wheel.html">http://www.malanenewman.com/color_theory_color_wheel.html</a></li>
<li>An overview of different theories <a href="http://colour-emotion.co.uk/harmony.html">http://colour-emotion.co.uk/harmony.html</a></li>
</ul>
<p><a name="h.pg8tmdy0a6l4"></a></p>
<h3>Uses of procedural palettes</h3>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="tinywings" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/tinywings.png" alt="tinywings" width="680" height="436" border="0" /></p>
<p>Procedural palettes can be used to:</p>
<ul>
<li>Get more variety in successively generated scenes,  such as in <em>Tiny Wings</em>.</li>
<li>To get more variety from a single asset, as shown below.</li>
<li>To get automatic colours for interface components, such as in the (notoriously ugly) graphs of earlier versions of Microsoft Excel or and Open Office Calc.</li>
</ul>
<h3>Considerations</h3>
<p>When selecting algorithms, you must think about what you need:</p>
<ul>
<li>How many colours do you need? A few, or many? A fixed number, or an arbitrary number?</li>
<li>How should the colours in the palette relate to one another? For example, should the colours form a harmonic triad?</li>
<li>Do you need a high contrasts palette or a palette with a minimum vector distance between colours?</li>
<li>What colours will be used with the procedurally selected colours?</li>
<li>Will you colour convey meaning? Do they need to match real-world elements? Are they used symbolically to distinguish between different types of elements?</li>
<li>What type of variety do you need? Variety in successive generations? Variety in a scene?</li>
</ul>
<h2><a name="h.owvwfo6ihqun"></a>7 Algorithms</h2>
<h3><a name="h.x93xw6yzqu2s"></a>1. Choosing random colours from a handpicked pre-set</h3>
<p>This very simple algorithm gives the most control, and is easy to implement. It is only useful for smaller palettes, and of course all palettes are limited to the original set. However, it can be combined with other algorithms to give bigger sets of colours.</p>
<h3>2. Uniform Random RGB</h3>
<p>The simplest algorithm for selecting colours procedurally is to simply choose random values for each of the three RGB channels.</p>
<pre>color = new Color(Random(), Random(), Random())</pre>
<p><img class="alignnone size-full wp-image-4950" title="Uniform_5_2" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/Uniform_5_2.png" alt="" width="680" height="100" /></p>
<p>This algorithm gives sets of colours the are usually quite ugly. There is no structure, no relationship among colours in the palette, no pattern that pleases the eye. All the algorithms below attempt to constrain the colours generated so that there are relationships or coherence among colours.</p>
<h4><a name="h.sq96mh5tr7wp"></a>3. Random Offset</h4>
<p>This algorithm computes a palette by computing a small random offset from a given colour.</p>
<p><img class="alignnone size-full wp-image-4951" title="Offset_5_0" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/Offset_5_0.png" alt="" width="680" height="100" /></p>
<p><img class="alignnone size-full wp-image-4952" title="Offset_5_1" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/Offset_5_1.png" alt="" width="680" height="100" /></p>
<p><img class="alignnone size-full wp-image-4953" title="Offset_5_2" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/Offset_5_2.png" alt="" width="680" height="100" /></p>
<p>An easy implementation simply calculates random offsets for each of RGB components. An alternative is to just change the value of the colour by a random offset.</p>
<pre>float value = (color.r + color.g + color.b)/3;
float newValue = value + 2*Random() * offset – offset;
float valueRatio = newValue / value;
Color newColor;
newColor.r = color.r * valueRatio;
newColor.g = color.g * valueRatio;
newColor.b = color.b * valueRatio;</pre>
<p>Changing the value randomly can in certain cases simulate shadows (see the middle row below), so that a scene looks like it has more depth than it really has.</p>
<p>In general, this algorithm is:</p>
<ul>
<li>Not good for small palettes where high contrast is desired.</li>
<li>Good for enriching a scene where the base colours are defined and repeated many times.</li>
<li>Good for colouring tiles with seams (to get more variance with seamless tiles requires a bit more work. See the section <em>Dynamic Colouring</em> in <a href="http://devmag.org.za/2009/05/28/getting-more-out-of-seamless-tiles/">Getting More from Seamless Tiles</a>).</li>
</ul>
<table width="680" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="random_offset0" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/random_offset0.png" alt="random_offset0" width="220" height="146" border="0" /></td>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="random_offset1" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/random_offset1.png" alt="random_offset1" width="220" height="146" border="0" /></td>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="random_offset2" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/random_offset2.png" alt="random_offset2" width="220" height="146" border="0" /></td>
</tr>
<tr>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="random_offset0" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/random_offset01.png" alt="random_offset0" width="220" height="146" border="0" /></td>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="random_offset3" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/random_offset3.png" alt="random_offset3" width="220" height="146" border="0" /></td>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="random_offset4" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/random_offset4.png" alt="random_offset4" width="220" height="146" border="0" /></td>
</tr>
<tr>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="screen_105" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/screen_105.png" alt="screen_105" width="220" height="220" border="0" /></td>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="screen_103" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/screen_103.png" alt="screen_103" width="220" height="220" border="0" /></td>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="screen_101" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/screen_101.png" alt="screen_101" width="220" height="220" border="0" /></td>
</tr>
</tbody>
</table>
<h4><a name="h.xd2xto2wh2tt"></a></h4>
<p>The effect of the maximum offset you choose is different based on the base colour:</p>
<ul>
<li>The less saturated the base colour, the more colourful the result is perceived.</li>
<li>Different hues will have different perceived variance. For example, if the base colour is yellow, the result will be perceived as more colourful than if the base colour was green.</li>
</ul>
<h3>4. Selecting from a gradient</h3>
<p>In the code examples below, <code>Gradient.GetColor</code> takes a parameter between 0 and 1 and generate the corresponding colour on the gradient.</p>
<p><strong>Uniform Random </strong>Randomly select values between 0 and 1, and map this to the gradient to select colours. This gives little structure, except for that already inherent in the gradient.</p>
<table width="680" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="gradient0" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/gradient0.png" alt="gradient0" width="220" height="146" border="0" /></td>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="gradient1" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/gradient1.png" alt="gradient1" width="220" height="146" border="0" /></td>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="gradient2" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/gradient2.png" alt="gradient2" width="220" height="146" border="0" /></td>
</tr>
</tbody>
</table>
<p><strong>Grid</strong> This is useful for selecting a known number of colours, with the assurance that no two colours will be closer to each other (along the gradient) than 1/n.</p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="Grid_Rainbow_5_2" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/Grid_Rainbow_5_2.png" alt="Grid_Rainbow_5_2" width="680" height="100" border="0" /></p>
<p>This is useful for colour which convey information, if the number of colours is small.</p>
<p><strong>Jittered Grid</strong> This is useful to get more variety with a small number of colours, where you know the number of colours up front. (The variety is not among the colours, but among different generations).<strong></strong></p>
<pre>for(int i = 0; i &lt; n; i++)
   color[i] = gradient.GetColor((i + Random.NextFloat()) * intervalSize)</pre>
<p>Using a jittered grid works well for a small selection of colours, so that multiple generations give different results. One disadvantage of using a jittered grid is that colours in the sequence are not guaranteed to be equally distinct from each other. You can address this by limiting the amount of jitter to guarantee a minimum distance between colours:</p>
<pre>maxJitter = ...//some value between 0 1nd 1

for(int i = 0; i &lt; n; i++)
   color[i] = gradient.GetColor(
      (i + 0.5 + (2 * Random.NextFloat() - 1) * maxJitter) * intervalSize);</pre>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="JitteredRainbow_5_2a" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/JitteredRainbow_5_2a.png" alt="JitteredRainbow_5_2a" width="680" height="100" border="0" /></p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="JitteredRainbow_5_2b" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/JitteredRainbow_5_2b.png" alt="JitteredRainbow_5_2b" width="680" height="100" border="0" /></p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="JitteredRainbow_5_2c" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/JitteredRainbow_5_2c.png" alt="JitteredRainbow_5_2c" width="680" height="100" border="0" /></p>
<p><strong>Golden Ratio </strong>This is a scheme to select a sequence of colours, not necessarily up front, so that consecutively selected colours are always far from each other. Colours never repeat (although, over time, colours become close to previously chosen colours).<strong></strong></p>
<pre>offset = Random.NextFloat();

for (int i = 0; i &lt; n; i++)
   color[i] = gradient.GetColor(offset + (0.618033988749895f * i) % 1);</pre>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="GoldenRatioGradient_5_0" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/GoldenRatioGradient_5_0.png" alt="GoldenRatioGradient_5_0" width="680" height="100" border="0" /></p>
<p>This algorithm is useful for selecting colours for contrast in an interface, where high contrast between successive colours is guaranteed.</p>
<table width="680" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="340"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image24" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/image24.png" alt="image24" width="335" height="197" border="0" /></td>
<td valign="top" width="340"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="image43" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/image43.png" alt="image43" width="335" height="213" border="0" /></td>
</tr>
</tbody>
</table>
<p>Here is an article explaining why this works:</p>
<ul>
<li><a href="http://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/">http://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/</a></li>
</ul>
<h3>5. Selecting random channels in other colour spaces</h3>
<p>For example, good results can be obtained using the HSL colour space.</p>
<p><strong>Random Hue </strong></p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Hue_5_0" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/Hue_5_0.png" alt="Hue_5_0" width="680" height="100" border="0" /></p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Hue_5_1" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/Hue_5_1.png" alt="Hue_5_1" width="680" height="100" border="0" /></p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Hue_5_2" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/Hue_5_2.png" alt="Hue_5_2" width="680" height="100" border="0" /></p>
<p><strong>Random Saturation</strong></p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Saturation_5_2" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/Saturation_5_2.png" alt="Saturation_5_2" width="680" height="100" border="0" /></p>
<p><strong>Random Luminance</strong></p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Luminance_5_2" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/Luminance_5_2.png" alt="Luminance_5_2" width="680" height="100" border="0" /></p>
<p><strong>Random Saturation and Luminance</strong></p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Saturation_Luminance_5_2" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/Saturation_Luminance_5_2.png" alt="Saturation_Luminance_5_2" width="680" height="100" border="0" /></p>
<p><a name="h.t00pnudemnhp"></a></p>
<h4>6. Standard Colour Harmonies</h4>
<p><a href="http://www.websiteoptimization.com/speed/tweak/color-harmony/">http</a><a href="http://www.websiteoptimization.com/speed/tweak/color-harmony/">://</a><a href="http://www.websiteoptimization.com/speed/tweak/color-harmony/">www</a><a href="http://www.websiteoptimization.com/speed/tweak/color-harmony/">.</a><a href="http://www.websiteoptimization.com/speed/tweak/color-harmony/">websiteoptimization</a><a href="http://www.websiteoptimization.com/speed/tweak/color-harmony/">.</a><a href="http://www.websiteoptimization.com/speed/tweak/color-harmony/">com</a><a href="http://www.websiteoptimization.com/speed/tweak/color-harmony/">/</a><a href="http://www.websiteoptimization.com/speed/tweak/color-harmony/">speed</a><a href="http://www.websiteoptimization.com/speed/tweak/color-harmony/">/</a><a href="http://www.websiteoptimization.com/speed/tweak/color-harmony/">tweak</a><a href="http://www.websiteoptimization.com/speed/tweak/color-harmony/">/</a><a href="http://www.websiteoptimization.com/speed/tweak/color-harmony/">color</a><a href="http://www.websiteoptimization.com/speed/tweak/color-harmony/">-</a><a href="http://www.websiteoptimization.com/speed/tweak/color-harmony/">harmony</a><a href="http://www.websiteoptimization.com/speed/tweak/color-harmony/">/</a></p>
<p>Methods for choosing random colours for standard colour harmonies all work basically the same: limit the possible choices of hue, and control saturation and luminance. We can use a generic triadic algorithm with suitable parameters to generate a variety colour harmonies:</p>
<p>The algorithm takes a few parameters; the important ones are two offset angles, and two angle ranges.</p>
<p>The simplest form of the algorithm works as follows:</p>
<ul>
<li>Select a random reference angle.</li>
<li>Select a random angle in the total of the range (the three range angles added together)</li>
<li>If the angle is smaller than the first range, keep it</li>
<li>Otherwise, if the angle is bigger than the first range, but smaller than the sum of the first Two ranges, offset it by the first offset angle</li>
<li>Otherwise, offset it by the second offset angle</li>
<li>Add this angle to the reference angle</li>
<li>The colour with this angle as hue is a colour generated with the triad harmony</li>
</ul>
<p>Here is a C# implementation of this algorithm that generates a given number of colours with controlled saturation and luminance.</p>
<pre>public static List GenerateColors_Harmony(
   int colorCount,
   float offsetAngle1,
   float offsetAngle2,
   float rangeAngle0,
   float rangeAngle1,
   float rangeAngle2,
   float saturation, float luminance)
{
   List colors = new List();

   float referenceAngle = random.NextFloat() * 360;

   for (int i = 0; i &lt; colorCount; i++)
   {
      float randomAngle = 
         random.NextFloat() * (rangeAngle0 + rangeAngle1 + rangeAngle2);

      if (randomAngle &gt; rangeAngle0)
      {
         if (randomAngle &lt; rangeAngle0 + rangeAngle1)
         {
            randomAngle += offsetAngle1;
         }
         else
         {
            randomAngle += offsetAngle2;
         }
      }

      HSL hslColor = new HSL(
         ((referenceAngle + randomAngle) / 360.0f) % 1.0f,
         saturation, 
         luminance);

      colors.Add(hslColor.Color);
   }

   return colors;
}</pre>
<p>The algorithm can be made a bit more intuitive by centring the reference and offset angles in corresponding ranges.</p>
<ul>
<li>Select a random reference angle.</li>
<li>Select a random angle in the total of the range (the three range angles added together)</li>
<li>If the angle is smaller than the first range, reduce it by half the first range.</li>
<li>Otherwise, if the angle is bigger than the first range, but smaller than the sum of the first two ranges, offset it by the first offset angle minus the second range.</li>
<li>Otherwise, offset it by the second offset angle minus the third range.</li>
<li>Add this angle to the reference angle.</li>
<li>The colour with this angle as hue is a colour generated with the triad harmony.</li>
</ul>
<p><strong>More varieties</strong></p>
<ul>
<li>With the centred version of the algorithm, it is easy to supply (instead of generating) the reference angle, making it possible to chain the algorithm with other colour selection algorithms.</li>
<li>More variety can be added by selecting random saturation and random luminance (possibly within a range from given parameters). This can potentially change the harmonic scheme by fringe colours being emphasized by their saturation / luminance. In many cases this is ok.</li>
<li>The hue can be selected uniformly instead of randomly across the total range. This will insure colours are a minimum hue-distance apart.</li>
<li>With suitable parameters, we can generate common colour schemes:
<ul>
<li><strong>Analogous:</strong> Choose second and third ranges 0.<strong></strong></li>
<li><strong>Complementary:</strong> Choose the third range 0, and first offset angle 180.<strong></strong></li>
<li><strong>Split Complementary: </strong>Choose offset angles 180 +/- a small angle. The second and third ranges must be smaller than the difference between the two offset angles. <strong></strong></li>
<li><strong>Triad:</strong> Choose offset angles 120 and 240.</li>
</ul>
</li>
</ul>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Harmony2_5_0" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/Harmony2_5_0.png" alt="Harmony2_5_0" width="680" height="100" border="0" /></p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Harmony_5_0" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/Harmony_5_0.png" alt="Harmony_5_0" width="680" height="100" border="0" /></p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Harmony2_5_1" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/Harmony2_5_1.png" alt="Harmony2_5_1" width="680" height="100" border="0" /></p>
<h3>7. Triad Mixing</h3>
<p>This algorithm takes three colours, and mixes them randomly to create a palette.</p>
<p>The standard algorithm produces many grey colours. If this is not desired, the amount of greyness can be controlled by limiting the contribution of one of the three colours. This version of the algorithm is given here (if the greyControl is 1, it is equivalent to the standard algorithm).</p>
<pre>public static Color RandomMix(Color color1, Color color2, Color color3, 
   float greyControl)
{
   int randomIndex = random.NextByte() % 3;

   float mixRatio1 =
      (randomIndex == 0) ? random.NextFloat() * greyControl : random.NextFloat();

   float mixRatio2 = 
      (randomIndex == 1) ? random.NextFloat() * greyControl : random.NextFloat();

   float mixRatio3 = 
      (randomIndex == 2) ? random.NextFloat() * greyControl : random.NextFloat();

   float sum = mixRatio1 + mixRatio2 + mixRatio3;

   mixRatio1 /= sum;
   mixRatio2 /= sum;
   mixRatio3 /= sum;

   return Color.FromArgb(
      255,
      (byte)(mixRatio1 * color1.R + mixRatio2 * color2.R + mixRatio3 * color3.R),
      (byte)(mixRatio1 * color1.G + mixRatio2 * color2.G + mixRatio3 * color3.G),
      (byte)(mixRatio1 * color1.B + mixRatio2 * color2.B + mixRatio3 * color3.B));
}</pre>
<p>Different mixing algorithms can be used, for example subtractive mixing, or hue interpolation.</p>
<p><strong>Low Grey Value</strong></p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Mix1_5_0" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/Mix1_5_0.png" alt="Mix1_5_0" width="680" height="100" border="0" /></p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Mix1_5_1" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/Mix1_5_1.png" alt="Mix1_5_1" width="680" height="100" border="0" /></p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Mix1_5_2" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/Mix1_5_2.png" alt="Mix1_5_2" width="680" height="100" border="0" /></p>
<p><strong>Medium Grey <strong>Value</strong></strong></p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Mix5_5_0" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/Mix5_5_0.png" alt="Mix5_5_0" width="680" height="100" border="0" /></p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Mix5_5_1" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/Mix5_5_1.png" alt="Mix5_5_1" width="680" height="100" border="0" /></p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Mix5_5_2" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/Mix5_5_2.png" alt="Mix5_5_2" width="680" height="100" border="0" /></p>
<p><strong>High Grey <strong>Value</strong></strong></p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Mix9_5_0" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/Mix9_5_0.png" alt="Mix9_5_0" width="680" height="100" border="0" /></p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Mix9_5_1" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/Mix9_5_1.png" alt="Mix9_5_1" width="680" height="100" border="0" /></p>
<p><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="Mix9_5_2" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/Mix9_5_2.png" alt="Mix9_5_2" width="680" height="100" border="0" /></p>
<table width="680" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="screen_137" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/screen_137.png" alt="screen_137" width="220" height="137" border="0" /></td>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="screen_142" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/screen_142.png" alt="screen_142" width="220" height="137" border="0" /></td>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="screen_130" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/screen_130.png" alt="screen_130" width="220" height="137" border="0" /></td>
</tr>
<tr>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="screen_69" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/screen_69.png" alt="screen_69" width="220" height="166" border="0" /></td>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="screen_74" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/screen_74.png" alt="screen_74" width="220" height="166" border="0" /></td>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="screen_75" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/screen_75.png" alt="screen_75" width="220" height="166" border="0" /></td>
</tr>
<tr>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="screen_10" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/screen_10.png" alt="screen_10" width="220" height="153" border="0" /></td>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="screen_11" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/screen_11.png" alt="screen_11" width="220" height="153" border="0" /></td>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="screen_12" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/screen_12.png" alt="screen_12" width="220" height="153" border="0" /></td>
</tr>
</tbody>
</table>
<table width="680" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="mix0" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/mix0.png" alt="mix0" width="221" height="138" border="0" /></td>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="mix2" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/mix2.png" alt="mix2" width="221" height="138" border="0" /></td>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="mix1" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/mix1.png" alt="mix1" width="221" height="138" border="0" /></td>
</tr>
</tbody>
</table>
<p>Below you can see the effect of setting the grey value. On the left it is 0, on the right it is 1.</p>
<table width="680" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="340"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="mix_g0" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/mix_g0.png" alt="mix_g0" width="335" height="202" border="0" /></td>
<td valign="top" width="340"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="mix_g1" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/mix_g1.png" alt="mix_g1" width="335" height="202" border="0" /></td>
</tr>
</tbody>
</table>
<h2>Monochromatic Textures are Boring</h2>
<p>Unlike hand-painted textures, textures altered procedurally can look flat and uninteresting.</p>
<p>There are several ways to deal with this issue. All of them require intensive artist input, but it is important to understand the techniques and how they work (and how they will affect the art pipeline).</p>
<p><strong>Use coloured textures. </strong>The base textures need not be totally greyscale. Painting them with colours will offset the final colour, and can be used for local colour variations.</p>
<table width="680" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="color_correct0" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/color_correct0.png" alt="color_correct0" width="220" height="199" border="0" /></td>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="color_correct1" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/color_correct1.png" alt="color_correct1" width="220" height="199" border="0" /></td>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="color_correct2" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/color_correct2.png" alt="color_correct2" width="220" height="199" border="0" /></td>
</tr>
<tr>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="diffus_grey" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/diffus_grey.png" alt="diffus_grey" width="220" height="110" border="0" /></td>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="diffus_grey2" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/diffus_grey2.png" alt="diffus_grey2" width="220" height="110" border="0" /></td>
<td valign="top" width="226"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="diffus_grey3" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/diffus_grey3.png" alt="diffus_grey3" width="220" height="110" border="0" /></td>
</tr>
</tbody>
</table>
<p><strong>Channel independent colour correction.</strong> Sometimes a good effect can be obtained by adjusting values for channels independently, for example, by a post-effect. In the example below, for example, shadows have been made a bit redder. (The image without any colour correction is shown on the left).</p>
<table width="680" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="340"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="color_correct3" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/color_correct3.png" alt="color_correct3" width="335" height="303" border="0" /></td>
<td valign="top" width="340"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="color_correct4" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/color_correct4.png" alt="color_correct4" width="335" height="303" border="0" /></td>
</tr>
</tbody>
</table>
<p><strong>Using coloured lights. </strong>By using coloured lights at slightly different angles, flat textures become more nuanced. Below, the scenes below are lit with the same three lights, but on the right the lights are coloured red, blue and green (and 3 times the intensity to compensate for the missing channels in each light).</p>
<table width="680" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td valign="top" width="340"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="color_correct5" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/color_correct5.png" alt="color_correct5" width="335" height="303" border="0" /></td>
<td valign="top" width="340"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="color_correct6" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/color_correct6.png" alt="color_correct6" width="335" height="303" border="0" /></td>
</tr>
</tbody>
</table>
<h2>Preparing Art</h2>
<p>Preparing the art requires careful planning. The biggest challenge is figuring out how to consistently separate textures. To give you an idea of what is involved, here is how I prepared the images for this article:</p>
<ul>
<li>The ferns use a single material. Each fern randomly selects a colour from the currently set up scheme, so I could just plunk the script on the colour selection script.</li>
<li>The flowers use different materials for each part. Only the petals must change colour, so I had to modify the script to link to a part of the mesh (the petals) to adjust the colours.</li>
<li>The room scene again uses separate materials for each part of the mesh. In this case I used a global script that sets the colours of all submeshes.</li>
</ul>
<p>You can see that it can become complicated, especially if you colour different elements using different algorithms, and have complicated objects.</p>
<p>There are a few other tips when it comes to preparing the art:</p>
<ul>
<li>If you multiply your grey textures with procedural colours, textures that covers a wide grey spectrum are more flexible. Your colour application algorithm or the colours you choose can always reduce the final contrast, but it’s much harder to put it back in.</li>
<li>Carefully plan how you will tweak the final result, to minimise back and forth. (This is a general art principle, but becomes even more important if you use this technique). For example, to there are at least four ways to make something darker: change the texture, change the input of the colour selection algorithm, or change the lighting, or change the post effects. You can easily land in a tweaking loop that can waste a lot of time. One strategy is to get base levels for all these, and then tweaking them in this order: texture, algorithm, lighting, post effects.</li>
<li>In some cases it may be useful to use index colours, where each index corresponds to a colour from the palette, instead of using separate materials for each colour.</li>
<li>To gain performance at the expense of disk space, you can pregenerate your textures.</li>
</ul>
<h2>Download</h2>
<p><a href="http://www.devmag.org.za/downloads/colour/ProceduralPalette.zip">C# source code</a> with all the algorithms explained here.</p>
<h2>Thanks</h2>
<ul>
<li><a href="http://jarredlunt.blogspot.com/">Jarred Lunt</a> made the art for the desert scene.</li>
<li>Ciaran Prince made the art for the room and flower scenes.</li>
</ul>
<p>Thanks guys!</p>
<div class='yarpp-related-rss'>
<h2>Related posts:</h2><p><ol>
<li><a href='http://devmag.org.za/2011/06/23/bzier-path-algorithms/' rel='bookmark' title='B&eacute;zier Path Algorithms'>B&eacute;zier Path Algorithms</a> <small>This tutorial provides some algorithms useful for working with Bézier...</small></li>
<li><a href='http://devmag.org.za/2011/02/23/quadtrees-implementation/' rel='bookmark' title='Quadtrees: Implementation'>Quadtrees: Implementation</a> <small>Quadtrees are 2D data structures, useful for efficient representation of...</small></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://devmag.org.za/2012/07/29/how-to-choose-colours-procedurally-algorithms/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>13 More Tips for Making a Fun Platformer</title>
		<link>http://devmag.org.za/2012/07/19/13-more-tips-for-making-a-fun-platformer/</link>
		<comments>http://devmag.org.za/2012/07/19/13-more-tips-for-making-a-fun-platformer/#comments</comments>
		<pubDate>Thu, 19 Jul 2012 19:33:49 +0000</pubDate>
		<dc:creator>Diorgo Jonkers</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Platform Game Design]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[controls]]></category>
		<category><![CDATA[platform game]]></category>
		<category><![CDATA[user interface]]></category>

		<guid isPermaLink="false">http://devmag.org.za/?p=4685</guid>
		<description><![CDATA[<img src="http://devmag.org.za/blog/wp-content/uploads/2010/12/devmag_orange_b.png" width="71" height="71" alt="Development" title="Development" /><br/>This article gives more handy tips for designing a platformer. There are tips for movement on ladders and veins, jumping, ledges and platforms, the camera, interface, and other ways to make a fun game.<div class='yarpp-related-rss'>
<h2>Related posts:</h2>
<ol>
<li><a href='http://devmag.org.za/2011/01/18/11-tips-for-making-a-fun-platformer/' rel='bookmark' title='11 Tips for making a fun platformer'>11 Tips for making a fun platformer</a> <small>This article gives handy tips for designing and building a...</small></li>
<li><a href='http://devmag.org.za/2011/07/04/how-to-design-levels-for-a-platformer/' rel='bookmark' title='How to design levels for a platformer'>How to design levels for a platformer</a> <small>This article looks at the process of designing levels for...</small></li>
<li><a href='http://devmag.org.za/2011/05/23/how-are-puzzle-games-designed-teddy-lee/' rel='bookmark' title='How are puzzle games designed? Teddy Lee'>How are puzzle games designed? Teddy Lee</a> <small>Teddy Lee (maker of My First First Quantum Translocater and...</small></li>
<li><a href='http://devmag.org.za/2010/01/26/making-a-testers-life-less-miserable/' rel='bookmark' title='Making a tester&#8217;s life less miserable'>Making a tester&#8217;s life less miserable</a> <small>To prototype and get early feedback is great for getting...</small></li>
<li><a href='http://devmag.org.za/2012/07/12/50-tips-for-working-with-unity-best-practices/' rel='bookmark' title='50 Tips for Working with Unity (Best Practices)'>50 Tips for Working with Unity (Best Practices)</a> <small>This article gives a list of best practices for working...</small></li>
<li><a href='http://devmag.org.za/2011/02/02/video-game-user-interface-design-diegesis-theory/' rel='bookmark' title='Video game user interface design: Diegesis theory'>Video game user interface design: Diegesis theory</a> <small>In this article, the Dave Russell introduces the basic concepts...</small></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<img src="http://devmag.org.za/blog/wp-content/uploads/2010/12/devmag_orange_b.png" width="71" height="71" alt="Development" title="Development" /><br/><p><a href="http://devmag.org.za/blog/wp-content/uploads/2012/07/super-mario-level-wallpaper-1680-x-1050.jpg"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="super-mario-level-wallpaper-1680-x-1050" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/super-mario-level-wallpaper-1680-x-1050_thumb.jpg" alt="super-mario-level-wallpaper-1680-x-1050" width="680" height="340" border="0" /></a></p>
<p>This article is a follow-up of a previous article I wrote, <a href="http://devmag.org.za/2011/01/18/11-tips-for-making-a-fun-platformer/">11 Tips for making a fun platformer</a>. Once again, this article focuses on platformers, but the philosophy behind each idea can be applied to any type of game, whether 2D or 3D. This time there are a few more practical tips.<br />
<span id="more-4685"></span></p>
<h2>1. Keep the camera simple</h2>
<p>The most simple (and best) camera is the one that always keeps player in the middle of the screen. This gives the player equal time to react to objects appearing from the left and right edges of the screen. The camera stops moving when the player reaches the edge of the level. For example, if the player reaches the left edge of the level then the camera stops moving left. It will continue to follow the player horizontally when the player moves away from the left edge of the level.</p>
<p>An optional addition is to make the camera look ahead in the direction the player is moving. For example, when the player runs right then the camera shows more of the level on the right side of the player, so he can see ahead. When he stops moving then the camera slowly moves to position the player in the middle of the screen.</p>
<p>Ideally, the player should not be aware of the camera.</p>
<h2>2. Allow the player to move in the air when jumping</h2>
<p>The player should have at least the same manoeuvrability when he is jumping through the air, as he has when he is running on the ground.</p>
<p>This means that he should move left or right at the same speed, and be able to shoot or use items with the same ease as when he is running.</p>
<h2>3. Make it easy to climb ladders</h2>
<p>&nbsp;</p>
<table width="680" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td width="340"><a href="http://devmag.org.za/blog/wp-content/uploads/2012/07/03_012.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="03_01" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/03_01_thumb2.png" alt="03_01" width="340" height="298" border="0" /></a></td>
<td style="text-align: center;" width="340"><em>The player can grab onto the ladder when he is in the green rectangle, even if he is in the air. The character grabs onto the ladder when the player presses up*. The rectangle is slightly bigger than the ladder to make it easier to grab onto the ladder.</em></td>
</tr>
<tr>
<td style="text-align: center;" width="340"><em>The player should be able to move up, down, left, right and diagonal when he is on a ladder. </em></td>
<td width="340"><a href="http://devmag.org.za/blog/wp-content/uploads/2012/07/03_022.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="03_02" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/03_02_thumb2.png" alt="03_02" width="340" height="298" border="0" /></a></td>
</tr>
<tr>
<td width="340"><a href="http://devmag.org.za/blog/wp-content/uploads/2012/07/03_032.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="03_03" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/03_03_thumb2.png" alt="03_03" width="340" height="298" border="0" /></a></td>
<td style="text-align: center;" width="340"><em>When the player moves up and bangs his head against collision (red rectangles), automatically move him towards the middle of the ladder (while he is pressing up). This will make it easier to get through narrow gaps.</em></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Allow the player to be able to shoot or use items while he is on a ladder.</p>
<p>At any time the player should be able to jump off the ladder by pressing the jump button. He can also fall off the ladder when he moves all the way to the left or right and no longer touches the ladder.</p>
<p>* To start climbing the player can press up, jump or a grab button, depending on the other mechanics of the game. Generally, pressing the up button to start climbing is the easiest and most intuitive. But it may not be ideal if your character has a gun which can aim up, so pressing up will aim the gun up to shoot upwards. In this case the jump button or an extra grab button can be used to start climbing up. Prototype it to find what is the easiest and most fun. (This also applies to vines and swinging ropes. See below.)</p>
<h2>4. Make it easy to climb vines on the side of a wall</h2>
<p>Ideally, climbing ladders and climbing vines will use the same code. Therefore climbing vines will be the same as climbing ladders, except, usually vines are wider and encourages more horizontal movement.</p>
<h2>5. Make it easy to swing on ropes</h2>
<table width="680" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td width="340"><a href="http://devmag.org.za/blog/wp-content/uploads/2012/07/051.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="05" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/05_thumb1.png" alt="05" width="340" height="255" border="0" /></a></td>
<td style="text-align: center;" width="340"><em>The player can grab onto the rope when he is within the green rectangles and he presses up. Like the ladder earlier on, the green rectangles are slightly bigger than the rope to make it easier to grab onto the rope.</em></td>
</tr>
</tbody>
</table>
<p>When the player is swinging on the rope, allow him to move up or down the rope when he presses up or down, no matter what angle the rope is swinging at. For example, if the rope is swinging at a 45 degree angle, pressing up still moves the player up the rope.</p>
<p>Allow the player to be able to shoot or use items while he is swinging on a rope.</p>
<p>At any time the player should be able to jump off the rope by pressing the jump button.</p>
<h2>6. Let the player double jump whenever</h2>
<p>Usually the player is only allowed to do the second jump of a double jump when the first jump reaches a certain state (for example, specific height, within a certain time limit, or when she is moving up).</p>
<p>Allow the player to do the second jump at any time while he is in the air. It makes the game feel more responsive and fun. The only limit should be that he has to release the jump button and press it again to do the second jump.</p>
<h2>7. Avoid using inertia</h2>
<p>When the player stops pressing left or right then the character should stop moving immediately. Avoid giving the character inertia which causes him to move forward a short distance before stopping. Inertia is acceptable in an ice level where it adds to the challenge of the level. But avoid having it throughout the game. Inertia can lead to the player falling off ledges or running into enemies or hazards, therefore making the game feel unresponsive.</p>
<h2>8. Make moving platforms friendly</h2>
<p><strong>The first moving platform the player encounters should be easy to use</strong> and not have a big penalty for falling off or missing it (for example, the penalty can just be climbing up a short ladder to get back to where the platform is). The first platform makes the player aware there are moving platforms in the game.</p>
<p><strong>Avoid making moving platforms travel far.</strong> If the platform travels far and the player misses it then he has to wait a long time for the platform to return. When he has to travel via moving platforms over a large area (for example, over spikes) then have multiple moving platforms.</p>
<p>If you have a platform that constantly moves back and forth to take the player between two ledges, then <strong>only start moving the platform when the player clearly sees it</strong>. When he gets to the ledge and does not see the platform (because it is off screen) then he may not know there is a platform there, and leaves to explore the rest of the level. Alternatively, if you want to make sure the player does not miss seeing the moving platform, let the platform only start moving when the player climbs on it. Another option is to make the platforms move along rails, so that when the player sees a rail he knows there is a moving platform nearby.</p>
<h2>9. Avoid adding leaps of faith</h2>
<p>Generally, the player should see what lies at the bottom of the platform he is currently standing on. So that he knows if it is safe to jump off or not.</p>
<p>If the player cannot see what lies past the bottom of the screen&#8217;s edge, then add clues so the player knows what lies at the bottom.</p>
<p>Examples:</p>
<ul>
<li>Skulls, flies or blood indicates there are spikes or rotating blades at the bottom.</li>
<li>A red glow indicates there&#8217;s fire or lava at the bottom.</li>
<li>A power-up in mid-air is an invite to jump off safely.</li>
<li>An enemy&#8217;s head sticking out the bottom of the screen, and moving horizontally will give the player an idea of where there is ground to land on.</li>
</ul>
<p>If there are no clues, then most of the time the player should be able to jump off and land safely at the bottom.</p>
<p>If there is an enemy at the bottom and off screen, then position the enemy in such a way that the player will have time to react to the enemy when he lands on the ground (for example, the enemy may be in an idle pose and delay for about 2 seconds before he starts attacking the player).</p>
<p>Avoiding <strong>leaps of faith</strong> removes the sense that the game is unfair. The player will feel it is unfair for him to make decisions when he cannot see the possible outcomes.</p>
<table width="696" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td width="347"><a href="http://devmag.org.za/blog/wp-content/uploads/2012/07/091.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="09" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/09_thumb1.png" alt="09" width="340" height="298" border="0" /></a></td>
<td width="347">
<p style="text-align: center;"><em>Some platformers have a </em>main ground<em>. Usually when the player falls out the bottom of the screen, past the main ground then he dies instantly. This is quickly learned by the player when it happens the first time. The </em>leaps of faith<em> generally apply to platforms above the main ground.</em></p>
</td>
</tr>
</tbody>
</table>
<h2>10. Remove frustrating elements</h2>
<p>By removing frustrating elements your game will become more fun.</p>
<p>Here are some examples of frustrating elements:</p>
<ul>
<li>A cut scene which you cannot skip before the boss fight. When the boss kills you then you are forced to watch the cut scene again.</li>
<li>Extremely difficult jumps that you have to retry countless times to get right.</li>
<li>Spending large amounts of time collecting items to achieve a goal (for example, collect 100 stars to get a special weapon) then losing all the items when you die.</li>
</ul>
<p>Complicated button combos which take too long to do a special attack and is interrupted when an enemy punches you.</p>
<ul>
<li>Losing health when you fall from a high height.</li>
<li>Being attacked by enemies who are still off screen.</li>
</ul>
<h2>11. Keep the background in the background</h2>
<p>Make sure the background does not interfere with the foreground. This will help the player see which platforms he can stand on and makes it easier to identify items and enemies.</p>
<p>Some tips on how to push the background backwards:</p>
<ul>
<li>Use less contrasts in the background (for example, reduce the background image&#8217;s contrast setting in GIMP or Photoshop).</li>
<li>Use cool colours in the background, such as shades of blues (for example, place a semi-transparent blue layer over the background image in GIMP or Photoshop).</li>
<li>Have less, slower or less frequent animations in the background. The animations should not distract the player.</li>
<li>Use <a href="http://en.wikipedia.org/wiki/Parallax_scrolling">parallax scrolling</a> (that is, the background scrolls slower than the foreground).</li>
</ul>
<table width="693" border="0" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td width="347"><a href="http://devmag.org.za/blog/wp-content/uploads/2012/07/111.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border: 0px;" title="11" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/11_thumb1.png" alt="11" width="340" height="255" border="0" /></a></td>
<td width="344"><em>Here it is easy to see what is in the background and it does not interfere with the foreground.</em></td>
</tr>
</tbody>
</table>
<h2>12. Emotion is more important than reason</h2>
<p>You can have the most brilliant, genius, unique, awesome ideas and mechanics or systems for a game. But what does it <em>feel</em> like when you play it?</p>
<p>In other words: prototype and let your emotions be the final judge.</p>
<h2>13. A fun game has a good user interface</h2>
<p>There are various definitions of what a user interface is, but most of them include the following:</p>
<ul>
<li>Information that allows a user to make a decision.</li>
<li>The user input system.</li>
<li>The feedback generated by the user input. This leads back to the first point: information to make the next decision.</li>
</ul>
<p>Examples of non-game user interfaces:</p>
<ul>
<li>The controls and dials of a car.</li>
<li>The LED, buttons and beeps of a washing machine.</li>
<li>The remote control of a television.</li>
<li>The buttons and highlighted floor number of a lift.</li>
</ul>
<p>What makes a good, non-game user interface?</p>
<ul>
<li>Clear information.</li>
<li>Easy to use.</li>
<li>Clear and instant feedback.</li>
</ul>
<p>These are also an important part of making a fun game.</p>
<h2>References</h2>
<ul>
<li><a href="http://searchsoa.techtarget.com/definition/user-interface">http://searchsoa.techtarget.com/definition/user-interface</a></li>
<li><a href="http://www.pcmag.com/encyclopedia_term/0,2542,t=user+interface&amp;i=53558,00.asp">http://www.pcmag.com/encyclopedia_term/0,2542,t=user+interface&amp;i=53558,00.asp</a></li>
<li><a href="http://en.wikipedia.org/wiki/User_interface">http://en.wikipedia.org/wiki/User_interface</a></li>
</ul>
<h2>Discuss</h2>
<p>Some more discussion of these tips on <a href="http://www.makegamessa.com/discussion/86/13-more-tips-for-making-a-fun-platformer#Item_1">Make Games SA</a>.</p>
<div class='yarpp-related-rss'>
<h2>Related posts:</h2><p><ol>
<li><a href='http://devmag.org.za/2011/01/18/11-tips-for-making-a-fun-platformer/' rel='bookmark' title='11 Tips for making a fun platformer'>11 Tips for making a fun platformer</a> <small>This article gives handy tips for designing and building a...</small></li>
<li><a href='http://devmag.org.za/2011/07/04/how-to-design-levels-for-a-platformer/' rel='bookmark' title='How to design levels for a platformer'>How to design levels for a platformer</a> <small>This article looks at the process of designing levels for...</small></li>
<li><a href='http://devmag.org.za/2011/05/23/how-are-puzzle-games-designed-teddy-lee/' rel='bookmark' title='How are puzzle games designed? Teddy Lee'>How are puzzle games designed? Teddy Lee</a> <small>Teddy Lee (maker of My First First Quantum Translocater and...</small></li>
<li><a href='http://devmag.org.za/2010/01/26/making-a-testers-life-less-miserable/' rel='bookmark' title='Making a tester&#8217;s life less miserable'>Making a tester&#8217;s life less miserable</a> <small>To prototype and get early feedback is great for getting...</small></li>
<li><a href='http://devmag.org.za/2012/07/12/50-tips-for-working-with-unity-best-practices/' rel='bookmark' title='50 Tips for Working with Unity (Best Practices)'>50 Tips for Working with Unity (Best Practices)</a> <small>This article gives a list of best practices for working...</small></li>
<li><a href='http://devmag.org.za/2011/02/02/video-game-user-interface-design-diegesis-theory/' rel='bookmark' title='Video game user interface design: Diegesis theory'>Video game user interface design: Diegesis theory</a> <small>In this article, the Dave Russell introduces the basic concepts...</small></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://devmag.org.za/2012/07/19/13-more-tips-for-making-a-fun-platformer/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>50 Tips for Working with Unity (Best Practices)</title>
		<link>http://devmag.org.za/2012/07/12/50-tips-for-working-with-unity-best-practices/</link>
		<comments>http://devmag.org.za/2012/07/12/50-tips-for-working-with-unity-best-practices/#comments</comments>
		<pubDate>Thu, 12 Jul 2012 08:00:43 +0000</pubDate>
		<dc:creator>Herman Tulleken</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[unity]]></category>

		<guid isPermaLink="false">http://devmag.org.za/?p=4647</guid>
		<description><![CDATA[<img src="http://devmag.org.za/blog/wp-content/uploads/2010/12/devmag_orange_b.png" width="71" height="71" alt="Development" title="Development" /><br/>This article gives a list of best practices for working with unity: it covers the process, working with art and prefabs, class design, project structure, and many others.<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></description>
				<content:encoded><![CDATA[<img src="http://devmag.org.za/blog/wp-content/uploads/2010/12/devmag_orange_b.png" width="71" height="71" alt="Development" title="Development" /><br/><p style="text-align: center;"><img class="aligncenter  wp-image-4652" title="unityLogo" src="http://devmag.org.za/blog/wp-content/uploads/2012/07/unityLogo.png" alt="" width="680" height="340" /></p>
<h2>About these tips</h2>
<p>These tips are not all applicable to every project.</p>
<ul>
<li>They are based on my experience with projects with small teams from 3 to 20 people.</li>
<li>There’s is a price for structure, re-usability, clarity, and so on — team size and project size determine whether that price should be paid.</li>
<li>Many tips are a matter of taste (there may be rivalling but equally good techniques for any tip listed here).</li>
<li>Some tips may fly in the face of conventional Unity development. For instance, using prefabs for specialisation instead of instances is very non-Unity-like, and the price is quite high (many times more prefabs than without it). Yet I have seen these tips pay off, even if they seem crazy.</li>
</ul>
<p><span id="more-4647"></span></p>
<h2>Process</h2>
<p><strong>1. Avoid branching assets.</strong> There should always only ever be one version of any asset. If you absolutely <em>have</em> to branch a prefab, scene, or mesh, follow a process that makes it very clear which is the <strong>right </strong>version. The “wrong” branch should have a funky name, for example, use a double underscore prefix: <code>__MainScene_Backup</code>. Branching prefabs requires a specific process to make it safe (see under the section <em>Prefabs</em>).<strong></strong></p>
<p><strong>2. Each team member should have a second copy of the project checked out for testing </strong>if you are using version control. After changes, this second copy, the clean copy, should be updated and tested. No-one should make any changes to their clean copies. This is especially useful to catch missing assets.<strong></strong></p>
<p><strong>3. Consider using external level tools for level editing.</strong> Unity is not the perfect level editor. For example, we have used <a href="http://www.diorgo.com/v1/?p=366">TuDee</a> to build levels for a 3D tile-based game, where we could benefit from the tile-friendly tools (snapping to grid, and multiple-of-90-degrees rotation, 2D view, quick tile selection). Instantiating prefabs from an XML file is straightforward. See <a href="http://devmag.org.za/2009/10/23/guerrilla-tool-development/">Guerrilla Tool Development</a> for more ideas.</p>
<p><strong>4. Consider saving levels in XML instead of in scenes.</strong> This is a wonderful technique:<strong></strong></p>
<ul>
<li>It makes it unnecessary to re-setup each scene.</li>
<li>It makes loading much faster (if most objects are shared between scenes).</li>
<li>It makes it easier to merge scenes (even with Unity&#8217;s new text-based scenes there is so much data in there that merging is often impractical in any case).</li>
<li>It makes it easier to keep track of data across levels.</li>
</ul>
<p>You can still use Unity as a level editor (although you need not). You will need to write some code to serialize and deserialize your data, and load a level both in the editor and at runtime, and save levels from the editor. You may also need to mimic Unity’s ID system for maintaining references between objects.</p>
<p><strong>5. Consider writing generic custom inspector code.</strong> To write custom inspectors is fairly straightforward, but Unity’s system has many drawbacks:<strong></strong></p>
<ul>
<li>It does not support taking advantage of inheritance.</li>
<li>It does not let you define inspector components on a field-type level, only a class-type level. For instance, if every game object has a field of type <code>SomeCoolType</code>, which you want rendered differently in the inspector, you have to write inspectors for <em>all</em> your classes.</li>
</ul>
<p>You can address these issues by essentially re-implementing the inspector system. Using a few tricks of reflection, this is not as hard as it seems, details are provided at the end of the article.</p>
<h2>Scene Organisation</h2>
<p><strong>6. Use named empty game objects as scene folders. </strong>Carefully organise your scenes to make it easy to find objects.<strong></strong></p>
<p><strong>7. Put maintenance prefabs and folders (empty game objects) at 0 0 0. </strong>If a transform is not specifically used to position an object, it should be at the origin. That way, there is less danger of running into problems with local and world space, and code is generally simpler.<strong></strong></p>
<p><strong>8. Minimise using offsets for GUI components.</strong>&nbsp;Offsets should always be used to layout components in their parent component only; they should not rely on the positioning of their grandparents. Offsets should not cancel each other out to display correctly.&nbsp;It is basically to prevent this kind of thing:</p>
<p>Parent container arbitrarily placed at (100, -50). Child, meant to be positioned at (10, 10), then placed at (90, 60) [relative to parent].</p>
<p>This error is common when the container is invisible, or does not have a visual representation at all.<strong></strong></p>
<p><strong>9. Put your world floor at y = 0.</strong> This makes it easier to put objects on the floor, and treat the world as a 2D space (when appropriate) for game logic, AI, and physics.<strong></strong></p>
<p><strong>10. Make the game runnable from every scene.</strong> This drastically reduces testing time. To make all scenes runnable you need to do two things:<strong></strong></p>
<p>First, provide a way to mock up any data that is required from previously loaded scenes if it is not available.</p>
<p>Second, spawn objects that must persist between scene loads with the following idiom:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;">myObject <span style="color: #008000;">=</span> FindMyObjectInScene<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>myObjet <span style="color: #008000;">==</span> <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
   myObject <span style="color: #008000;">=</span> SpawnMyObject<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<h2>Art</h2>
<p><strong>11. Put character and standing object pivots at the base, not in the centre. </strong>This makes it easy to put characters and objects on the floor precisely. It also makes it easier to work with 3D as if it is 2D for game logic, AI, and even physics when appropriate.<strong></strong></p>
<p><strong>12. Make all meshes face in the same direction (positive or negative z axis).</strong> This applies to meshes such as characters and other objects that have a concept of facing direction. Many algorithms are simplified if everything have the same facing direction.<strong></strong></p>
<p><strong>13. Get the scale right from the beginning.</strong> Make art so that they can all be imported at a scale factor of 1, and that their transforms can be scaled 1, 1, 1. Use a reference object (a Unity cube) to make scale comparisons easy. Choose a world to Unity units ratio suitable for your game, and stick to it.<strong></strong></p>
<p><strong>14. Make a two-poly plane</strong> to use for GUI components and manually created particles. Make the plane face the positive z-axis for easy billboarding and easy GUI building.<strong></strong></p>
<p><strong>15. Make and use test art</strong></p>
<ul>
<li>Squares labelled for skyboxes.</li>
<li>A grid.</li>
<li>Various flat colours for shader testing: white, black, 50% grey, red, green, blue, magenta, yellow, cyan.</li>
<li>Gradients for shader testing: black to white, red to green, red to blue, green to blue.</li>
<li>Black and white checkerboard.</li>
<li>Smooth and rugged normal maps.</li>
<li>A lighting rig (as prefab) for quickly setting up test scenes.</li>
</ul>
<h2>Prefabs</h2>
<p><strong>16. Use prefabs for everything.</strong> The only game objects in your scene that should not be prefabs should be folders. Even unique objects that are <em>used only once </em>should be prefabs. This makes it easier to make changes that don’t require the scene to change. (An additional benefit is that it makes building sprite atlases reliable when using <a href="http://www.anbsoft.com/middleware/ezgui/">EZGUI</a>).<strong></strong></p>
<p><strong>17. Use separate prefabs for specialisation; do not specialise instances. </strong>If you have two enemy types, and they only differ by their properties, make separate prefabs for the properties, and link them in. This makes it possible to <strong></strong></p>
<ul>
<li>make changes to each type in one place</li>
<li>make changes without having to change the scene.</li>
</ul>
<p>If you have too many enemy types, specialisation should still not be made in instances in the editor. One alternative is to do it procedurally, or using a central file / prefab for all enemies. A single drop down could be used to differentiate enemies, or an algorithm based on enemy position or player progress.</p>
<p><strong>18. Link prefabs to prefabs; do not link instances to instances. </strong>Links to prefabs are maintained when dropping a prefab into a scene; links to instances are not. Linking to prefabs whenever possible reduces scene setup, and reduce the need to change scenes.<strong></strong></p>
<p><strong>19. As far as possible, establish links between instances automatically.</strong> If you need to link instances, establish the links programmatically. For example, the player prefab can register itself with the <code>GameManager</code> when it starts, or the <code>GameManager</code> can find the <code>Player</code> prefab instance when it starts.<strong></strong></p>
<p><strong>Don&#8217;t put meshes at the roots of prefabs if you want to add other scripts.</strong>&nbsp;When you make the prefab from a mesh, first parent the mesh to an empty game object, and make&nbsp;<em>that</em> the root. Put scripts on the root, not on the mesh node. That way it is much easier to replace the mesh with another mesh without loosing any values that you set up in the inspector.</p>
<p><strong>Use linked prefabs as an alternative to nested prefabs.</strong> Unity does not support nested prefabs, and existing third-party solutions can be dangerous when working in a team because the relationship between nested prefabs is not obvious.</p>
<p><strong>20. Use safe processes to branch prefabs.</strong> The explanation use the Player prefab as an example.<strong></strong></p>
<p>Make a risky change to the Player prefab is as follows:</p>
<ol>
<li>Duplicate the <code>Player</code> prefab.</li>
<li>Rename the duplicate to <code>__Player_Backup</code>.</li>
<li>Make changes to the <code>Player</code> prefab.</li>
<li>If everything works, delete <code>__Player_Backup</code>.</li>
</ol>
<p>Do not name the duplicate Player_New, and make changes to it!</p>
<p>Some situations are more complicated. For example, a certain change may involve two people, and following the above process may break the working scene for everyone until person two finished. If it is quick enough, still follow the process above. For changes that take longer, the following process can be followed:</p>
<ol>
<li>Person 1:
<ol>
<li>Duplicate the <code>Player</code> prefab.</li>
<li>Rename it to <code>__Player_WithNewFeature</code> or <code>__Player_ForPerson2</code>.</li>
<li>Make changes on the duplicate, and commit / give to Person 2.</li>
</ol>
</li>
<li>Person 2:
<ol>
<li>Make changes to new prefab.</li>
<li>Duplicate <code>Player</code> prefab, and call it <code>__Player_Backup</code>.</li>
<li>Drag an instance of <code>__Player_WithNewFeature</code> into the scene.</li>
<li>Drag the instance onto the original <code>Player</code> prefab.</li>
<li>If everything works, delete <code>__Player_Backup</code> and <code>__Player_WithNewFeature</code>.</li>
</ol>
</li>
</ol>
<h2>Extensions and MonoBehaviourBase</h2>
<p><strong>21. Extend your own base mono behaviour, and derive all your components from it.</strong></p>
<p>This allows you to implement some general functionality, such as type safe Invoke, and more complicated Invokes (such as random, etc.).</p>
<p><strong>22. Define safe methods for Invoke, StartCoroutine and Instantiate.</strong></p>
<p>Define a delegate Task, and use it to define methods that don’t rely on string names. For example:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> Invoke<span style="color: #008000;">&#40;</span>Task task, <span style="color: #6666cc; font-weight: bold;">float</span> time<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
   Invoke<span style="color: #008000;">&#40;</span>task<span style="color: #008000;">.</span><span style="color: #0000FF;">Method</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Name</span>, time<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p><strong>23. Use extensions to work with components that share an interface. </strong>It is sometimes convenient to get components that implement a certain interface, or find objects with such components.<strong></strong></p>
<p>The implementations below uses <code>typeof</code> instead of the generic versions of these functions. The generic versions don’t work with interfaces, but <code>typeof</code> does. The methods below wraps this neatly in generic methods.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008080; font-style: italic;">//Defined in the common base class for all mono behaviours</span>
<span style="color: #0600FF; font-weight: bold;">public</span> I GetInterfaceComponent<span style="color: #008000;">&lt;</span>I<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #0600FF; font-weight: bold;">where</span> I <span style="color: #008000;">:</span> <span style="color: #6666cc; font-weight: bold;">class</span>
<span style="color: #008000;">&#123;</span>
   <span style="color: #0600FF; font-weight: bold;">return</span> GetComponent<span style="color: #008000;">&#40;</span><span style="color: #008000;">typeof</span><span style="color: #008000;">&#40;</span>I<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #0600FF; font-weight: bold;">as</span> I<span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">static</span> List<span style="color: #008000;">&lt;</span>I<span style="color: #008000;">&gt;</span> FindObjectsOfInterface<span style="color: #008000;">&lt;</span>I<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #0600FF; font-weight: bold;">where</span> I <span style="color: #008000;">:</span> <span style="color: #6666cc; font-weight: bold;">class</span>
<span style="color: #008000;">&#123;</span>
   MonoBehaviour<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> monoBehaviours <span style="color: #008000;">=</span> FindObjectsOfType<span style="color: #008000;">&lt;</span>MonoBehaviour<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
   List<span style="color: #008000;">&lt;</span>I<span style="color: #008000;">&gt;</span> list <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> List<span style="color: #008000;">&lt;</span>I<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
   <span style="color: #0600FF; font-weight: bold;">foreach</span><span style="color: #008000;">&#40;</span>MonoBehaviour behaviour <span style="color: #0600FF; font-weight: bold;">in</span> monoBehaviours<span style="color: #008000;">&#41;</span>
   <span style="color: #008000;">&#123;</span>
      I component <span style="color: #008000;">=</span> behaviour<span style="color: #008000;">.</span><span style="color: #0000FF;">GetComponent</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">typeof</span><span style="color: #008000;">&#40;</span>I<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span> <span style="color: #0600FF; font-weight: bold;">as</span> I<span style="color: #008000;">;</span>
&nbsp;
      <span style="color: #0600FF; font-weight: bold;">if</span><span style="color: #008000;">&#40;</span>component <span style="color: #008000;">!=</span> <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span>
      <span style="color: #008000;">&#123;</span>
         list<span style="color: #008000;">.</span><span style="color: #0600FF; font-weight: bold;">Add</span><span style="color: #008000;">&#40;</span>component<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
      <span style="color: #008000;">&#125;</span>
   <span style="color: #008000;">&#125;</span>
&nbsp;
   <span style="color: #0600FF; font-weight: bold;">return</span> list<span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p><strong>24. Use extensions to make syntax more convenient.</strong> For example:<strong></strong></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">class</span> CSTransform 
<span style="color: #008000;">&#123;</span>
   <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">void</span> SetX<span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">this</span> Transform transform, <span style="color: #6666cc; font-weight: bold;">float</span> x<span style="color: #008000;">&#41;</span>
   <span style="color: #008000;">&#123;</span>
      Vector3 newPosition <span style="color: #008000;">=</span> 
         <span style="color: #008000;">new</span> Vector3<span style="color: #008000;">&#40;</span>x, transform<span style="color: #008000;">.</span><span style="color: #0000FF;">position</span><span style="color: #008000;">.</span><span style="color: #0000FF;">y</span>, transform<span style="color: #008000;">.</span><span style="color: #0000FF;">position</span><span style="color: #008000;">.</span><span style="color: #0000FF;">z</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
      transform<span style="color: #008000;">.</span><span style="color: #0000FF;">position</span> <span style="color: #008000;">=</span> newPosition<span style="color: #008000;">;</span>
   <span style="color: #008000;">&#125;</span>
   <span style="color: #008000;">...</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p><strong>25. Use a defensive GetComponent alternative. </strong>Sometimes forcing component dependencies (through <code>RequiredComponent</code>) can be a pain. For example, it makes it difficult to change components in the inspector (even if they have the same base type). As an alternative, the following extension of <code>GameObject</code> can be used when a component is required to print out an error message when it is not found.<strong></strong></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">static</span> T GetSafeComponent<span style="color: #008000;">&lt;</span>T<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">this</span> GameObject obj<span style="color: #008000;">&#41;</span> <span style="color: #0600FF; font-weight: bold;">where</span> T <span style="color: #008000;">:</span> MonoBehaviour
<span style="color: #008000;">&#123;</span>
   T component <span style="color: #008000;">=</span> obj<span style="color: #008000;">.</span><span style="color: #0000FF;">GetComponent</span><span style="color: #008000;">&lt;</span>T<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
   <span style="color: #0600FF; font-weight: bold;">if</span><span style="color: #008000;">&#40;</span>component <span style="color: #008000;">==</span> <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span>
   <span style="color: #008000;">&#123;</span>
      Debug<span style="color: #008000;">.</span><span style="color: #0000FF;">LogError</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;Expected to find component of type &quot;</span> 
         <span style="color: #008000;">+</span> <span style="color: #008000;">typeof</span><span style="color: #008000;">&#40;</span>T<span style="color: #008000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot; but found none&quot;</span>, obj<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
   <span style="color: #008000;">&#125;</span>
&nbsp;
   <span style="color: #0600FF; font-weight: bold;">return</span> component<span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<h2>Idioms</h2>
<p><strong>26. Avoid using different idioms to do the same thing.</strong> In many cases there are more than one idiomatic way to do things. In such cases, choose one to use throughout the project. Here is why:<strong></strong></p>
<ul>
<li>Some idioms don’t work well together. Using one idiom well forces design in one direction that is not suitable for another idiom.</li>
<li>Using the same idiom throughout makes it easier for team members to understand what is going on. It makes structure and code easier to understand. It makes mistakes harder to make.</li>
</ul>
<p>Examples of idiom groups:</p>
<ul>
<li>Coroutines vs. state machines.</li>
<li>Nested prefabs vs. linked prefabs vs. God prefabs.</li>
<li>Data separation strategies.</li>
<li>Ways of using sprites for states in 2D games.</li>
<li>Prefab structure.</li>
<li>Spawning strategies.</li>
<li>Ways to locate objects: by type vs. name vs. tag vs. layer vs. reference (“links”).</li>
<li>Ways to group objects: by type vs. name vs. tag vs. layer vs. arrays of references (“links”).</li>
<li>Finding groups of objects versus self registration.</li>
<li>Controlling execution order (Using Unity’s execution order setup versus yield logic versus Awake / Start and Update / Late Update reliance versus manual methods versus any-order architecture).</li>
<li>Selecting objects / positions / targets with the mouse in-game: selection manager versus local self-management.</li>
<li>Keeping data between scene changes: through <a href="http://docs.unity3d.com/Documentation/ScriptReference/PlayerPrefs.html">PlayerPrefs</a>, or objects that are not Destroyed when a new scene is loaded.</li>
<li>Ways of combining (blending, adding and layering) animation.</li>
</ul>
<h2>Time</h2>
<p><strong>27. Maintain your own time class to make pausing easier.</strong> Wrap <code>Time.DeltaTime</code> and <code>Time.TimeSinceLevelLoad</code> to account for pausing and time scale. It requires discipline to use it, but will make things a lot easier, especially when running things of different clocks (such as interface animations and game animations).<strong></strong></p>
<h2>Spawning Objects</h2>
<p><strong>28. Don’t let spawned objects clutter your hierarchy when the game runs.</strong> Set their parents to a scene object to make it easier to find stuff when the game is running. You could use a empty game object, or even a singleton with no behaviour to make it easier to access from code. Call this object <code>DynamicObjects</code>.</p>
<h2>Class Design</h2>
<p><strong>29. Use singletons for convenience. </strong>The following class will make any class that inherits from it a singleton automatically:<strong></strong></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> Singleton<span style="color: #008000;">&lt;</span>T<span style="color: #008000;">&gt;</span> <span style="color: #008000;">:</span> MonoBehaviour <span style="color: #0600FF; font-weight: bold;">where</span> T <span style="color: #008000;">:</span> MonoBehaviour
<span style="color: #008000;">&#123;</span>
   <span style="color: #0600FF; font-weight: bold;">protected</span> <span style="color: #0600FF; font-weight: bold;">static</span> T instance<span style="color: #008000;">;</span>
&nbsp;
   <span style="color: #008080; font-style: italic;">/**
      Returns the instance of this singleton.
   */</span>
   <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">static</span> T Instance
   <span style="color: #008000;">&#123;</span>
      <span style="color: #0600FF; font-weight: bold;">get</span>
      <span style="color: #008000;">&#123;</span>
         <span style="color: #0600FF; font-weight: bold;">if</span><span style="color: #008000;">&#40;</span>instance <span style="color: #008000;">==</span> <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span>
         <span style="color: #008000;">&#123;</span>
            instance <span style="color: #008000;">=</span> <span style="color: #008000;">&#40;</span>T<span style="color: #008000;">&#41;</span> FindObjectOfType<span style="color: #008000;">&#40;</span><span style="color: #008000;">typeof</span><span style="color: #008000;">&#40;</span>T<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #0600FF; font-weight: bold;">if</span> <span style="color: #008000;">&#40;</span>instance <span style="color: #008000;">==</span> <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">&#123;</span>
               Debug<span style="color: #008000;">.</span><span style="color: #0000FF;">LogError</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;An instance of &quot;</span> <span style="color: #008000;">+</span> <span style="color: #008000;">typeof</span><span style="color: #008000;">&#40;</span>T<span style="color: #008000;">&#41;</span> <span style="color: #008000;">+</span> 
                  <span style="color: #666666;">&quot; is needed in the scene, but there is none.&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #008000;">&#125;</span>
         <span style="color: #008000;">&#125;</span>
&nbsp;
         <span style="color: #0600FF; font-weight: bold;">return</span> instance<span style="color: #008000;">;</span>
      <span style="color: #008000;">&#125;</span>
   <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>Singletons are useful for managers, such as <code>ParticleManager</code> or <code>AudioManager</code> or <code>GUIManager</code>.</p>
<ul>
<li>Avoid using singletons for unique instances of prefabs that are not managers (such as the Player). Not adhering to this principle complicates inheritance hierarchies, and makes certain types of changes harder. Rather keep references to these in your <code>GameManager</code> (or other suitable God class <img src='http://devmag.org.za/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  )</li>
<li>Define static properties and methods for public variables and methods that are used often from outside the class. This allows you to write <code>GameManager.Player</code> instead of <code>GameManager.Instance.player</code>.</li>
</ul>
<p><strong>30. For components, never make variables public that should not be tweaked in the inspector. </strong>Otherwise it <em>will</em> be tweaked by a designer, especially if it is not clear what it does. In some rare cases it is unavoidable. In that case use a two or even four underscores to prefix the variable name to scare away tweakers:<strong></strong></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">float</span> __aVariable<span style="color: #008000;">;</span></pre></td></tr></table></div>

<p><strong>31. Separate interface from game logic. </strong>This is essentially the MVC pattern.<strong></strong></p>
<p><em>Any input controller should only give commands to the appropriate components to let them know the controller has been invoked.</em> For example in controller logic, the controller could decide which commands to give based on the player state. But this is bad (for example, it will lead to duplicate logic if more controllers are added). Instead, the Player object should be notified of the intent of moving forward, and then based on the current state (slowed or stunned, for example) set the speed and update the player facing direction. Controllers should only do things that relate to their own state (the controller does not change state if the player changes state; therefore, the controller should not know of the player state at all). Another example is the changing of weapons. The right way to do it is with a method on Player <code>SwitchWeapon(Weapon newWeapon)</code>, which the GUI can call. The GUI should not manipulate transforms and parents and all that stuff.</p>
<p><em>Any interface component should only maintain data and do processing related to it&#8217;s own state.</em> For example, do display a map, the GUI could compute what to display based on the player&#8217;s movements. However, this is game state data, and does not belong in the GUI. The GUI should merely display game state data, which should be maintained elsewhere. The map data should be maintained elsewhere (in the <code>GameManager</code>, for example).</p>
<p><em>Gameplay objects should know virtually nothing of the GUI.</em> The one exception is the pause behaviour, which is may be controlled globally through <code>Time.timeScale</code> (which is not a good idea as well&#8230; see ). Gameplay objects should know if the game is paused. But that is all. Therefore, no links to GUI components from gameplay objects.</p>
<p>In general, if you delete all the GUI classes, the game should still compile.</p>
<p>You should also be able to re-implement the GUI and input without needing to write any new game logic.</p>
<p><strong>32. Separate state and bookkeeping.</strong> Bookkeeping variables are used for speed or convenience, and can be recovered from the state. By separating these, you make it easier to<strong></strong></p>
<ul>
<li>save the game state, and</li>
<li>debug the game state.</li>
</ul>
<p>One way to do it is to define a <code>SaveData</code> class for each game logic class. The</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&#91;</span>Serializable<span style="color: #008000;">&#93;</span>
PlayerSaveData
<span style="color: #008000;">&#123;</span>
   <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">float</span> health<span style="color: #008000;">;</span> <span style="color: #008080; font-style: italic;">//public for serialisation, not exposed in inspector</span>
<span style="color: #008000;">&#125;</span> 
&nbsp;
Player
<span style="color: #008000;">&#123;</span>
   <span style="color: #008080; font-style: italic;">//... bookkeeping variables</span>
&nbsp;
   <span style="color: #008080; font-style: italic;">//Don’t expose state in inspector. State is not tweakable.</span>
   <span style="color: #0600FF; font-weight: bold;">private</span> PlayerSaveData playerSaveData<span style="color: #008000;">;</span> 
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p><strong>33. Separate specialisation configuration.</strong></p>
<p>Consider two enemies with identical meshes, but different tweakables (for instance different strengths and different speeds). There are different ways to separate data. The one here is what I prefer, especially when objects are spawned, or the game is saved. (Tweakables are not state data, but configuration data, so it need not be saved. When objects are loaded or spawned, the tweakables are automatically loaded in separately)</p>
<ul>
<li>Define a template class for each game logic class. For instance, for Enemy, we also define <code>EnemyTemplate</code>. All the differentiating tweakables are stored in <code>EnemyTemplate</code></li>
<li>In the game logic class, define a variable of the template type.</li>
<li>Make an Enemy prefab, and two template prefabs <code>WeakEnemyTemplate</code> and <code>StrongEnemyTemplate</code>.</li>
<li>When loading or spawning objects, set the template variable to the right template.</li>
</ul>
<p>This method can become quite sophisticated (and sometimes, needlessly complicated, so beware!).</p>
<p>For example, to better make use of generic polymorphism, we may define our classes like this:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> BaseTemplate
<span style="color: #008000;">&#123;</span>
   <span style="color: #008000;">...</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> ActorTemplate <span style="color: #008000;">:</span> BaseTemplate
<span style="color: #008000;">&#123;</span>
   <span style="color: #008000;">...</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> Entity<span style="color: #008000;">&lt;</span>EntityTemplateType<span style="color: #008000;">&gt;</span> <span style="color: #0600FF; font-weight: bold;">where</span> EntityTemplateType <span style="color: #008000;">:</span> BaseTemplate
<span style="color: #008000;">&#123;</span>
   EntityTemplateType template<span style="color: #008000;">;</span>
   <span style="color: #008000;">...</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> Actor <span style="color: #008000;">:</span> Entity <span style="color: #008000;">&lt;</span>ActorTemplate<span style="color: #008000;">&gt;</span>
<span style="color: #008000;">&#123;</span>
   <span style="color: #008000;">...</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p><strong>34. Don’t use strings for anything other than displayed text.</strong> In particular, do not use strings for identifying objects or prefabs etc. One unfortunate exception is animations, which generally are accessed with their string names. <strong></strong></p>
<p><strong>35. Avoid using public index-coupled arrays. </strong>For instance, do not define an array of weapons, an array of bullets, and an array of particles , so that your code looks like this:<strong></strong></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> SelectWeapon<span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">int</span> index<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span> 
   currentWeaponIndex <span style="color: #008000;">=</span> index<span style="color: #008000;">;</span>
   Player<span style="color: #008000;">.</span><span style="color: #0000FF;">SwitchWeapon</span><span style="color: #008000;">&#40;</span>weapons<span style="color: #008000;">&#91;</span>currentWeapon<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> Shoot<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
   Fire<span style="color: #008000;">&#40;</span>bullets<span style="color: #008000;">&#91;</span>currentWeapon<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
   FireParticles<span style="color: #008000;">&#40;</span>particles<span style="color: #008000;">&#91;</span>currentWeapon<span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>   
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>The problem for this is not so much in the code, but rather setting it up in the inspector without making mistakes.</p>
<p>Rather, define a class that encapsulates the three variables, and make an array of that:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&#91;</span>Serializable<span style="color: #008000;">&#93;</span>
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> Weapon
<span style="color: #008000;">&#123;</span>
   <span style="color: #0600FF; font-weight: bold;">public</span> GameObject prefab<span style="color: #008000;">;</span>
   <span style="color: #0600FF; font-weight: bold;">public</span> ParticleSystem particles<span style="color: #008000;">;</span>
   <span style="color: #0600FF; font-weight: bold;">public</span> Bullet bullet<span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>The code looks neater, but most importantly, it is harder to make mistakes in setting up the data in the inspector.</p>
<p><strong>36. Avoid using arrays for structure other than sequences. </strong>For example, a player may have three types of attacks. Each uses the current weapon, but generates different bullets and different behaviour.<strong></strong></p>
<p>You may be tempted to dump the three bullets in an array, and then use this kind of logic:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> FireAttack<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
   <span style="color: #008080; font-style: italic;">/// behaviour</span>
   Fire<span style="color: #008000;">&#40;</span>bullets<span style="color: #008000;">&#91;</span><span style="color: #FF0000;">0</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> IceAttack<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
   <span style="color: #008080; font-style: italic;">/// behaviour</span>
   Fire<span style="color: #008000;">&#40;</span>bullets<span style="color: #008000;">&#91;</span><span style="color: #FF0000;">1</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> WindAttack<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
   <span style="color: #008080; font-style: italic;">/// behaviour</span>
   Fire<span style="color: #008000;">&#40;</span>bullets<span style="color: #008000;">&#91;</span><span style="color: #FF0000;">2</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>Enums can make things look better in code&#8230;</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> WindAttack<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
   <span style="color: #008080; font-style: italic;">/// behaviour</span>
   Fire<span style="color: #008000;">&#40;</span>bullets<span style="color: #008000;">&#91;</span>WeaponType<span style="color: #008000;">.</span><span style="color: #0000FF;">Wind</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>&#8230;but not in the inspector.</p>
<p>It’s better to use separate variables so that the names help show which content to put in. Use a class to make it neat.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&#91;</span>Serializable<span style="color: #008000;">&#93;</span>
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> Bullets
<span style="color: #008000;">&#123;</span>
   <span style="color: #0600FF; font-weight: bold;">public</span> Bullet FireBullet<span style="color: #008000;">;</span>
   <span style="color: #0600FF; font-weight: bold;">public</span> Bullet IceBullet<span style="color: #008000;">;</span>
   <span style="color: #0600FF; font-weight: bold;">public</span> Bullet WindBullet<span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>This assumes there is no other Fire, Ice and Wind data.</p>
<p><strong>37. Group data in serializable classes to make things neater in the inspector.</strong> Some entities may have dozens of tweakables. It can become a nightmare to find the right variable in the inspector. To make things easier, follow these steps:<strong></strong></p>
<ul>
<li>Define separate classes for groups of variables. Make them public and serializable.</li>
<li>In the primary class, define public variables of each type defined as above.</li>
<li>Do not initialize these variables in Awake or Start; since they are serializable, Unity will take care of that.</li>
<li>You can specify defaults as before by assigning values in the definition;</li>
</ul>
<p>This will group variables in collapsible units in the inspector, which is easier to manage.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&#91;</span>Serializable<span style="color: #008000;">&#93;</span>
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> MovementProperties <span style="color: #008080; font-style: italic;">//Not a MonoBehaviour!</span>
<span style="color: #008000;">&#123;</span>
   <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">float</span> movementSpeed<span style="color: #008000;">;</span>
   <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">float</span> turnSpeed <span style="color: #008000;">=</span> <span style="color: #FF0000;">1</span><span style="color: #008000;">;</span> <span style="color: #008080; font-style: italic;">//default provided</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> HealthProperties <span style="color: #008080; font-style: italic;">//Not a MonoBehaviour!</span>
<span style="color: #008000;">&#123;</span>
   <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">float</span> maxHealth<span style="color: #008000;">;</span>
   <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">float</span> regenerationRate<span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> Player <span style="color: #008000;">:</span> MonoBehaviour
<span style="color: #008000;">&#123;</span>
   <span style="color: #0600FF; font-weight: bold;">public</span> MovementProperties movementProeprties<span style="color: #008000;">;</span>
   <span style="color: #0600FF; font-weight: bold;">public</span> HealthPorperties healthProeprties<span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<h2>Text</h2>
<p><strong>38. If you have a lot of story text, put it in a file.</strong> Don’t put it in fields for editing in the inspector. Make it easy to change without having to open the Unity editor, and especially without having to save the scene.<strong></strong></p>
<p><strong>39. If you plan to localise, separate all your strings to one location. </strong>There are many ways to do this. One way is to define a Text class with a public string field for each string, with defaults set to English, for example. Other languages subclass this and re-initialize the fields with the language equivalents.<strong></strong></p>
<p>More sophisticated techniques (appropriate when the body of text is large and / or the number of languages is high) will read in a spread sheet and provide logic for selecting the right string based on the chosen language.</p>
<h2>Testing and Debugging</h2>
<p><strong>40. Implement a graphical logger to debug physics, animation, and AI. </strong>This can make debugging considerably faster. See <a href="http://devmag.org.za/2011/01/25/make-your-logs-interactive-and-squash-bugs-faster/">here</a>.<strong></strong></p>
<p><strong>41. Implement a HTML logger.</strong> In some cases, logging can still be useful. Having logs that are easier to parse (are colour coded, has multiple views, records screenshots) can make log-debugging much more pleasant. See <a href="http://devmag.org.za/2011/02/09/using-graphs-to-debug-physics-ai-and-animation-effectively/">here</a>.<strong></strong></p>
<p><strong>42. Implement your own FPS counter.</strong> Yup. No one knows what Unity’s FPS counter really measures, but it is not frame rate. Implement your own so that the number can correspond with intuition and visual inspection.<strong></strong></p>
<p><strong>43. Implement shortcuts for taking screen shots.</strong> Many bugs are visual, and are much easier to report when you can take a picture. The ideal system should maintain a counter in <code>PlayerPrefs</code> so that successive screenshots are not overwritten. The screenshots should be saved outside the project folder to avoid people from accidentally committing them to the repository.<strong></strong></p>
<p><strong>44. Implement shortcuts for printing the player’s world position.</strong> This makes it easy to report the position of bugs that occur in specific places in the world, which in turns makes it easier to debug.<strong></strong></p>
<p><strong>45. Implement debug options for making testing easier.</strong> Some examples:<strong></strong></p>
<ul>
<li>Unlock all items.</li>
<li>Disable enemies.</li>
<li>Disable GUI.</li>
<li>Make player invincible.</li>
<li>Disable all gameplay.</li>
</ul>
<p><strong>46. For teams that are small enough, make a prefab for each team member with debug options.</strong> Put a user identifier in a file that is not committed, and is read when the game is run. This why: <strong></strong></p>
<ul>
<li>Team members do not commit their debug options by accident and affect everyone.</li>
<li>Changing debug options don’t change the scene.</li>
</ul>
<p><strong>47. Maintain a scene with all gameplay elements. </strong>For instance, a scene with all enemies, all objects you can interact with, etc. This makes it easy to test functionality without having to play too long.<strong></strong></p>
<p><strong>48. Define constants for debug shortcut keys, and keep them in one place. </strong>Debug keys are not normally (or conveniently) processed in a single location like the rest of the game input. To avoid shortcut key collisions, define constants in a central place. An alternative is to process all keys in one place regardless of whether it is a debug function or not. (The downside is that this class may need extra references to objects just for this).<strong></strong></p>
<h2>Documentation</h2>
<p><strong>49. Document your setup.</strong> Most documentation should be in the code, but certain things should be documented outside code. Making designers sift through code for setup is time-wasting. Documented setups improved efficiency (if the documents are current). <strong></strong></p>
<p>Document the following:</p>
<ul>
<li>Layer uses (for collision, culling, and raycasting – essentially, what should be in what layer).</li>
<li>Tag uses.</li>
<li>GUI depths for layers (what should display over what).</li>
<li>Scene setup.</li>
<li>Idiom preferences.</li>
<li>Prefab structure.</li>
<li>Animation layers.</li>
</ul>
<h3>Naming Standard and Folder Structure</h3>
<p><strong>50. Follow a documented naming convention and folder structure. </strong>Consistent naming and folder structure makes it easier to find things, and to figure out what things are. <strong></strong></p>
<p>You will most probably want to create your own naming convention and folder structure. Here is one as an example.</p>
<h3>Naming General Principles</h3>
<ol>
<li>Call a thing what it is. A bird should be called <span style="color: #37a32c;">Bird</span>.</li>
<li>Choose names that can be pronounced and remembered. If you make a Mayan game, do not name your level <span style="color: #c40f13;">QuetzalcoatisReturn</span>.</li>
<li>Be consistent. When you choose a name, stick to it.</li>
<li>Use Pascal case, like this: <span style="color: #37a32c;">ComplicatedVerySpecificObject</span>. Do not use spaces, underscores, or hyphens, with one exception (see <em>Naming Different Aspects of the Same Thing</em>).</li>
<li>Do not use version numbers, or words to indicate their progress (<span style="color: #c40f13;">WIP</span>, <span style="color: #c40f13;">final</span>).</li>
<li>Do not use abbreviations: <span style="color: #c40f13;">DVamp@W</span> should be <span style="color: #37a32c;">DarkVampire@Walk</span>.</li>
<li>Use the terminology in the design document: if the document calls the die animation <em>Die</em>, then use <span style="color: #37a32c;">DarkVampire@Die</span>, not <span style="color: #c40f13;">DarkVampire@Death</span>.</li>
<li>Keep the most specific descriptor on the left: <span style="color: #37a32c;">DarkVampire</span>, not <span style="color: #c40f13;">VampireDark</span>; <span style="color: #37a32c;">PauseButton</span>, not <span style="color: #c40f13;">ButtonPaused</span>. It is, for instance, easier to find the pause button in the inspector if not all buttons start with the word <em>Button</em>. [Many people prefer it the other way around, because that makes grouping more obvious visually. Names are not for grouping though, folders are. Names are to distinguish objects of the same type so that they can be located reliably and fast.]</li>
<li>Some names form a sequence. Use numbers in these names, for example, <span style="color: #37a32c;">PathNode0</span>, <span style="color: #37a32c;">PathNode1</span>. Always start with 0, not 1.</li>
<li>Do not use numbers for things that don’t form a sequence. For example, <span style="color: #c40f13;">Bird0</span>, <span style="color: #c40f13;">Bird1</span>, <span style="color: #c40f13;">Bird2</span> should be <span style="color: #37a32c;">Flamingo</span>, <span style="color: #37a32c;">Eagle</span>, <span style="color: #37a32c;">Swallow</span>.</li>
<li>Prefix temporary objects with a double underscore <span style="color: #37a32c;">__Player_Backup</span>.</li>
</ol>
<h3>Naming Different Aspects of the Same Thing</h3>
<p>Use underscores between the core name, and the thing that describes the “aspect”. For instance:</p>
<ul>
<li><strong>GUI buttons states</strong> EnterButton_Active, EnterButton_Inactive<strong></strong></li>
<li><strong>Textures</strong> DarkVampire_Diffuse, DarkVampire_Normalmap<strong></strong></li>
<li><strong>Skybox</strong> JungleSky_Top, JungleSky_North<strong></strong></li>
<li><strong>LOD Groups</strong> DarkVampire_LOD0, DarkVampire_LOD1<strong></strong></li>
</ul>
<p>Do not use this convention just to distinguish between different types of items, for instance Rock_Small, Rock_Large should be SmallRock, LargeRock.</p>
<h3>Structure</h3>
<p>The organisation of your scenes, project folder, and script folder should follow a similar pattern.</p>
<h4>Folder Structure</h4>
<pre>Materials
GUI
Effects
Meshes
   Actors
      DarkVampire
      LightVampire
      ...
   Structures
      Buildings
      ...
   Props
      Plants
      ...
   ...
Plugins
Prefabs
   Actors
   Items
   ...
Resources
   Actors
   Items
   ...
Scenes
   GUI
   Levels
   TestScenes
Scripts
Textures
GUI
Effects
...</pre>
<h4>Scene Structure</h4>
<pre>Cameras
Dynamic Objects
Gameplay
   Actors
   Items
   ...
GUI
   HUD
   PauseMenu
   ...
Management
Lights
World
   Ground
   Props
   Structure
   ...</pre>
<h4>Scripts Folder Structure</h4>
<pre>ThirdParty
   ...
MyGenericScripts
   Debug
   Extensions
   Framework
   Graphics
   IO
   Math
   ...
MyGameScripts
   Debug
   Gameplay
      Actors
      Items
      ...
   Framework
   Graphics
   GUI
   ...</pre>
<h2>How to Re-implement Inspector Drawing</h2>
<h3>1. Define a base class for all your editors</h3>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;">BaseEditor<span style="color: #008000;">&lt;</span>T<span style="color: #008000;">&gt;</span> <span style="color: #008000;">:</span> Editor 
<span style="color: #0600FF; font-weight: bold;">where</span> T <span style="color: #008000;">:</span> MonoBehaviour
<span style="color: #008000;">&#123;</span>
   <span style="color: #0600FF; font-weight: bold;">override</span> <span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> OnInspectorGUI<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
   <span style="color: #008000;">&#123;</span>
      T data <span style="color: #008000;">=</span> <span style="color: #008000;">&#40;</span>T<span style="color: #008000;">&#41;</span> target<span style="color: #008000;">;</span>
&nbsp;
      GUIContent label <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> GUIContent<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
      label<span style="color: #008000;">.</span><span style="color: #0000FF;">text</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Properties&quot;</span><span style="color: #008000;">;</span> <span style="color: #008080; font-style: italic;">//</span>
&nbsp;
      DrawDefaultInspectors<span style="color: #008000;">&#40;</span>label, data<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
      <span style="color: #0600FF; font-weight: bold;">if</span><span style="color: #008000;">&#40;</span>GUI<span style="color: #008000;">.</span><span style="color: #0000FF;">changed</span><span style="color: #008000;">&#41;</span>
      <span style="color: #008000;">&#123;</span>         
         EditorUtility<span style="color: #008000;">.</span><span style="color: #0000FF;">SetDirty</span><span style="color: #008000;">&#40;</span>target<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
      <span style="color: #008000;">&#125;</span>
   <span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<h3>2. Use reflection and recursion to do draw components</h3>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #0600FF; font-weight: bold;">static</span> <span style="color: #6666cc; font-weight: bold;">void</span> DrawDefaultInspectors<span style="color: #008000;">&lt;</span>T<span style="color: #008000;">&gt;</span><span style="color: #008000;">&#40;</span>GUIContent label, T target<span style="color: #008000;">&#41;</span>
   <span style="color: #0600FF; font-weight: bold;">where</span> T <span style="color: #008000;">:</span> <span style="color: #008000;">new</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
   EditorGUILayout<span style="color: #008000;">.</span><span style="color: #0000FF;">Separator</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
   Type type <span style="color: #008000;">=</span> <span style="color: #008000;">typeof</span><span style="color: #008000;">&#40;</span>T<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>      
   FieldInfo<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> fields <span style="color: #008000;">=</span> type<span style="color: #008000;">.</span><span style="color: #0000FF;">GetFields</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
   EditorGUI<span style="color: #008000;">.</span><span style="color: #0000FF;">indentLevel</span><span style="color: #008000;">++;</span>
&nbsp;
   <span style="color: #0600FF; font-weight: bold;">foreach</span><span style="color: #008000;">&#40;</span>FieldInfo field <span style="color: #0600FF; font-weight: bold;">in</span> fields<span style="color: #008000;">&#41;</span>
   <span style="color: #008000;">&#123;</span>
      <span style="color: #0600FF; font-weight: bold;">if</span><span style="color: #008000;">&#40;</span>field<span style="color: #008000;">.</span><span style="color: #0000FF;">IsPublic</span><span style="color: #008000;">&#41;</span>
      <span style="color: #008000;">&#123;</span>
         <span style="color: #0600FF; font-weight: bold;">if</span><span style="color: #008000;">&#40;</span>field<span style="color: #008000;">.</span><span style="color: #0000FF;">FieldType</span> <span style="color: #008000;">==</span> <span style="color: #008000;">typeof</span><span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">int</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
         <span style="color: #008000;">&#123;</span>
            field<span style="color: #008000;">.</span><span style="color: #0000FF;">SetValue</span><span style="color: #008000;">&#40;</span>target, EditorGUILayout<span style="color: #008000;">.</span><span style="color: #0000FF;">IntField</span><span style="color: #008000;">&#40;</span>
            MakeLabel<span style="color: #008000;">&#40;</span>field<span style="color: #008000;">&#41;</span>, <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">int</span><span style="color: #008000;">&#41;</span> field<span style="color: #008000;">.</span><span style="color: #0000FF;">GetValue</span><span style="color: #008000;">&#40;</span>target<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
         <span style="color: #008000;">&#125;</span>   
         <span style="color: #0600FF; font-weight: bold;">else</span> <span style="color: #0600FF; font-weight: bold;">if</span><span style="color: #008000;">&#40;</span>field<span style="color: #008000;">.</span><span style="color: #0000FF;">FieldType</span> <span style="color: #008000;">==</span> <span style="color: #008000;">typeof</span><span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">float</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
         <span style="color: #008000;">&#123;</span>
            field<span style="color: #008000;">.</span><span style="color: #0000FF;">SetValue</span><span style="color: #008000;">&#40;</span>target, EditorGUILayout<span style="color: #008000;">.</span><span style="color: #0000FF;">FloatField</span><span style="color: #008000;">&#40;</span>
            MakeLabel<span style="color: #008000;">&#40;</span>field<span style="color: #008000;">&#41;</span>, <span style="color: #008000;">&#40;</span><span style="color: #6666cc; font-weight: bold;">float</span><span style="color: #008000;">&#41;</span> field<span style="color: #008000;">.</span><span style="color: #0000FF;">GetValue</span><span style="color: #008000;">&#40;</span>target<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
         <span style="color: #008000;">&#125;</span>
&nbsp;
         <span style="color: #008080; font-style: italic;">///etc. for other primitive types</span>
&nbsp;
         <span style="color: #0600FF; font-weight: bold;">else</span> <span style="color: #0600FF; font-weight: bold;">if</span><span style="color: #008000;">&#40;</span>field<span style="color: #008000;">.</span><span style="color: #0000FF;">FieldType</span><span style="color: #008000;">.</span><span style="color: #0000FF;">IsClass</span><span style="color: #008000;">&#41;</span>
         <span style="color: #008000;">&#123;</span>
            Type<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> parmTypes <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Type<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#123;</span> field<span style="color: #008000;">.</span><span style="color: #0000FF;">FieldType</span><span style="color: #008000;">&#125;</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #6666cc; font-weight: bold;">string</span> methodName <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;DrawDefaultInspectors&quot;</span><span style="color: #008000;">;</span>
&nbsp;
            MethodInfo drawMethod <span style="color: #008000;">=</span> 
               <span style="color: #008000;">typeof</span><span style="color: #008000;">&#40;</span>CSEditorGUILayout<span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">GetMethod</span><span style="color: #008000;">&#40;</span>methodName<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #0600FF; font-weight: bold;">if</span><span style="color: #008000;">&#40;</span>drawMethod <span style="color: #008000;">==</span> <span style="color: #0600FF; font-weight: bold;">null</span><span style="color: #008000;">&#41;</span>
            <span style="color: #008000;">&#123;</span>
               Debug<span style="color: #008000;">.</span><span style="color: #0000FF;">LogError</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;No method found: &quot;</span> <span style="color: #008000;">+</span> methodName<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #008000;">&#125;</span>
&nbsp;
            <span style="color: #6666cc; font-weight: bold;">bool</span> foldOut <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">;</span>
&nbsp;
            drawMethod<span style="color: #008000;">.</span><span style="color: #0000FF;">MakeGenericMethod</span><span style="color: #008000;">&#40;</span>parmTypes<span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Invoke</span><span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">null</span>, 
               <span style="color: #008000;">new</span> <span style="color: #6666cc; font-weight: bold;">object</span><span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span>
               <span style="color: #008000;">&#123;</span>
                  MakeLabel<span style="color: #008000;">&#40;</span>field<span style="color: #008000;">&#41;</span>,
                  field<span style="color: #008000;">.</span><span style="color: #0000FF;">GetValue</span><span style="color: #008000;">&#40;</span>target<span style="color: #008000;">&#41;</span>
               <span style="color: #008000;">&#125;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
         <span style="color: #008000;">&#125;</span>      
         <span style="color: #0600FF; font-weight: bold;">else</span>
         <span style="color: #008000;">&#123;</span>
            Debug<span style="color: #008000;">.</span><span style="color: #0000FF;">LogError</span><span style="color: #008000;">&#40;</span>
               <span style="color: #666666;">&quot;DrawDefaultInspectors does not support fields of type &quot;</span> <span style="color: #008000;">+</span>
               field<span style="color: #008000;">.</span><span style="color: #0000FF;">FieldType</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
         <span style="color: #008000;">&#125;</span>
      <span style="color: #008000;">&#125;</span>         
   <span style="color: #008000;">&#125;</span>
&nbsp;
   EditorGUI<span style="color: #008000;">.</span><span style="color: #0000FF;">indentLevel</span><span style="color: #008000;">--;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>The above method uses the following helper:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF; font-weight: bold;">private</span> <span style="color: #0600FF; font-weight: bold;">static</span> GUIContent MakeLabel<span style="color: #008000;">&#40;</span>FieldInfo field<span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
   GUIContent guiContent <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> GUIContent<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>      
   guiContent<span style="color: #008000;">.</span><span style="color: #0000FF;">text</span> <span style="color: #008000;">=</span> field<span style="color: #008000;">.</span><span style="color: #0000FF;">Name</span><span style="color: #008000;">.</span><span style="color: #0000FF;">SplitCamelCase</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>      
   <span style="color: #6666cc; font-weight: bold;">object</span><span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span> descriptions <span style="color: #008000;">=</span> 
      field<span style="color: #008000;">.</span><span style="color: #0000FF;">GetCustomAttributes</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">typeof</span><span style="color: #008000;">&#40;</span>DescriptionAttribute<span style="color: #008000;">&#41;</span>, <span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
   <span style="color: #0600FF; font-weight: bold;">if</span><span style="color: #008000;">&#40;</span>descriptions<span style="color: #008000;">.</span><span style="color: #0000FF;">Length</span> <span style="color: #008000;">&gt;</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">&#41;</span>
   <span style="color: #008000;">&#123;</span>
      <span style="color: #008080; font-style: italic;">//just use the first one.</span>
      guiContent<span style="color: #008000;">.</span><span style="color: #0000FF;">tooltip</span> <span style="color: #008000;">=</span> 
         <span style="color: #008000;">&#40;</span>descriptions<span style="color: #008000;">&#91;</span><span style="color: #FF0000;">0</span><span style="color: #008000;">&#93;</span> <span style="color: #0600FF; font-weight: bold;">as</span> DescriptionAttribute<span style="color: #008000;">&#41;</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Description</span><span style="color: #008000;">;</span>
   <span style="color: #008000;">&#125;</span>
&nbsp;
   <span style="color: #0600FF; font-weight: bold;">return</span> guiContent<span style="color: #008000;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>Note that it uses an annotation in your class code to generate a tooltip in the inspector.</p>
<h3>3. Define new Custom Editors</h3>
<p>Unfortunately, you will still need to define a class for each MonoBehaviour. Fortunately, these definitions can be empty; all the actual work is done by the base class.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008000;">&#91;</span>CustomEditor<span style="color: #008000;">&#40;</span><span style="color: #008000;">typeof</span><span style="color: #008000;">&#40;</span>MyClass<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#93;</span>
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> MyClassEditor <span style="color: #008000;">:</span> BaseEditor<span style="color: #008000;">&lt;</span>MyClass<span style="color: #008000;">&gt;</span>
<span style="color: #008000;">&#123;</span><span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>In theory this step can be automated, but I have not tried it.</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://devmag.org.za/2012/07/12/50-tips-for-working-with-unity-best-practices/feed/</wfw:commentRss>
		<slash:comments>66</slash:comments>
		</item>
		<item>
		<title>I Want to Be a Game Artist!</title>
		<link>http://devmag.org.za/2012/06/26/i-want-to-be-a-game-artist-2/</link>
		<comments>http://devmag.org.za/2012/06/26/i-want-to-be-a-game-artist-2/#comments</comments>
		<pubDate>Tue, 26 Jun 2012 08:24:14 +0000</pubDate>
		<dc:creator>Jonathan Hau Yoon</dc:creator>
				<category><![CDATA[Art]]></category>
		<category><![CDATA[Education]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[tertiary education]]></category>

		<guid isPermaLink="false">http://devmag.org.za/?p=4608</guid>
		<description><![CDATA[<br/>Tips for growing as a game artist and finding work in the game industry.<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></description>
				<content:encoded><![CDATA[<br/><p><img style="float: none; margin-left: auto; margin-right: auto; border: 0px;" src="http://devmag.org.za/blog/wp-content/uploads/2012/06/IWantToBeAGameArtist1.png" alt="platfrom_banner" width="680" height="341" border="0" /><br />
That&#8217;s great! You&#8217;ll be flinging digital paint and shooting vertices, and making the game art world more beautiful as you go! But wait — a word of advice before you jump on the realtime rendering railway: you need three pieces of essential kit!</p>
<p><span id="more-4608"></span>Firstly, you need <strong>Artist Goggles</strong>. These art-tinted lenses directly affect the quality of your work by allowing you to look at your own and other people&#8217;s&nbsp;work and see what could make it more beautiful. They are also what all other artists will judge you by, and have a direct and overwhelming influence on your art portfolio — the key to getting yourself a job in the front lines! A sound knowledge of art principles, a great visual library, and having a thousand pieces of art to your name will keep your Goggles crystal clear.</p>
<p>You&#8217;ll also need the <strong>Map of Contraints</strong>. This map allows you to check whether your art can fit into a game on a technical level. As a game artist, your work needs to run in a game engine where lots of things need to be shown in real-time. Knowing how to optimize your art for games means freeing up resources that can be used for even <em>more</em> art, special effects, and other eyegasmic goodness.</p>
<p>Lastly, you&#8217;ll need <strong>Design Slippers</strong>, gained from the experiences of playing, studying and building game worlds. You&#8217;ll want to have thought about design, and how your art can help to craft great game experiences.</p>
<h2>I want me those Art Goggles!</h2>
<p>You upgrade your Art Goggles by gaining Art XP, which you earn by <strong>making art</strong>. It doesn&#8217;t really matter what kind of art you&#8217;re making, in any medium, as all art will improve&nbsp;your Art Goggles. However, some activities will earn you an XP BOOST. The most basic and most powerful one is drawing. <strong>Drawing</strong> teaches many art fundamentals that are vital to your XP growth, including (but not limited to!): gesture (the energy!), value (contrasts of light and dark), texture (what materials things are made of), form (describing things you&#8217;ve observed in the real, 3D world, on a 2D canvas, and using lighting and shading to get things looking good) and composition (how these all tie together).</p>
<p><strong>Painting</strong>&#8216;s also a great thing to learn, as it requires all of the above, but adds the concept of colour: how they work together, and how they (together with lighting) control the mood of your game.<strong></strong></p>
<p><strong>Photography</strong>&#8216;s also a great skill, often undervalued. Everything we see is made up of light, so studying how light behaves, different light setups for different situations and for bringing out the best of your subject matter, and how lighting can be used in composition are especially vital for environment work.<strong></strong></p>
<p><strong>Sculpting</strong> is also a great skill, particularly if you&#8217;re interested in being a 3D game artist.</p>
<p>While you may want to jump right into learning software, it&#8217;s a good idea to <strong>learn art independently to (and before) learning software</strong>. Learning software can be frustrating and slow your Art XP growth. You may find yourself spending more time trying to figure out how to do things using digital media than polishing your Art Goggles, so your work may end up looking shoddy, and you may not know why. While you&#8217;ll probably need to learn some software somewhere along the line, it shouldn&#8217;t be the focus of your efforts. Traditional media provide a more direct way of upgrading your Art Goggles.</p>
<p>Lastly, you&#8217;ll also want to <strong>grow your visual library</strong>. This means watching documentaries, reading books and being interested in the world around you. These are akin to allowing your Goggles to see a wider spectrum of colours. If you&#8217;ve studied anatomy, you can use that knowledge in your characters. If you&#8217;re a fan of WW2 weapons, you&#8217;ll make much more convincing guns. Having a great visual library means you don&#8217;t need to search for reference images as often (because you&#8217;ve got them in your head), and you&#8217;ll have lots of ideas to draw from (lolpun) when you&#8217;re making your game art.</p>
<h2>I want to make digital work!</h2>
<p>The software you learn should match the studios or teams you wish to join. In South Africa, <strong>Softimage</strong> (also called XSI) has a massive hold in the vast majority of 3D studios in film and advertising. If there isn&#8217;t enough game art work (our industry is still small, although growing) it will be really easy to transition to offline rendering jobs. (It&#8217;s generally quite easy to move from games to another 3D industry, because you&#8217;re working with fewer constraints; it&#8217;s generally harder to move the other way around. There are exceptions.) <strong>3ds Max</strong> is very popular in the visualization industry (product viz, arch viz). <strong>Maya</strong> has rapidly grown into an immensely popular package overseas because of it&#8217;s great toolset and extensibility in character animation, but only a handful of studios use it locally. <strong>Blender</strong> is free, and competent. <strong>ZBrush</strong> and <strong>Mudbox</strong> are widely used for sculpting and texture painting. You&#8217;ll also need a 2D app for painting textures for your 3D assets.</p>
<p>For 2D, <strong>Photoshop</strong> is by far the dominant software. However, most 2D programs can also handle Photoshop files, and there are far fewer issues with file compatibility in 2D than there is in 3D programs. You can probably get away with using <strong>whatever you&#8217;re comfortable with</strong>.</p>
<p>Many of the above software have educational versions (some of which are free) if you&#8217;re registered at a recognized school. If not, the free, open source stuff is great for learning, and once you&#8217;ve mastered them, switching to one of the others only takes a couple of weeks.</p>
<p>However, realize that <strong>if your Art Goggles are poorly maintained, your work will suffer tremendously regardless of what software you use</strong>. Although teams may build their own tools specific to the games they&#8217;re working on, there are only ever &#8220;magic buttons&#8221; for working faster &#8212; there are none that will make your art look better. It&#8217;s a good thing to be familiar with several packages, but it&#8217;s a great thing to be a specialist with at least one. Learning another package when one is already highly proficient with one already is a breeze.</p>
<h2>I want to study!</h2>
<p>There are a few things you should think about before signing up to any ol&#8217; 3D/art course. Firstly, realize that <strong>no school (to my knowledge) will teach you everything you&#8217;ll need to know when you&#8217;re working</strong>. It&#8217;s important to take an honest look at yourself, and see what you really want to get help with, and then look at what it is each school offers. Is it important to have a degree? (While this helps with work visas and emigration, the degree itself matters very little compared to your portfolio. Having options <em>is</em> nice though.) Are you looking for software training? Are you looking for help with upgrading your Goggles? (Most 3D courses seem to focus on the former, although a handful of courses do emphasize the importance of drawing.) Look at breakdowns of courses and see which needs they&#8217;re meeting.</p>
<p>Look at <strong>who&#8217;s lecturing</strong> the course. While you can get some mileage out of someone who&#8217;s really good at lecturing but has no real industry experience, I believe you can get much more out of someone who&#8217;s got industry experience but is a poor lecturer. You&#8217;ll have to work harder to get all the information you want, but at least the answers you&#8217;re getting are tried and tested. If a course description doesn&#8217;t mention who the lecturer is, that should be a big red flag.</p>
<p>Look for <strong>past students&#8217; work</strong>, and consider whether their work is better than you could do on your own. Ask about past students finding work in the game industry. (If you&#8217;re given names and names of studios, think about tracking down their details and asking them about the course.) Ask them, out of interest, how much of what they know came from the content the school covered, and how much they had to teach themselves.</p>
<p>Look for <strong>opportunities to intern</strong>. If it&#8217;s a good studio with artists that have been making game art for a few years, simply watching them work for 15 minutes a day will teach you countless methods of making assets faster, using not-so-obvious tools you may not have noticed before, workarounds to problematic software problems, how artists and programmers interact and how you would fit in in a game dev environment, and many other gems that you&#8217;re extremely unlikely to learn about in a school environment.</p>
<p>Finally, it definitely is <strong>possible to teach yourself</strong> everything you need to know without spending a fortune (if you spend some &nbsp;time interning too). Tutorials and software training given by globally respected industry pros can be purchased from many online stores. (Some good ones include The Gnomon Workshop, Eat3D and, if you&#8217;re an absolute beginner, DigitalTutors.) Realize that polishing your Goggles daily should be something you crave (I must draaaaw! Something like the <a title="MakeGamesSA Sketch Group Thread" href="http://makegamessa.com/discussion/9/makegames-sketchgroup" target="_blank">MakeGamesSA Sketch group</a> may encourage you).</p>
<p><strong>Feedback from industry veterans </strong>is also vital. (I highly recommend getting feedback and seeing what other people do on <a title="Polycount" href="http://www.polycount.com" target="_blank">Polycount</a>, where large number of members are working professionals, and there&#8217;s a culture of honest critique.) Even if you do attend a school, all of these self-teaching tools will help to push you even further, and are highly recommended.</p>
<p>That said, schools are useful though, for networking, for having deadlines that encourage discipline, for traditional art classes (if they offer this), and for being pushed to do things you wouldn&#8217;t normally be comfortable with that ultimately improve your versatility as an artist (mileage also varies per school). Having your own &#8220;style&#8221; is great if you&#8217;re pursuing fine art. However, having your own style because you can&#8217;t do anything else limits your usefulness as a production artist enormously. Good art schools don&#8217;t allow you to make the &#8220;but that&#8217;s my style&#8221; excuse. If you&#8217;re going the self-taught route, recognize these weaknesses and find ways to make up for them.</p>
<h2>I want a game art job!</h2>
<p>You nee a <strong>portfolio</strong>! Every employer, whether they&#8217;re an indie group or a giant corporation needs to see evidence that you can pull off the work that they&#8217;ll need you to be able to do. Make sure your portfolio matches the kind of studio you&#8217;re heading to, whether it&#8217;s pixel art, digital paintings or 3D. Some quick and dirty tips about putting together a portfolio:</p>
<ul>
<li>Only include your <strong>best work</strong>. It&#8217;s better to have <em>one</em> truly stellar piece of work than a lot of mediocre work.</li>
<li>If you know which studio you&#8217;re trying to get into, <strong>make work that is relevant</strong> to them. You should be able to hold your work up next to a shot of one of their games, and honestly tell yourself that your work would easily fit there, and look just as good, or better.</li>
<li><strong>Answer questions</strong> with your work. (Example questions might include: Does this person understand lighting? Does this person understand anatomy? Will this person be able to create good quality work on a tight deadline? Does this person understand the constraints of getting her work into a game engine? Answers to these questions might include full environment pieces, anatomy studies, competition entries and captures from a real-time renderer, respectively. Which questions you prioritize depends on what kind of artist you want to be.)</li>
</ul>
<p>Also realize that the majority of positions are filled by referrals or word-of-mouth. It&#8217;s a really good idea to <strong>be involved</strong> in game communities, to <strong>show work</strong> regularly, to <strong>take feedback and critique professionally</strong> (regardless of how savage the feedback might be), and to be the person that people think of when a position pops up. Don&#8217;t be isolated, or nobody will even know you&#8217;re keen for a job.</p>
<h2>Further reading</h2>
<ul>
<li><a href="http://wiki.polycount.com/">The Polycount wiki</a>. <strong>&nbsp;</strong>Many of these FAQs are answered there in more detail.</li>
<li><a href="http://conceptart.org/wiki/doku.php">The ConceptArt wiki</a>. Awesome for those wanting to improve their Art Goggles.</li>
</ul>
<h2>Local schools</h2>
<p>A comprehensive list of art/3D/animation schools in South Africa can be found at <a href="http://www.animationsa.org/training-education/schools" target="_blank">AnimationSA</a>. I&#8217;m making no recommendations —&nbsp;but it&#8217;s probably a good idea to filter them using the stuff in this article before you sign up. <img src='http://devmag.org.za/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<h2>Header image</h2>
<p><a href="http://ambassadormann.deviantart.com/art/Steampunk-Goggles-11-1-166924592">http://ambassadormann.deviantart.com/art/Steampunk-Goggles-11-1-166924592</a></p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://devmag.org.za/2012/06/26/i-want-to-be-a-game-artist-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Loopholes in Game Design</title>
		<link>http://devmag.org.za/2012/05/07/loopholes-in-game-design/</link>
		<comments>http://devmag.org.za/2012/05/07/loopholes-in-game-design/#comments</comments>
		<pubDate>Mon, 07 May 2012 16:00:20 +0000</pubDate>
		<dc:creator>Julian Pritchard</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[exploits]]></category>
		<category><![CDATA[game design]]></category>
		<category><![CDATA[loopholes]]></category>

		<guid isPermaLink="false">http://devmag.org.za/?p=4531</guid>
		<description><![CDATA[<br/>Loopholes: what they are, how to find them, how to fix them, and a big list of generic loopholes in games.<div class='yarpp-related-rss'>
<h2>Related posts:</h2>
<ol>
<li><a href='http://devmag.org.za/2009/08/31/minimised-game-design-for-indies/' rel='bookmark' title='Minimised game design for indies'>Minimised game design for indies</a> <small>When you sit down to write a book, one of...</small></li>
<li><a href='http://devmag.org.za/2011/02/02/video-game-user-interface-design-diegesis-theory/' rel='bookmark' title='Video game user interface design: Diegesis theory'>Video game user interface design: Diegesis theory</a> <small>In this article, the Dave Russell introduces the basic concepts...</small></li>
<li><a href='http://devmag.org.za/2011/02/16/board-silly-tabletop-game-design/' rel='bookmark' title='Board Silly (Tabletop Game Design)'>Board Silly (Tabletop Game Design)</a> <small>Two Dev.Mag writers share their board game design experiences: conception,...</small></li>
<li><a href='http://devmag.org.za/2011/03/03/desktop-dungeons-design-analysis-part-1/' rel='bookmark' title='Desktop Dungeons: Design Analysis (Part 1)'>Desktop Dungeons: Design Analysis (Part 1)</a> <small>This is the first part of an in-depth look at...</small></li>
<li><a href='http://devmag.org.za/2012/02/13/game-design-on-ideas/' rel='bookmark' title='Game Design: On Ideas'>Game Design: On Ideas</a> <small>In this article, Julian Pritchard gives us his take on...</small></li>
<li><a href='http://devmag.org.za/2011/03/23/desktop-dungeons-design-analysis-part-2/' rel='bookmark' title='Desktop Dungeons: Design Analysis (Part 2)'>Desktop Dungeons: Design Analysis (Part 2)</a> <small>In this second part of analyzing Desktop Dungeons, we look...</small></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<br/><p><img style="display: block; float: none; margin-left: auto; margin-right: auto; border: 0px;" title="platfrom_banner" src="http://devmag.org.za/blog/wp-content/uploads/2012/03/loopholes.png" alt="platfrom_banner" width="680" height="341" border="0" /><br />
I had just finished working on my latest card game; I was rather chuffed with it: the rules were elegant and nuanced: there was a wealth of strategies you could use in the game. I explained the rules to two friends, and they began to play. I was expecting them to be amazed with the game.</p>
<p>Instead, <em>I</em> was amazed with how one had managed to find a neat little trick to <em>— </em>unexpectedly <em>— </em>win the game: a loophole!</p>
<p>After the discovery, the game was never the same. I eventually decided to change the card game into a board game so that the game could keep my original idea, but without the loophole.</p>
<p>After the change in my game, I became obsessed with loopholes in games. I began to research them and find how they could affect games. In this article, I summarize my research. This article covers what loopholes are, and why they are bad, with a big list of generic types of loopholes that can be found in games. The article also gives some advice on how to find and correct these nasty little game breakers.<br />
<span id="more-4531"></span></p>
<h2><a name="h.6okvlirwdmw2"></a>What a loophole is</h2>
<p style="text-align: right;"><em>If something can be abused, it will be.</em></p>
<p style="text-align: right;"><em></em><em>— </em>Hyrop’s Law of Loopholes</p>
<blockquote><p>A loophole can be defined as a flaw in the system that users can exploit to gain an unfair or unintended advantage.</p></blockquote>
<p>[Fullerton, <a href="http://www.amazon.com/Game-Design-Workshop-Second-Edition/dp/0240809742/ref=sr_1_1?s=books&amp;ie=UTF8&amp;qid=1336031450&amp;sr=1-1">Game Design Workshop</a>]</p>
<p>Loopholes are often the result of <a href="http://en.wikipedia.org/wiki/Emergent_gameplay">emergence</a>; two or more rules acting together to make something possible that was not thought possible. Loopholes arise when the game rules don’t completely limit or enforce the legal behaviour.</p>
<p>Players find loopholes when they know the rules very well, or by accident. However they find it, the result is always the same: they will use the loophole, regardless of whether it makes the game more fun. A pointed example of players grinding away instead of having fun is with <a href="http://www.gamasutra.com/blogs/GregMcClanahan/20091202/3709/Achievement_Design_101.php">achievement</a> farming.</p>
<p>When given a task, players will find the optimal solutions, even if it ruins their fun. Finding optimal solutions is part of playing the game — it is the designer’s responsibility to create the necessary challenges for an interesting solution; this burden is never the player’s.</p>
<p>Loopholes lead to unwanted player behaviour; the named loopholes discussed below are all words for things the player can do, but the designer does not (usually) want.</p>
<h2><a name="h.4huziveiaomj"></a>Related Concepts</h2>
<p>Loopholes are degenerate strategies to play the game. Among all available strategies, a <strong>dominant strategy</strong> has the best chance of leading to success. A <strong>degenerate strategy </strong>is a dominant strategy that <em>always </em>leads to success. (Not all dominant strategies are degenerate: the <a href="http://en.wikipedia.org/wiki/Prisoners_dilemma">prisoner’s dilemma</a> is a classical example.)</p>
<p>Loopholes are often bugs, but only bugs that can be exploited by the player are loopholes.</p>
<p>Many loopholes are <a href="http://en.wikipedia.org/wiki/Sequence_breaking">sequence breakers</a> (that is, they allow the player to experience events in a different order than was intended), but only sequence breaks that benefit the player are loopholes.</p>
<p>Many loopholes are exploits — ways to play the game that goes against the spirit of the game. But not all exploits are loopholes. For example, some exploits require special tools for hacking the game. These are generally considered cheating.</p>
<h2><a name="h.acbdqwh0nzbq"></a>Examples of loopholes</h2>
<p>In <a href="http://supergiantgames.com/?page_id=242"><em>Bastion</em></a>, players can deliberately fall off a barge, forcing the game to respawn them in a non-combative state on a moving barge. In this way, players can traverse part of the level without having to engage in combat. A secondary effect of this loophole is that the narrator does not realise what’s happening; he happily talks about combat as if it is still happening.</p>
<p>In an earlier version of <em><a href="http://www.desktopdungeons.net/">Desktop Dungeons</a></em>, there was three altars in each dungeon. Each of these altars randomly selected one god from a possible nine <a href="http://www.qcfdesign.com/wiki/DesktopDungeons/index.php?title=Full:Gods">gods</a>. These gods were unlocked one-by-one through quests. Players realised that if they have only unlocked three gods, they could know which three gods would spawn with certainty. Thus, the randomness of gods was removed. The developers have since fixed this loophole by making only one altar available in a dungeon until the player has unlocked four gods.</p>
<p>In <em><a href="http://en.wikipedia.org/wiki/Rock_of_Ages_(video_game)">Rock of Ages</a></em> it is <a href="http://www.youtube.com/watch?v=gvM-pM4RVTk">possible</a> for a rock to hit the door, and then bounce off the pathway. The game then places the rock back on the pathway, allowing the player to hit the door twice with only running the course once. This is a detrimental loophole because the game requires the player to traverse a course before they can hit the door.</p>
<p>In <em>Magic The Gathering </em>the <em>Chaos Orb</em> card removes any card it landed on from play. Some players would tear it up and sprinkle it on their opponents cards to remove multiple cards from play. When a player tried this the first time, the <a href="http://www.wizards.com/Magic/Magazine/Article.aspx?x=mtgcom/askwizards/1202">judges ruled it legal</a>, since there was no rule against tearing the card up.</p>
<p><em>Fallout 3</em> has a loophole where the player may skip a large portion of the game by <a href="http://www.youtube.com/watch?v=8RiwiAlAQNI&amp;feature=watch_response">going straight to one city (<em>The Citadel</em>), and then using any item to jump</a> into the city, instead of completing the quests to get inside.<em></em></p>
<p>In <em>The Elder Scrolls V: Skyrim</em> a player can place a <a href="http://www.gamebandits.com/news/the-elder-scrolls-5-skyrim-howard-likes-the-bucket-exploit-25542/">bucket on NPC’s</a> head and rob him blind without the NPC realising it.</p>
<p>In <em>Deus Ex</em> players could uses <a href="http://deusex.wikia.com/wiki/LAM">LAMs</a>, a grenade which could be placed as a proximity mine, as a ladder. This allowed players into areas in ways that were not intended.</p>
<p>A ten year old hacker exposed the following generic loophole at <a href="http://www.gev.com/2011/08/ten-year-old-hacker-finds-loopholes-in-mobile-games/">DefCon</a>: in social games that run on mobile devices, you can set the time forward and receive reward without having to wait for it.</p>
<p>More examples:</p>
<ul>
<li><a href="http://www.gamefaqs.com/pc/564621-sid-meiers-civilization/faqs/1847">Loopholes in Sid Meyer’s Civilisation IV</a></li>
<li><a href="http://elder-scrolls.alteredgamer.com/tes-5-skyrim/126742-gaming-the-system-how-to-level-up/">Loopholes in Skyrim (levelling up)</a></li>
<li><a href="http://epicodes.com/games/how-to-get-ahead-in-the-sims-3/">Loopholes in The Sims 3 </a></li>
<li><a href="http://www.8bitrocket.com/2012/03/16/going-into-space-mode-playing-with-video-games-in-ways-that-were-not-originally-intended-to-be-played/">Playing games in different ways</a></li>
</ul>
<div style="text-align: center;"><img class="alignnone" src="http://imgs.xkcd.com/comics/meerkat.jpg" alt="" width="400" height="334" /></div>
<p style="text-align: center;" dir="ltr"><a href="http://www.xkcd.com/115">Image from xkcd.com/115</a></p>
<p>&nbsp;</p>
<h2><a name="h.l2vkqfkfwzra"></a>Why loopholes are bad</h2>
<p>According to <a href="http://books.google.co.za/books?id=-BCrex2U1XMC&amp;lpg=PP1&amp;dq=adams%20fundamentals%2C%20challenge&amp;pg=PA11#v=onepage&amp;q&amp;f=false">Adams</a>, gameplay is</p>
<ul>
<li> The challenges a player must face to arrive at the object of the game.</li>
<li> The actions the player is permitted to take to address those challenges.</li>
</ul>
<p>Loopholes interfere with both these aspects of gameplay.</p>
<p><strong>They remove the challenge of the game.</strong> As mentioned earlier, players will take the easiest path towards their goal. A loophole introduces a new, easier path, effectively removing the path of challenge the designer intended. Without challenge, the gameplay is ruined.<strong></strong></p>
<p><strong>They remove <strong id="internal-source-marker_0.06049521756358445"><a href="http://thegameprodigy.com/to-be-or-not-to-be-ingredients-for-meaningful-choice-in-games/">meaningful choice</a></strong></strong><strong>. </strong>Loopholes mess with the balance of the game, and an unbalanced choice is almost always a no-brainer. The existence of a loophole limits the range of interesting actions the player can take..<strong></strong></p>
<p>There are two additional reasons why loopholes are bad.</p>
<p><strong>They remove fairness </strong>in multiplayer games. A game that is not fair is not fun, because all players would have to use the loophole to stay competitive. Designers should always strive to <a href="http://www.sirlin.net/articles/balancing-multiplayer-games-part-3-fairness.html">make games fair</a>.<strong></strong></p>
<p><strong>They can break the fourth wall.</strong> When a player uses a loophole, the game reacts in a way that exposes its limitations and underlying machinery. This can remove the sense of atmosphere and story from the game, because things no longer make sense without looking outside the magic circle. The narrator glitch in Bastion mentioned above is the perfect example.</p>
<h2><a name="h.mlisc8arm8ot"></a>General types of loophole</h2>
<p>The following behaviours can occur in any type of game. Many games rely on these behaviours for their gameplay, but when they were not the behaviours intended by the game designer, they show a loophole.</p>
<p><strong>Memorizing </strong>is when the game or game AI follows patterns that players can memorize.<strong></strong></p>
<p><em>Pac-Man </em>is famous for this — instead of responding to enemy behaviour, the best players memorize sequences of moves they have to make to complete a level.<em></em></p>
<p>The easiest way to avoid players from memorizing game events is to introduce a random element in the game, either in AI behaviour, or item and AI placement, or even just in the timing of the AI.</p>
<p><strong>Predicting</strong> is when the player can learn the logic of the AI, and easily defeat it by predicting its next action.</p>
<p>Prediction can be avoided by introducing random elements as explained above, or making AI more nuanced (essentially, making it depend on more input variables).</p>
<p><strong>Brute forcing</strong> (also called <a href="http://www.whatgamesare.com/permutation-play.html">permutation play</a>) is a way of solving certain kinds of puzzles, usually where the player must figure out the correct combination of moves, digits, levers, buttons, or something similar (there are many of these kinds of puzzles in <em>Machinarium</em>, for example). <strong></strong></p>
<p>In some cases, brute force is the intended method of solution. But when the designer intends the player to use logic and clues provided to solve the puzzle, solving it by brute force is a loophole.</p>
<p>There are two ways to fix this:</p>
<ul>
<li> Add more combinations (for example, adding a lever to a puzzle doubles the number of possible solutions), so that brute force techniques become infeasible.</li>
<li> Make the logic or clues more transparent.</li>
</ul>
<p><strong>Pixel hunting</strong> is a special form of brute forcing that is common in point-and-click adventure games. Pixel hunting is where the player mouses over (or clicks, depending on the controls) the entire screen until a indicator pops up to show that they had found an interactive point. <strong></strong></p>
<p>Pixel hunting can occur in any game that highlights interactive points only when the mouse hovers over them or they are clicked, such as a FPS reticle turning red when passing over a hidden enemy.</p>
<p>In some cases making the player hunt for pixels is intentional, such as <a href="http://www.youtube.com/watch?v=cpB2RkrelQE">resource scanning in Mass Effect 2</a>.</p>
<p><strong>Hustling </strong>is when a player exploits the dynamic difficulty adjustment of a game by playing lower than her potential. This makes the game easier, and eventually allows the player an easy victory. This is similar to <a href="http://en.wikipedia.org/wiki/Hustling">pool hustling</a> in the “real world”.<strong></strong></p>
<p>Hustling is most common in the single-player mode of racing games. Racing games use dynamic difficulty adjustment, called <a href="http://tvtropes.org/pmwiki/pmwiki.php/Main/RubberBandAI">rubber band AI</a>, which adjusts the AI vehicles’ performance to match the player’s: the faster the player, the faster the AI.<em> </em>A player hustles by keeping in second place until the last lap (even if she <em>can </em>pass the first vehicle). With the player in second place, the game will not increase the difficulty; it thinks that the player is being challenged.</p>
<p>To fix rubberband exploits can be difficult. The racing game <em>Pure</em> uses a sophisticated <a href="http://www.gamasutra.com/view/feature/132313/the_pure_advantage_advanced_.php?page=1">alternative to the rubber band method</a>. The system dynamically sets the AI some distance ahead of the player from the start. This means that the player is continually playing catch-up throughout the race until the end, where she can narrowly beat the AI. Like with rubber band AI, the player is generally capable of victory, but she can’t hustle.</p>
<p><strong>Fortune hunting</strong> occurs in games with random level generation. The player briefly glances around the level to decide if they feel the level is easy enough for them to complete; if not, they simply restart the level in the hope of a more favourable one. Like the hustler, the fortune hunter is playing the game at a difficulty lower than the one that designer intended.<strong></strong></p>
<p>The designer can prevent fortune hunting in several ways:</p>
<ul>
<li> By normalizing level difficulty so that each randomly generated level is about the same level of difficulty (this can be hard, and requires a good understanding of statistics and the game mechanics).</li>
<li> By not allowing a new level to be generated until the previous one has been played.This requires that you can guarantee that all your levels are fair. Otherwise, a level may be generated that frustrates the player to the point of quitting the game permanently.</li>
<li> To make it more difficult to judge the level difficulty until the player has invested enough time not to want to quit the level.</li>
</ul>
<h2><a name="h.fsf0uts6bhh0"></a>Loopholes in FPSes</h2>
<p><strong>Edging</strong> is where the player stands around a corner and shoots a part of the enemy while the enemy can’t see the player. This loophole can be countered by having the enemy AI seek out the source of the damage.<strong></strong></p>
<p><strong>Picking</strong> is the same as edging, except that the player hops out from the corner, shoots, and returns to hiding. As with edging, this loophole can be corrected by making the AI move towards the players to attack.</p>
<p><strong>Wedging</strong> can be used on enemies with a short attack range: the player lodges an enemy in a place where it cannot attack her from. This allows the player to pick off this enemy with ease.</p>
<p>Ways to counter this loophole are to give the enemy a long range attack, to allow it a means to reach the player by fixing the level design or improve the AI, or to create entities which force the player towards it (using a rope, for example).</p>
<p><strong>Kiting </strong>is when the player can move faster or shoot further than the AI. This allows the player to move backwards and attack the AI while not receiving damage.<strong></strong></p>
<p><strong>Camping</strong> is when a player stations herself where enemies can’t see her, and attacks enemies from such a place. Camping is normally done from a distance and with a sniper weapon.</p>
<p>Simply making enemies return fire may cause the player to feel cheated. A proper solution is to make the enemies move towards the player. Another strategy (especially useful in multiplayer games) is to carefully design levels without any good camping spots, and give enough feedback so that players can learn the positions of campers, for example, the Heartbeat Sensors, Unmanned Arial Vehicles (UAVs), and KillCam in <em>Modern Warfare 2</em>.</p>
<p><strong>Splashing</strong> is similar to camping. The player positions herself far away from the enemy and shoots an object that does splash damage, such as a grenade, at the enemy. <strong></strong></p>
<p>The are two solutions to this problem: first, the AI can be made to avoid splash damage of oncoming missiles with a bit of physics math; second, the AI can be made to seek out the player who launched the attack.</p>
<p><strong>Serializing </strong>is when a player kills an entire group of enemies by picking them off one-by-one. This is typically happens in narrow spaces, or if the AI causes enemies to separate from the group. This is a loophole if the intention was to make it more difficult to take out groups, and give the player an opportunity to choose which enemies to take out first. <strong></strong></p>
<p>The simplest fix is for the enemy to trigger an alert state in the nearby enemies which allow them to move off in a group towards the player. The combat space also needs to be designed carefully to prevent serialisation.</p>
<h2><a name="h.p1p6esktufjy"></a>Loopholes in multiplayer games</h2>
<p><strong>Turtling </strong>happens in games with resources — typically strategy games — and there are more than two players. When two players engage in combat, both will consume resources. This puts the combatants at a disadvantage since they both lost resources in the engagement. In the meantime, the turtle is better off than both, since she did not need to spend any resources, giving her an advantage in the next combat against either player. <strong></strong></p>
<p>This effect can lead everyone in the game to play turtle, which of course prevents the game from moving forward. The solution is to encourage aggressive play by awarding the winner of each battle with enough resources to offset the losses suffered in that battle.</p>
<p><strong>Killing the leader</strong> occurs in games where a scoreboard is available during play. Players attack the leader, since she is the person most likely to win, often forming coalitions to achieve this goal.<strong></strong></p>
<p>With the multitude of players attacking the leader, it is likely that they may suffer damages to a point where they can’t recover from them, and they no longer have any chance at victory.</p>
<p>A simple solution is to remove scoreboards from the game. A more complex solutions is to prevent players from cooperating with one and other.</p>
<p><strong>Sandbagging</strong> is is a form of hustling caused by the killing-the-leader effect. Good players are aware that others are likely to attack them if they are seen to be doing well. To prevent this, they deliberately underperform until they can act to their full potential and win the game. Note that the killing the leader effect serves as built-in dynamic difficulty adjustment.<strong></strong></p>
<p>The solution to this is the same as that for killing the leader: remove the leaderboard. If players don’t know who the leader is, there is no reason to play sub-optimally.</p>
<p><strong>Kingmaking</strong> is when the player lower down in the scores is not able to win, but by her actions she can decide whom among the leaders does win. These actions can be in the form of sending resources to another player, or combining the armies in a coalition. This introduces an element of diplomacy into the game, where a player can win based on relationships and not skill. (As always, it is just a loophole if this is unintentional).<strong></strong></p>
<p>The solution to this is the same as the one for sandbagging and killing the leader: remove scorebords.</p>
<p><strong>Experience leeching</strong> takes a variety of forms, but the general formula is the same. A player gains benefit of participation without putting in the required effort involved to achieve the outcome.<strong></strong></p>
<p>In games where experience is awarded to the player who lands the killing blow, leechers are passive in combat until the last moment, when they jump in and kill the enemy to get the experience, at little risk of dying.</p>
<p>In games where experience is awarded to all players in range of the kill, leechers can stay passive all the time; as long as they trail behind, they can get experience without having to take any risks.</p>
<p><strong>Power leveling</strong> is a special kind of leeching. A player groups with a high level player who also kills enemies of a high level. Because of the level difference, the low level player will gain a wealth of experience causing them to level fast.<strong></strong></p>
<p>Simple solutions are to assign experience to the player who does the most damage, or to assign experience in proportion to the damage dealt.</p>
<p><strong>AFK loopholes</strong> are a special form of experience leeching: instead of putting <em>minimal </em>effort, though, the player doesn’t put in <em>any </em>effort (they are, in fact, away from keyboard). The player hides in a place where other players will not notice that they are AFK, or even employs some form of bot.<strong></strong></p>
<p><strong>Boosting </strong>or <strong>alt farming </strong>or <strong>alternate-account farming</strong> is a method where a player uses an alternate account to enhance the gains of her primary account. This is widespread in <a href="http://en.wikipedia.org/wiki/MUD">MUDs</a>, where the players have a resource that they can attack repeatedly without fear of retribution. Boosting is also common in fighting games, where a player will “fight” against the character of her second account to boost her stats or position in the leaderboards.<strong></strong></p>
<p>A simple solution is to check the IP usage and discipline the user for abusing the game. The problem with this scheme is that the developer may punish a player unfairly, for example, if a player beats her brother at a game that they play together.</p>
<p>A more elegant solution is to implement a system of diminishing returns, where the continued killing of a single entity gives less gains for the attacker until it no longer to make sense to attack. This can further be improved by also making higher level players receive less benefits from attacking lower level players.</p>
<p><strong>Twinking</strong> is the opposite of alt farming. It is when a player creates a low-level character and gives it the benefits that are intended for a high level character. The twink is kept at a low-level so that it may defeat opponents of similar level with great ease. <strong></strong></p>
<p><strong>Smurfing</strong> is hustling by using a new account and pretending to be an inexperienced player to lure in and kill players that are actually inexperienced easily. This is common in games where there is matchmaking based on metrics tracking player capabilities. Examples include the recent <em>Call of Duty</em> games, the leagues in <em>StarCraft II</em>, and <em>League of Legends</em>.<strong></strong></p>
<p>Matchmaking systems are self-correcting: metrics will move the smurfer to matches with equally skilled players after a few games, so she can only use this technique a few times before having to create another new account. And with pay-to-play games, the smurfer is required to <em>buy</em> the game each time she wants to create a smurf account. In a free-to-play game it is up to the community and dev team to find a solution using social norms and policy (discussed more in a section below).</p>
<p><strong>Ghosting</strong> is when a non-playing observer in a multiplayer game communicates to one player, or team, the actions of their opponent.<strong></strong></p>
<p>A sub form of ghosting is called <strong>stream sniping</strong> this is when highly skilled player broadcast their games live on a streaming service. Their opponents may then watch the stream and counter their opponents actions as they are watching them.</p>
<p><strong>Account Sharing</strong> is when multiple people use the same account to achieve a goal that would need a large time commitment by a single player. With account sharing, such a goal can be reached with only a modest time commitment by each player.<strong></strong></p>
<p><strong>Farming</strong> is when players focus on a goal that is not the main goal of the game. This can be something such as increasing their stats, or gaining achievements. Each of which would normally prefix farming when in action.<strong></strong></p>
<p>Achievement farming, in a multiplayer games, is when players of opposing teams cooperate with one and other so that players can easily gain achievements that would normally require skill and investment in the game.</p>
<h2><a name="h.pz7ify9qlnaq"></a>Loopholes in racing games</h2>
<p><strong>Short circuiting </strong>is when the player finds a faster route to complete the race than the intended one. This can be as simple as <a href="http://kotaku.com/379260/watch-mario-kart-wii-ghost-glitch-cheat">driving the course backwards</a>, but normally requires the player to find an error in the level design.<strong></strong></p>
<p><strong>Spawn jumping </strong>occurs when the player respawns and has gained time. This normally involves the player dying in such a place that it is possible for them to spawn ahead, or dying in such a way that would dramatically increase her speed. An example of this is the rainbow bridge in <em>Mario Kart</em>, where a player could skip half the race by spawn jumping.<strong></strong></p>
<p><strong>Perma boosting</strong> is when the player is able to continually use a speed boost that is only supposed to be used seldomly, or in a limited amount. An example of such an exploit is <a href="http://www.metro.co.uk/tech/games/883669-mario-kart-7-expert-discovers-snaking-exploit"><strong>snaking</strong></a> in the <em>Mario Kart </em>games, where players use power slides to always have a boost on the vehicle. Another example is in <a href="http://en.wikipedia.org/wiki/F-Zero_X"><em>F</em></a><a href="http://en.wikipedia.org/wiki/F-Zero_X"><em>-</em></a><a href="http://en.wikipedia.org/wiki/F-Zero_X"><em>Zero</em></a><a href="http://en.wikipedia.org/wiki/F-Zero_X"><em>X</em></a>, where separate scoreboards are used for players who perma boost and those who don’t.</p>
<h2><a name="h.6pyqhkg98ota"></a>Loopholes in game physics</h2>
<p><strong>Wall jumping </strong>is when the player is able to climb up a wall by jumping against it, usually because of inaccurate physics or small glitches in the world geometry.<strong></strong></p>
<p>In <em>World of Warcraft,</em> before the introduction of flying mounts, it was possible to use this loophole to reach places in the game that the player shouldn’t have been able to.</p>
<p><strong>Bootstrapping </strong>is when the player jumps onto an object that she ‘holds’. She just moves up and also brings the object up with her. This allows the player to jump up or fly as if she had a jetpack. The <em>Fallout 3</em> loophole mentioned earlier relies on bootstrapping for the player to get access to the Citadel.<strong></strong></p>
<p><strong>Bunny hopping </strong>is when the player uses a series of secondary movements to increase the movement speed. These movements typically involve jumping or crouching. Bunny hopping techniques vary from engine to engine.<strong></strong></p>
<h2><a name="h.f9kcgqkndilq"></a>Loopholes in saving systems</h2>
<p><strong>Duping </strong>is when there is a resource that persists through saves — generally a currency the player <a>gains </a>through an in-app purchase. The player gathers the resource; loads and gathers it again, while they are in turn getting richer for not doing any work.<strong></strong></p>
<p><strong>Cloning</strong> is similar to twinking, but instead of creating a new account the player copies a saved game into a dummy account, sells the resources of the saved game for currency, and sends the currency back to the original account via a form of social integration where friends can ‘gift’ things to one and other.<strong></strong></p>
<p>The solution is to track the validity of player saves, or to check where the ‘gifts’ are coming from to be sure that they are from a legitimate user.</p>
<p><strong>Save scumming</strong> is when a player makes multiple saves so that they can play a ‘perfect’ game. The player creates a number of saves and simply reloads one until they get the result they want.</p>
<p>A solution is to remove, or disable, a save that is frequently used without the correct condition for the load to happen — player death is typical. This, unfortunately, removes the player’s ability to reload when death is certain even before it occurred. An alternative is to make the games use save points instead of free saves.</p>
<p>Save scumming is similar to fortune hunting — the difference is that a player can progress with save scumming, while a player that merely fortune hunts has to restart the game (or level).</p>
<p>Some games make statistics manipulation a valid game mechanic, for example, in <a href="http://tvtropes.org/pmwiki/pmwiki.php/VideoGame/CastleOfTheWinds">Castle Of The Winds</a> levels are randomly generated on player entering, and players can choose to re-enter the level. This is a kind of fall-back-fix for otherwise broken mechanics (more precisely, broken procedural generation).</p>
<p><strong>Save jumping</strong> is when the player uses the game auto-save system to their advantage. The player can do things such as teleporting to a different game point, or run to an autosave point while fighting to load the save and remove the enemies.<strong></strong></p>
<h2><a name="h.6po58ccpnx9t"></a>How to find game design loopholes</h2>
<p>As a designer, finding loopholes is a challenge: you are trying to break the very rules you crafted so carefully to govern the game world. In non-computer games this may be easier because the rules are stated explicitly. In video games, the rules are implicit, and requires a player to learn the rules, mostly, through trial-and-error. Because of the complexity of some games, a loophole may be completely overlooked simply because the “proper way of playing” is ingrained in the designer’s head.</p>
<p>There are four ways to find loopholes in your design.</p>
<h4><a name="h.rrjw7rmnavkh"></a>1. Use your own knowledge, experience and instincts</h4>
<p><strong>Look for loophole patterns. </strong>With experience, you will start to recognize the patterns that can lead to loopholes, and remove them from the design early. All the FPS loopholes discussed above arises from the interaction between the level design and AI. <strong></strong></p>
<p>Drawing from a large knowledge-base of loopholes in other games in your genre can be very helpful, and it’s a good idea to build such a base for yourself.</p>
<p><strong>Understand player motives. </strong>Even in simple games, the possibilities for loopholes are endless. Focus your attention where it matters. Consider what players want to do, and pay attention to the various systems that allows or limits these goals:</p>
<ul>
<li>Players want to win.</li>
<li>Players want more resources.</li>
<li>Players want to get to every spot in the game.</li>
<li>Players want to be the first, the fastest, the strongest,the richest, the prettiest, the coolest.</li>
<li>Players want achievements.</li>
</ul>
<p>This will not necessarily be the systems with the most loopholes, but it will be systems that players will pay most attention to, and loopholes in these systems are most likely to have important effects (on gameplay, player satisfaction, and even your bottom line).</p>
<p><strong>Don’t Kill Emergence. </strong>Trying to predict player behaviour can be tricky, and there is always the risk that your loophole corrections unnecessarily limits the game, and removes the possibilities of positive emergence.</p>
<h4><a name="h.qkk6pgvaypr4"></a>2. Ask fellow game designers to check your design</h4>
<p>Fellow designers can be great at finding loopholes. Designers have a good way of looking at a system and its rules and finding where to break them, and they typically have a vast knowledge of various loopholes in other games.</p>
<p>Of course, this method is not perfect:</p>
<ul>
<li> different designers may not agree on what are the loopholes of the game; and</li>
<li> even a hundred game designers may still overlook some loopholes.</li>
</ul>
<h4><a name="h.q7uj49jbmo9k"></a>3. Test</h4>
<p>Testing overcomes some of these problems: gamers don’t have designer’s bias, and you can generally find more game players than game designers willing to comment on your game.</p>
<p>Gamers know their game worlds have rules, and that they can break these rules to their advantage. Tournament level players are often used as <a href="http://www.igda.org/sites/default/files/IGDA_CreditsSnapshot_Apr06.pdf">balance testers</a> and have been extremely important in the making of games such as <em>Starcraft 2 </em>and <a href="http://www.rockpapershotgun.com/2011/08/15/counter-strike-go/">Counter Strike: Global Offensive</a>.</p>
<p>Metrics are a powerful tool for finding loopholes, especially if you have a large test group. A simple statistic such as number of players that choose a certain character may point to a balance issue: if a disproportionate number of players choose a certain character or combination, you know there is a problem. The course blog <em>Game Balance Concepts</em> gives an extensive overview of the use of <a href="http://gamebalanceconcepts.wordpress.com/2010/08/25/level-8-metrics-and-statistics/">metrics in game design</a>.</p>
<p>The <em>Desktop Dungeons</em> team was able to pick up the loophole with the gods by looking at the metrics of their players. A number of players were creating alternative characters on the same account where they unlocked only three gods. This puzzled the developers, until they realised the advantage of only unlocking three gods.</p>
<p>Metrics are also useful to pick up more general exploits: metrics exposed a <a href="http://wikibin.org/articles/overrated.html">highly skilled guild</a> of <em>WoW</em> players that used a client side tool to delete a wall during a raid and skip to the last boss, making game events happen out of the planned order.</p>
<p>A heatmap — a visual depiction of a metric on the game map — is another useful tool in finding loopholes. A heat map can show things such as player deaths, shots fired, enemy cover and player exploration. Heatmaps make it visually apparent where there are topographical problems with the map. See for example how this technique was applied in <a href="http://www.wired.com/gaming/virtualworlds/magazine/15-09/ff_halo?currentPage=all"><em>Halo</em></a><a href="http://www.wired.com/gaming/virtualworlds/magazine/15-09/ff_halo?currentPage=all"><em> 3</em></a>, <em><a href="http://www.fastcompany.com/1756538/infographic-of-the-day-using-113m-player-deaths-to-map-a-videogames-world">Just Cause 2</a></em>, <em><a href="http://www.gamasutra.com/view/feature/134526/hot_failure_tuning_gameplay_with_.php">Replica Island</a></em>, <em><a href="http://blog.counter-strike.net/science/maps.html">Counter Strike: Global Offensive</a></em>, by <a href="http://www.forcejunkies.com/2011/11/12/the-magic-behind-the-metrics/">BioWare</a>, and even in <a href="http://www.untoldentertainment.com/blog/2012/02/16/5-graphic-adventure-game-goofs-and-how-to-fix-them/">point-and-click adventure games</a>.</p>
<p style="text-align: center;"><a href="http://devmag.org.za/blog/wp-content/uploads/2012/05/clip_image005.jpg"><img class="aligncenter size-full wp-image-4529" title="clip_image005.jpg" src="http://devmag.org.za/blog/wp-content/uploads/2012/05/clip_image005.jpg" alt="" width="614" height="351" /></a></p>
<p style="text-align: center;"> <span style="text-align: center;">Player deaths in </span><em style="text-align: center;">Just Cause 2</em><span style="text-align: center;">.</span></p>
<h4><a name="h.erpvfzwvh9vx"></a>4. Use feedback from players in the field</h4>
<p>Once a game has shipped, and your game is played by a large number of players, even more loopholes will be exposed. Adding metrics to your games can be very helpful to expose loopholes in these circumstances (players may not want to report loopholes as eagerly as testers). Unfortunately, you will only be able to fix with a patch or update.</p>
<h2><a name="h.f8qwyyurz0h9"></a>How to fix loopholes</h2>
<p><strong>Change one of the components. </strong>Since loopholes arise from the unintended interaction of game elements (rules or systems), a loophole can generally be fixed by making a change to just one of these systems. For example, all the FPS loopholes discussed can be fixed by either changing the level design, or by changing the AI.<strong></strong></p>
<p><strong>Change the interaction. </strong>Loopholes can also be fixed at the points where systems that cause them interact. Taking the FPS examples, the AI can be adjusted to take the level design into account, so that alternate behaviours are used based on the topology of the surroundings.</p>
<p><strong>Beware: general versus specific solutions.</strong> Some loopholes can be fixed by introducing very specific rules or exceptions. For example, in an FPS game, AI can be developed for specific zones: “if I am close to position (123, 456), I need to move away from the crates”. Alternatively, problems can be fixed with general rules; in an FPS, for example, the AI may be adjusted “if I am between two crates, move away”. <strong></strong></p>
<p>General rules are more elegant and easier to manage. But adding general rules to fix loopholes may introduce new loopholes. Specific rules don’t impact on the overall game, but many may be needed, leading to debugging nightmare. “Why is this AI moving away from crates when he is near the big boss?”</p>
<p><strong>Rely on social norms. </strong>In multiplayer games, social norms can make up for broken rules. This is especially useful when a loophole would be too expensive to fix, or a solution is not clear. <a href="http://www.gamasutra.com/view/feature/131849/online_justice_systems.php">Online justice systems</a> are an essential part of MMO social systems. Such social norms can be provided by behavioural guidelines — such as the <em>World of Warcraft</em> <a href="http://us.battle.net/support/en/article/harassment-policy">harassment policy</a> — or rewarding players who positively contribute to the community, such is the <a href="http://www.gamasutra.com/view/feature/134839/the_valve_way_gabe_newell_and_.php?page=1">plan</a> for <em>Dota 2.</em><strong></strong></p>
<h2><a name="h.djbe8zgg7apc"></a>It’s not a bug, it’s a feature</h2>
<p>A loophole can destroy a game, but not always.</p>
<p><strong>Some loopholes require considerable skill in themselves</strong>, and thus they don’t break the game. In the developer commentary for <em>Portal</em>. The developers said they left trick methods of completing the puzzles in because they required more skill than completing the puzzle normally would.<strong></strong></p>
<p><strong>Some loopholes become new mechanics. </strong>If they are rich enough, it can still be a good game, even if it is not the one the designer intended. In Quake 3 players could use a combination of directional jumping and turning to increase her speed. This technique, called <a href="http://en.wikipedia.org/wiki/Strafe-jumping">strafe jumping</a>, was never planned for, but it soon became an essential part of the game, and the developers decided to leave it in. <strong></strong></p>
<p>The loopholes in a game can even become the <em>main </em>mechanics of the sequel. In <em>Starsiege: Tribes</em> the <a href="http://en.wikipedia.org/wiki/Starsiege:_Tribes#Movement">movement</a> system allowed players to attain very high speeds by using their jetpack to go down a hill. This is referred to as skiing, and is one of the core feature of every tribes game.</p>
<p><strong>Some loopholes have little effect in the greater scheme. </strong>They may make one small part of the game easier, but overall don’t change the difficulty. In this case, they may become a source of amusement, such as the bucket-on-the-head Skyrim loophole mentioned earlier.<strong></strong></p>
<p><strong>Some loopholes “fix” broken design.</strong> Yes, if you take out the ability to bruteforce puzzles in certain games, they may be totally unsolvable. <strong></strong></p>
<p><strong>Finding loopholes is a sport.</strong> The meta game of <a href="http://en.wikipedia.org/wiki/Speedrun">speed runs</a> use sequence breaking loopholes so that the player can complete a given game or level thereof in the least amount of game time possible.<strong></strong></p>
<h2><a name="h.kmtnl6ilcb2"></a>Conclusion</h2>
<p>Loopholes pop up from time to time. Experience and knowledge of loopholes in other games will help you avoid them, and proper testing to find and remove them when they do slip through.</p>
<p>Give us some of the loopholes found in your games in the comments!</p>
<h2><a name="h.w751l44yjzt"></a>References</h2>
<p>Many of the terms used in the FPS section and some in the general loopholes section come from John LeFlohic’ article <a href="http://www-cs-students.stanford.edu/~jl/Essays/enemies.html">Computer-Game Enemy Design</a>.</p>
<p>Some terms in <em>Loopholes in multiplayer games </em>were taken from Ian Schreiber’s course blog <a href="http://gamebalanceconcepts.wordpress.com/2010/09/08/level-10-final-boss/">Game Balance Concepts</a>.</p>
<p>Many of the multiplayer game loopholes come from Wikipedia: <a href="http://en.wikipedia.org/wiki/Exploit_(online_gaming)">Exploit (Online Gaming)</a>, <a href="http://en.wikipedia.org/wiki/Cheating_in_online_games">Cheating in online games</a>, <a href="http://en.wikipedia.org/wiki/Bunny_hopping">Bunny hopping</a>, <a href="http://www.google.com/url?q=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FDuping&amp;sa=D&amp;sntz=1&amp;usg=AFQjCNF4xcXka2f9LBxJxBbysaJu_oUQFQ">Duping</a>, <a href="http://en.wikipedia.org/wiki/Camping_(video_gaming)">Camping</a>,</p>
<p>Many of the terms and examples come from TV Tropes under various entries: <a href="http://tvtropes.org/pmwiki/pmwiki.php/Main/LoopholeAbuse">loophole abuses</a>, <a href="http://tvtropes.org/pmwiki/pmwiki.php/Main/SequenceBreaking">sequence breaking</a>, <a href="http://tvtropes.org/pmwiki/pmwiki.php/Main/GameplayDerailment">gameplay derailment</a>, <a href="http://tvtropes.org/pmwiki/pmwiki.php/Main/NotTheIntendedUse">not the intended use</a>, <a href="http://tvtropes.org/pmwiki/pmwiki.php/Main/EasyLevelTrick">easy level trick</a>, <a href="http://tvtropes.org/pmwiki/pmwiki.php/Main/RubberBandAI">rubber band AI</a>.</p>
<h2><a name="h.c30lwu1xkadd"></a>Thanks</h2>
<p>My thanks to Jonathan Hau-Yoon for completely breaking my card game. And Herman Tulleken, my editor, who put a great deal of effort into polishing this article.</p>
<div class='yarpp-related-rss'>
<h2>Related posts:</h2><p><ol>
<li><a href='http://devmag.org.za/2009/08/31/minimised-game-design-for-indies/' rel='bookmark' title='Minimised game design for indies'>Minimised game design for indies</a> <small>When you sit down to write a book, one of...</small></li>
<li><a href='http://devmag.org.za/2011/02/02/video-game-user-interface-design-diegesis-theory/' rel='bookmark' title='Video game user interface design: Diegesis theory'>Video game user interface design: Diegesis theory</a> <small>In this article, the Dave Russell introduces the basic concepts...</small></li>
<li><a href='http://devmag.org.za/2011/02/16/board-silly-tabletop-game-design/' rel='bookmark' title='Board Silly (Tabletop Game Design)'>Board Silly (Tabletop Game Design)</a> <small>Two Dev.Mag writers share their board game design experiences: conception,...</small></li>
<li><a href='http://devmag.org.za/2011/03/03/desktop-dungeons-design-analysis-part-1/' rel='bookmark' title='Desktop Dungeons: Design Analysis (Part 1)'>Desktop Dungeons: Design Analysis (Part 1)</a> <small>This is the first part of an in-depth look at...</small></li>
<li><a href='http://devmag.org.za/2012/02/13/game-design-on-ideas/' rel='bookmark' title='Game Design: On Ideas'>Game Design: On Ideas</a> <small>In this article, Julian Pritchard gives us his take on...</small></li>
<li><a href='http://devmag.org.za/2011/03/23/desktop-dungeons-design-analysis-part-2/' rel='bookmark' title='Desktop Dungeons: Design Analysis (Part 2)'>Desktop Dungeons: Design Analysis (Part 2)</a> <small>In this second part of analyzing Desktop Dungeons, we look...</small></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://devmag.org.za/2012/05/07/loopholes-in-game-design/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Video Game Audio: Diegesis Theory</title>
		<link>http://devmag.org.za/2012/04/19/video-game-audio-diegesis-theory-2/</link>
		<comments>http://devmag.org.za/2012/04/19/video-game-audio-diegesis-theory-2/#comments</comments>
		<pubDate>Thu, 19 Apr 2012 14:00:35 +0000</pubDate>
		<dc:creator>Dave Russell</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[Sound]]></category>
		<category><![CDATA[audio]]></category>
		<category><![CDATA[diegesis]]></category>
		<category><![CDATA[fourth wall]]></category>
		<category><![CDATA[game design]]></category>
		<category><![CDATA[sound]]></category>

		<guid isPermaLink="false">http://devmag.org.za/?p=4482</guid>
		<description><![CDATA[<br/>In a previous article, we looked at the diegesis theory of interface design. The theory can also be applied to audio design. This is a look into the design of audio for games, and how diegesis theory can help us structure our thoughts.<div class='yarpp-related-rss'>
<h2>Related posts:</h2>
<ol>
<li><a href='http://devmag.org.za/2011/02/02/video-game-user-interface-design-diegesis-theory/' rel='bookmark' title='Video game user interface design: Diegesis theory'>Video game user interface design: Diegesis theory</a> <small>In this article, the Dave Russell introduces the basic concepts...</small></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<br/><p><img style="display: block; float: none; margin-left: auto; margin-right: auto; border: 0px;" title="platfrom_banner" src="http://devmag.org.za/blog/wp-content/uploads/2012/04/diegetic-audio.png" alt="platfrom_banner" width="680" height="341" border="0" /><br />
In a previous article, we looked at the <a href="http://devmag.org.za/2011/02/02/video-game-user-interface-design-diegesis-theory/">diegesis theory of interface design</a>. The theory can also be applied to audio design. This is a look into the design of audio for games, and how diegesis theory can help us structure our thoughts.<br />
<span id="more-4482"></span><br />
So where do we start? Let’s start with an experiment.</p>
<ol>
<li>Turn computer on mute, start-up favourite game and play a bit of it.</li>
<li>Now do exactly the same thing, but this time with the audio.</li>
</ol>
<p>You would have most likely found the game easier, and more enjoyable to play. So what are the functions of audio in games? Sound serve four main functions in a game:</p>
<ul>
<li>Sound gives <strong>feedback</strong> to the player, often in addition to visual feedback. This is most obvious in the interface, where buttons make noises. In the game itself, audio feedback helps the player feel his actions have an effect, an example is the sound played when a gun is reloaded.</li>
<li>Sound gives the player <strong>information</strong> about the game and its world itself, for example, the sound of approaching enemies warns to player to get ready. It also helps draw the attention to important game events.</li>
<li>Sound forms part of the <strong>award system</strong> of games. The sounds and flashes that go with completing a row in <em>Tetris</em> make the act much more pleasurable. It is a short-term award that supports the long-term award of not dying and beating a high-score.</li>
<li>Sounds help create <strong>realism</strong>. They help to immerse the player deeper into the game world and encourages the suspension of disbelief. It helps put the player in the scene, making her part of the action. Explosions without audio are neither believable, nor very dramatic.</li>
<li>Sound creates <strong>mood and pace</strong>, most often as background music. The cinematic soundtracks used in strategy games have nothing to do with realism or feedback or information. Instead, glorifies the setting, it makes the events feel epic, and so enhances the player’s feeling that he is doing something important. Similarly, the action-packed feeling of an arcade game is as much a result of the blingy music as it is of the actual gameplay.</li>
</ul>
<p>This article is going to look at how we can use the concepts of diegesis or narration to help us design audio for a game. We will look at various different games to understand how this approach will help us.<br />
As with the diegesis theory of interface design, we are concerned with two main concepts: narrative and the fourth wall. I repeat the explanations of these two concepts from the interface article:</p>
<h2 dir="ltr">Narrative</h2>
<p><a href="http://devmag.org.za/category/development/narrative/">Narrative</a> is a message that conveys the particulars of an act or occurrence or course of events. In simple terms, it is the story the designer wishes to convey; be it the story of blocks falling from the sky which need to land in the right place (<em><a href="http://en.wikipedia.org/wiki/Tetris">Tetris</a></em>), or a journey through a strange land (<em><a href="http://machinarium.net/demo/">Machinarium</a></em>).</p>
<p>Not all elements of a game are part of the narration. For example, the game menus and the HUD, because the game’s characters are not aware of these elements. This does not mean these components do not support the narrative. For example, a futuristic game typically has GUI elements that also appear futuristic.</p>
<h2 dir="ltr">The fourth wall</h2>
<p>The fourth wall is the imaginary divide between the player and the world of the game. In order for the player to immerse themselves in the game world, he needs to move through the fourth wall. The ease with which the player moves between the real world and the game world depends on the way the interface designer delivers information to the player.</p>
<p>Posting your latest game accomplishments on Facebook is an example of how a game extends beyond the fourth wall. To further delve into this concept, one should read Steven Conway’s interesting discussion of the fourth wall in games: <a href="http://www.gamasutra.com/view/feature/4086/a_circular_wall_reformulating_the_.php">A Circular Wall? Reformulating the Fourth Wall for Video Games</a>.</p>
<h2 dir="ltr">Sounds in games</h2>
<p>We can now ask ourselves two questions about any sound:</p>
<ul>
<li>Is the sound of the game story? (Is it part of the narrative?)</li>
<li>Is the sound of the game space? (Is it behind the fourth wall?)</li>
</ul>
<p>Depending on the answers, we can classify the sound into one of four classes: diegetic; non-diegetic; spatial; or meta.</p>
<p>The diagram below summarises the four possible combinations.<img class="aligncenter" src="http://devmag.org.za/blog/wp-content/uploads/2011/02/diegesis_theory.png" alt="" width="600px;" height="415px;" /><br />
In talking about audio, meta and spatial representations are often clumped together with non-diegetic and diegetic sounds; we won’t cover go into detail into meta and spatial representations here (they are not very common), but it is still useful to keep the distinction.</p>
<h2 dir="ltr">Diegetic sound</h2>
<p>For diegetic sound, we answer our two questions as follows:</p>
<ul>
<li>Is the sound in the game story? <strong>YES</strong></li>
<li>Is the sound in the game space? <strong>YES</strong></li>
</ul>
<p>When we talk about diegetic sound, we are talking about sound that is part of the world that the player is in, any audio produced in your game world. This is includes sound-effects, ambient environmental sound, and game character dialog.</p>
<p>In this trailer of <em>Call of Duty: Black Ops</em>, all the sound is diegetic. The absence of music helps build tension, and helps the player focus on the events as they unfold.<br />
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='625' height='382' src='http://www.youtube.com/embed/h_fsM6LBi54?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p>Although diegetic sound is used most often to increase immersion and realism (bigger guns make bigger noise), it can also support gameplay. In <em>Dead Space</em>, the audio (an alien “screaming” from behind) is used to draw the player’s attention to the wave of enemies that is behind him.<br />
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='625' height='382' src='http://www.youtube.com/embed/4DmsDICPnjg?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<h2 dir="ltr">Non-diegetic sound</h2>
<p>For non-diegetic sound, we answer our two questions as follows:</p>
<ul>
<li>Is the sound in the game story? <strong>NO</strong></li>
<li>Is the sound in the game space? <strong>NO</strong></li>
</ul>
<p>Non-diegetic sounds are audio cues provided from outside the world that the player is in. This includes background music (where is this magical omnipresent band playing in the world?) and interface sounds.<br />
Music is incredibly useful to create atmosphere and manipulate the player’s emotions. (Changing the music is the single most effective tool used for genre bender spoofs, such as the recut trailers for <em><a href="http://www.youtube.com/watch?v=2T5_0AGdFic&amp;feature=player_embedded#!">Mary Poppins</a></em> or <em><a href="http://www.youtube.com/watch?v=KmkVWuP_sO0&amp;list=PL55525E6A147A240A&amp;index=2&amp;feature=plpp_video">The Shining</a></em>).</p>
<p><em>Robot Unicorn Attack</em> the crazy backing track supplied by Erasure, together with the chirpy graphics, emphasises the ironically chosen title of the game.<br />
<span class='embed-youtube' style='text-align:center; display: block;'><iframe class='youtube-player' type='text/html' width='625' height='382' src='http://www.youtube.com/embed/i1QUX6--waA?version=3&#038;rel=1&#038;fs=1&#038;showsearch=0&#038;showinfo=1&#038;iv_load_policy=1&#038;wmode=transparent' frameborder='0'></iframe></span></p>
<p>In games that use <a href="http://www.gamasutra.com/view/feature/1567/defining_adaptive_music.php">adaptive music</a>, the player’s emotions can be controlled even more tightly. How much more dramatic is a battle when the brass enters as it starts?</p>
<p>Interface sounds give the player feedback on his or her actions. They are vital to show that the interface is responding, and to draw the player’s attention to important events or information.</p>
<p>In <em>Borderlands</em>, the music effectively becomes part of the interface, changing based on your life level, presence of enemies, and their difficulty.</p>
<h2 dir="ltr">Meta representations</h2>
<p>For meta sound, we answer our two questions as follows:</p>
<ul>
<li>Is the sound in the game story? <strong>YES</strong></li>
<li>Is the sound in the game space? <strong>NO</strong></li>
</ul>
<p>Meta audio is audio which sits between the world of the protagonist and the player. The most obvious example is a game narrator, which is not part of the game world, but definitely adds to the story. In <em>Bastion</em> this is taken to the limit, where a running commentary is given on the player’s every move.</p>
<h2 dir="ltr">Spatial representations</h2>
<p>For spatial sound, we answer our two questions as follows:</p>
<ul>
<li>Is the sound in the game story? <strong>NO</strong></li>
<li>Is the sound in the game space? <strong>YES</strong></li>
</ul>
<p>Spatial audio representations are sounds set in the game space, but is not part of that world. It is not very common in games, mostly because we cannot easily map the source of a sound with a location in the game.</p>
<p>One example is in <em>Anno 1404</em>, where the music changes depending on the location the player is viewing: the music gets an Arabic flavour when the player views locations in the “Orient”; this, together with the visual differences, helps to sets the east part from the west in the game. Another example is the audio-navigation system used in <em><a href="http://thepath-game.com/">The Path</a></em>.</p>
<h2 dir="ltr">Links</h2>
<ul>
<li>The <a href="http://www.gamasutra.com/view/feature/3509/ieza_a_framework_for_game_audio.php?print=1">IEZA framework</a> is another very useful theory of game sound. It also makes use of the diegetic axis.</li>
<li>Game Sound provides a whole bunch of links to publications on <a href="http://www.gamessound.com/research.htm">game audio</a>.</li>
<li>Sander Huibert’s thesis <a href="http://download.captivatingsound.com/Sander_Huiberts_CaptivatingSound.pdf">Capitivating Sound</a> [14.6 MB, PDF] provides a wealth of useful information on how game sound contributes to immersion.</li>
</ul>
<h2 dir="ltr">Thanks</h2>
<p>Thank you <a href="https://plus.google.com/u/0/111401724839459268077">Zachary Reese</a> and <a href="https://plus.google.com/u/0/100592160437913066141">Devin Moore</a> for giving some of the examples.</p>
<p>Header image from <a href="http://www.flickr.com/photos/frostnova/606822557/sizes/z/in/photostream/">http://www.flickr.com/photos/frostnova/606822557/sizes/z/in/photostream/</a>.</p>
<div class='yarpp-related-rss'>
<h2>Related posts:</h2><p><ol>
<li><a href='http://devmag.org.za/2011/02/02/video-game-user-interface-design-diegesis-theory/' rel='bookmark' title='Video game user interface design: Diegesis theory'>Video game user interface design: Diegesis theory</a> <small>In this article, the Dave Russell introduces the basic concepts...</small></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://devmag.org.za/2012/04/19/video-game-audio-diegesis-theory-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Student&#8217;s Perspective on Education: DigiPen</title>
		<link>http://devmag.org.za/2012/04/17/a-stundents-perspective-on-education-digipen/</link>
		<comments>http://devmag.org.za/2012/04/17/a-stundents-perspective-on-education-digipen/#comments</comments>
		<pubDate>Tue, 17 Apr 2012 15:19:02 +0000</pubDate>
		<dc:creator>Julian Pritchard</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[Interviews]]></category>
		<category><![CDATA[digipen]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[interview]]></category>
		<category><![CDATA[tertiary education]]></category>

		<guid isPermaLink="false">http://devmag.org.za/?p=4459</guid>
		<description><![CDATA[<br/>Julian Pritchard talks to DigiPen student Alicia Yeargin about her degree, her experience as a student, and her thoughts on games and game design.<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></description>
				<content:encoded><![CDATA[<br/><p><img style="display: block; float: none; margin-left: auto; margin-right: auto; border: 0px;" title="platfrom_banner" src="http://devmag.org.za/blog/wp-content/uploads/2012/04/education-interview.png" alt="platfrom_banner" width="680" height="341" border="0" /></p>
<p><strong>Hi, thanks for doing this Dev.Mag interview. For the record, please state your name, what you do, and your favourite pastry.</strong></p>
<p>Alicia: Heya, my name is Alicia Yeargin. I’m currently a student at DigiPen Institute of Technology in Redmond, Washington, and about to complete my Bachelor of Science in Game Design. My favorite pastry is, without a doubt, the maple donut.</p>
<p><span id="more-4459"></span></p>
<p><strong>Your degree is a tech degree. Did it include non-technical topics?</strong></p>
<p>Alicia: Yes, my degree had one introductory psychology class, and I took a number of different art classes. There were two sketching / traditional art classes, one 3D art class, an architecture class, an art appreciation class, a film class, and a Photoshop class.</p>
<p><strong>Cool! I like that amount of art in a &#8216;tech&#8217; degree.</strong></p>
<p><strong>Do you think, as a game designer, that you should have a good grasp, or at least an understanding, of tech, art, and music?</strong></p>
<p>Alicia: Absolutely. Even though I don&#8217;t take any more art classes, I continue to use 3D Studio Max and sketch in notebooks. Naturally, all the things I make are crap, but just doing it helps me understand the art process; I think that&#8217;s incredibly important.</p>
<p>Music is something that&#8217;s always been beyond me, though. It&#8217;s not very big at DigiPen right now. (The rumor is that we&#8217;re getting an audio degree of some kind.)</p>
<p><strong>I&#8217;m happy to hear that. The reason I was asking about music is that when I look at games like Bastion, Amnesia, and even Deus Ex: Human Revolution, I see that music forms an extremely important part of the atmosphere. So it should be something that a designer should have in their arsenal.</strong></p>
<p>Alicia: I agree.</p>
<p><strong>So do you feel you would do anything to expand your knowledge of music?</strong></p>
<p>Alicia: At this point, I&#8217;m not sure. It&#8217;s unlikely. I&#8217;ve just personally never been musically inclined. I have a good ear for things; just not the mind or anything to create it.</p>
<p><strong>What do you feel the relationship between coding and design is like?</strong></p>
<p>Alicia: It should be together, definitely. I can&#8217;t imagine even calling myself a designer without knowing how to code. It&#8217;s super huge for understanding the tech behind games and how the software actually works.</p>
<p><strong>So what kind of background in coding would you feel someone approaching design from and art side would need?</strong></p>
<p>Alicia: At DigiPen even our artists learn some code -even the BFAs (<em>Ed. note: the BFA referred to is the DigiPen <a href="https://www.digipen.edu/academics/degree-programs/digital-art-and-animation/">Bachelor of Fine Arts in Digital Art and Animation</a></em>)  who may never touch a game in their lives do some code-, mostly ActionScript. Even if you&#8217;re an artist, I think you should have some ActionScript or something like that in your belt. Technology&#8217;s so huge these days; it&#8217;s kinda crazy to not.</p>
<p><strong>Did you learn anything about the production side of things?</strong></p>
<p>Alicia: In terms of being a producer and team management?</p>
<p><strong>Yes.</strong></p>
<p>Alicia: That&#8217;s kind of an interesting thing here. Every year, we work on a team project, and on every team someone has to be a producer; it&#8217;s just a requirement of the class. So, someone will be learning a bit about scheduling. We do have, I think, one or two management-type classes, but it&#8217;s not super huge. I personally haven&#8217;t taken any of those, and I was a producer on my first-year game team.</p>
<p><strong>Making video games is an applied field. How often did you make projects and such things?</strong></p>
<p>Alicia: First year, we made an individual semester project with the engine provided by the school. (It&#8217;s something like GameMaker.) The second half of first year, we worked on a team on an ASCII game.  Second year was a two-semester (one year) long 2D game. Third year was another year-long 3D game. Fourth year has more leeway. It can be 3D or 2D, and we also can do solo projects in order to pursue something more specifically related to our desired fields. For designers, there are also the design courses where you make prototypes of games and other projects as well.</p>
<p><strong>Are those design courses similar to Global Game Jam style of making games?</strong></p>
<p>Alicia: Oh. Hmm, I don&#8217;t know enough to make a direct comparison, but I can say it does vary between each class. One class, we had a prototype due every two weeks. One week an RPG, another an FPS, and so on. In my analog class right now, we&#8217;re just doing two projects. First half of the semester was a tabletop RPG, and the second is a tabletop simulation game.</p>
<p><strong>Would you have like to do more prototypes or less?</strong></p>
<p>Alicia: Hmm, probably less. I would have preferred to spend more time on projects to get further polish on them.</p>
<p><strong>Do you believe polish is an important aspect of every game?</strong></p>
<p>Alicia: Yes, I think polish matters. That may just be more of a personal thing. I&#8217;m kind of a perfectionist. I always notice the little things.</p>
<p><strong>Well, there is a point where you have to let things go, otherwise you end up with Duke Nukem Forever.</strong></p>
<p>Alicia: Definitely.</p>
<p><strong>Do you think there is a difference between a story and a narrative?</strong></p>
<p>Alicia: Yes. I believe pretty much every game ever has a narrative, but I think story requires a little bit more. (I&#8217;ve yet to do enough personal research and study to fully define where the &#8220;line&#8221; of story/not-story is, if it exists.)</p>
<p><strong>Did you try and make games before you started your studies?</strong></p>
<p>Alicia: I actually didn&#8217;t really. I went to the ProjectFUN summer program that DigiPen hosts, and I made a game there. Other than that, I really hadn&#8217;t even thought much about making games. I&#8217;d always just been a writer, but I knew I didn&#8217;t want to write novels.</p>
<p><strong>What sort of writing courses did you study? Or have you just always been a natural writer?</strong></p>
<p>Alicia: Writing has always been huge for me, even before I ever started playing games. DigiPen has a decent amount of English classes, though not very many writing classes. I think having actual writing classes is something the school needs.</p>
<p><strong>With your background in writing, what position would you like to end up with in the game industry?</strong></p>
<p>Alicia: At the moment, I&#8217;m just digging around to see if I can find any level-design jobs. If not that then playtesting. Ideally, in five to ten years, I&#8217;d like to work my way up to a position as a full-time writer for games. Maybe something like a Mass Effect or a Skyrim.</p>
<p><strong>Do you think that Mass Effect and The Elder Scrolls games are good in terms of their story?</strong></p>
<p>Alicia: I think Mass Effect&#8217;s story and dialog are both incredible. The Elder Scrolls series is amazing for its lore and depth and uniqueness of universe. (I started with The Elder Scrolls III: Morrowind, so that&#8217;s why I say that.) The actual game stories in the Elder Scrolls games are, admittedly, a bit flat, but I&#8217;ve always enjoyed the writing in the quests.</p>
<p><strong>Mass Effect, and The Elder Scrolls games are massive, but do you think you could make a complete game by yourself?</strong></p>
<p>Alicia: It&#8217;s possible. I&#8217;ve technically almost done that with my senior project. However, it&#8217;s not easy, and it&#8217;s not practical for a professional game. Although, it does give you a REALLY good appreciation for every part of a game team.</p>
<p><strong>Minecraft did start out as a one man project. Do you think it will be more common for game to grow with their community as minecraft did?</strong></p>
<p>Alicia: Yeah, I can definitely see more things popping up like that, especially with the way things seem to be growing for Internet-based products like that.</p>
<p><strong>With regards to your student projects how do the IP-rights for those work?</strong></p>
<p>Alicia: DigiPen owns everything. No question about it. Even access to installers for games, those have to be distributed through DigiPen&#8217;s website (unless super special permission is given).</p>
<p><strong>Yeah, I remember downloading The Fourth Wall from the website. Has any full scale game ever emerged out of digipen, or do they end up like Narbacular Drop and Portal?</strong></p>
<p>Alicia: No commercial full scale games can emerge from DigiPen; that&#8217;s just the way things are. If the students want to take their ideas and go big, they have to go the way of Portal pretty much.</p>
<p><strong>Now that you have basically completed your degree, are there anything you wish you could have learned, learned more of, learned less of, or even not learned at all?</strong></p>
<p>Alicia: I wish there were classes dedicated to learning specific tools or something, like a class on Unreal, as a design course elective or something. I think that would have been very helpful. Unreal experience is something a lot of companies look for, and I&#8217;m one of the few graduating designers who actually has it.</p>
<p>Also, a class in mobile game design might have been great. Not sure how that would have been done, but that&#8217;s such a huge thing now; I feel like it would have been nice to get more experience with that.</p>
<p><strong>That is a rather strange concept to me. In South Africa just about everyone makes mobile games, and perhaps even more people make their games with Unity.</strong></p>
<p>Alicia: Yeah, Unity is just now getting into our design courses as a serious thing. I&#8217;ve had some prior experience with it, but I&#8217;ve talked to very few dev&#8217;s who use it (so far). I like it though.</p>
<p><strong>What kind of text books were you given for game design?</strong></p>
<p>Alicia: Not a lot really. The only book that was consistently a recommended/required bit of text between classes was Schell&#8217;s The Art of Game Design. We do a lot of learning by doing here.</p>
<p><strong>Thanks for the interview. Anything else you want to say?</strong></p>
<p>Alicia: DigiPen’s done a great job kicking my butt every day until making me into a solid game designer, and it’s been tough&#8211;but a really good experience. Looking forward to graduating and finally getting into the industry!</p>
<p>Thanks for the interview!</p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://devmag.org.za/2012/04/17/a-stundents-perspective-on-education-digipen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crunch Time</title>
		<link>http://devmag.org.za/2012/02/27/crunch-time/</link>
		<comments>http://devmag.org.za/2012/02/27/crunch-time/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 14:00:45 +0000</pubDate>
		<dc:creator>Julian Pritchard</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Production]]></category>
		<category><![CDATA[Crunch]]></category>
		<category><![CDATA[Finance]]></category>
		<category><![CDATA[Satire]]></category>

		<guid isPermaLink="false">http://devmag.org.za/?p=4423</guid>
		<description><![CDATA[<img src="http://devmag.org.za/blog/wp-content/uploads/2010/12/devmag_orange_b.png" width="71" height="71" alt="Development" title="Development" /><br/>This article looks at crunch time, its effects on the development process and the developers themselves, how to avoid it, and how to deal with it if it does come.<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></description>
				<content:encoded><![CDATA[<img src="http://devmag.org.za/blog/wp-content/uploads/2010/12/devmag_orange_b.png" width="71" height="71" alt="Development" title="Development" /><br/><p><img style="display: block; float: none; margin-left: auto; margin-right: auto; border: 0px;" title="platfrom_banner" src="http://devmag.org.za/blog/wp-content/uploads/2012/02/crunch.png" alt="platfrom_banner" width="680" height="341" border="0" /><br />
Looking into the development cycle for video games we look at one of the worst, and almost unavoidable occurrences. Crunch. For a common definition of crunch, or in full crunch time, <a href="http://en.wiktionary.org/wiki/crunch_time">Wikipedia</a> give us A critical period of time during which it is necessary to work hard and fast . Indeed when we are crunch, for anything, we work as hard and as fast as we can.</p>
<p>But unfortunately crunch has a series of negative effect. In a brief summation of Evan Robinson’s article <a href="http://www.igda.org/why-crunch-modes-doesnt-work-six-lessons">Why Crunch Modes Don’t Work: Six Lessons</a>. Crunch leads to a short-term productivity boost due to the extended hours the people work. But in a long-term scenario crunch leads to a loss in productivity as the there is a natural peak amount of hours that a person can work and be effective at that work. As such it leads to poor work rushed out to meet deadlines. This happens with video games, writing, and many other things.</p>
<p><span id="more-4423"></span>Given the apparent nature that a long-term crunch is a bad thing why does it occur? In larger development this occurs due to publishers only giving so much money to the studio to complete certain goals. This leads to the management pushing harder on the staff to be more productive without giving them overtime. Which in often enough they do not have the money for, as it was said above they crunch to meet a deadline so they can get money.</p>
<p>With small-medium sized studios, it comes down to budget. The investors a lot a certain budget to a project. And if they can’t make that deadline they have to let staff go or close. So they crunch to make deadlines to survive. Often if the project is not complete a skeleton staff remains to finish the project to something ship-able &#8211; or it is handed over to a third-party developer who get paid once the game is released.</p>
<p>With, unfunded, indie studios it is simple. Since you have no one signing a pay check you need to finish the game so you can eat. If it came down to crunching or starving I am sure most people would be crunching.</p>
<h2 dir="ltr">It’s not always about the money</h2>
<p>Unfortunately the financial losses of crunching are not always the greatest worry, you won’t find many developers who make games purely for the money. One of the most famous cases of the effect of crunch was written almost a decade prior to this article. It was a <a href="http://ea-spouse.livejournal.com/274.html">LiveJournal entry</a> by Erin Hoffman, who used the pseudonym ea_spouse. She highlight the emotional, mental, and physical strain that her family took due to the extended period of crunching in game development.</p>
<p>It is easy to understand how when working over double the number of hours a week that most other people to, and only to be told that you won’t receive over-time, days off, or any compensation for that matter would have a terrible effect. On a person’s mental and emotional state. And given the long hours one can easily see that it would put strain on both a person’s body, and their relationships.</p>
<p>Another infamous, but more recent, case of game development crunch was the developers of L.A. Noire, Team Bondi. <a href="http://www.gamesindustry.biz/articles/2011-06-28-igda-to-investigate-team-bondi-allegations">Reports</a> of 12 hour 7 day a week work weeks being the normal conditions. This was also expanded upon by the fact that developers who refused to comply with these abhorrent conditions were refused a title in the credits.</p>
<h2 dir="ltr">What is special about games?</h2>
<p>Given the above, people who don’t work in the game development industry may wonder why on earth we go through this.</p>
<p>Well, many don’t. The average time developers stay in the industry is 5 years, and taking that further; according to the <a href="http://www.igda.org/sites/default/files/IGDA_QualityOfLife_WhitePaper.pdf">IGDA quality of life white paper</a> only 3.4% of people working in the industry have beyond 10 years experience.</p>
<p>And those that put up with this?</p>
<p>Game development is of course not unique in this regard; many other industries also deal with the same problem, software development is infamous for projects going overtime and over-budget. As is always the case, those who do it believe the benefits outstrip the negatives. They do it because it is part of the price to pay. If you want to become a doctor, you have to study for many years, and depending on your country, work for the government for a few years after that. If you want to be a game developer, the chances are that you will have to crunch it is a part of the industry unfortunately, and even more unfortunate is how often it is necessary.</p>
<h2 dir="ltr">So what are the benefits of being a game developer?</h2>
<p>The people who work in video games have a passion and love for games. The best parable is: “If you win the lottery you are happy for a year, but if you love the work you do; you are happy for life.” For those who find the right place in the industry I do not believe that they would do not believe that they would do anything else.</p>
<p>But unfortunately many companies propagate the mentality of: “This is game development be grateful you have your job here, and get used to crunching.”</p>
<p>That is a very unfortunate reality, and one that is not true. Work is like life there are periods when things are good, and there are periods where you have to get things moving and give it all you have. The thing that is being opposed is a system of continual overtime without compensation.</p>
<p>But there are places, like <a href="http://www.develop-online.net/features/1184/The-Valve-manifesto">Valve</a>, which emphasise an open-work environment, and collaborative work mentality. Perhaps this is an ideal for game development? On the other hand Extra Credits did a piece on <a href="http://www.penny-arcade.com/patv/episode/an-open-letter-to-ea-marketing">EA marketing</a>* in which they covered an old advertisement, which I found transcribed <a href="http://johanistan.wordpress.com/2011/03/16/the-electronic-arts-manifesto-can-computer-make-you-cry/">here</a>. I cannot do it justice by paraphrasing, but I will say it talks about issues which I believe are at the heart of video games but are so often forgotten.</p>
<h2 dir="ltr">What to do about crunch</h2>
<p>As a developer there are some things you can do to avoid crunch. The first is understand the ethic of the studio that you work at. If it seems wrong how it works speak to your lead and producer. Producers are in charge of scheduling so if there is a reason for crunching they are definitely the ones to speak to. Some times you with your fellow workers can open negotiations so that you receive the appropriate benefits for the crunch, or have a reduction in the amount of time spent crunching, but keep the reasons for why studios crunch in mind when you do this.</p>
<p>In the end if it seems like the studio is abusive towards its employees then that is not a good place to be at. I would suggest finding somewhere else to work. Since if you believe that game development is the job for your then there is most likely a studio that is the right place for you.</p>
<p>Or you can write an article about crunch which abuses the English language so hard that grammar nazis cry in an attempt to give people an example of why crunch does not work.</p>
<p><em>*If you want to just watch the segment of video related start at 5:15.</em></p>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://devmag.org.za/2012/02/27/crunch-time/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>So You Want to Crowd-Source Your Funding?</title>
		<link>http://devmag.org.za/2012/02/20/so-you-want-to-crowd-source-your-funding/</link>
		<comments>http://devmag.org.za/2012/02/20/so-you-want-to-crowd-source-your-funding/#comments</comments>
		<pubDate>Mon, 20 Feb 2012 15:17:56 +0000</pubDate>
		<dc:creator>Julian Pritchard</dc:creator>
				<category><![CDATA[Funding]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[funding]]></category>
		<category><![CDATA[marketing]]></category>

		<guid isPermaLink="false">http://devmag.org.za/?p=4391</guid>
		<description><![CDATA[<br/>This article looks at Kickstarter, and to use it to raise funding for game development as an alternative to the traditional publishing model.<div class='yarpp-related-rss yarpp-related-none'>

No related posts.
</div>
]]></description>
				<content:encoded><![CDATA[<br/><div>
<p><img style="display: block; float: none; margin-left: auto; margin-right: auto; border: 0px;" title="platfrom_banner" src="http://devmag.org.za/blog/wp-content/uploads/2012/02/crowdfunding.png" alt="platfrom_banner" width="680" height="341" border="0" /></p>
<p>With Double Fine adventures just hitting the $2,000,000 when I started writing this article; I seem to notice that the Internet, or at least the parts I pay attention to, is abuzz with ‘Kickstarter fever.’ Now I am extremely happy about this since: I love Double Fine, don’t like publishers, and feel this can be the start of something great.</p>
<p><span id="more-4391"></span>But, I must caution people against thinking that they can crowd source millions of dollars. The reason I say this is because <a href="http://en.wikipedia.org/wiki/Double_Fine_Productions">Double Fine</a> has something unique. They have been around for 12 years, created one of the most celebrated cult hits, are making a game for a genre that is almost forgotten, and have two of the most famous people of that genre working on the game. Now that is a tall order to top!</p>
<h2 dir="ltr">What do you need to crowd-source a million dollars?</h2>
<p>This is a question I don’t have an exact answer to, nor does anyone I would imagine. But we can take a good look at the man who has done it. <a href="http://en.wikipedia.org/wiki/Tim_Schafer">Tim Schafer</a> has worked on adventure games since 1990 where he was a co-writer on <em>The Secret of Monkey Island</em>. Since then he has been the lead of <em>Full Throttle</em>, and <em>Grim Fandango</em>. And these days he is the founder/owner of Double Fine. In terms of social media he has: 5,400 likes on <a href="http://www.facebook.com/TimOfLegend">Facebook</a>, has been circled 6,392 on <a href="https://plus.google.com/117564870844254304139/posts">Google+</a>, and finally 68,218 followers on <a href="http://twitter.com/TimOfLegend">Twitter</a>. So if video games have celebrities I’m sure Tim is one of them.</p>
<p>The next is Double Fine; I have already stated the company&#8217;s record. But they have one person I haven’t talked about yet. <a href="http://en.wikipedia.org/wiki/Ron_Gilbert">Ron Gilbert</a> is the creator of the point-and-click adventure game. Which is the genre of game that DF are crowd-sourcing the funds for. So think about this: they have two of the most celebrated developers of the genre, talk to the community with the same sincerity as an indie developer, did not ask, or expect a million dollars in funding, but now they have two.</p>
<h2 dir="ltr">The Kickstarter Fever</h2>
<p>The current developer that I am paying attention to with regards to crowd sourcing is <a href="http://en.wikipedia.org/wiki/Brian_Fargo">Brian Fargo</a>. Who by the <a href="http://www.rockpapershotgun.com/2012/02/16/brian-fargo-turning-to-kickstarter-for-wasteland-2">news</a> wants to make a sequel to <em><a href="http://en.wikipedia.org/wiki/Wasteland_(video_game)">Wasteland</a></em>. <em>Wasteland</em> came out in 1988 and may be viewed as the progenitor of the <em>Fallout</em> series. The reason why I am paying attention to Fargo is that he is say he needs exactly a million dollars; he also is somewhat of a prolific developer.</p>
<p>So why the attention to Fargo? That is simple; with all the Kickstarter fever in the air we need some judge of the make or break conditions it take to make a game using crowd funding. Fargo, I believe, is at the right point to see what those conditions are.</p>
<p>Since he is working on an old franchise with fans, which is one of those things that the fans would like to see again. So when it comes to reaching the million dollar mark I believe that this will be the test.</p>
<h2 dir="ltr">Learn from the indies</h2>
<p>Indie developers make some of the most awesome games, and on some of the tightest budgets. For example <em>World of Goo</em> was made on a budget of just <a href="http://venturebeat.com/2009/01/02/the-world-of-goo-became-one-of-the-indie-hits-of-2008/">$10,000</a>, and it was a phenomenal game. On the other hand Braid cost <a href="http://kotaku.com/5037392/jonathan-blow-says-he-spent-180000-on-braid">$180,000</a>. Clearly, indies have a diverse range of costs.</p>
<p>Recently I have seen almost unknown indies turn to Kickstarter for funding. Then there are indie developers asking just as little as a <a href="http://indiegames.com/2012/02/kinect_and_ipad_kickstarter_do.htm">$1,500</a> to get there game out. I will however point out that such Kickstarters are, mostly, funded by indie developers.</p>
<p>The moral behind the indies is that you need to have a small game that you can make, and that you don’t need a massive budget to do it. Well this may sound like advice in the opposite direction of this article, it is in fact at the core of this article. Since developers want to make awesome games, and fans want to play them.</p>
<h2 dir="ltr">It’s a trap!</h2>
<p>The video game industry goes through ‘fads’. I clearly remember when everything was a: FPS, MMO, Social game, make for mobile devices. Now there might be the fad of we made a game using Kickstarter. While it was stated earlier that there was a hope that this could be a practical future. There is still the question of whether this is the correct choice for developers to follow.</p>
<p><a href="http://devmag.org.za/blog/wp-content/uploads/2012/02/DFbudget.png"><img class="aligncenter size-full wp-image-4394" title="DFbudget" src="http://devmag.org.za/blog/wp-content/uploads/2012/02/DFbudget.png" alt="" width="518" height="395" /></a><br />
The reason I bring thing up is that Double Fine’s XBLA type games were each made using about $2,000,000 and they had received traditional publishing on those. And they have been great success. Taking <a href="http://www.gamasutra.com/view/news/39712/InDepth_Xbox_Live_Arcade_sales_analysis_December_2011.php?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+GamasutraNews+%28Gamasutra+News%29">some statistic</a> <em>Iron Brigade</em> (nee <em>Trenched</em> in the stats) sold 120,126 units. Which at about $15, variance given to the MSpoint costs, the game so far made $1,800,000.</p>
<p>So you don’t always have to go with crowd-funding. But publishers are publishers. And they don’t like taking big risks. So seek funding in the right way sometimes that might be a publisher</p>
<p>Developers as with almost every choice they make need to be careful not to fall into a trap. Whether that is using a publisher, crowd-funding, or using your savings. So if you decide that a crowd-funded project is the way to go. Be aware of the terms of the platform, and what <a href="http://www.gamasutra.com/view/news/40291/Equitybased_crowdfunding_platform_Gambitious_launching_next_month.php">new</a> ones there are.</p>
<h2 dir="ltr">Make a Game</h2>
<p>As a developer and designer I would advocate a model similar to what Double Fine has done. Say the least you need to get the project done; then apply a modular design of expansion. So say your core is a: “City management game” which you think will cost $100,000. Call it $150,000 on your initial funding to be safe. But you want it to have cities in the same world that can trade and so on. That feature requires you to have raised $300,000.</p>
<p>The reason I say this is that when people fund a game in this way they know it might not get done. But you really want to get it done, and they really want to play it. Look at Minecraft how it has grown with its community and how integral that community has been to the development of the game.</p>
<p>So if you only get enough funding to make the first part of the game. Make that first part! Get people playing it tell them if more people buy it then you can continue development and you will implement that feature that they really want.</p>
<p>A Kickstarter is a great way to get a start, and then a closed beta for people who paid, and will pay, is a great way to make a game. Just remember to never close the doors for people who want to pay and be a part of your game!</p>
</div>
<div class='yarpp-related-rss yarpp-related-none'>
<p>No related posts.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://devmag.org.za/2012/02/20/so-you-want-to-crowd-source-your-funding/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A guide for prospective game programmers</title>
		<link>http://devmag.org.za/2012/02/16/a-guide-for-prospective-game-programmers-bobby-anguelov/</link>
		<comments>http://devmag.org.za/2012/02/16/a-guide-for-prospective-game-programmers-bobby-anguelov/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 14:00:27 +0000</pubDate>
		<dc:creator>Bobby Anguelov</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[career]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[skills]]></category>

		<guid isPermaLink="false">http://devmag.org.za/?p=4359</guid>
		<description><![CDATA[<br/>In this article, game developer Bobby Anguelov gives advice on getting a good education for a career as a game programmer.<div class='yarpp-related-rss'>
<h2>Related posts:</h2>
<ol>
<li><a href='http://devmag.org.za/2009/08/12/latest-game-career-guide-challenge-results/' rel='bookmark' title='Latest Game Career Guide challenge results'>Latest Game Career Guide challenge results</a> <small>I&#8217;m going to assume you know about Game Career Guide...</small></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<br/><p><img style="display: block; float: none; margin-left: auto; margin-right: auto; border: 0px;" title="platfrom_banner" src="http://devmag.org.za/blog/wp-content/uploads/2012/02/header.png" alt="platfrom_banner" width="680" height="341" border="0" /></p>
<div>
<p>While I was still deciding on a topic for this article, huge discussions (read arguments) started popping up in various game dev communities I followed, all based around the same theme: education<span id="more-4359"></span></p>
<ul>
<li><a href="http://altdevblogaday.com/2011/07/14/an-ai-curriculum/">http://altdevblogaday.com/2011/07/14/an-ai-curriculum/</a></li>
<li><a href="http://altdevblogaday.com/2011/07/04/the-importance-of-a-balanced-gamedev-curriculum/">http://altdevblogaday.com/2011/07/04/the-importance-of-a-balanced-gamedev-curriculum/</a></li>
<li><a href="http://altdevblogaday.com/2011/05/09/thoughts-on-university-education/">http://altdevblogaday.com/2011/05/09/thoughts-on-university-education/</a></li>
</ul>
<div>There seems to be quite a lot of debate on what prospective game programmers should study as well as what current curricula should include. The most common questions still being asked by prospective game programmers are: “What do I need to study to become a game programmer?” and “What do I need to do to help me land a game industry job as a programmer?” It is these questions that I wish to address in this article.</div>
<div>I’m lucky enough to have been exposed to the enterprise software industry, the game industry as well as academia. Which I think gives me a broad perspective on what is required of potential game programmers as well as programmers in general. I do need to stress that this is just my own personal opinion and that this topic is quite a hotly debated one.</p>
<h2 dir="ltr">Game Programming is Hard!</h2>
<p>The first thing that I need to say is about game programming is that it is hard! It is by far one of the most challenging software development fields. As such, game programmers, and game developers in general, are a separate breed.</p>
<p>Game programmers are not in the industry for the money; game programmer salaries are usually quite a bit lower than those found in the enterprise space.</p>
<p>Nor do people become game programmers for the comfortable work environments; crunch time is an unfortunate fact of life in the game industry. During periods of crunch you are expected to work 60 to 80 hours a week for several weeks at a time.</p>
<p>Furthermore, the game industry can be rather unstable, layoffs and project cancellations are common as are employee burnouts. At GDC 2011, I was told the average lifetime of a game programmer in the industry is around 7 years. I don’t know how true that is, but it’s something that I can believe.</p>
<p>In addition to all this, the game industry is also notoriously difficult to get into, especially for fresh graduates.</p>
<p>Now I’m not trying to scare anyone away, but this is the truth of the industry. So why the hell would any sane person want to work as a game programmer? Well, the first and most important reason is simply passion.</p>
<p>Game programmers love what they do and would not want to do anything else. So far I’ve only mentioned the negatives of the industry, but game development is one of the most exciting, innovative, and personally rewarding industries in the software development field. Unlike the majority of enterprise development which is repetitive and mundane; there are always new challenges with each new project. Game programmers are by their nature problem solvers and thrive on the constant challenges that they are presented with. Personally, I cannot see myself ever working in enterprise software again.</p>
<p>From a technical perspective, game programming is extremely challenging. Game programmers are often tasked with the impossible; creating a high fidelity 3D virtual world with sounds and eveything else in 33 milliseconds or less. As such, game programming, particularly in the AAA space, tends to be extremely low level work. It requires that programmers be comfortable with concepts such as advanced mathematics, data structures, memory management, optimization techniques and a basic understanding of hardware and operating system architectures.</p>
<p>Programming isn’t something that can really be taught. Just like everything else in the world, programming requires a fair amount of natural talent and a brain that works well with concepts like math and logic. If you struggle with math, that’s probably a good sign that programming is probably not a good career choice for you. If that’s the case then don’t despair; there are numerous other non-programming positions in the game industry like game design, art, or production that may be more suited for your talents.</p>
<p>Now before I carry on with study options, let’s briefly discuss the various positions available within the game programming field. While generalist programming positions do exist, they are few and far between. The large majority of game programming positions are specialized within a single area of expertise such as: graphics, physics, AI, sound, tools, networking, etc.</p>
<p>So how are you, with no experience in any of these fields, supposed to choose one and specialize in it? How do you know that you will enjoy it or that you will be good at it? Well, I feel that you really shouldn’t make that choice without actually trying each of these sub-fields first.</p>
<h2 dir="ltr">What should I Study?</h2>
<p>The central point of this article is the “What should I study?” question.</p>
<p>Simply put, the answer is computer science. As with any other programming field, game programmers are expected to have completed at least a bachelor’s degree in computer science. Luckily computer science (CS) is a rather standard course which most universities will offer a degree in.</p>
<p>So why a CS degree? Because it will give you a great foundation in mathematics, programming and computer systems. As with any tertiary degree program; CS degrees will vary across universities and in most cases offer some degree of flexibility with regards to subject choices or specializations. At the very least a good computer science degree should cover the following fundamental subjects:</p>
<ul>
<li>Calculus</li>
<li>Linear Algebra</li>
<li>Discrete Mathematics</li>
<li>A C/C++ programming course</li>
<li>Data Structures</li>
<li>Design Patterns</li>
<li>Operating Systems</li>
<li>Software Engineering</li>
<li>Concurrency / Parallel Programming</li>
</ul>
<p>In addition to these fundamentals you will usually have a choice between specialization electives such as the following:</p>
<ul>
<li>Computer Graphics</li>
<li>Artificial Intelligence</li>
<li>Compiler Construction</li>
<li>Network Programming</li>
<li>Databases</li>
<li>Computer Security</li>
<li>Microprocessors</li>
</ul>
<p>In some cases, as in the US colleges, students will be presented with a single course called something along the lines of Computer Science 1, or Fundamentals of Computer Science, etc. These kinds of courses are usually a single semester or a year course that will act as an umbrella for several of the above courses. For example, the University of Cape Town (UCT) has such courses e.g. <a href="http://www.cs.uct.ac.za/teaching/undergraduate-courses">CSC1015</a> (Problem solving and algorithm development; object orientated program design using Java; number systems) whereas the University of Pretoria (TUKS) has separate modules for each topic (<a href="http://www.cs.up.ac.za/courses/list">http://www.cs.up.ac.za/courses/list</a>).</p>
<p>With so many options and varying degree programs; how should you choose what program to take? Well, my first piece of advice is to choose the computer science degree program which allows you to take the most math modules. This is good metric of the quality of the degree program. CS degrees that are light on math are usually of a low quality. So to reiterate, try to take as many math electives as you can, as they will be essential later on, especially for game programming.</p>
<p>Game programming is pretty much one large math problem. For example: computer graphics is heavily reliant on a good understanding of calculus and linear algebra; Artificial intelligence (AI) concepts are based on the first order logic covered in discrete math courses; other key computer science concepts like data structures, graph theory, combinatorics and sets are also covered in discrete math courses. Other math subjects like numerical methods, mathematical modeling and statistic will also be useful in your future career as a game programmer. If you have the choice and think you may be interested in physics programming; take a physics module or two as well. In addition to the standard course load, most colleges will let you take additional non degree subjects as well and you are also able to simply attend the lectures for other subjects without actually enrolling in them.</p>
<p>Now what about electives? Well, I’d advise taking all the C++ modules available and the compiler construction module. Furthermore choose a degree program which offers courses in computer graphics, AI, and networks. This may prove a bit tricky since, for example, computer graphics courses are not taught in a lot of computer science degrees in South Africa. Try to take electives that have similar fields in the game industry. They don’t have to be identical just similar enough. For example, network programming might not focus on creating game server but you will definitely learn about client/server architecture and much, much more. Past that, it’s your own choice to take what subjects seem interesting to you.</p>
<p>You need to think of college as an opportunity to be exposed to and experience as many different sub-fields as possible. Don’t think of college as place to specialize; especially not in an undergraduate degree. Think of that degree as an opportunity to learn more about yourself, your talents and your potential interests. Especially ones that you never knew you had! The only way to find out if you will enjoy something or have a knack for it is to try it so be smart and make full use of the opportunity college provides you.</p>
<p>In South Africa (and as far as I know the UK, Australia and Canada), we have a postgraduate honors degree, which is similar to a US master’s degree, in that it consists of multiple specialization modules (graphics, AI, etc.) as well as a mini-thesis. It is only a one year degree unlike the US masters which is two year but content wise, the degrees are quite similar. It is advisable that you do your honors as well if it is an option, once more giving you an opportunity to explore various fields.</p>
<p>Having a master’s degree or higher is not essential for the game industry, in fact I don’t think it really matters. I’m sure it helps but there are way more important things which I will discuss later on. Personally, I completed my master’s degree because it allowed me to spend two or more years researching a game oriented topic while also leaving me a lot of free time in which I could improve my skills, and do research on various other game programming topics I was interested in (animation, engine architectures, AI,) and most importantly learn more about the industry. This is a personal choice, and as I mentioned not really essential.</p>
<p>Once you’ve graduated with a CS degree and have hopefully had exposure to most of the various sub-fields present in the industry. You should also know more about your personal skill-set as well as which of those sub-fields you really enjoy working in. For example, early on in my degree I found out that I really hated things like networking and computer security but I really enjoyed AI and graphics. Conversely a friend of mine went in with a game dev, in his case graphics,  interest; did the security module and got hooked. He now works for one of the leading computer security firms in the world. That for me is the greatest selling point of doing a general computer science degree. The fact that in exploring various fields it might spark a passion for something that you never knew you had. Furthermore, a CS degree will quickly show you whether you are cut out to be a programmer or not.</p>
<h2 dir="ltr">Beware of the easy method</h2>
<p>Sometimes people say: “So yeah, computer science…  But wait, I just saw that ‘University XYZ’ is offering a course in ‘uber game programming’, wouldn’t that be a better option since it like says game programming and stuff?”<br />
In general, I’m skeptical of specialized degree programs, but they aren’t all bad. You just have to be careful and do your research before enrolling in such programs. Compare these programs with a standard computer science degree. If you notice a large discrepancy between the two programs (especially when it comes to math or C++ modules), be wary of those specialized degrees.</p>
<p>Recently, a local university, the University of the Witwatersrand (WITS), announced that they will be starting a <a href="http://www.wits.ac.za/academic/humanities/wsoa/digitalart/8828/undergraduate_courses.html">degree program in game design</a> (they state they have a game design and a game programming degree as well). This is in addition to another local university, the University of Cape Town (UCT), already having a <a href="http://www.cs.uct.ac.za/about-us/gamesFlyer%20-%202010.pdf">game programming /design degree program</a> as well. In the US there has been an explosion of colleges that are now offering specialized game development oriented programs, most notably: <a href="https://www.digipen.edu/">The Digipen Institute of Technology</a>, <a href="http://www.fullsail.edu/">Full Sail University</a> and <a href="http://www.scad.edu/">Savannah College of Art and Design</a>. It is important to note, that all of the above options are accredited universities and you will graduate with a bachelor’s degree.</p>
<p>On the other hand, there are also numerous “fly-by-night” online courses/college on game development available, such as <a href="http://www.gameversity.com/">viCampus</a>, <a href="http://www.gameinstitute.com/">GameInstitute</a> and <a href="http://www.train2game.com/">Train2Game</a>. There are some local options as well:  <a href="http://www.adcourses.co.za/">AD Courses</a>. My advice with this whole group of “colleges” and I use this word loosely, is to avoid them like the plague. You will often walk out of these “colleges”, after wasting a ton of money and time, with a diploma that isn’t worth the paper it’s printed on.</p>
<p>If you are serious about studying a specialized game development course, do so at an accredited university.</p>
<p>If you are still unsure about your choice, try to get hold of a game developer either via twitter or email and see if they are willing to give you some advice. In my experience, game devs are quite a friendly bunch and are more than willing to answer a few questions.</p>
</div>
<h2 dir="ltr">Portfolios and Side Projects</h2>
<p>Now to blow your mind! At the end of the day, what you studied is pretty irrelevant when it comes to getting a job in the game industry. Having a Ph.D. in ‘UBERGameProgamming’ is not going to make you a better candidate than some other guy with a high-school diploma that wrote a real-time ray tracer in his garage. The game industry is all about skills and being able to demonstrate those skills.</p>
<p>A degree is a great way to filter applicants but it is your portfolio that will get you an interview. If you have an outstanding academic record and nothing to show at the end of your studies apart from a degree, don’t expect a call back. Being a programmer; means it’s a lot harder to create an impressive portfolio than let’s say if you were an artist. So try to play around with things that interested you in your college class at home. If something in class caught your attention, go home and try it. First, it’s a great way to build up a portfolio of demos. Second, it’s the best way to actually understand a technique. I started a tiny tech blog to just keep track of all the things I’ve been mucking around with in my spare time and you know what, that tech blog has actually become my portfolio.</p>
<p>Remember that there are hundreds of other guys just like you that are applying for the same job, some of which probably have more impressive academic records than you or went to better schools than you. On paper these candidates look better so you need to make yourself stand out from the crowd and say: “screw my resume! This is who I am as an engineer!” Do something weird or unusual; show the company that you can think out of the box.  Don’t just fire up UDK and slap together another shooter mod and send that in.</p>
<p>It’s also not a good idea to hand in group projects or class assignments as portfolio pieces. Companies want to see what you can do and they want to see stuff that’s slightly more advanced than something that was made so that entire class was expected to be able to complete. College assignments are usually set so that the weaker students can still complete them to some degree and therefore make very bad benchmarks of your individual skills. Group assignments also allow you to claim greater credit than is actually due to you and so are usually disregarded.</p>
<p>Another problem, at least for me, was that I hadn’t specialized when I was looking for a job. I was doing my masters in AI yet I was teaching graphics. My blog is more graphics oriented than game AI and yet I was applying for AI positions. This was a point of confusion for most of the callbacks I got, and I got asked numerous times which field I preferred and why. If you know what you want to do, focus on that and tailor your portfolio with that in mind. So obviously, don’t do send in a ray tracer project for a networking position.</p>
<p>In the game industry, so far my experience is that talent is king. There are lots of amazingly talented game programmers that are self-taught and don’t have any college education (for various reasons). They didn’t get their jobs because of their education rather despite it. They got their jobs because of their skills, but I think if you asked them, the consensus would be that getting a college education is a good idea.</p>
<p>So now, taking all this into account, why did I spend such a long time discussing education if it’s not that relevant? Well, as I said your education won’t train you but what it will give you is a set of tools which you can then use to learn and improve.</p>
<p>The worst thing for me was seeing programmers spend a day trying to solve what is essentially an already solved problem. These programmers are so proud of their solution and are oblivious to the fact they’ve simply re-invented the wheel (usually their reinvented wheel is kind of squarish) and have wasted a massive amount of time doing so because they had gaps in their fundamental education and didn’t know a solution existed.</p>
<p>I often identify areas in my own background that are rather “swiss-cheesy” and so I try to fill them whenever I get a chance. For example, I never took a compiler construction course during my degree (I took microprocessors instead) and now that’s starting to bug me, so my next step is going to be reading up on compiler construction.</p>
<p>As a programmer your education will never end, there will always be things that you may not know and have yet to learn, new technologies to master and so on but it is essential that you know the fundamentals. Just like building a house, you need to ensure that the foundations are strong before you start building upon them. Just like a bad foundation will make a bad house, bad fundamentals will make a bad programmer.</p>
<p><em><br />
</em></p>
</div>
<div class='yarpp-related-rss'>
<h2>Related posts:</h2><p><ol>
<li><a href='http://devmag.org.za/2009/08/12/latest-game-career-guide-challenge-results/' rel='bookmark' title='Latest Game Career Guide challenge results'>Latest Game Career Guide challenge results</a> <small>I&#8217;m going to assume you know about Game Career Guide...</small></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://devmag.org.za/2012/02/16/a-guide-for-prospective-game-programmers-bobby-anguelov/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
