<?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>#AltDevBlogADay &#187; Phil Carlisle</title>
	<atom:link href="http://www.altdevblogaday.com/author/phil-carlisle/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.altdevblogaday.com</link>
	<description>Each day a little more #gamedev love</description>
	<lastBuildDate>Thu, 17 May 2012 03:06:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Have you done your 10,000 hours?</title>
		<link>http://www.altdevblogaday.com/2011/10/31/have-you-done-your-10000-hours/</link>
		<comments>http://www.altdevblogaday.com/2011/10/31/have-you-done-your-10000-hours/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 14:44:31 +0000</pubDate>
		<dc:creator>Phil Carlisle</dc:creator>
				<category><![CDATA[Education]]></category>
		<category><![CDATA[General Interest]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://altdevblogaday.com/?p=19635</guid>
		<description><![CDATA[<p><strong>10,000 hours.</strong></p>
<p>I&#8217;m not a big fan of Malcolm Gladwell&#8217;s books, but one of the things I read about after seeing a review of his book Outliers got me thinking about my own students.</p>
<p><a href="http://www.altdevblogaday.com/2011/10/31/have-you-done-your-10000-hours/" class="more-link">Read more on Have you done your 10,000 hours?&#8230;</a></p>
]]></description>
			<content:encoded><![CDATA[<p><strong>10,000 hours.</strong></p>
<p>I&#8217;m not a big fan of Malcolm Gladwell&#8217;s books, but one of the things I read about after seeing a review of his book Outliers got me thinking about my own students.</p>
<p>His book <a href="http://www.amazon.com/Outliers-Story-Success-Malcolm-Gladwell/dp/0316017922/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1242789855&amp;sr=1-1" target="_blank">Outliers</a> is based on the research of <a title="Anders Ericsson" href="http://www.coachingmanagement.nl/The%20Making%20of%20an%20Expert.pdf" target="_blank">Anders Ericsson</a> in which he studies the commonalities of &#8220;experts&#8221; and how they came to be that way. The upshot of which is that it is all about &#8220;practice&#8221;. Notionally, the book suggests that you become an expert at something by fulfilling a regimen of practice for &#8220;10,000 hours&#8221;. You can read the research yourself to see how far Gladwell has stretched that notion. The thing is, 10,000 hours works out to rougly 3.5 years of full time 8 hours-a-day work!</p>
<p>To give you a bit of background, I teach part-time at a University in the UK and one of my classes involves a module called Advanced Games Technology in which we ask students to produce a full game for themselves over a two semester period. We don&#8217;t really specify much in terms of constraints other than &#8220;it has to be 3D&#8221; and &#8220;it has to use some middleware&#8221;. Ultimately it is meant to be a portfolio peice for them, so they can throw all of what they&#8217;ve learnt into the game and produce something really polished.</p>
<p>Now I&#8217;ve been teaching this module for a few years now, so I&#8217;ve started seeing some patterns in terms of student response to this relatively simple and open brief. Can you guess what it is?</p>
<p>Yep, it&#8217;s paralysis. Literally, for some reason the sheer concept of starting a project from scratch on this scale seems to throw most of the students into a cartwheel of indecision. My thinking is that this is because up until that point, they have largely worked off fairly strict briefs and fairly regimented development schedules with specialized classes and teaching to support them. But then they are faced with &#8220;do whatever you really want to do&#8221; it seems what they really want to do is nothing!</p>
<p>Only, it&#8217;s not strictly that simple. Because this isn&#8217;t just common garden student laziness (anyone who has taught knows what that looks like). This is something else and I feel like it has some relationship to the experitise issue. Which is that they simply have never practiced actually thinking of making a project from scratch for themselves. Or rather, they haven&#8217;t practiced often enough for it to be second nature that you have a hundred ideas you want to create and never have enough time for them. Almost everyone I know in the games industry has both done more than 10,000 hours worth of work in their respective roles and has also gotten hundreds of ideas for games they would like to make.</p>
<p><strong>Analysis paralysis</strong></p>
<p>The other issue I think, is that many of them fail to start because they are stuck in the limbo of indecision trying to choose which technologies to build and which middleware to use. I&#8217;ve seen this issue happening with indie projects as well. Literally never starting on something because the perfect technology is not quite there, even if one is &#8220;close enough&#8221;. The main factor is that if you find that there is always a barrier to you starting a particular project (be it a new peice of technology, a new art peice, or a new feature for a game) then you should maybe start thinking that practice in terms of just producing something is a good idea. I used to get that kind of feeling a lot when I was doing my own indie games using Torque. I always found myself waiting for the garagegames.com guys to develop some new technology they&#8217;d been talking about so I could then work on using it for my game. That whole notion of waiting for someone else to develop core technology simply wasn&#8217;t something I ever had when I was working in commercial development, where we would rather work on our own solutions and not use someone else&#8217;s. But the end result was that I had an excuse not to simply practice and make progress even if ultimately I would end up using their solution further down the line.</p>
<p><strong>How to fix the problem?</strong></p>
<p>This is basically a mental blockage as much as anything else. But the ideal solution is to &#8220;practice&#8221; these things until they become almost like muscle memory. One great way I think to approach this, is to take part in a short term development competitions like Ludum Dare or any of the game jams. At the very least you will not feel like you are the only one to have the blockage. But if you practice throwing together project code and &#8220;getting things done&#8221; you will eventually get over that hump of not being able to figure out where to start.</p>
<p>Here area few other ideas for practice for programmers:</p>
<ul>
<li>Make yourself create small project files from scratch, including setting up all build settings. Create your own libraries from scratch and use them as both static and dynamic libraries.</li>
<li>Make yourself a testbed project and integrate new technology middleware into it often, write code so that you can &#8220;wrap&#8221; each middleware so that you can implement new ones in an opaque manner</li>
<li>Take on a new aspect of technology, in an area you are not familiar with (animation, graphics, networking, physics, engine design etc)</li>
<li>Practice 2D and 3D, make prototypes that work with similar code across both (thinking in components is good here)</li>
<li>Work on math skills, practice things like orientations and simple but useful tools like easing. Do plenty of work involving different coordinate frames and transformations.</li>
<li>Work on interfaces and API designs. Time them and profile them. Look at how memory changes and how different sizes of allocations change the profiles.</li>
<li>Find a new aspect of the language and implement something new with it. Look at delegates, smart pointers and any new C++ standards features. Study new features in boost and other open source frameworks (POCO for instance).</li>
<li>Learn a new language, implement a completely unrelated type of project with it than you normally work with (i.e. a database, a tool of some sort etc).</li>
</ul>
<p>I do think that many companies would actually be wise to give their devs time to practice starting smaller games from scratch too, although it seems fairly rare. But the idea of making quick prototypes and generally not sweating the details of choices or designs or architectures I think is a useful practice as it stretches you to not be concerned with details and instead by productive and experimental. Of course the details matter, but then you can practice those issues seperately. As the Ericsson research shows, the best experts actually use a well thought out practice regime. It isn&#8217;t that you simply practice for its own sake, but that you practice in order to learn something new, or to commit to memory some process or practice that you can build on incrementally. In a way you are trying to find flaws in your own process and then factoring in corrections into the overall practice regime.</p>
<p>I&#8217;ve recently been teaching myself 3D art skills and one of the things I&#8217;ve learnt is that simply practicing things like sculpting (for faces) helps to improve my eye for proportion and anatomy and helps me understand what makes a &#8220;good&#8221; image. So doing regular sculpting, even if I&#8217;m still fairly tragic at it all is good. As I learn the tools and the forms I slowly begin to appreciate the underlying structure and process.</p>
<p>I think we can see code in similar terms. So doing quick and dirty prototypes will begin to show you the underlying patterns we need to commonly use in more complex works. Or will show us some aspect of design we aren&#8217;t fully aware of until we actually try and develop in that area.</p>
<p>So my questions to you, the readers of this entry. Have you done your 10,000 hours? How do you approach practice and what do you do to work on your skills and to expand your working process? Have you tackled anything new recently? How did you learn the new area and how can you apply those learning processes to new areas next time?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2011/10/31/have-you-done-your-10000-hours/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The content conundrum</title>
		<link>http://www.altdevblogaday.com/2011/09/01/the-content-conundrum/</link>
		<comments>http://www.altdevblogaday.com/2011/09/01/the-content-conundrum/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 23:27:26 +0000</pubDate>
		<dc:creator>Phil Carlisle</dc:creator>
				<category><![CDATA[Tools]]></category>
		<category><![CDATA[Visual Arts]]></category>

		<guid isPermaLink="false">http://altdevblogaday.com/?p=14483</guid>
		<description><![CDATA[<p>There are plenty of problems with game development as a business. But one of the biggest ones is the problem of the cost of &#8220;content&#8221;. Content is basically the assets used in the game, be it sound, character models, animation, textures, images or whatever. Essentially, this is the &#8220;stuff&#8221; that makes it possible to realize your imagined game world.</p>
<p><a href="http://www.altdevblogaday.com/2011/09/01/the-content-conundrum/" class="more-link">Read more on The content conundrum&#8230;</a></p>
]]></description>
			<content:encoded><![CDATA[<p>There are plenty of problems with game development as a business. But one of the biggest ones is the problem of the cost of &#8220;content&#8221;. Content is basically the assets used in the game, be it sound, character models, animation, textures, images or whatever. Essentially, this is the &#8220;stuff&#8221; that makes it possible to realize your imagined game world.</p>
<p>Now the problem of content is a thorny one. Because many people would have you believe that so-called &#8220;AAA&#8221; development doesn&#8217;t really have a constraint on content. But the reality is that content is a huge part of any game budget and as such it can hit hard on any development budget, be it AAA or indie.</p>
<p><strong>So what is the problem?</strong></p>
<p>In a nutshell it takes too much effort to produce.</p>
<p>The overall quality of content has been rising ever since games first started being played. Moving from single colour blocks in &#8220;pong&#8221; to sprites in &#8220;mario&#8221; to fully realized 3D worlds in &#8220;Gears&#8221; the cost of producing all that content has been rising. Not to mention the skill and time to produce it has been growing also.</p>
<p>As an indie developer, I&#8217;ve often been very tightly constrained by my lack of ability to produce my own content. To the point where I&#8217;ve looked for alternatives. So I thought it might be useful to enumerate some of the alternatives in this post.</p>
<p>Now let me get this point across before we start. I am NOT advocating that we can ever totally replace artist created peices. What I am suggesting is that there has to be a smarter way to produce *some* types of content. Or at least streamlining the content production process so that we reduce the burden of both cost and effort.</p>
<p><strong>Procedural methods, a potential solution?</strong></p>
<p><a title="procedural methods" href="http://altdevblogaday.com/2011/03/23/procedural-generation-and-user-generated-content-part-i-intro-myths-and-facts/" target="_blank">As others have talked about before</a>. Procedural methods are a very good way of producing content. Not least because they generally have some designer feedback mechanisms to allow the artistic shaping of content, whilst also allowing the content producer to be vastly more productive.</p>
<p>Procedural methods seems to work best at producing content where there is some systemic structure to it. By this I mean that there are patterns of composition in the content that can be processed to produce variation. So for a simple example, texture synthesis seems like a good choice, because textures have a mixture of varying frequencies and procedural methods are good at handling variations on a theme.</p>
<p>There is a <a title="list of texture synthesis tools" href="http://forums.xonotic.org/showthread.php?tid=93" target="_blank">list of texture synthesis tools here</a></p>
<div class="wp-caption aligncenter" style="width: 650px"><img src="http://www.mapzoneeditor.com/resources/gallery_shaders/profx_shader_006.jpg" alt="procedural texture" width="640" height="231" /><p class="wp-caption-text">Texture procedurally generated with Mapzone</p></div>
<p>A good example of a texture synthesis tool (Mapzone) <a title="mapzone link" href="http://www.mapzoneeditor.com/index.php" target="_blank">can be had for free</a>.</p>
<p>Whilst texture synthesis seems useful. It can also be augmented by use of procedural blending to allow for more variation. So for instance, a perfectly normal sythetic texture can be aged by adding a procedurally generated &#8220;scratch map&#8221; texture to it. This layered approach is another key aspect of procedural methods. Adding layers of control into the content allows for variations in the mixing of those layers, again leading to more variation.</p>
<p>The point of most procedural tools is not to replace the artist, but rather to amplify their output. Or to allow rapid iteration on a basic theme in a way that allows artistic choice while handling much of the donkey work involved in the work itself.</p>
<p>Now of course, there are issues with entirely procedural methods. Mostly revolving around the problem of aesthetic quality (procedural methods are great where patterns and rules are involved, but no necasarily where artistic intent is involved) and of the &#8220;vision&#8221; of an artist being hampered by the synthesis tool. In effect, when you choose a procedural approach, you do give up some artistic direction because you are constrained by the algorithms represented in the tool.</p>
<p>Sometimes though, it feels like that is a reasonable thing to give up to allow for more variety. At the very least, it is reasonable to allow for artistically inspired procedural content generation. A very good example of this approach is apparent in MMO&#8217;s where they have character creation screens.</p>
<p>Have a look at some of the examples from this <a title="Youtube character creation videos" href="http://www.youtube.com/results?search_query=character+creation&amp;aq=f" target="_blank">youtube search.</a></p>
<span style="text-align:center; display: block;"><a href="http://www.altdevblogaday.com/2011/09/01/the-content-conundrum/"><img src="http://img.youtube.com/vi/FQLSZCiSmC0/2.jpg" alt="" /></a></span>
<p>You can have much hilarity with procedural methods too</p>
<p>Most of these character creators use relatively simple techniques. Adding artist created content in peices such that you can swap out individual elements and swap amongst a limited pallete of choices. The point is that if you think of the complexity of the approach versus the number of potential variations it is a very powerful value proposition. But of course, you trade off entirely individualized characters for a more &#8220;template&#8221; based approach. In essence for all the combinatorial variation allowed, you are constrained within some limitations to allow for it. In a way, the potential spectrum of artistically created works is infinite. But the procedural approach limits you to the number of variations allowed by the underlying algorithms involved in the generation.</p>
<p>So the common approach to character creation. Using the &#8220;template base character, plus variations on clothing and accessories/texture&#8221; based approach is reasonably common, but as you can see from the Spore crature creator, it isn&#8217;t the only method you can use.</p>
<p>Another approach to the generation of humanoid characters, is to allow morph based variation and to allow the blend-space of the morph shapes.</p>
<div class="wp-caption aligncenter" style="width: 573px"><img class=" " src="http://www.makehuman.org/forum/download/file.php?id=597&amp;mode=view" alt="Makehuman example" width="563" height="438" /><p class="wp-caption-text">Makehuman example</p></div>
<p>You can have a look at this approach on the <a title="Makehuman website" href="http://www.makehuman.org" target="_blank">MakeHuman website</a>, although this is not the only tool using this approach. Both <a title="Facegen" href="http://www.facegen.com/" target="_blank">FaceGen</a> and <a title="Evolver" href="http://www.evolver.com/" target="_blank">Evolver</a> also take this approach. It is a powerful technique because again, the core of the content is based on artist created input meshes (in the form of morph targets). So the quality of the result is based on the quality of the artists involved, rather than the underlying algorithms.</p>
<p><em>I once saw an internal tool at a certain game company here in the UK that was working on a footaball game. They had made a 3dsmax based toolset for morph based generation of football players using morph meshes and morphed textures. The results were unbelievably impressive even compared to the commercial tools linked above. The approach is capable of making high end and high quality content, if it is fed with high quality input meshes.</em></p>
<p>The most obvious area for procedural methods to be used, is in the generation of organic shapes/textures/deformations where nature has essentially played the part of the algorithms in shaping the natural world. So for instance grass only growing on relatively flat ground is a great rule that can then be duplicated as a procedural parameter in a generation step.</p>
<p><a title="Terrain generation apps" href="http://vterrain.org/Packages/Artificial/" target="_blank">Here is a nice list of terrain texture generation applications</a>. As you can see, there is quite a lot of choice in terms of terrain and vegetation generators.</p>
<p>One area I have been hoping would see more development is in the area of procedural animation. Specifically, things like automated rigging and procedural animation of walk and idle cycles would be very nice. I have noticed that 3dsMax now has a procedural walk cycle generation within its CAT rigging system. However that is still relatively rudimentary.</p>
<div style='text-align:center;'>
<object type="application/x-shockwave-flash" width="400" height="300" data="http://www.vimeo.com/moogaloop.swf?clip_id=2360652&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=01AAEA">
	<param name="quality" value="best" />
	<param name="allowfullscreen" value="true" />
	<param name="scale" value="showAll" />
	<param name="movie" value="http://www.vimeo.com/moogaloop.swf?clip_id=2360652&amp;server=www.vimeo.com&amp;fullscreen=1&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=01AAEA" />
	<param name="wmode" value="opaque" />
</object>
</div>
<p>There are approaches to procedural animation that involve procedurally generating footsteps and then making a character move along with those footsteps using some kind of forward search and/or with ik based solvers to actually plant the feet. But I&#8217;m more interested in actually generating the motion in an artistic sense than actually procedurally generating it in the game right now.</p>
<p>If I get time soon, I&#8217;ll check out some of the procedural animation toolsets and post them here. But I think thats enough to be going on with for now!!</p>
<p>Thanks for reading.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2011/09/01/the-content-conundrum/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The side effects of programming</title>
		<link>http://www.altdevblogaday.com/2011/08/02/the-side-effects-of-programming/</link>
		<comments>http://www.altdevblogaday.com/2011/08/02/the-side-effects-of-programming/#comments</comments>
		<pubDate>Tue, 02 Aug 2011 11:59:04 +0000</pubDate>
		<dc:creator>Phil Carlisle</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://altdevblogaday.com/?p=12778</guid>
		<description><![CDATA[<p>I usually blog about game design related issues, because that&#8217;s where my heart is. I like to program but only because it allows me to be creative. But this week, I&#8217;ve gotten my hackles up and I wanted to share my frustration with the readers of this blog.</p>
<p><a href="http://www.altdevblogaday.com/2011/08/02/the-side-effects-of-programming/" class="more-link">Read more on The side effects of programming&#8230;</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I usually blog about game design related issues, because that&#8217;s where my heart is. I like to program but only because it allows me to be creative. But this week, I&#8217;ve gotten my hackles up and I wanted to share my frustration with the readers of this blog.</p>
<p><strong>The problem</strong></p>
<p>In a nutshell, my problem is &#8220;side effects&#8221;. To be more specific, side effects of the implementation of code.</p>
<p>I&#8217;ll give you an example I&#8217;ve been facing to illustrate the point. We&#8217;re using an old code base (name redacted to protect the creators) as part of our client prototyping for our latest project. I&#8217;m trying to get some animations to play. So I look at the code and within literally hundreds of classes is the &#8220;player&#8221; class that I need to use. Well, actually, its an &#8220;AIPlayer&#8221;, which is derived from player, which in turn is derived from:</p>
<p>ShapeBase-&gt;GameBase-&gt;NetObject-&gt;SceneObject-&gt;SimObject-&gt;ConsoleObject</p>
<p>As you can probably tell, this code base is quite old school in its architecture.</p>
<p>Anyway, back to the problem. I&#8217;m trying to get animations to play on a character when they receive an update in state from the server (its an online game). So I find the function &#8220;setAnimationThread&#8221; which seems to do what I want. Only, it doesn&#8217;t do what I want. On an API level it *is* the correct method to call. But in terms of functionality, it has issues. As I debug, it finally dawns on me what is happening. The side effect of parts of the &#8220;Player&#8221; functionality, is that the player class controls animation state based on movement. But it does it an opaque manner within an &#8220;updateMove&#8221; method. Effectively the side effect of using the &#8220;player&#8221; class, is that actually playing animations is fraught with problems.</p>
<p>Let me give you another example, which of these methods do you think is responsible for selecting which animation is currently playing?</p>
<p><code><br />
updateAnimationTree();<br />
updateMove();<br />
updateTransitions();<br />
animateSubtrees();<br />
</code></p>
<p>&nbsp;</p>
<p>The problem is that when you look at an interface, a method or a class, you should have a reasonable chance of knowing what it is actually going to do. In effect, what is happening when you write a piece of code, is that you are forming a contract with the user of that code that you will fulfill a specific purpose. From the example, you really can&#8217;t isolate where specific animation clips should be selected. So would it be possible to have a clearer interface?</p>
<p><strong>So how do things go wrong and what can we do to fix the problems?</strong></p>
<p>The main reason I see for side effects to happen in code, is where you have legacy code that has been worked on over time, with other purposes in mind. This is a reasonably common case when you have say a &#8220;core tech&#8221; team in a larger company, but can happen pretty much anywhere. Most developers do not have the luxury of starting from scratch when they start a project. But the side effects of using a legacy code base, is that often the functionality was not as planned as it should have been and ultimately you often have the case where special edge cases are dealt with in order to ship a specific title. Unpicking the side effects of those last minute bug-fix special cases can be a nightmare.</p>
<p>Another reason for side effects, is that sometimes you simply don&#8217;t know what the API requirements for an implementation will be until you&#8217;ve tried implementing it. I often have the situation where I will prototype a system up to learn what kind of interface I ultimately will need and just accept that refactoring is a part of improving the product. But sometimes the product ships with the prototype code.</p>
<p>The major reason for side effects though, is when you are trying to create an all encompassing class that deals with all sorts of functionality in a monolithic manner. A sure sign of this kind of thing, is when you cannot actually simply instantiate a class without having it require a lot of setup from other classes.</p>
<p>Now let&#8217;s be clear here. I&#8217;m not saying that you can always avoid side effects. Or that all interfaces should be instantiable without requiring other classes to setup. But in the most common case, you should aim for simpler class structures and favour composition over inheritance. The reason I say this, is because the main aim here is &#8220;separation of concerns&#8221;. You are trying to make sure that whatever class you write, only deals with one specific issue. So for instance, the class I should be looking at for animation, should not require any form of movement code, or any form of network code etc. Sure, you can provide it with interfaces to communicate with those systems, but functionality wise, an animation class should concern itself with animation. I should know that if ever I want to debug animation happening in the engine, that is the place to look.</p>
<p><strong>So how do you fix these kind of issues?</strong></p>
<p>The first approach is to design interfaces that express this notion of separation of concerns. All that means, is that when you write code, you write it to fulfill a specific purpose and ensure that you protect the interface from being co-opted to perform other functionality. So for example, you would write accessor methods that return classes that are contained within an interface to perform a specific task. So instead of having a number of animation methods on an interface, you have it contain an animation interface and provide a method to get that interface for external use. Personally I&#8217;ve taken to using a component based architecture to more effectively state this notion of composition rather than inheritance and to try and enforce the narrowing of focus, which is definitely more natural in a component architecture.</p>
<p>The second approach, is to use test driven development to help enforce the design. If you consider each class as a mock object, you should think about what you would expect that class to do as a mock. The reason I suggest this, is that if you can design code to work with mocks and still have it make logical sense, then chances are that the real interface has a narrowly focused purpose and is more likely to be separable in a clean way. Separable code tends to be better at not having unexpected side effects.</p>
<p>The main thing here is to understand that side effects tend to come about because code that &#8220;says&#8221; it will serve one purpose, is actually used to perform functions for an unrelated purpose. It seems reasonable to assume that comes about because either the purpose is unclear, or because the implementation details that are required to clearly serve that purpose are unclear. One way or another you need to address those issues.</p>
<p>This is an ongoing struggle for me personally, I tend to try and work on games that conceptually have quite a lot of unknowns for me, so I often tend to create interfaces that I later understand to be incorrect. Using a component based architecture for the last few years has taught me that components are a great way of narrowing concerns, but that comes at the cost of constantly looking up or cacheing interfaces.</p>
<p><strong>What methods do you guys use to ensure you don&#8217;t have side effects in your own code?</strong></p>
<p>I&#8217;d really love to hear what everyone else does to try and protect themselves from code with side effects. I&#8217;m sure there are plenty of ways I&#8217;m not aware of.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2011/08/02/the-side-effects-of-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>animation and games part two</title>
		<link>http://www.altdevblogaday.com/2011/07/18/animation-and-games-part-two/</link>
		<comments>http://www.altdevblogaday.com/2011/07/18/animation-and-games-part-two/#comments</comments>
		<pubDate>Mon, 18 Jul 2011 23:09:51 +0000</pubDate>
		<dc:creator>Phil Carlisle</dc:creator>
				<category><![CDATA[General Interest]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[animation]]></category>

		<guid isPermaLink="false">http://altdevblogaday.com/?p=11759</guid>
		<description><![CDATA[<p>See Mike Jungbluth&#8217;s excellent series over at Gamasutra <a title="Mikes articles on gamasutra" href="http://www.gamasutra.com/blogs/MichaelJungbluth/20101227/6692/Adding_Weight_to_Your_Game_Design_Part_1_Squash__Stretch.php" target="_blank">here</a> and my previous post <a href="http://wp.me/p1ETmK-1WE" target="_blank">here</a>.</p>
<p>In this part, I&#8217;m going to cover the concept of squash and stretch and what it can mean for AI developers.</p>
<p><a href="http://www.altdevblogaday.com/2011/07/18/animation-and-games-part-two/" class="more-link">Read more on animation and games part two&#8230;</a></p>
]]></description>
			<content:encoded><![CDATA[<p>See Mike Jungbluth&#8217;s excellent series over at Gamasutra <a title="Mikes articles on gamasutra" href="http://www.gamasutra.com/blogs/MichaelJungbluth/20101227/6692/Adding_Weight_to_Your_Game_Design_Part_1_Squash__Stretch.php" target="_blank">here</a> and my previous post <a href="http://wp.me/p1ETmK-1WE" target="_blank">here</a>.</p>
<p>In this part, I&#8217;m going to cover the concept of squash and stretch and what it can mean for AI developers.</p>
<p>Squash and stretch is very well described in Mike&#8217;s post, so I wont go over the artistic principle (that and I don&#8217;t want to steal his bouncing ball picture). But the theory is pretty simple, because the original animators were working in a fixed time interval medium, they had to draw elements in a way that suggested deformation and momentum. These images used squash (to suggest momentum being converted to elastic energy) and stretch (to suggest that energy being converted back into kinetic energy). What they were doing was draing the various inbetween states as a rubber ball rebounds off a solid object. The deformations an impact produces gives a particular look as you can see if you study any high framerate photography of rubber balls.</p>
<p>&nbsp;</p>
<span style="text-align:center; display: block;"><a href="http://www.altdevblogaday.com/2011/07/18/animation-and-games-part-two/"><img src="http://img.youtube.com/vi/3jI57WMOzbU/2.jpg" alt="" /></a></span>
<p style="text-align: center"><strong>high speed video of bouncing rubber ball on youtube</strong></p>
<p>As you can see from the above video the deformation results in a squashing motion as the volume of the ball is preserved during an impact. This deformation is mimicked in hand animation by simply elongating or truncating the shape of the object in the direction of motion.</p>
<p>A relatively simple visual trick can add substantially to the feeling of stiffness and solidity of an object (or vice versa). Stiff objects tend to not deform as much as softer objects. So you get an inherent sense of the material of an object as it squashes and stretches.</p>
<p>&nbsp;</p>
<span style="text-align:center; display: block;"><a href="http://www.altdevblogaday.com/2011/07/18/animation-and-games-part-two/"><img src="http://img.youtube.com/vi/VaLESWaRMjU/2.jpg" alt="" /></a></span>
<p style="text-align: center"><strong>squash and stretch video on youtube</strong></p>
<p>&nbsp;</p>
<p>You might find the concept of squash and stretch pretty alien as an AI programmer. Why would we want to deform something that way? But don&#8217;t think of it literally. Think about the principles that the animators were trying to apply. They wanted to show that different materials deform differently. They also wanted to show that there was weight and momentum to the motions they were animating. So how can we think of these same kind of principles in terms of AI? Well, one area that seems reasonable to apply this principle to is that of group movements. You could consider that moving a group of units would require a fair degree of deformation of the group structure, but overall maintaining coherence. The group of units could &#8220;stretch&#8221; out as it moves, then &#8220;squash&#8221; back together again before finally settling on the overall structure.</p>
<p>But I&#8217;m thinking at a more abstract level, we can consider squash and stretch to be demonstrating the constraint of force and momentum within a particular value. By tracking say the amount of help a squad gives to a player in a squad shooter, you might apply the principles of squash and stretch to allow the player to run ahead of the squad (not literally, but figuratively in terms of help) and stretch themselves against enemies, but squash back together to help them out if their forward progress is halted for some reason. You could apply this principle in an AI director to maintain a non-constant helper system, so what would actually change would be that your squad would maybe be less accurate with shots as you progressed quickly, but then became more accurate as your progress slowed.</p>
<p>The main question is to consider how much momentum we want to portray as part of the movement. Another example of a potential application of squash and stretch in AI is the &#8220;rubber banding&#8221; you might apply to racing games. Clearly this is a very obvious application of the squash and stretch principle applied to the progress of a players race. Good progress is rewarded with the player pulling away from the field and &#8220;stretching&#8221; them out, but if the player slows down, then the field &#8220;squashes&#8221; back into place. Its easy enough to see how that actually works in a real race and might be useful to apply in similar areas where one agent is racing against another to accomplish a task.</p>
<p>Squash and stretch perhaps isnt immediately obviously applicable, but hopefully these examples will start getting you thinking about the value of showing the player different types of squash and stretch beyond simply the visuals.</p>
<p>Next time, we&#8217;ll have a look at one of the more directly applicable animation techniques and how important it is that we start to consider it as part of building really compelling AI characters and scenes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2011/07/18/animation-and-games-part-two/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging an AI Server</title>
		<link>http://www.altdevblogaday.com/2011/07/03/debugging-an-ai-server/</link>
		<comments>http://www.altdevblogaday.com/2011/07/03/debugging-an-ai-server/#comments</comments>
		<pubDate>Sun, 03 Jul 2011 12:49:43 +0000</pubDate>
		<dc:creator>Phil Carlisle</dc:creator>
				<category><![CDATA[#gamedev]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://altdevblogaday.com/?p=10248</guid>
		<description><![CDATA[<p><strong>Building the server</strong></p>
<p>Now that we&#8217;re officially out of stealth mode, I can talk a bit about some of the things I&#8217;m working on at <a href="http://www.namaste.vg">Namaste</a>. </p>
<p>I&#8217;m currently building the AI architecture for the project and one aspect of this is the need for an AI server. Building servers isn&#8217;t particularly new to me, although it has been a while since I worked on network code. But I thought I&#8217;d blog about the various frameworks and tools I&#8217;m using to build out the server and more importantly to help me debug it.</p>
<p><a href="http://www.altdevblogaday.com/2011/07/03/debugging-an-ai-server/" class="more-link">Read more on Debugging an AI Server&#8230;</a></p>
]]></description>
			<content:encoded><![CDATA[<p><strong>Building the server</strong></p>
<p>Now that we&#8217;re officially out of stealth mode, I can talk a bit about some of the things I&#8217;m working on at <a href="http://www.namaste.vg">Namaste</a>. </p>
<p>I&#8217;m currently building the AI architecture for the project and one aspect of this is the need for an AI server. Building servers isn&#8217;t particularly new to me, although it has been a while since I worked on network code. But I thought I&#8217;d blog about the various frameworks and tools I&#8217;m using to build out the server and more importantly to help me debug it.</p>
<p>Debugging AI is hard enough when you can throw debug data around within a single exe. But adding the fact that this has to be a server, it adds an interesting issue for debugging entity behavior.</p>
<p>The server itself is built using C++ and uses the <a href="http://pocoproject.org/">POCO framework</a> as a method of enabling it to run on both Linux as a daemon and on windows as a service. One of the benefits of using POCO is that it comes with a set of libraries that allow you to run an embedded web server, which is really useful for debugging. But we&#8217;ll get to that in a second.</p>
<p>Now poco comes with some pretty well specified logging functionality, which I&#8217;m using to create debug logs for the AI. Debug logging is the staple of most AI debugging techniques and can really help, especially when coupled with useful inspection tools. You can see a brilliant example of such a tool in <a href="http://aigamedev.com/premium/masterclass/flight-recorder/">an interview with Mika Vehkala over at aigamedev.com</a>, Mika shows a brilliant tool set that they built for IO interactive that has a sort of timeline approach to reviewing logs. </p>
<p>I think debug logs are perhaps the most powerful approach, but I tend to think a bit more visually. What I prefer to do, is actually show in-game what the AI is doing, in terms of movement selection, path generation, focus of interest etc. Unfortunately that simply isn&#8217;t available to me right now because I don&#8217;t have a direct connection to the client side as all AI communication is done with a game server. </p>
<p>What I needed, was some method of displaying debug information, such as a dump of the current behavior tree of a character, plus a representation of the world it is aware of, along with positional and other information.</p>
<p>The great thing about networked code, is that you start thinking in terms of distributed systems a lot more. What I needed was a protocol and a client that could attach to the server and pull the information I needed and display it. I already had the embedded web server, so I thought why not try that?</p>
<p><strong>Using a web client as debug viewer</strong></p>
<p>I&#8217;d played around with jQuery and JavaScript about a year ago, when I was looking at using webkit as a UI for my indie games. At the time I rejected it because of its lack of animation speed, but the techniques of using JavaScript to create a nice user interface have stuck with me. I decided to try and use a JavaScript based browser client that somehow would pull data from the web server and display the debug information I needed. </p>
<p>So the first thing I needed to do was pull the data from the server. Luckily, that&#8217;s actually quite a simple process. All you really need to do, is have a factory method derived from HTTPRequestHandlerFactory that you pass to the web server framework. When you call a specific URL, it goes to the factory method, which then creates a request handler object to handle the request based on the parameters you passed in the URL. </p>
<p>I created a number of methods on the server to respond to the calls I needed. The root &#8220;/&#8221; call simply presented an interface to the other methods, such as list entities for a world, view the current running world etc. Having a few test handlers in place, I had to get the data back to the client in a manner that would work for the JavaScript end. The easiest method was to simply return HTML content that displayed the appropriate href links. This worked ok, but wasn&#8217;t very pretty and I still needed some method of having JavaScript actually understand some of the object data in a more structured way.</p>
<p><strong>Choosing a protocol</strong></p>
<p>I could have used XML data as my protocol, as libraries for that are available both in the POCO framework and my own AI framework, but I chose instead to use JSON format. I used <a href="http://sourceforge.net/projects/libjson/">libjson</a> to encode the data in json format (in this case a list of entities) and passed that out as response to a &#8220;/listentities&#8221; url hit. Unfortunately I hit a snag in that the browser simply wouldn&#8217;t let me receive the data. Essentially I was hitting a security feature in the browser that stops it from reading data from a different URL than it had originally loaded. </p>
<p>I had loaded the browser client UI by storing a local HTML file which then references local JavaScript files as I didn&#8217;t want to have to deal with sending those files via the web server embedded in the AI server. After talking with someone else at Namaste I learnt that you can use JSONP to get around this particular issue. In a nutshell <a href="http://en.wikipedia.org/wiki/JSONP">JSONP</a> is a way to &#8220;wrap&#8221; JSON data in a script call, which gets parsed on the client as though it is a local script call, thus if you have matching script function names on the wrapped data and on the client you can call the function and pass the data back to the client. </p>
<p>So the functionality is that on page loading in the browser, you attach a script call to a button that creates a new element in the browser dom and then attaches a script call to it. This script call uses a URL which pulls the jsonp data via the URL and calls a script function as callback. The script function runs and then removes the element from the dom. Once the json data is parsed from the receiving function, you can pretty much do whatever JavaScript you want to it. Originally I had some <a href="http://raphaeljs.com/index.html">Raphael</a> code I was using to display entities positions as dots on a grid along with debug lines etc. But I&#8217;m currently moving that over to using <a href="https://github.com/mrdoob/three.js/">Three.js</a> and webgl to render the entities (which is nicer because then I can add different camera views and the rendering is far more responsive).</p>
<p>Here is how the Javascript code looks:<br />
<code><br />
function parseData(data)<br />
{<br />
	// remove the script element so we can recreate a new one<br />
	scriptElement.parentNode.removeChild(scriptElement);<br />
	var nItems = data.Gobs.length;<br />
	//alert(data); //uncomment this for debug<br />
	window.paper.clear();</p>
<p>	// draw entities positions<br />
	for( var i = 0; i &lt; nItems; i++  )<br />
	{<br />
		var circle = window.paper.circle(data.Gobs[i].xpos * 1 + 320,data.Gobs[i].zpos * 1 + 240,4);<br />
		circle.attr(&quot;fill&quot;,&quot;#f00&quot;);<br />
		circle.attr(&quot;stroke&quot;,&quot;#fff&quot;);<br />
	}<br />
};</p>
<p>$(document).ready(function()<br />
{<br />
	// create raphael canvas to draw on<br />
	window.paper = Raphael(document.getElementById(&quot;showdata&quot;),640,480);	</p>
<p>	//attach a jQuery live event to the button<br />
	$(&#039;#getdata-button&#039;).live(&#039;click&#039;, function()<br />
	{<br />
		// use a JSONP hack to get the json data in a viable format<br />
		scriptElement = document.createElement(&quot;SCRIPT&quot;);<br />
		scriptElement.type = &quot;text/javascript&quot;;<br />
		scriptElement.src = &quot;http://localhost:8080/jsonents&quot;;<br />
		document.getElementsByTagName(&quot;HEAD&quot;)[0].appendChild(scriptElement);<br />
	});<br />
});</code></p>
<p>What is happening is that in the handler for the document &#8220;ready&#8221; event from jQuery, we first create the Raphael object to draw with, then setup a handler for a click event on a jQuery based link. That link calls a url on the server and that server responds with JSON formatted data wrapped in the method to respond as callback. So in this case it might return something like:</p>
<p>parseData( <em>json formatted data here</em> );</p>
<p>You simply ensure that the server wraps the data in the appropriate response method call name. Essentially the client runs the script as though it is native to the client.</p>
<p><strong>What next?</strong></p>
<p>My next big task is to add support for rendering the navmesh of the world in the browser and add support for rendering the paths and avoidance vectors of selected agents. But that is for another sprint. I think the technique of using a browser for debugging the AI will be especially useful as our designers play with the AI representations. There is of course a lot of interface to build up and as we&#8217;re still a small team, I&#8217;m having to balance working on debug functionality with actually delivering the AI behaviour. </p>
<p>In general I&#8217;d strongly suggest considering the use of embedded webservers and browser based code to enhance your toolset. I know that <a href="http://altdevblogaday.com/2011/03/15/debugging-on-your-web-browser/">quite a few people are already doing this</a> and it is a relatively easy using libraries like mongoose to support a web interface. I  expect that as webgl matures it will mean that more people use this powerful approach. I really want to add some flash based UI to the mix as I think that Mika&#8217;s timeline based approach would work pretty well via flash. Plus I think that at some point we&#8217;ll need to actually add live updating to the server via this interface and maybe even live editing of the behaviour trees. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2011/07/03/debugging-an-ai-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The value of education</title>
		<link>http://www.altdevblogaday.com/2011/06/19/the-value-of-education/</link>
		<comments>http://www.altdevblogaday.com/2011/06/19/the-value-of-education/#comments</comments>
		<pubDate>Sun, 19 Jun 2011 08:14:59 +0000</pubDate>
		<dc:creator>Phil Carlisle</dc:creator>
		
		<guid isPermaLink="false">http://altdevblogaday.org/?p=8933</guid>
		<description><![CDATA[</p>
<p><b>A bit of background</b></p>
<p>Up until recently I have been taking a break from commercial game development to work in education as a lecturer teaching game design and game programming at the University of Bolton in England. I got into this after shipping Worms 3D, the last of a number of worms games I&#8217;d worked on while at Team17. Education seemed like a reasonable choice when I had decided to leave Team17 because I wanted to try something completely new and didn&#8217;t feel particularly driven to work for another games company in the UK. Team17 had been a pretty good place to work and the guys there were great so I didn&#8217;t expect to find anywhere that was better. I had considered taking a job in developer relations, because I enjoyed travel, I enjoyed talking to other developers and I thought maybe there would be some variety to the role. As it happens, the first search I did on google hit the job I would end up taking at the University and it took all of a week to make the change.</p>
<p><a href="http://www.altdevblogaday.com/2011/06/19/the-value-of-education/" class="more-link">Read more on The value of education&#8230;</a></p>
]]></description>
			<content:encoded><![CDATA[<p>
<p><b>A bit of background</b></p>
</p>
<p>Up until recently I have been taking a break from commercial game development to work in education as a lecturer teaching game design and game programming at the University of Bolton in England. I got into this after shipping Worms 3D, the last of a number of worms games I&#8217;d worked on while at Team17. Education seemed like a reasonable choice when I had decided to leave Team17 because I wanted to try something completely new and didn&#8217;t feel particularly driven to work for another games company in the UK. Team17 had been a pretty good place to work and the guys there were great so I didn&#8217;t expect to find anywhere that was better. I had considered taking a job in developer relations, because I enjoyed travel, I enjoyed talking to other developers and I thought maybe there would be some variety to the role. As it happens, the first search I did on google hit the job I would end up taking at the University and it took all of a week to make the change.</p>
<p>I went into education wanting to give something to the new generation of game developers and over that time have had some highs and some lows and I wanted to explain a few of those here so that those of you thinking about working as educators, or those of you working in the industry considering education, or just the academically curious can gain at least one persons perspective.</p>
<p>I&#8217;ve been working as a Senior Lecturer teaching across two courses, namely games programming (we call that computer game software development for historical reasons) and games design. Normally I tend to work in the final year because I found it incredibly hard teaching at the first year level. One thing you imagine when you first start a job like this, is that everyone who comes into a university is self motivated, capable of working hard and is driven with a thirst for knowledge. You imagine a ninja army of super programmers and designers who you can mould into an unstoppable killing force of game development. Unfortunately on the whole, what you actually get is much more of a mixed bag of typical late teens/early twenties youth. It really shouldn&#8217;t be a surprise I suppose, but the reality is that people come into education for a variety of reasons and one of those reasons is because they simply don&#8217;t have the will to do something else. I&#8217;m not saying there aren&#8217;t ninja&#8217;s in the mix, because there are. But the reality is that in any single body of people, you will always find a mixture of motivations and some people have more passion and drive than others. Even within game companies you can see that some people are more passionate about the task than others.</p>
</p>
<p><b>So what is the role of education? Especially a specialized education like game development? </b></p>
</p>
<p>For myself, I wanted to teach people the reality of game development in its raw beauty and uglyness. I wanted to try and make them consider the ways in which game development was changing and to be able to be self critical about not just the development process, but about their thought processes. It&#8217;s surprisingly hard for people in the industry to take time and get a perspective on what it is they are doing, because deadlines always come sooner than you would like and work is always much too hectic to allow you to step back and really critique your own thinking. While at the University I&#8217;ve been working as a researcher and supervisor and one thing I&#8217;ve learnt is that there is value in actually thinking about the development process from different perspectives. Evaluating how we do things with a critical sense can help us identify our own biases and motivations and I think this is a very useful skill we should all learn. </p>
<p>In practical terms, especially in game design, there is value in being able to consider our work in terms of how we evaluate our success. We have pushed our design students towards being able to critique their own work and it is amazing how they change over the course of three years. In the first year, they come in simply as game players, so we teach the tools and techniques of production (level design etc). In the second year, they use that production and are taught more about what to consider when producing (aesthetics, pacing, space etc). In the final year they are taught the value of metrics, evaluation, psychology and criticism. We see a vast difference in the maturity of students within this relatively short space of time. Although I must admit to occasionally getting very angry with them (one particular second year class I was sitting in on some presentations for a colleague and it just incensed me that they had failed to see very obvious flaws in their designs, later those same students turned out to be far more skilled at self criticism as they had matured immensely).</p>
<p>The use of the scientific method for evaluation of game designs is something that we&#8217;ve been pushing hard. Things like metrics, psychophysiology and the creation of a core base of scientific research on the effect of games on players and on our understanding of the creation of games has been a pillar of our teaching. Honestly game design still feels like it is based far too much on intuition and far too little on understanding and objective evaluation. But that will slowly change (and thankfully has been changing) as more designers understand the real value of metrics and discover new methods of analysis and construction.</p>
<p><p><b>The highs and lows? </b></p>
</p>
<p>One of the low points for me in all of this work, is that the games industry still does not value education properly. Especially not the specialized games education I have been involved with. It is frustrating to hear that people would prefer &#8220;comp sci&#8221; rather than game programming, because fundamentally they are the same thing, just with a bias towards delivering the problem set in a manner that addresses thinking in terms of games instead of general software. How it can be more valid to teach in the context of say database design rather than in the context of games is beyond me. Luckily the reality is that good programmers are good programmers and people tend to be able to evaluate that no matter the context, so my graduates have been pretty consistantly finding jobs in the industry in spite of the many detractors.</p>
<p>Another low point has been the realization that not everyone who says they want to work in game development is cut out to work in game development. Either because they can&#8217;t take the pressure of the work, they can&#8217;t self-motivate themselves or because they simple aren&#8217;t capable of working at the level the industry requires. It&#8217;s sad to say, but the industry is demanding and it really isn&#8217;t for everyone so we have to be quite strict when faced with people who can&#8217;t achieve the required standard. Strangely enough, you can usually tell within the first week or two of a three year degree who will finish well and go into the industry and who will not.</p>
<p>The final low point is how far we have yet to go in establishing games as a credible subject area worthy of academic study in its own right. Frankly there are very few people in academia that really &#8220;get&#8221; games and so you have this surreal situation where academia has gone in completely the wrong direction and the games industry has simply not participated in forming that direction. </p>
<p>The highs have come from seeing my students succeed, both in terms of getting jobs in the industry as well as becoming mature thinkers who are capable of really getting to the heart of a problem. There is also my own research, which has changed my own viewpoints as I have taken more time to consider what really interests me. My research is about game characters (which I am calling &#8220;digital actors&#8221;) and artificial intelligence and actually the act of doing research has opened my eyes in terms of my understanding of my own work and the work we have done in games to date. </p>
<p><p><b>Conclusions? </b></p>
</p>
<p>If there is one thing that this work in education has shown me, is that there is considerable value in studying games. The games industry would do well to embrace games education and to become active in shaping its direction, rather than simply taking the best students as workforce. The industry should actively engage academics, many of which do not understand games, so that we all learn more about the things we create. Developers should take time to educate themselves not just in the production of games or game content methods, but in the critique of their own works and the works of the industry at large. There is a lot of work to do before we better understand how to consistantly make games that actually mean something to players, we have relied on licenses and franchises for many years but those will only sustain a very narrow audience, if we want to engage more people, we have to understand more than just production. Study in its broadest sense, involves thinking about what you do. We need to think about what (and why) we do what we do more. </p>
<p>As I transition back into the games industry, I feel happy to have had the experience of education because it has shown me that there is life outside of the trenches of development. As my research goes on and I apply it to the products I am involved with, I gain insight into the subject and I now have the skills to try and analyse that knowledge I have gained. I can start to really understand what it is I&#8217;m trying to achieve and evaluate more rigorously wether I am any nearer to achieving my goal.</p>
<p>For those of you not currently in the industry but considering going into education as a means to getting there. I would advise you to really think about why you want to get into the industry. Only begin on this path if you are truly motivated to create games rather than play them.</p>
<p>For those of you in the industry considering getting into education, I would say there is considerable value in the academic process to you as a developer, in thinking beyond your own situation and considering the greater picture. Education can help open your mind by virtue of you simply taking the time to think about the &#8220;why&#8221; of your own work. </p>
<p>I&#8217;m not saying you need a University necassarily to do any of this. Education doesn&#8217;t require an institution much like religion doesn&#8217;t require a church. You can educate yourself by simply opening yourself up to new ways of thinking and by being active in seeking new viewpoints. Conferences, books, blogs all have a place. Read beyond your own subject, read about psychology if you are a designer, read about patterns if you are a programmer. Begin the process and you will very quickly discover new insights into what you do that make subsequent efforts more meaningful.</p>
<p>Education is very valuable, if you embrace it as part of your life.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2011/06/19/the-value-of-education/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Animation and games part one</title>
		<link>http://www.altdevblogaday.com/2011/06/03/animation-and-games-part-one/</link>
		<comments>http://www.altdevblogaday.com/2011/06/03/animation-and-games-part-one/#comments</comments>
		<pubDate>Fri, 03 Jun 2011 21:36:49 +0000</pubDate>
		<dc:creator>Phil Carlisle</dc:creator>
		
		<guid isPermaLink="false">http://altdevblogaday.org/?p=7480</guid>
		<description><![CDATA[<p><strong>What can designers of game characters learn from other forms of animation?</strong></p>
<p>I&#8217;ve been thinking quite a long time about the relationship between animation and game AI. Most of the people who stay around long enough to let me bore them with it know that its a passion of mine. I thought that I would take the time in this post to start off with a look at where I think traditional animation can give us some pointers towards creating characters that are compelling and achieve the illusion of life.</p>
<p><a href="http://www.altdevblogaday.com/2011/06/03/animation-and-games-part-one/" class="more-link">Read more on Animation and games part one&#8230;</a></p>
]]></description>
			<content:encoded><![CDATA[<p><strong>What can designers of game characters learn from other forms of animation?</strong></p>
<p>I&#8217;ve been thinking quite a long time about the relationship between animation and game AI. Most of the people who stay around long enough to let me bore them with it know that its a passion of mine. I thought that I would take the time in this post to start off with a look at where I think traditional animation can give us some pointers towards creating characters that are compelling and achieve the illusion of life.</p>
<p>In their book &#8220;The illuision of life&#8221; Frank Thomas and Ollie Johnson lay out a number of essential elements they think help to achieve the illusion of life and create compelling characters. So I thought it would be a good place to start. Rather than numerically listing them, I thought a discussion format would be more useful. I&#8217;m not trying to say my own personal interpretation of the elements laid out in the book is the sole interpretation, I&#8217;m certainly willing to be convinced of other viewpoints and I hope you will add comments if you feel I&#8217;ve missed something. So lets get on with it!</p>
<p><strong>Appeal</strong></p>
<p>The core of this notion of appeal, is that you choose characters that fit for a specific role. It doesn&#8217;t mean that everyhing is cute, or has specific attributes (although that is often the case), but more that you consider the character in its role. As is the case with traditional animation, you need think about the purpose of the character, how they move, how they think. I think in terms of game characters, we do actually have a pretty good handle on this. Although there are far too many generic space-marine style characters in games, I do think that we have some reasonably strong character designs too, like Mario and many of the other Nintendo characters. There is a lot to choosing characters for games and I urge you to read<strong><a title="Katherine Isbisters book" href="http://amzn.to/jKlK7D" target="_blank"> Katherine Isbister&#8217;s book</a> </strong>for a better understanding of game character design.</p>
<p>Appeal is perhaps the earliest we get to understand a character, using concept art to draw out the basic outline of the proportions, maybe even thinking through the backstory of the character. Personally, I think that many game companies fail at this stage, often choosing to go with a simple puppet instead of a character. I can understand the thinking, because you will most likely be controlling the character on screen so giving it a personality might not allow you to project yourself into the game AS the character. The bigger question that springs to mind is how important the &#8220;character&#8221; you are controlling is, do you mentally model the character you are playing with as a seperate entity, or are you actually immersed enough that they are essentially a projection of you? I think we need some study in that area before we truly know that answer. One study we did a few years ago looked at the character design in an RPG (in this case Neverwinter Nights 2) and wether players are attracted to character narratively versus aesthetically amongst other influences. The group that did the study found that even relatively obvious aesthetic changes had quite a big influence on the players interactions with a character. In many ways this is what you would predict, because we often have to try and predict the nature of another person from a distance and we mostly use clothing (for instance uniforms) to give us an indication of how we will be recieved.</p>
<p>So in terms of game creation, I think we can agree that &#8220;appeal&#8221; is as important to us in the game industry as much as it is with traditional animation.</p>
<p><strong>Staging</strong></p>
<p>In traditional animation, staging is the layout of the scene, essentially its artistic composition, such that the viewer understands or &#8220;reads&#8221; the scene&#8217;s intent correctly. Staging because it is very important for storytelling probably feels like it has no place in games. But actually, when you think about it staging is one of the most important aspects we should address. Staging for games involves how and where we present information and characters to the player. If we present important information out of view, then we fail to achieve our design goals. If a player sees none of the brilliant content we developed, it can be a very expensive affair. A lot of games are moving towards a linear narrative in order to address this issue of high production costs and players simply not seeing it. I think that is a mistake but it has proven very popular with so many games using that approach.</p>
<p>Personally, I think staging can be very useful if we think of it dynamically. If you imagine a case where you have to have characters interact, it really doesnt take much to place constraints on them to only interact when they are being viewed by a player. I consider the AI director in left 4 dead a form of staging, because it controls the scene in such a way that the player is aware of the impending threat. There was an interesting presentation by the guys at <strong><a href="http://www.insomniacgames.com/research_dev/articles/2011/152568379" target="_blank">Insomniac about the combat mechanics in their latest FPS</a></strong>. What is interesting is that they are almost entirely talking about staging. Considering how the player will view an element of the game and how best to guide them towards the right feeling or understanding is the key to staging.</p>
<p>I consider staging to be another key element of traditional animation that we can apply to game development.</p>
<p>Next post, I will cover more of the animation &#8220;principles&#8221; that perhaps don&#8217;t seem as though they apply to games, but with some thought we can potentially see our equivalent principle. Hopefully at some point we can consider some of our own unique principles, it certainly would be nice to think we have our own basis for creating great game character experiences at least.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2011/06/03/animation-and-games-part-one/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>What does game design research tell us?</title>
		<link>http://www.altdevblogaday.com/2011/05/20/what-does-game-design-research-tell-us/</link>
		<comments>http://www.altdevblogaday.com/2011/05/20/what-does-game-design-research-tell-us/#comments</comments>
		<pubDate>Fri, 20 May 2011 19:33:44 +0000</pubDate>
		<dc:creator>Phil Carlisle</dc:creator>
		
		<guid isPermaLink="false">http://altdevblogaday.org/?p=6227</guid>
		<description><![CDATA[<p>I was following along with a discussion that was started by my old friend Dan Cook over at http://www.lostgarden.com where he was lamenting the quality of critique in game journalism. Actually, I think what he was asking for was slightly different than the title of <a title="Link to lostgarden blog entry" href="http://www.lostgarden.com/2011/05/blunt-critique-of-game-criticism.html" target="_blank">his post</a> suggested. I think Dan was actually lamenting the lack of useful critique that is aimed at the creation of games. If you read the feedback Dan got in his comments, there were plenty of people who were happy to defend the position that game journalists are not in the business of teaching game designers how to fix their designs.</p>
<p><a href="http://www.altdevblogaday.com/2011/05/20/what-does-game-design-research-tell-us/" class="more-link">Read more on What does game design research tell us?&#8230;</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I was following along with a discussion that was started by my old friend Dan Cook over at http://www.lostgarden.com where he was lamenting the quality of critique in game journalism. Actually, I think what he was asking for was slightly different than the title of <a title="Link to lostgarden blog entry" href="http://www.lostgarden.com/2011/05/blunt-critique-of-game-criticism.html" target="_blank">his post</a> suggested. I think Dan was actually lamenting the lack of useful critique that is aimed at the creation of games. If you read the feedback Dan got in his comments, there were plenty of people who were happy to defend the position that game journalists are not in the business of teaching game designers how to fix their designs.</p>
<p>Essentially I think what Dan was getting at (and I&#8217;ve long since felt this way myself), was that game critique has never developed beyond the sort of intuitive criticism you get from game reviews. Ultimately applying the methods of criticism from other media, in particular media studies, fails to capture the nature of games and the design challenges they face. It feels as though game design is essentially being under served by really directly applicable critique. The kind of critique that could serve to educate designers and spot potential design weaknesses at a structural level.</p>
<p>I teach game design part-time at the University of Bolton, one of the things we try and do on the course is to educate the students in methods of critique and analysis. Things like using scientific research methods, metrics, game theory etc allow us to challenge the notion that all design must be intuitive.</p>
<p>An interesting side effect of this education, is that we often get exposed to game design issues that are a little counter-intuitive. I&#8217;ll give you an example to explain what I mean.</p>
<p>Every year, we have a number of undergrad student research groups tackle a year long project to do with a fundamental game design problem. Often these problems are informed by the students themselves, or their perceptions. Other times, the problems they investigate are more foundational or are informed by previous studies. Very occasionally we get an experimental result that throws us into a whole new area of investigation.</p>
<p>One of the most interesting results of this current semester, is a side effect of a group failing to prove their hypothesis to any degree of reliability (in effect affirming a null hypothesis). Their hypothesis was that they could create a level of immersion using various techniques and to test it, they had produced a number of artifacts with various distraction methods deliberately placed to take the immersion of the player away. In effect, they made dynamic changes to the environment that grew more obvious and noted when players saw the discontinuities.</p>
<p>What is interesting isn&#8217;t the fact that they ended up with a null hypothesis. But that during the course of their tests, players simply never saw any of the changes they were making to the level. Essentially, the players were so engaged with the task at hand in the test environment, they simply didn&#8217;t see any changes that were happening. Now this has some pretty profound consequences for level design that bear some thinking about. What they saw was that players do not actually perceive changes in a level (and reasonably big changes, like colour changes, changing models, adding NPC&#8217;s that float outside windows etc).</p>
<p>This research has basically thrown up an entirely new design problem for us to investigate. Namely the degree to which the player is paying attention to their environment in a game, how the challenge/task in the environment shapes that perception and just how far we can push the changes employed before players become aware of them. Of course, we will need to do a follow on study that investigates these issues. I can see the new test being based on quantifying different changes in level between different artifacts. So for instance, will a player notice that they were in a house, but somehow ended up on a boat? Will they notice that what originally was a car, is now a truck?</p>
<p>Game design is full of psychological issues that I think would benefit from more critical reflection, organized study and research. I think that is essentially what Dan was asking for. Hopefully over time we can contribute to the knowledge of interaction design as it is distinct from other forms of design. We may also then see an improvement in the actual games we play, which is my prime goal when supervising these research groups.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2011/05/20/what-does-game-design-research-tell-us/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Work in a startup</title>
		<link>http://www.altdevblogaday.com/2011/05/04/work-in-a-startup/</link>
		<comments>http://www.altdevblogaday.com/2011/05/04/work-in-a-startup/#comments</comments>
		<pubDate>Wed, 04 May 2011 22:04:58 +0000</pubDate>
		<dc:creator>Phil Carlisle</dc:creator>
		
		<guid isPermaLink="false">http://altdevblogaday.org/?p=5147</guid>
		<description><![CDATA[<p>I am still trying to find the time to get my post on the 12 principles of animation sorted out. But in the meantime, I thought I&#8217;d post some thoughts about working in a startup.</p>
<p><a href="http://www.altdevblogaday.com/2011/05/04/work-in-a-startup/" class="more-link">Read more on Work in a startup&#8230;</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I am still trying to find the time to get my post on the 12 principles of animation sorted out. But in the meantime, I thought I&#8217;d post some thoughts about working in a startup.</p>
<div id="attachment_5148" class="wp-caption aligncenter" style="width: 235px"><a href="http://altdevblogaday.com/wp-content/uploads/2011/05/IMG_20110504_012147.jpg"><img class="size-medium wp-image-5148" src="http://altdevblogaday.com/wp-content/uploads/2011/05/IMG_20110504_012147-225x300.jpg" alt="" width="225" height="300" /></a><p class="wp-caption-text">Namaste &quot;office&quot;</p></div>
<p style="text-align: left">Recently I started working with a company called Namaste. We&#8217;re a small privately funded company working on AI-based socially oriented online games technology. It feels very different working in a startup to my experiences working for Team17 and my own indie stuff. The fact that there are other people around and working on the product makes it feel different than working by myself on my indie projects. The fact that we&#8217;re basically living in a house in London and working remotely sometimes makes it feel different than working at a more established studio.</p>
<p style="text-align: left">I often encounter people (and we&#8217;ve interviewed a few for Namaste recently) that have this strange image of working for some huge corporate like Blizzard, EA or Disney/Pixar. Somehow for many people the ideal work environment is to work on sequels for a corporate machine, rather than to pursue a new, although admittedly riskier venture.</p>
<p style="text-align: left">I once had a discussion with a well know AAA studio owner about how he came to be boss of the company and he told me something like (to paraphrase) &#8220;I just couldn&#8217;t imagine allowing my potential future to be dictated by the whims of someone else&#8221;. What he said has stuck with me ever since, because it really speaks to the heart of why I think smaller studios often produce better results. Ultimately, the type of person who is interested in working for a start-up (or building one) at least has a vision to follow. Not a profit and loss statement on a balance sheet to fill with profit to account for shareholder dividends.</p>
<p style="text-align: left">Of course indies constantly push the boundaries with new designs, but there is a limit on the amount of effort and reward with truly indie development. My own indie games were always too grand for my own ability to deliver them in a reasonable time frame. So working in a start-up with a few more people opens up many avenues to finally pursue the ideas I&#8217;ve long harbored for my own games.</p>
<p style="text-align: left">There are downsides to working at a startup though. Primarily the age old funding issue. Luckily we have someone who is willing to help with funding (and finding more) which definitely eases things a touch. The other major issue is simply that nobody actually wants to take the risk of working for an unknown developer on a reasonably ambitious project. Ultimately the bigger effort has been simply gathering people who are ready to take that risk and finding a good mix of experience and enthusiasm.</p>
<p style="text-align: left">Strangely enough, it feels like finding quality artists with a solid level of technical ability and the required enthusiasm for pursuing something aesthetically off the beaten track is actually far harder then finding programmers and designers. Maybe there is something about the way artists are taught that drives them towards wanting to reproduce existing work rather than forge a new style? Perhaps it is also an issue of maximizing the potential to be picked up by a bigger developer and only wanting to work for a well known entity? Frankly, I think there&#8217;s some value in working for a larger company for most people in that you learn wether you enjoy the corporate world and structure (and whether you enjoy modelling only noses for footballers for years). But ultimately, I still don&#8217;t quite understand why more artists aren&#8217;t a bit more self-directed and willing to explore.</p>
<p style="text-align: left">Anyway, there&#8217;s undoubtedly more blogging to be done in the future about the trials and tribulations of this particular start-up. Hopefully at least some of it wont be about crunching on products that are massively over ambitious.</p>
<p style="text-align: left">Til next time!</p>
<p style="text-align: left">&nbsp;</p>
<p style="text-align: left">&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2011/05/04/work-in-a-startup/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Psychology and Game AI</title>
		<link>http://www.altdevblogaday.com/2011/04/19/psychology-and-game-ai/</link>
		<comments>http://www.altdevblogaday.com/2011/04/19/psychology-and-game-ai/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 08:24:12 +0000</pubDate>
		<dc:creator>Phil Carlisle</dc:creator>
		
		<guid isPermaLink="false">http://altdevblogaday.org/?p=4201</guid>
		<description><![CDATA[<p>This morning I went for a walk in the park, I do this quite often when I&#8217;m thinking about something and the suns out. It&#8217;s generally pretty quiet there and it helps me to try and zone out the noise of the world.</p>
<p><a href="http://www.altdevblogaday.com/2011/04/19/psychology-and-game-ai/" class="more-link">Read more on Psychology and Game AI&#8230;</a></p>
]]></description>
			<content:encoded><![CDATA[<p>This morning I went for a walk in the park, I do this quite often when I&#8217;m thinking about something and the suns out. It&#8217;s generally pretty quiet there and it helps me to try and zone out the noise of the world.</p>
<p>I recently started working with a bunch of guys on a startup called Namaste, which is focussing on the more fictional/social end of game AI and entertainment. One of the aspects of the product, is that we want players to understand the game worlds characters. This means that we have to focus a lot more on the behavioural realism of the character rather than the graphical realism. We are not trying to create &#8220;realistic&#8221; characters so much as believable. In the same way that bugs bunny isn&#8217;t &#8220;realistic&#8221; but he is still highly believable.</p>
<p>A big part of that believability comes from fairly subtle cue&#8217;s and its that I was experimenting with this morning.</p>
<p>After a few minutes walk (its a big park), I decided to try a simple little experiment for myself. I tried to predict all of the people who would respond to my greeting of &#8220;good morning&#8221; as I passed them by. The purpose being to see if I could intuitively understand and predict what their behaviour would be prior to eliciting communication.</p>
<p>I suggest you try this out for yourself, its a pretty easy experiment to undertake. Before I tell you the results, I will make it clear that there are a few things I can think of that will skew the results:</p>
<ul>
<li>I&#8217;m a big guy, which can intimidate some people</li>
<li>I&#8217;m in britain, we are socially and culturally expected to be polite, but that might not actually be true for all cultures or even youth cultures anymore</li>
<li>If I were more attractive, or of the opposite sex to the test subject, I might expect a different response</li>
</ul>
<p>So what were the test results?</p>
<p>It turns out I&#8217;m about 95% accurate at predicting when people will respond. How can I be this accurate? What were the predictors to interaction? Let me summarize them here:</p>
<ul>
<li>The subjects who were more likely to respond positively were looking around their environment more often</li>
<li>The subjects who made eye contact and sustained it for a short period were far more likely to respond positively</li>
<li>The subjects who were in a group that were already involved in a social discourse responded more positively</li>
<li>The gait of the subjects who responded positively were more often open and changeable</li>
</ul>
<p>What were the predictors of non responses?</p>
<ul>
<li>A closed gait, basically very stiff movement and a &#8220;purposeful&#8221; stride</li>
<li>Looking at the ground, focusing straight ahead, not scanning the area visually</li>
<li>No eye contact apart from at a relatively large distance</li>
<li>Visible minor deviation in path, often a stiffening of stride and posture</li>
</ul>
<p>The point of this was just to while away a little bit of time while walking, but its got a serious element to it as well. Can you ever remember the time in a game, where you could predict the response of a character by such subtle issues? In games, we tend to colour characters in very obvious colours to denote their meaning. So a monster has to look like a monster, rather than actually looking like a very nice character but behaving monstrously (i.e. an attractive murderess). I simply cant remember a game where I could have reasonably predicted the outcome of a social interaction before attempting it, without the character having some obvious affiliation denoted by clothing or due to where it was in the game world.</p>
<p>Game designers will probably tell you that one of the most important things you need to do as a designer is make everything explicit and clear to the player. We use uniforms as a means to denote the function of a particular NPC far more often than we use behavioural character traits. I think its about time we challenged some of these notions, at least to be clear in our own minds where the obvious disjunctions are. How far can we push behavioural believability over simple expression of function? Of course there isn&#8217;t an easy answer there. I&#8217;m going to be spending a great deal of my time working on such problems, as we push forward with work on animation, characters, expression and emotion in our products.</p>
<p>Why have I brought up this simple experiment? Well, I wanted to put forward the radical notion that the really interesting meat of game AI has nothing to do with what particular flavour of logic structure you use and has far more to do with simple psychology. In fact, I&#8217;m proposing that if you are in the field of game AI and haven&#8217;t started studying psychology (even at a rudimentary level) then you aren&#8217;t doing game AI at all. You&#8217;re doing logic programming, which has very little to do with games and has far more to do with linguistics. If you think that state machines, or behaviour trees, or HTN planners are the point of game AI, then I suggest you need to rethink. Ultimately, the goal of most game AI is the creation of either characters for interaction, or systems that support gameplay. Either of those goals I would suggest, are behavioural rather than logical. You want the AI to support a specific set of mechanics, but the goal is the experience of those mechanics from the viewpoint of the player. Similar with characters, we arent necassarily bothered about creating a character so much as the experience the player has when interacting with the character.</p>
<p>In order to understand this experience, you have to at least start taking an interest in how the psychology of the player works and what allows them to understand and interact with your work. Ideally you would also think further and consider the notion that the player already has certain psychological strategies for understanding their world and that if you can tap into those strategies you can provide information in a manner that feels natural and &#8220;easy&#8221; to understand. Certainly game AI design to me is all about psychology.</p>
<p>If you are interested in getting started on learning more about psychology, I can heartily recommend the book <a title="Understanding Emotions" href="http://bit.ly/hTdNkY" target="_blank">&#8220;Understanding Emotions&#8221; by Oatley et al</a> which is a good place to start, but trust me once you start down that rabbit hole there really isn&#8217;t any stopping.</p>
<p>Anyway, enough of the soapboxing. I&#8217;m still thinking about the 12 principles of animation and how they crossover (or not) to games. Will post that another day.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2011/04/19/psychology-and-game-ai/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Back to first principles</title>
		<link>http://www.altdevblogaday.com/2011/04/05/back-to-first-principles/</link>
		<comments>http://www.altdevblogaday.com/2011/04/05/back-to-first-principles/#comments</comments>
		<pubDate>Tue, 05 Apr 2011 12:57:54 +0000</pubDate>
		<dc:creator>Phil Carlisle</dc:creator>
		
		<guid isPermaLink="false">http://altdevblogaday.org/?p=3243</guid>
		<description><![CDATA[<p>I&#8217;m in a bit of a hurry today, as I&#8217;m off to present at a conference in a few hours. So this post is going to be text only, sorry about that.</p>
<p><a href="http://www.altdevblogaday.com/2011/04/05/back-to-first-principles/" class="more-link">Read more on Back to first principles&#8230;</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m in a bit of a hurry today, as I&#8217;m off to present at a conference in a few hours. So this post is going to be text only, sorry about that.</p>
<p>I started working with a group of guys at Namaste recently (<a href="http://www.namaste.vg/">http://www.namaste.vg/</a>) and one of the things we&#8217;re really concentrating on is AI. Not only that, but we&#8217;re trying to push the boundaries of what games can be in that area. Its a great team and I&#8217;m really looking forward to dive into the work now, since I&#8217;ve been researching and doing academic work for so long.</p>
<p>One thing I came to realize when thinking about the work we&#8217;re trying to do, is how much we (and by we I mean game developers) dont know about characters. I spent a good few weeks looking at animation in other media and you can&#8217;t help but be impressed at the skills of quality animators of the likes of Pixar. The fact that they consistantly set the quality threshold so high is a testiment to their accumulated knowledge. That accumulation of knowledge is what I wanted to discuss in this post.</p>
<p>If any of you haven&#8217;t read Thomas and Johnsons &#8220;The illusion of life&#8221; I stronly urge you to do so. It essentially lays out the historical and theoretical underpinnings of the traditional hand drawn animation process, but more than that, it details the history of the development of that process and the people who shaped it. It literally takes you back to the first rudimentary line drawings and takes things forward from there. Reading about what is a multi-generational period of learning brings it home to me that this whole issue of characters in games is not going to be solved easily or necassarily in my lifetime. But what it inspires me to do, is to start trying to figure out the principles of the interactive medium when it comes to &#8220;believable&#8221; characters.</p>
<p>We need to start figuring out the basics of that illusion of life, when embedded in an interactive scene. Of course there are things we can learn from traditional animation, much as digital animation has learnt from hand-drawn animation. But the notion of player perspective changes quite a lot of the 12 principles that Thomas and Johnson describe.</p>
<p>So we&#8217;re at this interesting starting point, where there are very few companies really tackling the qualities of &#8220;believable&#8221; characters. Although many companies can do pretty nice stuff in cutscenes, when faced with interactivity most current games break down in their characterisations.</p>
<p>We&#8217;re almost back to first principles: What IS the most important part of a motion when it comes to interactivity? How do we frame it so that the player percieves its importance? How do we ensure the action is viewed? All of those really juicy design/technical problems about character animation and behaviour need to be reinvestigated and understood. Its a tall order for sure, but one that fascinates me.</p>
<p>Hopefully next post, I&#8217;ll have more time to go into the 12 principles and what I think we can take from them and where I think we need to rethink things for an interactive medium like games. But sadly that will have to wait.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2011/04/05/back-to-first-principles/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The future is procedural</title>
		<link>http://www.altdevblogaday.com/2011/03/20/the-future-is-procedural/</link>
		<comments>http://www.altdevblogaday.com/2011/03/20/the-future-is-procedural/#comments</comments>
		<pubDate>Sun, 20 Mar 2011 13:20:25 +0000</pubDate>
		<dc:creator>Phil Carlisle</dc:creator>
		
		<guid isPermaLink="false">http://altdevblogaday.org/?p=2139</guid>
		<description><![CDATA[<p>If you follow AAA development you might have seen a couple of interesting things happening recently. The first is that budgets have been growing increasingly bigger, the second is that the play times for games has been getting shorter, only recently <a href="http://www.rockpapershotgun.com/2011/03/19/wot-i-think-homefront-single-player/">Homefront has been slammed</a> for exactly the reasons I am going to try and espouse here.</p>
<p><a href="http://www.altdevblogaday.com/2011/03/20/the-future-is-procedural/" class="more-link">Read more on The future is procedural&#8230;</a></p>
]]></description>
			<content:encoded><![CDATA[<p>If you follow AAA development you might have seen a couple of interesting things happening recently. The first is that budgets have been growing increasingly bigger, the second is that the play times for games has been getting shorter, only recently <a href="http://www.rockpapershotgun.com/2011/03/19/wot-i-think-homefront-single-player/">Homefront has been slammed</a> for exactly the reasons I am going to try and espouse here.</p>
<p>I believe the reason for the apparent discrepancy has been the very high sales of a new type of game. I&#8217;m not entirely sure I&#8217;ve traced the origins of such games yet, but I think I can spot one now. It looks something like a game, in that it has characters and worlds and mechanics. But mostly it is actually an interactive movie, cutscenes drive the narrative and you occasionally get to take part if you&#8217;re lucky. Games like Call of Duty, Uncharted, Homefront are examples of this style. You can usually spot them, because you get a LOT of really well executed cutscenes. Not only in-engine cutscenes but external cutscenes and plenty of extra dialogue. In general the gameplay is very linear, with a high degree of polish in the experience as long as you play the game as designed. Often the scenes are massively scripted to give that &#8220;you are in a hollywood blockbuster&#8221; experience.</p>
<p>Clearly, in order to pursue this hollywood experience, the creators of such games have driven themselves forward by advancing visual elements and in general have just put a huge amount of effort into each title. As a game maker, I have to admit an admiration for the creators of such games, because these games are the pinnacle of sheer effort-based development and they really shine. However we are at the point where the industry itself is changing, the shifting sands of the market are moving and these huge developments are having a hard time. Clearly the blockbuster mentality works, but it is a war of attrition. Each title has to sell more than the next in order to justify the huge development costs involved. Because sales of these blockbusters are robust, publishers are prepared to throw money at production, but ultimately a franchise failure will spell the end of any company involved.</p>
<p>The flipside to these hand crafted masterworks are the exact opposite experiences. While they still contain cutscenes, they really are only doing that to appear AAA. These games are the &#8220;open world&#8221; type games, games where mechanical systems support gameplay and are subservient to the game experience. In these types of games, the mechanics come first, narrative takes more of a back seat and only really acts as an embellishment. For open world games the content is far less directed and linear, which opens up opportunity for the actual topic I want to discuss in this post.</p>
<p>Procedural content.</p>
<p>The first time I was really sold on the concept of using procedural content was while I was working on one of the best selling indie titles of all time. No, I&#8217;m not talking about minecraft (although that uses procedural content generation too). It was during my time on the worms franchise that I really bought into the notion of procedural content as a core techique for making games. For those of you who don&#8217;t know worms, it features a set of worms (pretty obvious choice there) that fight it out over a set of procedurally generated 2D landscapes. Of course like everyone else I&#8217;d been aware of procedural techniques for quite a while, I&#8217;d written the ubiquitous 3D terrain that every beginning programmer of the day wrote, I&#8217;d experimented with various forms of Perlin noise function, midpoint displacement, diamond squares and the like. But it was only when I saw the Worms landscape editor that I really truly understood the value of procedural content. This editor was basically a level generator, it generated a large bitmap image with 1 bit per pixel if I recall, as a mask for terrain pixels. These pixels were then processed into a byte-per-colour image which was then displayed as the terrain. The sheer power of the system wasn&#8217;t merely in the generation code, which I&#8217;ll discuss in a second. The thing that really convinced me was in the editor interface itself. In the editor, you could view the currently generated landscape. Around it were a number of variations on that landscape which could be used as a seed to generate more in a certain style. What we had right there was the ultimate power in procedural creation, we had a &#8220;preview&#8221; of choices which could be experimented with in near realtime.</p>
<div id="attachment_2214" class="wp-caption aligncenter" style="width: 310px"><a href="http://altdevblogaday.com/wp-content/uploads/2011/03/wamapeditor.gif"><img class="size-medium wp-image-2214 " src="http://altdevblogaday.com/wp-content/uploads/2011/03/wamapeditor-300x150.gif" alt="" width="300" height="150" /></a><p class="wp-caption-text">Worms armageddon map editor</p></div>
<p style="text-align: center">
<p>The key to this of course was very simple. At its core the terrain generation algorithm took a series of bits. Each bit in the series having a certain value to a part of the generation algorithm. But the clustering of bits such that the sequence of bits could be varied-but-similar is a key here.</p>
<p>Let me give you an example. If we start with a bit set which displays these bits:</p>
<p><strong>0000 0000 0000 0000 </strong></p>
<p>and we break them up into four bit &#8220;fields&#8221;, then we can allow the user to change the bottom most bits in each field to affect a change to the generation. Lets say the last 4 bits form the &#8220;density of islands&#8221; value, by allowing changes in that area only, we can affect that specific part of the generation algorithm. If we then save the other bit fields and simply randomize the last 4 bits, we can randomly generate previews for multiple forms of terrain that have varying &#8220;density of islands&#8221; values.</p>
<p><strong>0000 0000 0000 0001 &#8211; might produce small islands<br />
</strong></p>
<p><strong>0000 0000 0000 0100 &#8211; produces more dense islands, but with the same visual qualities<br />
</strong></p>
<p><strong>0100 0100 1001 0101 &#8211; produces a completely different type of scene altogether<br />
</strong></p>
<p>This narrowing of concerns of the procedural generation is really useful. It means that we don&#8217;t get entirely random results every time, but instead, we get semi-random results along a certain style of generation. In effect, we have artistic control of the degree of randomness in the generation function. You may have seen similar interfaces in things like Kai&#8217;s power tools for texture generation.</p>
<div id="attachment_2216" class="wp-caption aligncenter" style="width: 310px"><a href="http://altdevblogaday.com/wp-content/uploads/2011/03/KPTexture.jpg"><img class="size-medium wp-image-2216" src="http://altdevblogaday.com/wp-content/uploads/2011/03/KPTexture-300x215.jpg" alt="Kai's power tools interface" width="300" height="215" /></a><p class="wp-caption-text">Kai&#039;s power tools interface</p></div>
<p>The notion of designer led procedural generation is a really kep point here. In addition to the random generation, we also had a drawing interfaces where users simply painted into the bitmask part of the level. Then the generation algorithm would take over and fill in the coloured level using the procedural parameters currently set. Aside from a number of naughty words spelled out in lurid textures with christmas themed objects embedded, this gave a powerful interface that essentially allowed unlimited content. The cost of this unlimited content? 2 programmers (1 for the terrain, one for the editor) and various artists for textures and objects to embed in the landscape).</p>
<p>Of course this was more than ten years ago now. And it seems we are still doing lots of what should obviously be done procedurally by hand. My current bugbear being the creation of human characters for games, the cost of which is unbelievably high. Let me ask you this question, what does a human look like? If you consider the variations of human proportions in games, how many do you think we could classify within a reasonable bounds as &#8220;normal human proportions&#8221;? So if we are creating humans of normal human proportions, my second question is why are we not generating them?</p>
<div id="attachment_2217" class="wp-caption aligncenter" style="width: 303px"><a href="http://altdevblogaday.com/wp-content/uploads/2011/03/vitruvian_man_mixed.jpg"><img class="size-full wp-image-2217 " src="http://altdevblogaday.com/wp-content/uploads/2011/03/vitruvian_man_mixed.jpg" alt="DaVinci's vitruvian man" width="293" height="293" /></a><p class="wp-caption-text">DaVinci&#039;s vitruvian man</p></div>
<p>Davinci shows quite clearly that he understood proportion when he drew the Vitruvian man. Proportions for humans are generally understood artistically and yet people are still spending inordinate amounts of time and production cost actually hand crafting humans. I recently read that one worker on an EA Sports title had spent a good deal of the previous two years working on &#8220;noses&#8221; for the characters. Why are we not procedurally generating humans? Even more amazing is that we are not procedurally animating them either. Even though human gait hasn&#8217;t changed significantly since Muybridge, somehow we still have rig and animate characters by hand. Really? Luckily, people like Ken Perlin are trying to change that with <a href="http://www.actormachine.com/">ActorMachine</a>, alongside technologies like <a href="http://www.naturalmotion.com">NaturalMotion</a>.</p>
<p>I&#8217;ll give you an example of the kind of products I think will become vastly more important as we come to face with the impending apocalypse that the cost of content is driving us towards. <a href="http://www.procedural.com">CityEngine</a> is a great example. It generates cities. It doesn&#8217;t try and do absolutely everything, but what it does, it does really quite well. It generates cities using a thing called a &#8220;shape grammar&#8221;, which is essentially a functional language that declares the structure of a building. With this shape grammer and enough parameters, you can define cities that range from futuristic, to medieval, from rome to paris and points between. But this is only an example of the type of product I am talking about.</p>
<div id="attachment_2218" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.procedural.com"><img class="size-medium wp-image-2218 " src="http://altdevblogaday.com/wp-content/uploads/2011/03/cityengine-300x168.jpg" alt="Procedural.com CityEngine" width="300" height="168" /></a><p class="wp-caption-text">Procedural.com CityEngine</p></div>
<p>Ultimately it is with the indie developers where I am seeing the shoots of inspiration that I feel will inevitably overturn the current production mentality. Minecraft obviously has its roots in procedural terrain generation, but there are plenty of other examples, for instance Overgrowth by the Wolfire guys has some really interesting procedural animation technology.</p>
<p style="text-align: center"><!--YouTube Error: bad URL entered--></p>
<p>My own game Damzel uses procedural methods for generating a living city, plus it relies on procedural generation of crowds and will incorporate elements of procedural animation alongside it. Introversion have been showcasing their city generation for a while.</p>
<p style="text-align: center"><!--YouTube Error: bad URL entered--></p>
<p>Ultimately, if we look even further off into the distance, work at Michael Mateas&#8217; lab is experimenting with actual procedural generation of game design itself. Not as an entire replacement for the ultimate vision of a designer, but as a means to generate experiments and to quickly iterate ideas. Much like the system I described for terrain generation in Worms, I think the future of games will revolve around technologies that employ procedural methods to amplify the quality and variety of content and allow actual humans to decide on the parameters that determine the end product. Tools such as <a href="http://www.allegorithmic.com/products/substance/designer">Allegorithmic&#8217;s</a> texture synthesis and presentations such as the <a href="http://udn.epicgames.com/Three/ProceduralBuildings.html">GDC 2010 presentation by Epic</a> give me hope that at least some people in the industry are thinking similarly.</p>
<p>The future is procedural because we can&#8217;t afford it not to be. So best brush of your copy of &#8220;Texturing and Modelling: A procedural approach&#8221;, break out your best perlin noise generator, your best random number generator and get with the in-crowd! Go procedural!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2011/03/20/the-future-is-procedural/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Why we need more scientific study of games design</title>
		<link>http://www.altdevblogaday.com/2011/03/05/why-we-need-more-scientific-study-of-games-design/</link>
		<comments>http://www.altdevblogaday.com/2011/03/05/why-we-need-more-scientific-study-of-games-design/#comments</comments>
		<pubDate>Sat, 05 Mar 2011 16:33:43 +0000</pubDate>
		<dc:creator>Phil Carlisle</dc:creator>
		
		<guid isPermaLink="false">http://altdevblogaday.org/?p=1550</guid>
		<description><![CDATA[I appeal to fellow game developers and academics to work together to create a body of knowledge that informs us all about the craft and techniques of game design in order to create deeper and more meaningful experiences.]]></description>
			<content:encoded><![CDATA[<p>I will admit to you right now that I am part-academic and part-developer. As such, I am probably quite a strange beast, in that I see the value and failings in both sides. Academics simply fail to grasp the fundamental pain involved in developing games. Game developers fail to notice when academia has something to offer them about understanding their own work.</p>
<p>So lets agree to put that aside for now and lets talk about something more productive. The need for a scientific method of studying games design.</p>
<p>Now I&#8217;ll be clear, there are already people (myself included) who study game design academically. There are even conferences and journals and the like (although sadly they tend to be more of the &#8220;media studies&#8221; variety and often make me incandescent with rage). But the issue is that pro-rata with almost every other area of creative endeavour, games are underserved academically. Not only that, but the narrowness of the academic study that is going on is typically self-serving and not really pushing EVERYBODY&#8217;s understanding of games forward.</p>
<p>So let me ask you an easy starter question: How can you tell if someone is immersed with your game?</p>
<p>Easy to answer? Not really. What exactly defines immersion? How do you actually measure it? What if there are different types of immersion, how do you differentiate how far the player is immersed in the different types?</p>
<p>Currently, I&#8217;ve got a bunch of undergraduate students looking at various aspects of immersion, but this is only one tiny sample of the work that needs doing. There are so many aspects of the game design space (lets not even start on the programming/modelling/simulation science) that could be studied. And yet how many labs are actually being funded to do core research in this exciting and growing industry? The sad fact of the matter, is that the games industry doesn&#8217;t care for academia. It doesnt tend to fund much research, work to form many labs, offer much in the way of useful feedback or promote the use of academic material within games. It&#8217;s an understandable picture, given the shocking lack of awareness presented by many academics. I&#8217;ve seriously talked to academics about game AI where they thought we still all worked with state machines!!!</p>
<div class="wp-caption aligncenter" style="width: 810px"><a href="http://www.flickr.com/photos/ario/6420882/sizes/o/in/photostream/"><img class="  " src="http://farm1.static.flickr.com/3/6420882_8f594d89c9_o_d.jpg" alt="We should be studying players, games and game design" width="800" height="600" /></a><p class="wp-caption-text">We should be studying players, games and game design</p></div>
<p>The core of the problem is of course a generational one. Frankly, the people in charge of research budgets do NOT get games. They don&#8217;t like them, don&#8217;t play them and honestly regard them as subversive and pointless. I&#8217;ve come across so many colleagues in academia that have this attitude, or a very thinly veiled version of it. So I can understand that there is animosity there. Likewise when I speak to game developers about academic work, its rare that they have delved very deeply into the well of academic literature on their chosen subject. Although to be fair, I think this isn&#8217;t the case with the more senior members of game development I&#8217;ve come across, who all seem to be highly academically qualified and/or similarly informed. So maybe its just the young blood who are still getting used to the concept of actually learning that you don&#8217;t know it all and that maybe you better go out and read about your chosen subject a bit more. I suppose you could view that as a reverse of the academic problem. Maybe where academics are too old, game developers are too young.</p>
<p>But I want to make the case right now, that we (and by we, I mean both academia and game developers) have a <strong>huge</strong> amount more to learn about games and interactivity. Real concrete game design issues, such as player perception of characters and wether the experience of playing on a screen alters the ability to percieve emotion from them abound. Every semester (twice a year) I have no problem in thinking of fundamental game design research to throw at our undergraduate groups. We have so much to study, in terms of the fundamentals, that it almost feels like an impossible mountain to climb. So why aren&#8217;t there more labs studying games? Why are there more people studying the effect of games on players than there are studying how that effect might be used to create deeper experiences? Why are there not more people studying what games could be?</p>
<p>I will stress that there ARE useful studies being done. A few people at a few labs really do great work. But for an industry that has huge potential both commercially and culturally it feels to me like the scientific study of game design is still languishing in the ghetto. Which is very strange, considering that other areas of academic study have informed games very well over the years. Graphics research for instance has been applied quite nicely in games for generations now. But for some reason it is always something that is not directly *games* that we learn from.</p>
<p>So my appeal is to you as fellow developers to go out and find some academics to befriend. After all, you guys are probably going to be in the driving seat as academics are encouraged to work with you. Give them guidance on what you want, be firm but fair in telling them when they are going down the wrong path. For sure there is a disconnect and some academics are merely working from self interest, but you can quickly get past those and find the people who really care about the medium. Form a strong relationship with academia, not just out of your own self interest (lets face it recruiting people who understand what you want is generally a good thing) but out of the interests of your craft. You will definitely learn something about your own understanding of something by trying to help someone form theirs.</p>
<p>Let us all work to become better informed about game creation, be that technical or design. Eventually we will gather our respective knowledge into a more coherent body of work and will form a method of critque that offers really useful, truthful and insightful thinking about our chosen medium. Ultimately we will <strong>make better games more often</strong>. Which has the added bonus of a more profitable industry.</p>
<div style="width: 1px;height: 1px;overflow: hidden">We should be studying players, games and game design</div>
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2011/03/05/why-we-need-more-scientific-study-of-games-design/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Deconstructing a city</title>
		<link>http://www.altdevblogaday.com/2011/02/02/deconstructing-a-city/</link>
		<comments>http://www.altdevblogaday.com/2011/02/02/deconstructing-a-city/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 17:12:00 +0000</pubDate>
		<dc:creator>Phil Carlisle</dc:creator>
		
		<guid isPermaLink="false">http://altdevblogaday.org/2011/02/02/deconstructing-a-city/</guid>
		<description><![CDATA[<p><em>Reposted from my blog at <a href="http://www.mindflock.com/">www.mindflock.com/</a></em></p>
<p>My game Damzel is a game set in a city. The city itself is alive with AI-based&#160; people. But I wanted the city to have a nice aesthetic to it too.&#160; Luckily, there&#8217;s a good example in Mirrors Edge. I knew it was built&#160; with the Unreal engine, so I decided to see if there was any way to fly&#160; around it and see how they build the levels in it.</p>
<p><a href="http://www.altdevblogaday.com/2011/02/02/deconstructing-a-city/" class="more-link">Read more on Deconstructing a city&#8230;</a></p>
]]></description>
			<content:encoded><![CDATA[<p><em>Reposted from my blog at <a href="http://www.mindflock.com/">www.mindflock.com/</a></em></p>
<p>My game Damzel is a game set in a city. The city itself is alive with AI-based&nbsp; people. But I wanted the city to have a nice aesthetic to it too.&nbsp; Luckily, there&#8217;s a good example in Mirrors Edge. I knew it was built&nbsp; with the Unreal engine, so I decided to see if there was any way to fly&nbsp; around it and see how they build the levels in it.
<p />And there is!
<p />So I thought it might be useful to fly around&nbsp; and describe some of the tricks they used in creating such a beautiful&nbsp; vista, whilst keeping the game running smoothly.</p>
<p>Here we go!!</p>
<p><a href='http://posterous.com/getfile/files.posterous.com/temp-2011-02-02/bFyrfCxDeiApDIlrigGACltdvryAJbFkfupikiihaknFFkrgaDaHsEzIgtjg/mirrorsedge-20110130-1752087.jpg.scaled1000.jpg'><img src="http://altdevblogaday.com/wp-content/uploads/2011/02/mirrorsedge-20110130-1752087.jpg.scaled500-300x225.jpg" width="500" height="375"/></a><br />
First,&nbsp; lets take a look at the basic view you&#8217;ll see while playing the game,&nbsp; notice the blue-ish tones to the shadows? Those are lightmap based&nbsp; shadows, baked with a lightmap creator called &#8220;Beast&#8221; by a company&nbsp; called Illuminate Labs. Lightmaps in case you didn&#8217;t know, are textures&nbsp; that are multiplied with a base colour texture, they are useful for&nbsp; storing complex lighting and shadowing calculations. In this case Beast&nbsp; does a global illumination and ambient occlusion solve and stores that&nbsp; in the lightmap textures. It looks pretty nice I think we can all agree.</p>
<p>So lets take a look at the ground level (its where Damzel will take place, so I was interested in how it works in ME).
<p /></p>
<p><a href='http://altdevblogaday.com/wp-content/uploads/2011/02/mirrorsedge-20110130-1804494.jpg.scaled1000.jpg'><img src="http://altdevblogaday.com/wp-content/uploads/2011/02/mirrorsedge-20110130-1804494.jpg.scaled1000-300x225.jpg" width="500" height="375"/></a><br />
<br />Interesting!&nbsp; first, the lightmaps still look pretty nice at this level. Flying&nbsp; around the level you notice that many of the buildings are actually&nbsp; poking through the ground rather than set on it. It doesn&#8217;t matter to ME&nbsp; because its set on the tops of the buildings, but it does look a tad&nbsp; weird.</p>
<p><a href='http://altdevblogaday.com/wp-content/uploads/2011/02/mirrorsedge-20110130-1757034.jpg.scaled1000.jpg'><img src="http://altdevblogaday.com/wp-content/uploads/2011/02/mirrorsedge-20110130-1757034.jpg.scaled1000-300x225.jpg" width="500" height="375"/></a><br />
<br />Next up are the ambient objects. In this case pedestrians and&nbsp; cars. There is a central &#8220;highway&#8221; in this level, which has cars that&nbsp; run occasionally down the road. Pedestrians also walk occasionally up&nbsp; and down the paths. One thing to notice, is that pedestrians and cars&nbsp; run along prescribed paths. They literally follow straight lines, which&nbsp; while not realistic, makes moving them a lot easier. The pedestrians&nbsp; themselves are very low poly, because they only contribute a few pixels&nbsp; to the screen most of the time (viewed from the rooftops). An&nbsp; interesting aside is the police car flashing light, which is just a&nbsp; billboarded (facing flat to the camera) flashing sprite texture.
<p />Fly out a bit further and we start to see things getting interesting&nbsp; render-wise. Most noticable, is that geometry starts getting culled.&nbsp; The back faces of buildings for instance start getting left out. As do&nbsp; the paths and roads that arent in view. I&#8217;d hazard a guess here and say&nbsp; it was done by hand, but it would be reasonably easy to do a PVS&nbsp; (potentially visibile set) calculation and simply pre-process the level&nbsp; to remove any non visible polygons (test each polygon for views of the&nbsp; play area bounding box as a first pass I would say).</p>
<p><a href='http://altdevblogaday.com/wp-content/uploads/2011/02/mirrorsedge-20110130-1757456.jpg.scaled1000.jpg'><img src="http://altdevblogaday.com/wp-content/uploads/2011/02/mirrorsedge-20110130-1757456.jpg.scaled1000-300x225.jpg" width="500" height="375"/></a>
</p>
<p>&nbsp;</p>
<p>Above is a view of a building in the middle ground. Notice that&nbsp; the building itself uses black and white textures? This is because the&nbsp; distance fogging (see next shot) tends to push the colour of buildings&nbsp; towards a pale blue as distance to them increases, so it has the effect&nbsp; of looking like atmospheric scattering. I&#8217;m actually thinking of using a&nbsp; rayleigh/mie scattering term, but maybe just pushing all colours&nbsp; towards light blue based on distance from camera is enough.
<p />Here&#8217;s a shot of the fog volume, its more noticable when you reach&nbsp; the edge of the volume because you can see the contast between pixels in&nbsp; the volume and those outside of it.</p>
<p><a href='http://altdevblogaday.com/wp-content/uploads/2011/02/mirrorsedge-20110130-1809194.jpg.scaled1000.jpg'><img src="http://altdevblogaday.com/wp-content/uploads/2011/02/mirrorsedge-20110130-1809194.jpg.scaled1000-300x225.jpg" width="500" height="375"/></a><br />
<br />The interesting thing about&nbsp; ME leveles is that they tend to have quite contrasting levels of detail&nbsp; at different parts of the level. The inner &#8220;ring&#8221; meshes are all&nbsp; reasonably high detail at the rooftop level near the play area. Then we&nbsp; have medium detail meshes for the city blocks inside the inner area but&nbsp; outside the play area. Then we have a sort of &#8220;no mans land&#8221; which&nbsp; doesnt even draw the skybox (you can see that here, where it doesnt draw&nbsp; the skybox/dome and you see overdraw of the inner mesh details). That&nbsp; is then ringed by a lower poly outer mesh set, which entails a set of&nbsp; randomly placed buildings and some low poly landscape heightfield&nbsp; meshes.</p>
<p><a href='http://altdevblogaday.com/wp-content/uploads/2011/02/mirrorsedge-20110130-1802303.jpg.scaled1000.jpg'><img src="http://altdevblogaday.com/wp-content/uploads/2011/02/mirrorsedge-20110130-1802303.jpg.scaled1000-300x225.jpg" width="500" height="375"/></a><br />
<br />Here&#8217;s a shot of the landscape and outer meshes, where you can still&nbsp; see the inner mesh set. Notice the large gap between them? I think thats&nbsp; likely there to give a sense of parallax with the outer blocks. Whats&nbsp; interesting is that those outer buildings are literally just boxes with&nbsp; simple textures on. Nothing particularly fancy about that, although&nbsp; there is a single landmark building that has a low res environment map&nbsp; on it (a sort of blue environment map).</p>
<p><a href='http://altdevblogaday.com/wp-content/uploads/2011/02/mirrorsedge-20110130-1759562.jpg.scaled1000.jpg'><img src="http://altdevblogaday.com/wp-content/uploads/2011/02/mirrorsedge-20110130-1759562.jpg.scaled1000-300x225.jpg" width="500" height="375"/></a><br />
And finally, on the outer edges, we have a set of billboard&nbsp; &#8220;skyline&#8221; quads with an alpha edged texture of a bunch of buildings in&nbsp; it. Those are laid out at the edges of the low res mesh area to make&nbsp; sure you never see a flat edge from any viewpoint while youre running&nbsp; around the rooftops. They are distant enough and fogged enough that you&nbsp; hardly notice them, but they do break up the skyline quite nicely.
<p /></p>
<p><a href='http://altdevblogaday.com/wp-content/uploads/2011/02/mirrorsedge-20110130-1800394.jpg.scaled1000.jpg'><img src="http://altdevblogaday.com/wp-content/uploads/2011/02/mirrorsedge-20110130-1800394.jpg.scaled1000-300x225.jpg" width="500" height="375"/></a><br />
<br />So it appears that the key to rendering a nice city scene from the&nbsp; mirrors edge point of view, is the inner core meshes having reasonably&nbsp; high poly buildings with nice global illumination based lightmaps, many&nbsp; of them using a single environment map as reflection over a base texture&nbsp; in the windows. Followed by a lower resolution set of outter buildings&nbsp; for parallax. Ringed by an further set of flat quads to break up the&nbsp; skyline, alongside a few heightfields to suggest mountains on one side&nbsp; and reflected water near the other for added interest.
<p />Damzel is going to use some of these ideas, mainly the LOD &#8220;rings&#8221;&nbsp; and the global illumination lighting on the inner ring. I&#8217;m not sure the&nbsp; billboards will be needed, but it will be tried anyway. The pedestrians&nbsp; and ambient objects like cars will be far more important than ME, so&nbsp; most of the polygon budget will go towards them rather than the&nbsp; buildings. So in contrast to ME, most of the buildings will be quite&nbsp; low-ish in polygons, but hopefully some useful texturing and environment&nbsp; mapping will help there.
<p />Hope this tour of Mirrors Edge environments has proved interesting,&nbsp; it certainly was for me looking around the world. I highly recommend&nbsp; buying the PC version and having a fly around it. Its a masterwork of&nbsp; level design if nothing else.
<p />.Z.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.altdevblogaday.com/2011/02/02/deconstructing-a-city/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

