<?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>Lost in the Triangles &#187; games</title>
	<atom:link href="http://aras-p.info/blog/tags/games/feed/" rel="self" type="application/rss+xml" />
	<link>http://aras-p.info/blog</link>
	<description>Random thoughts of a triangle pusher</description>
	<lastBuildDate>Fri, 16 Jul 2010 07:04:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Improving C#/Mono for Games</title>
		<link>http://aras-p.info/blog/2009/11/14/improving-cmono-for-games/</link>
		<comments>http://aras-p.info/blog/2009/11/14/improving-cmono-for-games/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 19:07:24 +0000</pubDate>
		<dc:creator>Aras Pranckevičius</dc:creator>
				<category><![CDATA[games]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[unity]]></category>

		<guid isPermaLink="false">http://aras-p.info/blog/?p=442</guid>
		<description><![CDATA[A tweet by Michael Hutchinson on C#/Mono usage in games caused me to do a couple of short replies (one, two). But then I started thinking a bit more, and here&#8217;s a longer post on what is needed for C# (and more specifically Mono) to be used in games more. In Unity we use Mono [...]]]></description>
			<content:encoded><![CDATA[<p>A <a href="http://twitter.com/mjhutchinson/status/5643232459">tweet by Michael Hutchinson</a> on C#/Mono usage in games caused me to do a couple of short replies (<a href="http://twitter.com/aras_p/status/5643338294">one</a>, <a href="http://twitter.com/aras_p/status/5643361286">two</a>). But then I started thinking a bit more, and here&#8217;s a longer post on what is needed for C# (and more specifically Mono) to be used in games more.</p>
<p>In <a href="http://unity3d.com/">Unity</a> we use Mono to do game code (well, Unity users are doing that, not us). Overall it&#8217;s great; it has tons of advantages, loads of awesome and a flying ninja here and there. But no technology is perfect, right?</p>
<p><strong>Edit</strong>: Miguel rightly points out in the comments that Mono team is solving or has already solved some of these issues already. In some areas they are moving so fast that we at Unity can&#8217;t keep up!</p>
<p><span id="more-442"></span><br />
<strong>#1: Garbage Collector</strong></p>
<p>Most game developers do not like Garbage Collection (GC) very much. Typically, the more limited/hardcore their target platform is, the more they dislike GC. The reason? Most GC implementations cause rather unpredictable spikes.</p>
<p>Here&#8217;s a run of something recorded in the <em>(awesome)</em> Unity 2.6 profiler. Horizontal axis is time, vertical is CPU time spent in that frame:<br />
<a href="http://aras-p.info/blog/wp-content/uploads/2009/11/gcspikes.png"><img src="http://aras-p.info/blog/wp-content/uploads/2009/11/gcspikes.png" alt="Garbage collection spikes" title="Garbage collection spikes" width="563" height="187" class="alignnone size-full wp-image-441" /></a></p>
<p>At the bottom you see dark red thingies appearing once in a while. This is garbage collector kicking in, because some script code is allocating some memory at runtime.</p>
<p>Now of course, it <em>is possible</em> to write your script code so that it does no allocations (or almost no allocations). Preallocate your objects into pools, manually invoke GC when there&#8217;s a game situation when a small hickup won&#8217;t affect gameplay, etc. In fact, a lot of iPhone games made with Unity do that.</p>
<p>But that kind of side steps the whole advantage of &#8220;garbage collector almost frees you from doing memory management&#8221;. If you&#8217;re not allocating anything anyway, GC could just as well not be there!</p>
<p>A little side story. Me and Unity&#8217;s iPhone tech lead ReJ tried to explain what GC is to a non-programmer. Here&#8217;s what we came up with:</p>
<blockquote><p>
Garbage Collection is this cleaning service for lazy people. They can just leave any garbage on the floor in their house, and once in a while a garbage guy comes, collects all the garbage and takes it outside. Now, there are some intricacies in the service.</p>
<p>First, you never know when the garbage guy will come. You might be taking a shower, doing a meditation or having some &#8220;sexy time&#8221; &#8211; and it&#8217;s in the service agreement that when a garbage guy comes, you have to let him in to do his work.</p>
<p>Second thing is, the garbage guy is usually some homeless drunkard. He smells so bad that when he comes, you have to stop whatever you were doing, go outside and wait until he&#8217;s done with the garbage collection. Even your neighbors, who might be doing something entirely else in parallel, actually have to stop and idle while garbage is being collected in your house!</p>
<p>There are variations of this GC service. One variation is called &#8220;moving GC&#8221;, where the garbage guy also rearranges your furniture while collecting the garbage &#8211; he moves it all into one side of your house. This is so that you can buy a bigger piece of furniture, or throw a huge piece of garbage &#8211; and there will be enough unused space for you to do that! Of course this way GC process takes somewhat longer, but hey, you get all your stuff nicely packed into one corner.</p>
<p>Can&#8217;t you see that this service is the greatest idea of all time?
</p></blockquote>
<p>This is quite a harsh attitude towards GC, and of course it&#8217;s exaggerated. But there is some truth to it. So how could GC be fixed?</p>
<p><em>GC fix #1: more control</em></p>
<p>More explicit control on when &#038; how long GC runs. I want to say to the garbage guy, &#8220;come everyday at 4PM and do your work for 20 minutes&#8221;. In the game, I&#8217;d want to call GC with an upper time limit, say 1 millisecond for each call, and I would be calling that 30 times per second.</p>
<p><em>GC fix #2: sometimes I want to clean garbage myself</em></p>
<p>Inefficiencies and unpredictability of GC cause people to do even more work than a normal, oldskool memory allocation. Why not provide an option to deal with deallocations manually? I.e. a keyword <code>reallynew</code> could allocate an object that is not part of garbage collected world. It would function as a regular .NET object, just it would be user&#8217;s responsibility to <code>reallydelete</code> it.</p>
<p>Mono is already extending .NET (see <a href="http://tirania.org/blog/archive/2008/Nov-03.html">SIMD</a> and <a href="http://tirania.org/blog/archive/2009/Apr-09.html">continuations</a>). Maybe it makes sense to add some way to bypass garbage collector?</p>
<p><strong>#2: Distribution Size</strong></p>
<p>Using C#/.NET in a game requires having .NET runtime. None of the interesting platforms are guaranteed to have it, and even on Windows you can&#8217;t count on it being present. Mono is great here in a sense that it can be used on many more platforms than Microsoft&#8217;s own .NET. It&#8217;s also great on distribution size, but only if you compare it to Microsoft&#8217;s .NET.</p>
<p>In Unity Web Player, we package Mono DLL + mscorlib assembly into something like 1.5 megabytes (after LZMA compression). Which is great compared to 20+ megabytes of .NET runtime, but not that great it you compare it so, say, <a href="http://www.lua.org/">Lua</a> runtime (which is less than 100 kilobytes).</p>
<p>On some platforms (iPhone, Xbox 360, PS3, &#8230;) it&#8217;s not possible to generate code at runtime, so Mono&#8217;s JIT does not work. All code that&#8217;s written in C# has to be precompiled to machine code ahead of time (AOT compilation). This is not a problem per se, but because .NET framework was never designed with small size and few dependencies in mind, <em>doing anything</em> will ultimately pull in a lot of code.</p>
<p>We joke that doing anything in C# will result in an XML parser being included <em>somewhere</em>. This is not that far from the truth; e.g. calling <code>float.ToString()</code> will pull in whole internationalization system, which <em>probably</em> somewhere needs to read some global XML configuration file to figure out whether daylight savings time is active when Eastern European Brazilian Chinese calendar is used.</p>
<p><em>Size fix #1: custom core .NET libraries?</em></p>
<p>For game uses, most of &#8220;fat&#8221; stuff in .NET runtime is not really needed. <code>float.ToString()</code> could just always use period as a decimal separator. Core libraries could consist just of essential collections (list, array, hash table) and maybe a String class, with just essential methods. Maybe it&#8217;s worth sacrificing some of the generality of .NET if that could shave off a couple of megabytes from your iPhone game size?</p>
<p>Of course this is very much doable; &#8220;all that is needed&#8221; &#8482; is writing custom mscorlib+friends, and telling C# compiler to not ever reference <em>any</em> of the &#8220;real&#8221; libraries.</p>
<p><em>Size fix #2: make Mono runtime smaller</em></p>
<p>Uncompressed Mono DLL in our Windows build is 1.5 megabytes. We have turned off all the easy stuff (profiler, debugger, logging, COM, AOT etc.). But <em>probably</em> some more could be stripped away. Do our games really need multiple AppDomains? Some fancy marshalling? I don&#8217;t know, it just <em>feels</em> that 1.5MB is a lot.</p>
<p><strong>#3: Porting to New Platforms</strong></p>
<p>You know this classic: &#8220;There&#8217;s no portable code. There&#8217;s only code that&#8217;s been ported.&#8221;</p>
<p>Most existing gaming platforms are quite weird. Most upcoming smartphone platforms also are quite weird, each in their own interesting way. Porting a large project like Mono is not easy, especially since parts of it (JIT or AOT engine) highly depend on the platform.</p>
<p>For Unity iPhone, unexpected discovery that it&#8217;s not possible to JIT on iPhone made the initial release be delayed by something like 4 months. It did not help that in early iPhone SDK builds JIT was actually possible, and Apple decided to disable runtime generated code later. Making Mono actually work there required significant work both from Mono team and from Unity. We still have one guy working almost exclusively on Mono+iPhone issues!</p>
<p>Of course, <em>maybe</em> all the Mono iPhone work made porting to new platforms easier as a byproduct. But so far we don&#8217;t have Mono ported to any other platform, up to production quality. So judging from experience, we now always assume Mono port will be a pain, just because &#8220;some nasty surprises will come up&#8221; (and they always do).</p>
<p><strong>#4: Small Stuff</strong></p>
<p>There is a ton of small bits where extending .NET would benefit gaming scenarios. For example:</p>
<p>Suppose there is some array on the native engine side; for example vertex positions in a mesh (3xFloat for each vertex). Is it possible to make that piece of memory be represented as a native struct array for .NET side? So that it would not involve any extra memory copies, but N vertices somewhere in memory would look just like Vector3[N] for C#?</p>
<p>On a similar note, having &#8220;strided arrays&#8221; would be useful. For example, mesh data is often interleaved, so for each vertex there is a position, normal, UVs and so on. It would be cool if in C# position array would still look like Vector3[N], but internally the distance between each element would be larger than 12 bytes required for Vector3.</p>
<p><strong>Where do we go from here?</strong></p>
<p>The above are just random ideas, and I&#8217;m not complaining about Mono. It is great! It&#8217;s just not perfect. Mono being open source is a very good thing, which means pretty much any interested party can improve it as needed. So rock on.</p>
]]></content:encoded>
			<wfw:commentRss>http://aras-p.info/blog/2009/11/14/improving-cmono-for-games/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>All games in one short paragraph</title>
		<link>http://aras-p.info/blog/2009/04/03/all-games-in-one-short-paragraph/</link>
		<comments>http://aras-p.info/blog/2009/04/03/all-games-in-one-short-paragraph/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 05:36:28 +0000</pubDate>
		<dc:creator>Aras Pranckevičius</dc:creator>
				<category><![CDATA[games]]></category>
		<category><![CDATA[random]]></category>

		<guid isPermaLink="false">http://aras-p.info/blog/?p=314</guid>
		<description><![CDATA[Here, ryg nails it: why would you want sound and physics when you can have sparsely clothed ninja space marine amazon secret agents riding on chainsaw-hoofed flying pink stealth space unicorns through a brightly colored dystopian african urban jungle fantasy wasteland island state populated with mutated propaganda-spewing gas mask-wearing alien nazi zombie demons that entered [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://pouet.net/topic.php?which=6210&#038;page=4">Here</a>, ryg nails it:</p>
<blockquote><p>why would you want sound and physics when you can have sparsely clothed ninja space marine amazon secret agents riding on chainsaw-hoofed flying pink stealth space unicorns through a brightly colored dystopian african urban jungle fantasy wasteland island state populated with mutated propaganda-spewing gas mask-wearing alien nazi zombie demons that entered this island planet dimension through a hellgate portal invasion triggered by a black magic freak teleportation experiment resonance cascade accident caused by a power-hungry mad scientist wizard evil genius working for a multinational corporation conspiracy of lawyers and weapons manufacturers without morals, and all that in its proper realtime dynamically lit globally illuminated deferred-shaded parallax-occlusion-mapped ambient-occluded shadow-buffered high dynamic range silky smooth glory?</p></blockquote>
<p>Pretty much sums up the mainstream game industry!</p>
]]></content:encoded>
			<wfw:commentRss>http://aras-p.info/blog/2009/04/03/all-games-in-one-short-paragraph/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>LTGameJam 2009 postmortem</title>
		<link>http://aras-p.info/blog/2009/02/20/ltgamejam-2009-postmortem/</link>
		<comments>http://aras-p.info/blog/2009/02/20/ltgamejam-2009-postmortem/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 19:18:13 +0000</pubDate>
		<dc:creator>Aras Pranckevičius</dc:creator>
				<category><![CDATA[games]]></category>

		<guid isPermaLink="false">http://aras-p.info/blog/?p=279</guid>
		<description><![CDATA[So LTGameJam 2009 is over. I&#8217;ve been there as part organizer, part participant, so my views are both biased and incomplete (being an organizer means you have to run around a bit, instead of just focusing on making the game). The theme for the games was &#8220;as long as we have each other, we will [...]]]></description>
			<content:encoded><![CDATA[<p>So <a href="http://ltgamejam.org/2009/">LTGameJam 2009</a> is over. I&#8217;ve been there as part organizer, part participant, so my views are both biased and incomplete (being an organizer means you have to run around a bit, instead of just focusing on making the game).</p>
<p>The theme for the games was &#8220;as long as we have each other, we will never run out of problems&#8221;. Additionally, games had to be short (5 minutes of play or less), and somehow incorporate one of &#8220;affectionate&#8221;, &#8220;patriotic&#8221; or &#8220;missing&#8221; words.</p>
<p><a href="http://ltgamejam.org/2009/games.html#missingpeace"><img src="http://aras-p.info/blog/wp-content/uploads/2009/02/missingpeace-150x150.jpg" alt="missingpeace" title="missingpeace" width="150" height="150" class="alignright size-thumbnail wp-image-282" /></a>I worked on a <a href="http://ltgamejam.org/2009/games.html#missingpeace">Missing Peace</a> game. It&#8217;s nothing really fancy, does not quite follow the idea and incorporates the above mentioned words in a cheap way (&#8220;just stick it into a title! haha!&#8221;). It was probably the most polished game from all games made there though (for some definition of polish)&#8230; too bad it&#8217;s not actually fun to play :) </p>
<p>Oh well. I just did not have any interesting ideas, and wasn&#8217;t particularly inspired, so there is the result. Probably burnout of trying to finish <a href="http://unity3d.com/unity/coming-soon/unity-2.5.html">Unity 2.5</a> at work had it&#8217;s toll as well.</p>
<p>Overall, the good parts about this game jam:</p>
<ul>
<li>It was fun (hey, that&#8217;s the whole idea)</li>
<li>Some very positive progress, compared to LTGameJams <a href="http://ltgamejam.org/2002/">2002</a>/<a href="http://ltgamejam.org/2003/">2003</a>: more people (20-25, up from 10-15), much better proportion of artists (about 30%, up from almost zero), more people who don&#8217;t know each other, more games made by folks outside of <a href="http://nesnausk.org/">nesnausk!</a> group :)</li>
<li>Some of the ideas that were brainstormed have interesting bits.</li>
<li>Did I mention it was fun?</li>
</ul>
<p>On the downside, I get the feeling that the games made this time were <em>not crazy enough</em>. GameJams are meant to generate totally whacky, crazy and amazing ideas; however this time most of the games were known game mechanics, pretty safe idea and so on. Have to improve on that the next time.</p>
<p>So that&#8217;s about it!</p>
]]></content:encoded>
			<wfw:commentRss>http://aras-p.info/blog/2009/02/20/ltgamejam-2009-postmortem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Off to game jam</title>
		<link>http://aras-p.info/blog/2009/01/30/off-to-game-jam/</link>
		<comments>http://aras-p.info/blog/2009/01/30/off-to-game-jam/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 09:59:31 +0000</pubDate>
		<dc:creator>Aras Pranckevičius</dc:creator>
				<category><![CDATA[games]]></category>

		<guid isPermaLink="false">http://aras-p.info/blog/?p=277</guid>
		<description><![CDATA[Off to local Global Game Jam!]]></description>
			<content:encoded><![CDATA[<p>Off to <a href="http://ltgamejam.org/2009/">local Global Game Jam</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://aras-p.info/blog/2009/01/30/off-to-game-jam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hardware of the casual gamer</title>
		<link>http://aras-p.info/blog/2008/08/28/hardware-of-the-casual-gamer/</link>
		<comments>http://aras-p.info/blog/2008/08/28/hardware-of-the-casual-gamer/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 18:32:57 +0000</pubDate>
		<dc:creator>Aras Pranckevičius</dc:creator>
				<category><![CDATA[games]]></category>
		<category><![CDATA[gpu]]></category>
		<category><![CDATA[unity]]></category>

		<guid isPermaLink="false">http://aras-p.info/blog/?p=200</guid>
		<description><![CDATA[(if this sounds like a rehash of a blog post on blogs.unity3d.com, well, it is&#8230;) Everyone knows the Valve&#8217;s hardware survey. But what if your target game players are not the traditional &#8220;big budget AAA game&#8221; type? For example, at the moment most Unity Web Player games are oriented to much more casual market, so [...]]]></description>
			<content:encoded><![CDATA[<p><em>(if this sounds like a rehash of a blog post on <a href="http://blogs.unity3d.com/2008/08/01/hardware-of-the-casual-gamer/">blogs.unity3d.com</a>, well, it is&#8230;)</em></p>
<p>Everyone knows the <a href="http://www.steampowered.com/status/survey.html">Valve&#8217;s hardware survey</a>. But what if your target game players are not the traditional &#8220;big budget AAA game&#8221; type? For example, at the moment most Unity Web Player games are oriented to much more casual market, so hardware there might be <em>very</em> different. And indeed, turns out it is quite different.</p>
<p>Without further ado, here&#8217;s the data we have: <a href="http://unity3d.com/webplayer/hwstats/"><strong>Unity Web Player hardware statistics</strong></a>.</p>
<p>It&#8217;s about two million data points since we started gathering it earlier this year.</p>
<p>Some subjective points of interest (I&#8217;ll be using current data for 2008 Q3 here):</p>
<ul>
<li><a href="http://unity3d.com/webplayer/hwstats/pages/web-2008Q3-os.html">Operating systems</a>: Mac OS X is 2.5%, the rest is Windows. 64 bit Windows haven&#8217;t really picked up yet (0.7%). Windows 2000 is dying fast (0.7%). OS X Leopard already took over OS X Tiger.</li>
<li><a href="http://unity3d.com/webplayer/hwstats/pages/web-2008Q3-cpuvendor.html">CPUs</a>: poor Transmeta :) <a href="http://unity3d.com/webplayer/hwstats/pages/web-2008Q3-cores.html">Dual core</a> CPUs are becoming the norm (46%).</li>
<li><a href="http://unity3d.com/webplayer/hwstats/pages/web-2008Q3-gfxcard.html">Graphics cards</a>: quite sad, in fact&#8230; top 15 cards are slow or <em>horribly slow</em>. Capability wise, they are quite good, with <a href="http://unity3d.com/webplayer/hwstats/pages/web-2008Q3-shader.html">about 70%</a> having shader model 2.0 or higher. Shader model 1.x cards are dead. &#8220;<a href="http://unity3d.com/webplayer/hwstats/pages/web-2008Q3-shadergen.html">Can has DX10</a>&#8221; is 2.7%.</li>
<li>Casual machines don&#8217;t have lots of <a href="http://unity3d.com/webplayer/hwstats/pages/web-2008Q3-ram.html">RAM</a>. Nor lots of <a href="http://unity3d.com/webplayer/hwstats/pages/web-2008Q3-vram.html">VRAM</a>.</li>
<li>Most popular nvidia driver? <a href="http://unity3d.com/webplayer/hwstats/pages/web-2008Q3-gfxdriver.html">56.73</a>. Looks like this is the driver that comes integrated in XP SP2&#8230; Now, who says regular people <em>ever</em> update their drivers? Likewise, vga.dll (i.e. standard VGA) is 1.6% of machines; additional 1.5% don&#8217;t report any driver (not sure how that happens&#8230;).</li>
</ul>
<p>So yeah. Casual machines: capabilities quite okay, performance low, low, low. That&#8217;s life.</p>
]]></content:encoded>
			<wfw:commentRss>http://aras-p.info/blog/2008/08/28/hardware-of-the-casual-gamer/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Dogfooding: PeaNinjas part 1</title>
		<link>http://aras-p.info/blog/2008/02/20/dogfooding-peaninjas-part-1/</link>
		<comments>http://aras-p.info/blog/2008/02/20/dogfooding-peaninjas-part-1/#comments</comments>
		<pubDate>Wed, 20 Feb 2008 19:42:49 +0000</pubDate>
		<dc:creator>Aras Pranckevičius</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[unity]]></category>

		<guid isPermaLink="false">http://aras-p.info/blog/2008/02/20/dogfooding-peaninjas-part-1/</guid>
		<description><![CDATA[I decided to make a very small game with Unity. Coincidentally, Danc of Lost Garden fame just announced a small game design challenge called &#8220;Play With Your Peas&#8220;. It comes with a set of cute graphics and a ready-to-be-implemented game design. What more could I want? So it&#8217;s a small very small 2D game without [...]]]></description>
			<content:encoded><![CDATA[<p>I decided to make a very small game with Unity. Coincidentally, Danc of <a href="http://www.lostgarden.com/">Lost Garden</a> fame just announced a small game design challenge called &#8220;<a href="http://lostgarden.com/2008/02/play-with-your-peas-game-prototyping.html">Play With Your Peas</a>&#8220;. It comes with a set of cute graphics and a ready-to-be-implemented game design. What more could I want?</p>
<p>So it&#8217;s a <del datetime="2008-02-20T19:15:28+00:00">small</del> very small 2D game without <em>any</em> next-gen bells and whistles. It can probably be done casually on the side, by allocating an hour here and there. We&#8217;ll see how it goes. Hey, I never <em>actually</em> done any game in Unity, I only make or break some underlying parts&#8230;</p>
<p><a href='http://aras-p.info/blog/wp-content/uploads/2008/02/peas080211a.png' title='Look! No game there!'><img class='alignleft' src='http://aras-p.info/blog/wp-content/uploads/2008/02/peas080211a.thumbnail.png' alt='Look! No game there!' /></a>Of course, first I start with no game, just imported graphics. Hey look, I can do sprites!</p>
<p><a href='http://aras-p.info/blog/wp-content/uploads/2008/02/peas080216a.png' title='Level editing'><img class='alignright' src='http://aras-p.info/blog/wp-content/uploads/2008/02/peas080216a.thumbnail.png' alt='Level editing' /></a>Then cook up some base things: define the game grid, throw in some basic user interface on the right hand side, and make it actually do something. This wasn&#8217;t so hard; that already gets me an almost working level building functionality. It does not have fancy block building delay or block deletion yet; that will come later.</p>
<p>Next come basic physics. Danc&#8217;s design calls for simple arcade-like physics (things moving at constant speeds, bouncing off at equal angles, and so on), but in Unity I have a fully fledged <a href="http://unity3d.com/unity/features/physics">physics engine</a> just waiting to be used. Let&#8217;s use that.</p>
<p>The design has sloped ramp pieces, which are hard to approximate using any primitive colliders, so instead I&#8217;ll use convex mesh colliders for them. Now, on this machine I only have Blender, which I totally don&#8217;t know how to use; and I was too lazy to go to PC and use 3ds Max there. What a coder does? Of course, just type in the mesh file in ASCII FBX format. Excerpt:</p>
<blockquote><p>; scaled 2x in Z, by 0.85 in Y<br />
Vertices: -0.5,-0.425,-1.0, 0.5,-0.425,-1.0, -0.5,-0.425,1.0, 0.5,-0.425,1.0,  -0.5,0.425,-1.0, -0.5,0.425,1.0<br />
PolygonVertexIndex: 0,1,-3,2,1,-4,1,0,-5,2,3,-6,0,2,-5,2,5,-5,3,1,-5,5,3,-5
</p></blockquote>
<p>It&#8217;s a left ramp mesh! So much for fancy <a href="http://unity3d.com/unity/features/asset-importing">asset auto-importing</a> functionality, when you don&#8217;t know how to use those 3D apps :)</p>
<p><a href='http://aras-p.info/blog/wp-content/uploads/2008/02/peas080216b.png' title='Physics!'><img class='alignleft' src='http://aras-p.info/blog/wp-content/uploads/2008/02/peas080216b.thumbnail.png' alt='Physics!' /></a><a href='http://aras-p.info/blog/wp-content/uploads/2008/02/peas080216c.png' title='Pea stack!'><img class='alignright' src='http://aras-p.info/blog/wp-content/uploads/2008/02/peas080216c.thumbnail.png' alt='Pea stack!' /></a>After a while I&#8217;ve got peas being controlled by physics, colliding with level and so on. Physics is very bad for productivity, as I ended up just playing around with pea-stacks!</p>
<p>So far there&#8217;s no <em>game</em> yet&#8230; Next up: implement some AI for the peas, so they can wander around, climb the walls, fall down and bounce around. I guess that will be more work and less playing around&#8230; We&#8217;ll see.</p>
]]></content:encoded>
			<wfw:commentRss>http://aras-p.info/blog/2008/02/20/dogfooding-peaninjas-part-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>My experience with Crysis so far</title>
		<link>http://aras-p.info/blog/2008/02/15/my-experience-with-crysis-so-far/</link>
		<comments>http://aras-p.info/blog/2008/02/15/my-experience-with-crysis-so-far/#comments</comments>
		<pubDate>Fri, 15 Feb 2008 13:37:10 +0000</pubDate>
		<dc:creator>Aras Pranckevičius</dc:creator>
				<category><![CDATA[games]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://aras-p.info/blog/2008/02/15/my-experience-with-crysis-so-far/</guid>
		<description><![CDATA[So I decided to check out Crysis myself. A demo for a non-gamer like me would be perfect, I thought. It&#8217;s probably three frames per second. In the menu! I did not see the game itself yet, got bored while waiting for the after-menu-but-before-game intro movie to end (it&#8217;s not skippable, and it also ran [...]]]></description>
			<content:encoded><![CDATA[<p>So I decided to check out <a href="http://en.wikipedia.org/wiki/Crysis">Crysis</a> myself. A demo for a non-gamer like me would be perfect, I thought.</p>
<p>It&#8217;s probably three frames per second. <em>In the menu</em>!</p>
<p>I did not see the game itself yet, got bored while waiting for the after-menu-but-before-game intro movie to end (it&#8217;s not skippable, <em>and</em> it also ran at about three FPS). This is after watching half a dozen obligatory before-menu intro movies at 3 FPS with stuttering sound (&#8220;nvidia,vidia,vidia,vidia&#8230; the way it&#8217;s meant,meant,meant,meant&#8230;&#8221; &#8211; <a href="http://www.nzone.com/object/nzone_twimtbp_gameslist.html">TWIMTBP</a>).</p>
<p>All of this on a half-decent PC, I think &#8211; Intel Core 2 Quad, 4GB RAM, Radeon 3850, Windows XP, latest drivers, none of extra stuff running; the PC is able to run other 3D stuff just fine. I&#8217;m sure the developers and EA&#8217;s testing labs have tested everything extensively, but sometimes something completely random apparently can make things be <em>oh so slow</em>. Oh well. Get back to work.</p>
]]></content:encoded>
			<wfw:commentRss>http://aras-p.info/blog/2008/02/15/my-experience-with-crysis-so-far/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Off-Road Velociraptor Safari</title>
		<link>http://aras-p.info/blog/2008/02/05/off-road-velociraptor-safari/</link>
		<comments>http://aras-p.info/blog/2008/02/05/off-road-velociraptor-safari/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 17:43:29 +0000</pubDate>
		<dc:creator>Aras Pranckevičius</dc:creator>
				<category><![CDATA[games]]></category>
		<category><![CDATA[unity]]></category>

		<guid isPermaLink="false">http://aras-p.info/blog/2008/02/05/off-road-velociraptor-safari/</guid>
		<description><![CDATA[This is just too cool: Off-Road Velociraptor Safari game. Read that again. Who says game industry is all about sequels and safe licenses? You drive a jeep with a spiky ball, and your goal is to chase down raptors and send them to the future, presumably to end world hunger. Or you can do stunts. [...]]]></description>
			<content:encoded><![CDATA[<p>This is just too cool: <em>Off-Road Velociraptor Safari</em> game. Read that again. Who says game industry is all about sequels and safe licenses?</p>
<p>You drive a jeep with a spiky ball, and your goal is to chase down raptors and send them to the future, presumably to end world hunger. Or you can do stunts. And <em>you the driver</em> are a raptor, only you wear a hat and a monocle.</p>
<p>Just go and play it already: <a href="http://raptorsafari.com/"><strong>raptorsafari.com</strong></a>. It&#8217;s free.</p>
<p>Or watch a <a href="http://www.vimeo.com/618534">trailer</a> if you want to miss all the <em>real</em> fun, or read a <a href="http://raptorsafari.com/press-raptor-feathers.php">press release</a>. <em>Of course</em> it&#8217;s made in Unity, in two months from start to finish.</p>
<p>To me, this is a perfect example of focus. Basically there are three things &#8211; 1) vehicle, 2) raptors, 3) physics mayhem &#8211; and that almost describes a game. Yes, there are crates and stunts and achievements and online leaderboards, but that&#8217;s just additional stuff on top of the core game.</p>
<p>Sounds like a good plan for making game prototypes:</p>
<ol>
<li>Think up a game idea and describe it in one concise sentence. The idea may be totally crazy, like in this case. I guess an idea like Velociraptor Safari would not fly in a pitch at any publisher, but that does not matter at this point.</li>
<li>Get a small team of smart people. In Flashbang&#8217;s case, it seems they were 4 to 7 person team.</li>
<li>Choose a game engine/toolset that will allow you to make your game fast. *cough cough*</li>
<li><em>Do it!</em></li>
</ol>
<p>All the above requires is a small smart team and groceries/rent for a couple of months.</p>
<p>Your original idea may be totally crazy, but with the actual working prototype at hand it might <em>just work</em>. Looks like Velociraptor Safari really clicked something on the internets (see <a href="http://kotaku.com/350934/please-go-play-velociraptor-safari">Kotaku</a>, <a href="http://jayisgames.com/archives/2008/01/offroad_velociraptor_safari.php">JayIsGames</a>, <a href="http://www.destructoid.com/off-road-velociraptor-safari-is-out-go-murder-raptors-with-a-jeep-67798.phtml">Destructoid</a>, <a href="http://tigsource.com/articles/2008/01/29/off-road-velociraptor-safari">TIGSource</a>, <a href="http://www.atomicgamer.com/article.php?id=525">AtomicGamer</a>, &#8230;).</p>
]]></content:encoded>
			<wfw:commentRss>http://aras-p.info/blog/2008/02/05/off-road-velociraptor-safari/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Splume!</title>
		<link>http://aras-p.info/blog/2007/10/21/splume/</link>
		<comments>http://aras-p.info/blog/2007/10/21/splume/#comments</comments>
		<pubDate>Sun, 21 Oct 2007 05:42:48 +0000</pubDate>
		<dc:creator>Aras Pranckevičius</dc:creator>
				<category><![CDATA[games]]></category>
		<category><![CDATA[unity]]></category>

		<guid isPermaLink="false">http://aras-p.info/blog/2007/10/21/splume/</guid>
		<description><![CDATA[Flashbang Studios just launched Splume, probably the first game out there* made with Unity 2.0. It just won our &#8220;Top DOG&#8221; competition by the way. It&#8217;s a cute little gem, or alternatively, &#8220;Puzzle Bobble meets Ageia&#8217;s PhysX engine&#8221;. Lots of levels, user level editor, some AJAX magic and so on, and everything made in about [...]]]></description>
			<content:encoded><![CDATA[<p>Flashbang Studios just launched <a href="http://splume.flashbangstudios.com/">Splume</a>, <del datetime="2007-10-22T13:42:52+00:00">probably the first game out there</del>* made with Unity 2.0. It <a href="http://forum.unity3d.com/viewtopic.php?t=7197">just won</a> our &#8220;Top DOG&#8221; competition by the way.</p>
<p>It&#8217;s a cute little gem, or alternatively, &#8220;Puzzle Bobble meets Ageia&#8217;s PhysX engine&#8221;. Lots of levels, user level editor, some AJAX magic and so on, and everything made in about four weeks. Matthew has some <a href="http://forum.unity3d.com/viewtopic.php?t=7302">technical details</a> for the curious.</p>
<p>Here are some shots and a <a href="http://youtube.com/watch?v=0VuB2XFMHk8">youtube trailer</a> for the lazy ones. The youtube trailer uses music from <a href="http://www.8bitpeoples.com/">8bitpeoples</a> which can&#8217;t be bad :)<br />
<a href='http://aras-p.info/blog/wp-content/uploads/2007/10/splume_teaser_1.jpg' title='Splume shot #1'><img src='http://aras-p.info/blog/wp-content/uploads/2007/10/splume_teaser_1.jpg' alt='Splume shot #1' /></a><a href='http://aras-p.info/blog/wp-content/uploads/2007/10/splume_teaser_2.jpg' title='Splume shot #2'><img src='http://aras-p.info/blog/wp-content/uploads/2007/10/splume_teaser_2.jpg' alt='Splume shot #2' /></a></p>
<p><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/0VuB2XFMHk8"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/0VuB2XFMHk8" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object></p>
<p>But really, you should just go and play it: <a href="http://splume.flashbangstudios.com/">splume.flashbangstudios.com</a></p>
<p><em>* I stand corrected: <a href="http://www.mrjoy.com/games/6">When Orcs Attack</a> also was made with Unity 2.0, and it was released earlier!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://aras-p.info/blog/2007/10/21/splume/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MegaPixel on shockwave.com</title>
		<link>http://aras-p.info/blog/2007/05/19/megapixel-on-shockwavecom/</link>
		<comments>http://aras-p.info/blog/2007/05/19/megapixel-on-shockwavecom/#comments</comments>
		<pubDate>Fri, 18 May 2007 22:22:17 +0000</pubDate>
		<dc:creator>Aras Pranckevičius</dc:creator>
				<category><![CDATA[games]]></category>
		<category><![CDATA[unity]]></category>

		<guid isPermaLink="false">http://aras-p.info/blog/2007/05/19/megapixel-on-shockwavecom/</guid>
		<description><![CDATA[I just have to blog this: shockwave.com just launched a Unity web game &#8211; MegaPixel. It&#8217;s a pure, abstract, and mega-fun FPS. It&#8217;s set up in a very small space (the levels are basically boxes with several smaller boxes inside), and it pretty much uses a single texture for the whole game, and it does [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://aras-p.info/blog/wp-content/uploads/2007/05/megapixel-3normal.jpg" title="MegaPixel!"><img src="http://aras-p.info/blog/wp-content/uploads/2007/05/megapixel-3normal.thumbnail.jpg" class="alignright" alt="MegaPixel!" /></a>I just have to blog this: shockwave.com just launched a Unity web game &#8211; <a href="http://www.shockwave.com/gamelanding/megapixel.jsp" title="Death to the pixels!">MegaPixel</a>. It&#8217;s a pure, abstract, and mega-fun FPS. It&#8217;s set up in a very small space (the levels are basically boxes with several smaller boxes inside), and it pretty much uses a single texture for the whole game, and it does not use much more than particle effects for <em>everything</em> (the levels, enemies, weapons and everything else is just particles). Pure genius.</p>
<p>I like it! That says a lot, because last time I played FPS was <em>ages</em> ago. Finally, someone made a game that I can like again. <em>How much I&#8217;m biased because it&#8217;s made with Unity&#8230; decide for yourselves :)</em></p>
<p>Now the killer part: the game is designed and developed solely by a 15 year old &#8211; <a href="http://yogware.bluegillstudios.com/site/">Forest &#8220;Yoggy&#8221; Johnson</a>. How cool is that?</p>
<p>Enough talking, just go and <a href="http://www.shockwave.com/gamelanding/megapixel.jsp">play it</a>. And remember that you didn&#8217;t see cool until you get to the robot level!</p>
]]></content:encoded>
			<wfw:commentRss>http://aras-p.info/blog/2007/05/19/megapixel-on-shockwavecom/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Zen bondage!</title>
		<link>http://aras-p.info/blog/2006/01/03/zen-bondage/</link>
		<comments>http://aras-p.info/blog/2006/01/03/zen-bondage/#comments</comments>
		<pubDate>Tue, 03 Jan 2006 08:52:00 +0000</pubDate>
		<dc:creator>Aras Pranckevičius</dc:creator>
				<category><![CDATA[demos]]></category>
		<category><![CDATA[games]]></category>

		<guid isPermaLink="false">http://aras-p.info/blog/?p=84</guid>
		<description><![CDATA[Check out a small game by demogroup Moppi: Zen Bondage. Zen Bondage is a puzzle game about control. The motivation was to try to make a puzzle game which evokes adult emotions. However, it fails to evoke any &#8220;adult emotions&#8221; in me. Maybe I&#8217;m just not into this bondage thing :) I like the simplicity/pureness [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align: justify;">Check out a small game by demogroup Moppi: <a href="http://www.pouet.net/prod.php?which=20938">Zen Bondage</a>.</p>
<blockquote><p>Zen Bondage is a puzzle game about control. The<br />
motivation was to try to make a puzzle game which<br />
evokes adult emotions.
</p></blockquote>
<p>However, it fails to evoke any &#8220;adult emotions&#8221; in me. Maybe I&#8217;m just not into this bondage thing :)</p>
<p>I like the simplicity/pureness of the idea, and it&#8217;s executed very well.
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://aras-p.info/blog/2006/01/03/zen-bondage/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Pakimono!</title>
		<link>http://aras-p.info/blog/2005/12/10/pakimono/</link>
		<comments>http://aras-p.info/blog/2005/12/10/pakimono/#comments</comments>
		<pubDate>Sat, 10 Dec 2005 12:01:00 +0000</pubDate>
		<dc:creator>Aras Pranckevičius</dc:creator>
				<category><![CDATA[games]]></category>
		<category><![CDATA[unity]]></category>

		<guid isPermaLink="false">http://aras-p.info/blog/?p=80</guid>
		<description><![CDATA[(the lack of updates recently is because I have lots of stuff here going on) I few weeks ago I was visiting OTEE and over the weekend we were jamming on a small game called Pakimono! The idea of the game was pretty cool &#8211; you&#8217;re the naked guy and have to ruin tourists&#8217; photos [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align: justify;"><span style="font-style: italic;">(the lack of updates recently is because I have lots of stuff here going on)</span></p>
<p>I few weeks ago I was visiting <a href="http://otee.dk/">OTEE</a> and over the weekend we were jamming on a small game called <a href="http://www.idevgames.com/contest/downloads/details.php?file=19">Pakimono!</a> The idea of the game was pretty cool &#8211; you&#8217;re the naked guy and have to ruin tourists&#8217; photos :)</p>
<p>The whole experience was great. It was my first time using a Mac, first time working with <a href="http://otee.dk/unity/index.html">Unity </a>(their game development tool) etc. I coded&#038;tuned most of the bullet-time character controller, where you drag your limbs with a mouse, trying to cover as much of the sight as possible.</p>
<p>The coding was a bit unusual &#8211; most of my coding life I was doing pretty low-level C++ programming. This time it was completely different &#8211; I&#8217;d setup &#8220;the game&#8221; directly in the editor, write some short C# scripts and <span style="font-style: italic;">boom!</span> &#8211; everything works, without me having to worry about any of the low-level stuff. No recompiling or any of that stuff. Cool.</p>
<p>Ironically, I did not see the final Pakimono build yet. I left earlier than the others and do not have a Mac anywhere nearby. But the guys promised me a windows build!
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://aras-p.info/blog/2005/12/10/pakimono/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lost Garden</title>
		<link>http://aras-p.info/blog/2005/11/08/lost-garden/</link>
		<comments>http://aras-p.info/blog/2005/11/08/lost-garden/#comments</comments>
		<pubDate>Tue, 08 Nov 2005 07:21:00 +0000</pubDate>
		<dc:creator>Aras Pranckevičius</dc:creator>
				<category><![CDATA[games]]></category>

		<guid isPermaLink="false">http://aras-p.info/blog/?p=79</guid>
		<description><![CDATA[Lost Garden is good &#8211; about game design and related things from (ex) Anark guy (hi Chris!). E.g. this one (a practical definition of innovation in game design): And if you ever hear an indie game developer talking about level design, either shoot them in the head now to help them avoid their future misery, [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align: justify;"><a href="http://www.lostgarden.com/">Lost Garden</a> is good &#8211; about game design and related things from (ex) Anark guy <span style="font-style: italic;">(hi Chris!)</span>. E.g. this one (<a href="http://lostgarden.com/2005/04/practical-definition-of-innovation-in.html">a practical definition of innovation in game design</a>):</p>
<blockquote><p>And if you ever hear an indie game developer talking about level design, either shoot them in the head now to help them avoid their future misery, or direct them towards this essay.</p></blockquote>
</div>
]]></content:encoded>
			<wfw:commentRss>http://aras-p.info/blog/2005/11/08/lost-garden/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bought Rag Doll Kung Fu</title>
		<link>http://aras-p.info/blog/2005/10/13/bought-rag-doll-kung-fu/</link>
		<comments>http://aras-p.info/blog/2005/10/13/bought-rag-doll-kung-fu/#comments</comments>
		<pubDate>Thu, 13 Oct 2005 15:52:00 +0000</pubDate>
		<dc:creator>Aras Pranckevičius</dc:creator>
				<category><![CDATA[games]]></category>

		<guid isPermaLink="false">http://aras-p.info/blog/?p=73</guid>
		<description><![CDATA[Like I promised :) It ownz, period.]]></description>
			<content:encoded><![CDATA[<div style="text-align: justify;">Like I <a href="http://aras-p.info/blog/2005/09/27/rag-doll-kung-fu">promised</a> :)</p>
<p>It ownz, period.
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://aras-p.info/blog/2005/10/13/bought-rag-doll-kung-fu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Rag Doll Kung Fu</title>
		<link>http://aras-p.info/blog/2005/09/27/rag-doll-kung-fu/</link>
		<comments>http://aras-p.info/blog/2005/09/27/rag-doll-kung-fu/#comments</comments>
		<pubDate>Tue, 27 Sep 2005 15:52:00 +0000</pubDate>
		<dc:creator>Aras Pranckevičius</dc:creator>
				<category><![CDATA[games]]></category>

		<guid isPermaLink="false">http://aras-p.info/blog/?p=69</guid>
		<description><![CDATA[I saw Rag Doll Kung Fu website already a while ago. However, only today I saw the video of it&#8217;s presentation at GDC. It&#8217;s awesome! Will buy the game as soon as it appears on Steam (even if I don&#8217;t play games). Go to downloads section at the site and get this large video presentation. [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align: justify;">I saw <a href="http://www.ragdollkungfu.com/">Rag Doll Kung Fu</a> website already a while ago. However, only today I saw the video of it&#8217;s presentation at GDC. It&#8217;s <span style="font-style: italic;">awesome</span>! Will buy the game as soon as it appears on Steam (even if I don&#8217;t play games).</p>
<p>Go to downloads section at the site and get this large video presentation. It&#8217;s really good.</p></div>
]]></content:encoded>
			<wfw:commentRss>http://aras-p.info/blog/2005/09/27/rag-doll-kung-fu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Guns &amp; games</title>
		<link>http://aras-p.info/blog/2005/08/11/guns-games/</link>
		<comments>http://aras-p.info/blog/2005/08/11/guns-games/#comments</comments>
		<pubDate>Thu, 11 Aug 2005 07:25:00 +0000</pubDate>
		<dc:creator>Aras Pranckevičius</dc:creator>
				<category><![CDATA[games]]></category>

		<guid isPermaLink="false">http://aras-p.info/blog/?p=60</guid>
		<description><![CDATA[The comment on the blog entry here is great: 38% of Americans own game consoles. Around 40% of Americans own guns. The gun lobby is damn powerful. We shouldn&#8217;t need anywhere near as much money as the gun lobby, because unlike games, we are absolutely, 100% sure that guns actually do kill people.]]></description>
			<content:encoded><![CDATA[<div style="text-align: justify;">The comment on the blog entry <a href="http://www.zenofdesign.com/?p=422">here</a> is great:</p>
<blockquote><p>38% of Americans own game consoles. Around 40% of Americans own guns. The gun lobby is damn powerful. We shouldn&#8217;t need anywhere near as much money as the gun lobby, because unlike games, we are absolutely, 100% sure that guns actually <i>do</i> kill people.</p></blockquote>
</div>
]]></content:encoded>
			<wfw:commentRss>http://aras-p.info/blog/2005/08/11/guns-games/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
