<?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>mattiasgustavsson.com</title>
	<atom:link href="http://mattiasgustavsson.com/Blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://mattiasgustavsson.com/Blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Fri, 11 May 2012 18:36:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>First character &#8211; The Cleric</title>
		<link>http://mattiasgustavsson.com/Blog/first-character-the-cleric/</link>
		<comments>http://mattiasgustavsson.com/Blog/first-character-the-cleric/#comments</comments>
		<pubDate>Thu, 10 May 2012 18:36:00 +0000</pubDate>
		<dc:creator>Mattias</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://mattiasgustavsson.com/Blog/?p=494</guid>
		<description><![CDATA[So, here&#8217;s some first shots of one of the four player characters &#8211; the cleric. Obviously nothing is final yet, but I&#8217;m happy with it so far. The idea is to try and make something in a style similar to old Dungeons &#38; Dragons. Especially the art of Larry Elmore serves as a&#160; great source [...]]]></description>
			<content:encoded><![CDATA[<p>So, here&#8217;s some first shots of one of the four player characters &#8211; the cleric. Obviously nothing is final yet, but I&#8217;m happy with it so far. </p>
<p><a href="http://www.colossusentertainment.com/forumref/FantasyRPG/Cleric_Full.png[/img]"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="cleric" border="0" alt="cleric" src="http://mattiasgustavsson.com/Blog/wp-content/uploads/2012/05/cleric.png" width="640" height="400" /></a></p>
<p>The idea is to try and make something in a style similar to old Dungeons &amp; Dragons. Especially the art of Larry Elmore serves as a&#160; great source of inspiration. Not that I&#8217;m anywhere near that level of art, obviously, but one can still try &#8211; even with limited ability and the limitations of Poser <img src='http://mattiasgustavsson.com/Blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgustavsson.com/Blog/first-character-the-cleric/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>More on the fantasy RPG</title>
		<link>http://mattiasgustavsson.com/Blog/more-on-the-fantasy-rpg/</link>
		<comments>http://mattiasgustavsson.com/Blog/more-on-the-fantasy-rpg/#comments</comments>
		<pubDate>Wed, 09 May 2012 18:28:00 +0000</pubDate>
		<dc:creator>Mattias</dc:creator>
				<category><![CDATA[Fantasy RPG]]></category>

		<guid isPermaLink="false">http://mattiasgustavsson.com/Blog/?p=489</guid>
		<description><![CDATA[For this game, I&#8217;ll be using Poser for the graphics as usual &#8211; but I&#8217;ll try to keep it fairly simple, and aim for a bit more content instead. I&#8217;m currently thinking of doing it in the same style (visually, it will have totally different controls) as the &#34;Dwarven Commando&#34; I started on but never [...]]]></description>
			<content:encoded><![CDATA[<p>For this game, I&#8217;ll be using Poser for the graphics as usual &#8211; but I&#8217;ll try to keep it fairly simple, and aim for a bit more content instead. I&#8217;m currently thinking of doing it in the same style (visually, it will have totally different controls) as the &quot;Dwarven Commando&quot; I started on but never finished (but a bit more zoomed out):</p>
<p><a href="http://mattiasgustavsson.com/Blog/wp-content/uploads/2012/05/dcsprites.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="dcsprites" border="0" alt="dcsprites" src="http://mattiasgustavsson.com/Blog/wp-content/uploads/2012/05/dcsprites_thumb.png" width="640" height="400" /></a> </p>
<p>I&#8217;ve started making one of the player characters &#8211; mostly to have something hands on to work with (and to &quot;set the tone&quot; for myself) while I get on with the design and initial planning. I&#8217;ll post a picture of it when it&#8217;s a bit further along. </p>
<p>But mainly, I am trying to come up with the fundamental design, defining what aspects are important for this game and which ones doesn&#8217;t matter. </p>
<p>I must say, in this phase of &quot;ideation&quot; and design, one of the best resources I&#8217;ve found is the blog <a href="http://rampantgames.com/blog/">Tales of the Rampant Coyote</a> &#8211; it&#8217;s full of great information, but even better than that, it helps me coming up with the right questions &#8211; and that&#8217;s invaluable!</p>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgustavsson.com/Blog/more-on-the-fantasy-rpg/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My new game project</title>
		<link>http://mattiasgustavsson.com/Blog/my-new-game-project/</link>
		<comments>http://mattiasgustavsson.com/Blog/my-new-game-project/#comments</comments>
		<pubDate>Tue, 08 May 2012 18:26:00 +0000</pubDate>
		<dc:creator>Mattias</dc:creator>
				<category><![CDATA[Fantasy RPG]]></category>

		<guid isPermaLink="false">http://mattiasgustavsson.com/Blog/?p=467</guid>
		<description><![CDATA[Somehow, I’ve managed to get caught up in various tech-projects over the last few months, instead of actually working on any games. In fact, I haven&#8217;t really worked on a game since The Strangler, though there&#8217;s been a couple of &#34;false starts&#34;. So now I&#8217;m getting stuck in again, and thought I&#8217;d make sure to [...]]]></description>
			<content:encoded><![CDATA[<p>Somehow, I’ve managed to get caught up in various tech-projects over the last few months, instead of actually working on any games. In fact, I haven&#8217;t really worked on a game since <a href="http://www.superfriendshipclub.com/forum/viewtopic.php?f=12&amp;t=20">The Strangler</a>, though there&#8217;s been a couple of &quot;false starts&quot;. </p>
<p>So now I&#8217;m getting stuck in again, and thought I&#8217;d make sure to post about my progress, as a way of reminding me to stay on track <img src='http://mattiasgustavsson.com/Blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  </p>
<p>I have only a vague idea of what I&#8217;m going to do at the moment &#8211; I&#8217;m thinking a traditional fantasy RPG, with a party of four characters (I&#8217;m thinking Fighter, Wizard, Thief and either Cleric or Ranger). The key thing for me on this one is to keep things simple, and focus on completing it &#8211; and not to get lost in various tech-related side-tracks. </p>
<p>So, that&#8217;s a quick statement of intent. I&#8217;ll keep you guys posted <img src='http://mattiasgustavsson.com/Blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgustavsson.com/Blog/my-new-game-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Strangler &#8211; attempting a point-and-click game</title>
		<link>http://mattiasgustavsson.com/Blog/the-strangler-attempting-a-point-and-click-game/</link>
		<comments>http://mattiasgustavsson.com/Blog/the-strangler-attempting-a-point-and-click-game/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 17:55:00 +0000</pubDate>
		<dc:creator>Mattias</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://mattiasgustavsson.com/Blog/?p=485</guid>
		<description><![CDATA[Last month (July) I&#8217;ve been participating in a challenge, to make a game in a month, using any technology and tools. The only restriction was the theme: Justice. And even that was open to interpretation. I saw this as an opportunity to practice a bit of game design and, more importantly, telling a story, so [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:eb5d6df2-3a65-4192-8983-ee7446b47c77" class="wlWriterEditableSmartContent">
<div><object width="628" height="525"><param name="movie" value="http://www.youtube.com/v/w5JNWf7h6e4&amp;hl=en"></param><embed src="http://www.youtube.com/v/w5JNWf7h6e4&amp;hl=en" type="application/x-shockwave-flash" width="628" height="525"></embed></object></div>
</div>
<p>Last month (July) I&#8217;ve been participating in a <a href="http://www.superfriendshipclub.com/forum/viewtopic.php?f=4&amp;t=16">challenge</a>, to make a game in a month, using any technology and tools. The only restriction was the theme: Justice. And even that was open to interpretation. </p>
<p>I saw this as an opportunity to practice a bit of game design and, more importantly, telling a story, so I decided to make some sort of classic point-and-click. I used my game engine <a href="http://www.pixieuniversity.com/">Pixie</a>, and the coding was quite straightforward, but it was rather difficult to come up with what was to happen in the game. </p>
<p>To make it a bit more interesting, I decided to try and make it in a bright and happy visual style, while keeping the story itself a bit more dark and sinister. There was something about those two conflicting ideas that appealed to me. </p>
<p>The game can be downloaded here&#160; (for windows, but should run on Linux through Wine): </p>
<p><a href="http://www.colossusentertainment.com/forumref/strangler_1_0.zip"><font size="4"><strong>http://www.colossusentertainment.com/forumref/strangler_1_0.zip</strong></font></a></p>
<p>And here are some screenshots: </p>
<p>The name of the game is &quot;The Strangler&quot;, and is about Tom O&#8217;Reilly, Private Investigator:   <br /><a href="http://mattiasgustavsson.com/Blog/wp-content/uploads/2012/05/strangler_02.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="strangler_02" border="0" alt="strangler_02" src="http://mattiasgustavsson.com/Blog/wp-content/uploads/2012/05/strangler_02_thumb.png" width="640" height="400" /></a> </p>
<p>The game starts with you, playing as O&#8217;Reilly, getting a visit&#8230;   <br /><a href="http://mattiasgustavsson.com/Blog/wp-content/uploads/2012/05/strangler_07.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="strangler_07" border="0" alt="strangler_07" src="http://mattiasgustavsson.com/Blog/wp-content/uploads/2012/05/strangler_07_thumb.png" width="640" height="400" /></a> </p>
<p>&#8230; from a lady who has a case for you &#8211; to find out if her husband is a killer.   <br /><a href="http://mattiasgustavsson.com/Blog/wp-content/uploads/2012/05/strangler_08.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="strangler_08" border="0" alt="strangler_08" src="http://mattiasgustavsson.com/Blog/wp-content/uploads/2012/05/strangler_08_thumb.png" width="640" height="400" /></a> </p>
<p>So you have to hit the streets in a search for clues, but you&#8217;re not very popular with the local PD:   <br /><a href="http://mattiasgustavsson.com/Blog/wp-content/uploads/2012/05/strangler_12.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="strangler_12" border="0" alt="strangler_12" src="http://mattiasgustavsson.com/Blog/wp-content/uploads/2012/05/strangler_12_thumb.png" width="640" height="400" /></a> </p>
<p>There&#8217;s a couple of cut-scenes in the game, giving you another perspective on what&#8217;s happening:   <br /><a href="http://mattiasgustavsson.com/Blog/wp-content/uploads/2012/05/strangler_17.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="strangler_17" border="0" alt="strangler_17" src="http://mattiasgustavsson.com/Blog/wp-content/uploads/2012/05/strangler_17_thumb.png" width="640" height="400" /></a> </p>
<p>I didn&#8217;t have time to&#160; add much interactive dialogue (so that&#8217;s something I&#8217;ll be adding over the next couple of weeks). But there&#8217;s a little of it at least:   <br /><a href="http://mattiasgustavsson.com/Blog/wp-content/uploads/2012/05/strangler_23.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="strangler_23" border="0" alt="strangler_23" src="http://mattiasgustavsson.com/Blog/wp-content/uploads/2012/05/strangler_23_thumb.png" width="640" height="400" /></a> </p>
<p>When you discover a new location, you get a marker on a map, which is used to move around in the game:   <br /><a href="http://mattiasgustavsson.com/Blog/wp-content/uploads/2012/05/strangler_27.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="strangler_27" border="0" alt="strangler_27" src="http://mattiasgustavsson.com/Blog/wp-content/uploads/2012/05/strangler_27_thumb.png" width="640" height="400" /></a> </p>
<p>I had to come up with a bunch of characters for the game. Ten of them in total.   <br /><a href="http://mattiasgustavsson.com/Blog/wp-content/uploads/2012/05/strangler_29.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="strangler_29" border="0" alt="strangler_29" src="http://mattiasgustavsson.com/Blog/wp-content/uploads/2012/05/strangler_29_thumb.png" width="640" height="400" /></a> </p>
<p>As I only had a month to do it, and everything took longer than expected (especially the animations), I didn&#8217;t have time to do the last scene of the game within the time set out for the challenge, but in the couple of weeks following it, I finished it off.</p>
<p>If you do try it out, please let me know what you think <img src='http://mattiasgustavsson.com/Blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
</p>
</p>
</p>
</p>
<p>Also, as I usually do, I’ve released the source code for the whole thing:</p>
<p><a href="http://www.colossusentertainment.com/forumref/strangler_source_1_0.zip">http://www.colossusentertainment.com/forumref/strangler_source_1_0.zip</a></p>
<p>It includes both the code for the engine and the code for the game, but not the data-files for the game (you&#8217;d have to get them from the games zip file). The code is public domain. The source code for the game itself is not particularly pretty &#8211; time limitations meant doing quite a few nasty hacks. But sometimes it can be fun to see that other people hack their code too, so I&#8217;m releasing it as is <img src='http://mattiasgustavsson.com/Blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgustavsson.com/Blog/the-strangler-attempting-a-point-and-click-game/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Simple and efficient management of shared resources</title>
		<link>http://mattiasgustavsson.com/Blog/simple-and-efficient-management-of-shared-resources/</link>
		<comments>http://mattiasgustavsson.com/Blog/simple-and-efficient-management-of-shared-resources/#comments</comments>
		<pubDate>Wed, 22 Jun 2011 20:18:18 +0000</pubDate>
		<dc:creator>Mattias</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://mattiasgustavsson.com/Blog/simple-and-efficient-management-of-shared-resources/</guid>
		<description><![CDATA[Recently, Cliff Harris of Positech Games made a blog post called Optimising my ‘dumb’ textures, where he describes the optimisations he is doing to his latest game, to increase the load times when dealing with large number of textures that needs to be managed automatically, but also be shared between different game systems. This made [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, Cliff Harris of Positech Games made a blog post called <a href="http://positech.co.uk/cliffsblog/2011/06/13/optimising-my-dumb-textures/">Optimising my ‘dumb’ textures</a>, where he describes the optimisations he is doing to his latest game, to increase the load times when dealing with large number of textures that needs to be managed automatically, but also be shared between different game systems.</p>
<p>This made me think of resource managers in general, and how I’ve been planning for a while to replace the one in my <a href="http://www.pixieuniversity.com">Pixie Game Engine</a> with something more robust, efficient and generic. It also struck me that this is a topic that often comes up, and I think all developers eventually reach a point where they need to solve this problem, so I thought I might as well give it a shot and share the resulting code as public domain, as I usually do.</p>
<p>So, my requirements for this system is that it should be really easy to use, but at the same time very efficient both in terms of memory use and performance.</p>
<p>In the solution I came up with, I use efficient hash tables to store the resources, but I wrap the access to them in a convenient resource class, which can be used as simply as this:</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;">Resource<span style="color: #000080;">&lt;</span>Texture<span style="color: #000080;">&gt;</span> myTexture<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;myBitmap.tga&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></pre></div></div>

<p>In this example, Texture is the class that we want our resource manager to manage, and Resource is the templated wrapper class that we use to have it managed automatically.</p>
<p>There’s no problem having multiple instances referencing the same physical resource, like this:</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;">Resource<span style="color: #000080;">&lt;</span>Texture<span style="color: #000080;">&gt;</span> myTexture<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;myBitmap.tga&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
Resource<span style="color: #000080;">&lt;</span>Texture<span style="color: #000080;">&gt;</span> myOtherTexture<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;myBitmap.tga&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span></pre></div></div>

<p>Even though we have two different resources, the fact that they’re created from the same filename means that they will both be pointing to the same Texture instance. The first of these two lines will cause the Texture instance to be created, while the second line will merely add an additional reference to the same instance.</p>
<p>Resources are automatically reference counted, so as resources are destroyed, the reference count goes down, and when it reaches zero (meaning there are no longer any Resource referencing the instance in question), the instance will be deleted automatically.</p>
<p>A good thing about this resource implementation is that Resource instances take very little memory – only 4 bytes – as they only store a pointer to the instance they reference. Also, they can be freely copied and assign, and the reference count will be adjusted accordingly, like this:</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;">Resource<span style="color: #000080;">&lt;</span>Texture<span style="color: #000080;">&gt;</span> myTexture<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;myBitmap.tga&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">// New instance created</span>
Resource<span style="color: #000080;">&lt;</span>Texture<span style="color: #000080;">&gt;</span> myTexture2<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;myBitmap2.tga&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">// New instance created</span>
Resource<span style="color: #000080;">&lt;</span>Texture<span style="color: #000080;">&gt;</span> myTexture3<span style="color: #008000;">&#40;</span>myTexture<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">// Ups ref count on &quot;myBitmap.tga&quot;</span>
myTexture2 <span style="color: #000080;">=</span> myTexture3<span style="color: #008080;">;</span> <span style="color: #666666;">// Ups ref count on &quot;myBitmap.tga”</span>
<span style="color: #666666;">// and also causes &quot;myBitmap2.tga&quot; instance to be destroyed</span></pre></div></div>

<p>This makes it possible to work freely with Resources, assigning them and copying them around, knowing that it’s all very efficient under the hood, and that the bulk of the data (as would be stored in, say, the Texture class) will be shared among all of them.</p>
<p>Additionally there’s a couple of helper functions to get the filename that a resource was created from, and to get a list of all managed resources of a specific type – which can come in handy if you need to loop through and perform an operation on each of them, such as Cliffski’s case where he needed to restore lost surfaces after Alt+Tab.</p>
<p>The code is public domain, it’s stand-alone and compiles as is – but it does include several of the data containers I originally developed for Pixie, so there’s quite a few files in this package, even though the resource system itself is only four fairly small files.</p>
<p><a href="http://mattiasgustavsson.com/Blog/Files/resource_manager.zip">Download Resource Manager Source Code</a></p>
<p>I hope someone will find this useful, if nothing else as a starting point for their own system. I’ve done some quick performance tests, and on my computer I can create and destroy one million resources in less than half a second, so the resource system adds very little overhead to the process of loading and managing your assets <img src='http://mattiasgustavsson.com/Blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgustavsson.com/Blog/simple-and-efficient-management-of-shared-resources/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TIGJamUK3</title>
		<link>http://mattiasgustavsson.com/Blog/tigjamuk3/</link>
		<comments>http://mattiasgustavsson.com/Blog/tigjamuk3/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 18:51:00 +0000</pubDate>
		<dc:creator>Mattias</dc:creator>
		
		<guid isPermaLink="false">http://www.mattiasgustavsson.com/Blog/tigjamuk3/</guid>
		<description><![CDATA[This weekend, I spent in Cambridge at TIGJamUK3 an indie game dev get-together of about 30 people, where we came up with weird themes and tried to make games designed around them in only 2-3 hours each! Lot&#8217;s of good fun, and I managed the deadline for the three jams I participated in (I tend [...]]]></description>
			<content:encoded><![CDATA[<p>This weekend, I spent in Cambridge at <a href="http://forums.tigsource.com/index.php?topic=11963.0">TIGJamUK3</a> an indie game dev get-together of about 30 people, where we came up with weird themes and tried to make games designed around them in only 2-3 hours each!
<p>Lot&#8217;s of good fun, and I managed the deadline for the three jams I participated in (I tend to have to stay so focused when making a game in such a short time period that my brain gets fried, and then I have to rest for a bit <img src='http://mattiasgustavsson.com/Blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> )</p>
<p>For the first game, the theme was either &quot;Fish&quot; or &quot;Summer &amp; Heat&quot; &#8211; or a combination of both, at your choice. There was a conversation about sharks, in regards to the &quot;Fish&quot; theme (with <a href="http://distractionware.com/blog/?page_id=642">Terry</a> showing pictures of &quot;invisible sharks&quot;), and I recalled a terrible movie I saw once (<a href="http://www.youtube.com/watch?v=Fa7ck5mcd1o">Mega Shark vs Giant Octopus</a>) and quickly decided on a fighting game with a shark and an octopus. Coming up with the idea for these things are usually quite a challenge, as you can&#8217;t ponder for too long, so you sort of have to stick with the first one you get and try to make it work.</p>
<p>The result, three hours and a couple of extra minutes later:</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="tigjam_sharkvsoctopus" border="0" alt="tigjam_sharkvsoctopus" src="http://www.mattiasgustavsson.com/Blog/wp-content/uploads/2010/06/tigjam_sharkvsoctopus.png" width="640" height="480" /> </p>
<p><a href="http://www.mattiasgustavsson.com/Blog/Files/tigjam_sharkvsoctopus.zip"><font size="5">DOWNLOAD SHARK vs OCTOPUS</font></a></p>
<p>For the next jam, the theme was either &quot;Camera&quot; or &quot;Antidepressants&quot; &#8211; or a combination of the two. This time, we decided on only two hours time limit. I felt warmed up at this point and decided to do a combination of the two, and also to push myself a bit and try to draw stuff myself instead of using Poser &#8211; something I&#8217;m not used to doing at all!</p>
<p>The result of this one, which I managed comfortably within the two hour time limit:</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="tigjam_smile" border="0" alt="tigjam_smile" src="http://www.mattiasgustavsson.com/Blog/wp-content/uploads/2010/06/tigjam_smile.png" width="640" height="400" /> </p>
<p><a href="http://www.mattiasgustavsson.com/Blog/Files/tigjam_smile.zip"><font size="5">DOWNLOAD SMILE, YOU&#8217;RE ON CAMERA</font></a></p>
<p>For the last jam I did, the theme was &quot;White hole&quot; or &quot;Staying awake&quot;, or a combination of the two. I went with &quot;Staying awake&quot;, and the time limit was three hours. I aimed WAY too high with this one, and took about 20 minutes extra to just wrap up what I had into *something* at least &#8211; it&#8217;s a game where you have to stay awake or you endup in a nightmare place.</p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="tigjam_dreamscape" border="0" alt="tigjam_dreamscape" src="http://www.mattiasgustavsson.com/Blog/wp-content/uploads/2010/06/tigjam_dreamscape.png" width="640" height="480" /> </p>
<p><a href="http://www.mattiasgustavsson.com/Blog/Files/tigjam_dreamscape.zip"><font size="5">DOWNLOAD DREAMSCAPE</font></a></p>
<p>All in all, a fun weekend, and it was good to finally meet some of the people I&#8217;ve gotten to know through various forums! Thanks to the organisers and everyone involved.</p>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgustavsson.com/Blog/tigjamuk3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debug Text Render</title>
		<link>http://mattiasgustavsson.com/Blog/debug-text-render/</link>
		<comments>http://mattiasgustavsson.com/Blog/debug-text-render/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 17:56:00 +0000</pubDate>
		<dc:creator>Mattias</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://www.mattiasgustavsson.com/Blog/debug-text-render/</guid>
		<description><![CDATA[When working on games, I often find it useful to be able to quickly and easily display text strings on the screen for debugging purposes. A long time ago I wrote a simple little piece of code which could draw text onto a bitmap, and without having a dependency on anything else &#8211; it doesn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="DebugFont" border="0" alt="DebugFont" src="http://www.mattiasgustavsson.com/Blog/wp-content/uploads/2010/04/DebugFont.png" width="200" height="64" /></p>
<p>When working on games, I often find it useful to be able to quickly and easily display text strings on the screen for debugging purposes. A long time ago I wrote a simple little piece of code which could draw text onto a bitmap, and without having a dependency on anything else &#8211; it doesn&#8217;t use any other classes, functions or libraries, and it doesn&#8217;t need any external data &#8211; the font bitmaps are included in the source file, as a static array. This system, in all its simplicity, have turned out to be very, very useful, and I&#8217;ve used it for most of my stuff for the last 10 years or so.</p>
<p>I recently spent a little time cleaning it up a little, and thought I&#8217;d release it to anyone who&#8217;s interested. As usual, it&#8217;s public domain, so use it in any way you like.</p>
<p>You can <a href="http://www.mattiasgustavsson.com/Blog/Files/DebugFont.zip">download the DebugFont source code here</a>.</p>
<p>To draw text on any bitmap, you simple include &quot;DebugFont.h&quot;, and do something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;">DebugFont font<span style="color: #008080;">;</span>
font.<span style="color: #007788;">Blit</span><span style="color: #008000;">&#40;</span>pixelDataPtr,w,h,<span style="color: #0000dd;">20</span>,<span style="color: #0000dd;">30</span>,<span style="color: #FF0000;">&quot;My text&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">// 20,30 is the x,y position of the text</span></pre></div></div>

<p>Where <em>pixelDataPtr</em> is a pointer to the pixel data of the bitmap we want to draw onto, and<em>w</em> and <em>h</em> are the width and height (in pixels) of that pixel data area. The pixel data of the bitmap to draw on, can be 8-, 16- or 32-bit data.</p>
<p>As I finish the refactoring of more parts of my <a href="http://www.pixieuniversity.com">Pixie game engine</a>, I&#8217;ll try and post more of these little useful, stand-alone code snippets which can just be dropped into any project &#8211; let me know if you find any of them useful <img src='http://mattiasgustavsson.com/Blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgustavsson.com/Blog/debug-text-render/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New Characters for Jade Figurines</title>
		<link>http://mattiasgustavsson.com/Blog/new-characters-for-jade-figurines/</link>
		<comments>http://mattiasgustavsson.com/Blog/new-characters-for-jade-figurines/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 17:53:00 +0000</pubDate>
		<dc:creator>Mattias</dc:creator>
		
		<guid isPermaLink="false">http://www.mattiasgustavsson.com/Blog/new-characters-for-jade-figurines/</guid>
		<description><![CDATA[I&#8217;ve been making some more characters for my Jade Figurines game recently, so just thought I&#8217;d post some pics of them, along with some close-ups of some of the characters which is already in the game: First up, a captain for the Watch, to go along with the guards &#8211; a bit tougher, a bit [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been making some more characters for my <a href="http://www.mattiasgustavsson.com/Blog/Features/TheJadeFigurines.php">Jade Figurines</a> game recently, so just thought I&#8217;d post some pics of them, along with some close-ups of some of the characters which is already in the game:     <br />First up, a captain for the Watch, to go along with the guards &#8211; a bit tougher, a bit meaner:&#160; <br /><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="jade_watchcaptain" border="0" alt="jade_watchcaptain" src="http://www.mattiasgustavsson.com/Blog/wp-content/uploads/2010/04/jade_watchcaptain1.png" width="350" height="498" />&#160;<img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="jade_watchman" border="0" alt="jade_watchman" src="http://www.mattiasgustavsson.com/Blog/wp-content/uploads/2010/04/jade_watchman.png" width="283" height="498" />     <br />Also, another wizard (the story I have in mind calls for two of &#8216;em):&#160; <br /><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="jade_goodwizard" border="0" alt="jade_goodwizard" src="http://www.mattiasgustavsson.com/Blog/wp-content/uploads/2010/04/jade_goodwizard.png" width="282" height="418" /> <img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="jade_evilwizard" border="0" alt="jade_evilwizard" src="http://www.mattiasgustavsson.com/Blog/wp-content/uploads/2010/04/jade_evilwizard.png" width="303" height="443" />     <br />I&#8217;m also going to have elves in the game. Now, elves are quite different from humans, and have their own agenda &#8211; you can never fully trust them, and they are as often an ally as they are your enemy:&#160; <br /><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="jade_elf" border="0" alt="jade_elf" src="http://www.mattiasgustavsson.com/Blog/wp-content/uploads/2010/04/jade_elf.png" width="296" height="404" />     <br />And finally, I&#8217;m having Orcs as well &#8211; but not your ordinary &quot;hordes of darkness and evil&quot; Orcs, but rather a wild and primitive people, proud warriors who fights fiercely and have their own culture and values, but are not outright evil:&#160; <br /><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="jade_orc" border="0" alt="jade_orc" src="http://www.mattiasgustavsson.com/Blog/wp-content/uploads/2010/04/jade_orc.png" width="562" height="496" />     <br />There&#8217;s more to come, of course, but these are the latest additions&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgustavsson.com/Blog/new-characters-for-jade-figurines/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Dungeon Master-style game</title>
		<link>http://mattiasgustavsson.com/Blog/dungeon-master-style-game/</link>
		<comments>http://mattiasgustavsson.com/Blog/dungeon-master-style-game/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 18:40:00 +0000</pubDate>
		<dc:creator>Mattias</dc:creator>
		
		<guid isPermaLink="false">http://www.mattiasgustavsson.com/Blog/dungeon-master-style-game/</guid>
		<description><![CDATA[The last few days, I&#8217;ve been experimenting a bit with art for a type of game I&#8217;ve been wanting to make for quite some time: a game in the style of good old Dungeon Master. Did you use to play it, or other similar games? If so, I&#8217;d like to hear about what sort of [...]]]></description>
			<content:encoded><![CDATA[<p>The last few days, I&#8217;ve been experimenting a bit with art for a type of game I&#8217;ve been wanting to make for quite some time: a game in the style of good old Dungeon Master. Did you use to play it, or other similar games? If so, I&#8217;d like to hear about what sort of things you remember from it, what made it fun and what would make you want to play a new game in the same style <img src='http://mattiasgustavsson.com/Blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />   <br />Anyway, here&#8217;s a few examples of what my game will look like:
<p><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="DmTestTroll" border="0" alt="DmTestTroll" src="http://www.mattiasgustavsson.com/Blog/wp-content/uploads/2010/06/DmTestTroll.png" width="640" height="480" /> </p>
<p><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="DmTestSpider" border="0" alt="DmTestSpider" src="http://www.mattiasgustavsson.com/Blog/wp-content/uploads/2010/06/DmTestSpider.png" width="640" height="480" /> </p>
<p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="DmTestDragon" border="0" alt="DmTestDragon" src="http://www.mattiasgustavsson.com/Blog/wp-content/uploads/2010/06/DmTestDragon.png" width="640" height="480" /></p>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgustavsson.com/Blog/dungeon-master-style-game/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Video: Jade Figurines</title>
		<link>http://mattiasgustavsson.com/Blog/video-jade-figurines/</link>
		<comments>http://mattiasgustavsson.com/Blog/video-jade-figurines/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 17:48:00 +0000</pubDate>
		<dc:creator>Mattias</dc:creator>
		
		<guid isPermaLink="false">http://www.mattiasgustavsson.com/Blog/video-jade-figurines/</guid>
		<description><![CDATA[I&#8217;ve put a video on youtube of the Jade Figurines game I made recently. The video doesn&#8217;t really do the game justice though (it&#8217;s much smoother than in the video), so you&#8217;re still better off downloading it. If you have any thoughts, suggestions or ideas, I&#8217;d love to hear them.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve put a video on youtube of the Jade Figurines game I made <a href="http://www.mattiasgustavsson.com/VideoJadeFigurines.php">recently</a>. The video doesn&#8217;t really do the game justice though (it&#8217;s much smoother than in the video), so you&#8217;re still better off <a href="http://www.mattiasgustavsson.com/Blog/Files/jadefigurines_1_0.zip">downloading</a> it.</p>
<p> <object width="640" height="500"><param name="movie" value="http://www.youtube.com/v/ZcyqNDAIqBs&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en_US&amp;feature=player_embedded&amp;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.youtube.com/v/ZcyqNDAIqBs&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en_US&amp;feature=player_embedded&amp;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="640" height="500"></embed></object>
<p>If you have any thoughts, suggestions or ideas, I&#8217;d love to hear them.</p>
]]></content:encoded>
			<wfw:commentRss>http://mattiasgustavsson.com/Blog/video-jade-figurines/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

