<?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>Cynical Stuff - Casual games development and cynical observations &#187; Software Development</title>
	<atom:link href="http://www.cynicalstuff.com/category/software-development/feed" rel="self" type="application/rss+xml" />
	<link>http://www.cynicalstuff.com</link>
	<description>A blog about casual games development, science, culture and cynical observations</description>
	<lastBuildDate>Sat, 16 Jul 2011 17:14:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Indie Game Engine Choices 2011</title>
		<link>http://www.cynicalstuff.com/indie-game-engine-choices-2011</link>
		<comments>http://www.cynicalstuff.com/indie-game-engine-choices-2011#comments</comments>
		<pubDate>Fri, 25 Feb 2011 12:33:51 +0000</pubDate>
		<dc:creator>Karja</dc:creator>
				<category><![CDATA[Indie Games]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.cynicalstuff.com/?p=497</guid>
		<description><![CDATA[What? Is it 2011 already?! And I will be finished with Spandex Force: Superhero U soon? This means that it&#8217;s time to plan ahead for my next game project! One of the most crucial choices right now is what game engine to use for my next game. I use the term &#8220;game engine&#8221; very loosely [...]]]></description>
			<content:encoded><![CDATA[<p>What? Is it 2011 already?! And I will be finished with <a href="http://www.spandexforce.com">Spandex Force: Superhero U</a> soon? This means that it&#8217;s time to plan ahead for my next game project!</p>
<p>One of the most crucial choices right now is what game engine to use for my next game. I use the term &#8220;game engine&#8221; very loosely &#8211; I don&#8217;t care about all the added bling bling right now. In fact, I would be just fine with a low-level engine that provided graphics and audio abstraction layers. Granted, extra functionality will result in a shorter development time, but first and foremost I am going to look at what platforms are available for distribution with the different game engines. For a small developer like me it means incredibly much if I can reach an extra market with not much extra effort!</p>
<p>It&#8217;s worth noting that this is a non-comprehensive list of all the available game engines. These are simply the ones I think are of most interest to me as an indie developer.</p>
<table border="1">
<tbody>
<tr>
<th>Engine Name</th>
<th>Language</th>
<th>Windows</th>
<th>Mac</th>
<th>Web</th>
<th>iPhone</th>
<th>Android</th>
<th>Xbox 360</th>
<th>Linux</th>
</tr>
<tr>
<td>Flash/haXe</td>
<td>haXe</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>(X)</td>
<td>(X)</td>
<td></td>
<td>(X)</td>
</tr>
<tr>
<td>Flash/Actionscript</td>
<td>Actionscript</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td></td>
<td>(X)</td>
<td></td>
<td>(X)</td>
</tr>
<tr>
<td>Unity</td>
<td>C#/JS</td>
<td>X</td>
<td>X</td>
<td>(X)</td>
<td>X</td>
<td>X</td>
<td></td>
<td></td>
</tr>
<tr>
<td>LWJGL</td>
<td>Java</td>
<td>X</td>
<td>X</td>
<td>(X)</td>
<td></td>
<td>(X)</td>
<td></td>
<td>X</td>
</tr>
<tr>
<td>Simple DirectMedia Layer</td>
<td>C++</td>
<td>X</td>
<td>X</td>
<td></td>
<td>X</td>
<td>X</td>
<td></td>
<td>X</td>
</tr>
<tr>
<td>Gosu</td>
<td>C++</td>
<td>X</td>
<td>X</td>
<td></td>
<td>X</td>
<td></td>
<td></td>
<td>X</td>
</tr>
<tr>
<td>Allegro</td>
<td>C++</td>
<td>X</td>
<td>X</td>
<td></td>
<td>(X)</td>
<td></td>
<td></td>
<td>X</td>
</tr>
<tr>
<td>BlitzMax</td>
<td>Misc</td>
<td>X</td>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>X</td>
</tr>
<tr>
<td>SFML</td>
<td>C++</td>
<td>X</td>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>X</td>
</tr>
<tr>
<td>ClanLib</td>
<td>C++</td>
<td>X</td>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>X</td>
</tr>
<tr>
<td>Game Maker</td>
<td>Misc</td>
<td>X</td>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>pygame</td>
<td>Python</td>
<td>X</td>
<td>X</td>
<td></td>
<td>(X)</td>
<td>(X)</td>
<td></td>
<td>X</td>
</tr>
<tr>
<td>Silverlight</td>
<td>Misc</td>
<td>X</td>
<td>(X)</td>
<td>(X)</td>
<td></td>
<td></td>
<td></td>
<td>(X)</td>
</tr>
<tr>
<td>XNA Game Studio</td>
<td>C#</td>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td></td>
</tr>
<tr>
<th>Upcoming Engines</th>
<th>Language</th>
<th>Windows</th>
<th>Mac</th>
<th>Web</th>
<th>iPhone</th>
<th>Android</th>
<th>Xbox 360</th>
<th>Linux</th>
</tr>
<tr>
<td>Monkey/Mojo</td>
<td>Misc</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td>X</td>
<td></td>
<td>X</td>
</tr>
<tr>
<td>ExEn</td>
<td>C#</td>
<td>X</td>
<td>X</td>
<td></td>
<td>X</td>
<td>X</td>
<td>X</td>
<td></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>So, what&#8217;s this table all about? This is a list of different game engines/SDKs/development environments that are suitable for indie games. An X marks support, while an (X) marks dubious support that may or may not work correctly/easily.</p>
<p>The platforms are sorted in <strong>order of priority</strong>, from left to right. <strong>Web</strong> has a very high focus, but if the benefits of the other platforms outweigh that of web based distribution, I could definitely skip it. After all, <strong>iPhone</strong> (which includes iPad) and <strong>Android</strong> might be emerging as quite valid alternatives.</p>
<p>Based on the platform support, each engine is listed in <strong>order of priority</strong>. Essentially, a development environment that e.g. lacks support for Mac will be at the bottom of the list, plain and simple.</p>
<p>A quick look would show that <strong>haXe</strong> is the way to go, but that&#8217;s not the entire truth. The language is not widely spread, and the support is quite lacking. <strong>Actionscript</strong> is what I&#8217;m using for my current game, but it&#8217;s not really a great environment to develop in. Other than those two, <strong>Unity</strong> and <strong>LWJGL</strong> have some sort of support for web based games, but I still claim that the Unity plugin and Java work pretty poorly in browsers. I&#8217;m not dismissing LWJGL completely, though &#8211; I&#8217;d love to develop in Java.</p>
<p>If I were to decide that web based distribution isn&#8217;t all that cool after all, I think that <strong>SDL</strong> is a clear winner. I have made a small game in it earlier and it&#8217;s decent to work with. The problem is that the Android port is of an old version, and I&#8217;m not sure how functional the iPhone port is.</p>
<p>Lastly, I have to make some honorary mentions regarding <strong>ExEn</strong> and <strong>Monkey</strong>. ExEn is a project to port XNA to various platforms, and it&#8217;s really very interesting. Monkey, on the other hand, is a new upcoming language + graphics framework by the developer behind BlitzMax. Not only will it support the listed platforms, but also HTML5. Quite, quite interesting!</p>
<p>Have I missed something?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cynicalstuff.com/indie-game-engine-choices-2011/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Stop that Thief!</title>
		<link>http://www.cynicalstuff.com/stop-that-thief</link>
		<comments>http://www.cynicalstuff.com/stop-that-thief#comments</comments>
		<pubDate>Thu, 03 Feb 2011 09:12:29 +0000</pubDate>
		<dc:creator>Karja</dc:creator>
				<category><![CDATA[Indie Games]]></category>
		<category><![CDATA[Observations]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.cynicalstuff.com/?p=490</guid>
		<description><![CDATA[This, kids, is how you act like a complete bastard and ruin things for everyone: Counterfeit Lugaru on Apple&#8217;s App Store What&#8217;s going on here is that Wolfire Games released the source code to their game Lugaru as part of the second edition of the Humble Indie Bundle a little while ago. Essentially, a great [...]]]></description>
			<content:encoded><![CDATA[<p>This, kids, is how you act like a complete bastard and ruin things for everyone:</p>
<p><a href="http://blog.wolfire.com/2011/02/Counterfeit-Lugaru-on-Apple-s-App-Store-developing">Counterfeit Lugaru on Apple&#8217;s App Store</a></p>
<p>What&#8217;s going on here is that Wolfire Games released the source code to their game Lugaru as part of the second edition of the Humble Indie Bundle a little while ago. Essentially, a great deal where you get loads of good games as well as source code for a pittance. Great deal indeed for a guy calling himself iCoder (Michael Latour) &#8211; he decided to use the source code for Lugaru to release it himself on the App Store. And to make things even better, at the tenth of the price of the official Lugaru HD release.</p>
<p><img class="alignnone" title="Lugaru vs Lugaru HD" src="http://cdn.wolfire.com/lugarupiracy/lugarupiracythumb.jpg" alt="" width="520" height="240" /></p>
<p>&#8220;Naah, I can&#8217;t be arsed to make a game of my own! I&#8217;ll just grab this code&#8230;and steal these assets&#8230; There! Hah! I wonder why more game developers don&#8217;t do it like this instead!&#8221;</p>
<p>I&#8217;m completely flabbergasted. My flabber is all gasted. Or maybe my gast is all flabbered. From Wolfire&#8217;s blog:</p>
<p style="padding-left: 30px;"><em>iCoder was very unhelpful in response to our emails (their feedback form  doesn&#8217;t seem to work), but Kotaku managed to get an interesting comment  for their <a href="http://kotaku.com/5750238/the-case-of-the-identical-rabbit-games">article</a>,  they responded &#8220;we have every legal right to market and sell the  software&#8221; and, &#8220;the license we were granted allows for non-exclusive  redistribution of the source code or the compiled product, modified or  unmodified, for a fee or free of charge.&#8221;</em></p>
<p>So, the code was GPL&#8217;d and thus this Michael Latour thinks that the art and sound assets fall under the same license. Insane. The gall of it. Let&#8217;s see, in how many ways is this wrong?</p>
<ul>
<li>It&#8217;s illegal, first of all.</li>
<li>It&#8217;s immoral and unethical, secondly. To such an enormous degree that it&#8217;s ridiculous.</li>
<li>This little stunt will cause others to think twice before releasing the source code for a game.</li>
<li>He&#8217;s releasing a game at a pitiful price, speeding on (ever so slightly) the race to the bottom with regards to game prices.</li>
<li>His little stunt requires the time and effort of the original developers. It&#8217;s not just a passive loss of revenue &#8211; it requires them to actively pursue this in order to get it removed.</li>
<li>Even though it&#8217;s blindingly obvious that the game will be pulled off the App Store, he&#8217;s still earning money from it &#8211; at the expense of the original developers. Think about that. No matter what happens, he will probably have gained something from this because it&#8217;s going to be too much work getting him to cough up the dollars he&#8217;s earned.</li>
</ul>
<p>And I&#8217;ve probably missed a number of other points.</p>
<p>I&#8217;m all for open source. In some cases. But a game is heavily (I&#8217;d say to most part) dependent on assets, so the code itself serves little purpose. If you have some clever algorithms it makes sense to release the code, but I have a hard time seeing how general game code is useful for anyone. With that in mind, this little incident hasn&#8217;t exactly made me more favorable toward releasing source code for any games. The risk of people like Michael Latour confusing the source code and the assets is simply too great.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cynicalstuff.com/stop-that-thief/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multiple Madness and Test Driven Development</title>
		<link>http://www.cynicalstuff.com/multiple-madness-and-test-driven-development</link>
		<comments>http://www.cynicalstuff.com/multiple-madness-and-test-driven-development#comments</comments>
		<pubDate>Thu, 16 Sep 2010 10:27:27 +0000</pubDate>
		<dc:creator>Karja</dc:creator>
				<category><![CDATA[Indie Games]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Spandex Force: Superhero U]]></category>

		<guid isPermaLink="false">http://www.cynicalstuff.com/?p=422</guid>
		<description><![CDATA[A recent private thread on Juuso&#8217;s GameProducer forums discusses Test Driven Development and offers insights into benefits of the paradigm. I can&#8217;t argue that there are benefits, but I also don&#8217;t see the point of applying it to minor projects like casual games. In general, I&#8217;m very sceptical towards evangelic people who claim that one [...]]]></description>
			<content:encoded><![CDATA[<p>A recent private thread on <a href="http://www.gameproducer.net/forums/">Juuso&#8217;s GameProducer forums</a> discusses Test Driven Development and offers insights into benefits of the paradigm. I can&#8217;t argue that there are benefits, but I also don&#8217;t see the point of applying it to minor projects like casual games. In general, I&#8217;m very sceptical towards evangelic people who claim that one process/development method/paradigm is applicable to all kinds of projects. TDD is great for large systems, TDD is a fresh way of looking at design, etc etc &#8211; but it&#8217;s not relevant for KarjaSoft.</p>
<p>Why not? The primary reason is that my games evolve relatively organically, and the initial overall design is rarely the final one.</p>
<p>&#8220;Well, that&#8217;s the beauty of it all! You can apply continuous refactoring &#8211; and TDD is great for that!&#8221;</p>
<p>Look, I don&#8217;t just mean that the code changes. I mean that I rewrite essential basic requirements of the game all the time. Partly, this is because I&#8217;m doing this for a hobby. It&#8217;s meant to give me pleasure, and just &#8220;doing stuff&#8221; feels good. But also, it&#8217;s largely because my game designs change along with the art I have. I&#8217;m very much doing art-driven game design, and the art I have depends on what artists I find and what I can do myself. &#8230;Nothing of which is set in stone at the beginning.</p>
<p>&#8220;Why don&#8217;t you just gather all the art you need and then do the design afterwards?&#8221;</p>
<p>Because that&#8217;d take longer, and because there&#8217;s a constant give-and-take between the art and the design. If I get a decent enough price for the backgrounds I can hire a GUI artist, and then I need to design the power and item stores to utilize the GUI art. But wait, I can&#8217;t afford a GUI artist! That means that I have to design the stores in such a way that I can create the art for them myself. All of this moves to and fro for many months.</p>
<p>But enough of that. Yesterday I encountered a situation where I really could have used a TDD approach. I have multiples among my tokens on the game board, and since the beginning I&#8217;ve had some issues with deciding if there are three or more matches when a multiple&#8217;s involved.</p>
<p><img class="alignnone" title="Multiple" src="http://www.cynicalstuff.com/images/spandex2/multiple.jpg" alt="" width="180" height="136" /></p>
<p>I decided to just let it go and finish all the other stuff first, but now the time has come to fix this bug. And for some reason the logic in my code isn&#8217;t working:</p>
<pre style="padding-left: 30px;">if ( found &gt; 0 &amp;&amp; index == multiple &amp;&amp;
tiles[i][j].active &amp;&amp; tiles[i][j].state == "Active"
&amp;&amp; (tiles[i][j].index &lt; 3 || tiles[i][j].index == multiple) )</pre>
<p>It never correctly identifies a line of three or more, that begins with a multiple!</p>
<p>No big deal. I&#8217;ll just have a closer look at it, rewrite the function to become cleaner and easier to read, and then fix the problem. If I had used TDD the code would already have been prepared for this, and I could simply have added another test case. Now I have to spend an hour (-ish) to make this work properly instead. TDD would most definitely have helped.</p>
<p>&#8230;But on the other hand I just lose an hour this way, compared to the time I&#8217;d have had to spend if I went with full TDD from the beginning. I&#8217;m a firm believer that it&#8217;s way too easy to suboptimize, and that implementing a theoretically more effective method often will cause the end result to be more costly. Choose the right tool for the task; not the prettiest and sexiest tool.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cynicalstuff.com/multiple-madness-and-test-driven-development/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A Quick Look at my Ideas File</title>
		<link>http://www.cynicalstuff.com/a-quick-look-at-my-ideas-file</link>
		<comments>http://www.cynicalstuff.com/a-quick-look-at-my-ideas-file#comments</comments>
		<pubDate>Tue, 02 Feb 2010 14:17:42 +0000</pubDate>
		<dc:creator>Karja</dc:creator>
				<category><![CDATA[Indie Games]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.cynicalstuff.com/?p=394</guid>
		<description><![CDATA[I have an ever-growing file with ideas for various games and applications. A few years ago it contained a few gems like Grabble (Grammar Scrabble) in which you place words instead of letters and have to form grammatically correct sentences, and DoodlePad which was a text editor much like Notepad, but with the possibility to [...]]]></description>
			<content:encoded><![CDATA[<p>I have an ever-growing file with ideas for various games and applications. A few years ago it contained a few gems like <strong>Grabble</strong> (Grammar Scrabble) in which you place words instead of letters and have to form grammatically correct sentences, and<strong> DoodlePad</strong> which was a text editor much like Notepad, but with the possibility to add simple illustrations by drawing with the mouse. Sometimes these ideas result in an actual product, but most of the time they never get further than concept stage&#8230;or a few lines in the ideas.txt file.</p>
<p style="text-align: center;"><img src="http://satisfaction.tinytwitter.com/helpcenter/images/idea_med.png" alt="" width="37" height="44" /><img src="http://satisfaction.tinytwitter.com/helpcenter/images/idea_med.png" alt="" width="37" height="44" /><img src="http://satisfaction.tinytwitter.com/helpcenter/images/idea_med.png" alt="" width="37" height="44" /></p>
<p>For fun I decided to check what I wrote a year or two ago. These are different game concepts that may or may not result in actual games later:</p>
<ul>
<li>TV show production game. Create small game shows and try to get good network ratings.</li>
<li>Ninja school. <em>That&#8217;s all I wrote &#8211; I guess it pretty much says it all!</em></li>
<li>Game continuity. A game where the player dies but continues with his offspring. Affecting the game world results in changes for the next incarnation too.</li>
<li>SimCity + Viva Pinata. Prepare environment for citizens to join. E.g. a doctor requires sick people and wealth, and provides health. The player never has active control over the citizens.</li>
<li>Woggle or Worggle. Word-Boggle. Same idea as Grabble, but make a simple Boggle game where you have to string up sentences from words.</li>
<li>&#8220;Modern fantasy.&#8221; A fantasy world that was common fantasy ~1000 years ago but have evolved. How would elves, men and dwarves live in a more modern setting?</li>
<li>Vampire adventure game. Oh, so many snarky Twilight parodies that could be included&#8230;</li>
<li>&#8220;Closed system RPG.&#8221; Nothing is ever added to the game world: killing enemies doesn&#8217;t give experience points &#8211; it gives you the person&#8217;s life force. Money is never created, it only shifts hands. The same thing with weapons and armor. Includes autonomous heroes/villains that &#8220;level up&#8221; just like the player.</li>
</ul>
<p>Fun fun fun! A few of these might actually end up in real projects, if I only get my game development up to speed. I wonder if I should have a look at the ideas from five years ago too, to see what else I was thinking of&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cynicalstuff.com/a-quick-look-at-my-ideas-file/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Web and Downloadable Game Engine Choices 2009</title>
		<link>http://www.cynicalstuff.com/web-and-downloadable-game-engine-choices-2009</link>
		<comments>http://www.cynicalstuff.com/web-and-downloadable-game-engine-choices-2009#comments</comments>
		<pubDate>Sun, 20 Dec 2009 11:44:07 +0000</pubDate>
		<dc:creator>Karja</dc:creator>
				<category><![CDATA[Indie Games]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[casual games]]></category>
		<category><![CDATA[game development]]></category>
		<category><![CDATA[game engines]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.cynicalstuff.com/?p=369</guid>
		<description><![CDATA[In my last post I complained about the lack of a perfect silver bullet game engine that would fit my needs as a small indie developer starting up a new game project. My three primary target platforms are Windows, Mac and the web, in roughly that order. &#8220;But Karja, haven&#8217;t you heard? iPhone/XBox Live 360/Android/etc [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.cynicalstuff.com/game-engine-choices-for-indie-developers-2009">In my last post</a> I complained about the lack of a perfect silver bullet game engine that would fit my needs as a small indie developer starting up a new game project. My three primary target platforms are Windows, Mac and the web, in roughly that order.</p>
<p>&#8220;But Karja, haven&#8217;t you heard? iPhone/XBox Live 360/Android/etc etc is the new indie platform of choice! This guy I read about made six billion dollars on his game there!&#8221;</p>
<p>I have a number of reasons why that is utter bull excrement:</p>
<ul>
<li>iPhone is flooded with games. Literally flooded, with thousands and thousands of games that make it hard to gain visibility. Also, iPhone relies on Apple&#8217;s SDK, objective-C (to some extent at the very least), touch screen, low-end hardware, etc etc &#8211; and all of these aspects have to be hand-crafted for the iPhone release without being reusable on other platforms.</li>
<li>XBox 360 is good if you only intend to target Windows and XB360. But that would be incredibly stupid for me, since my target audience isn&#8217;t the XBox lads.</li>
<li>Android is interesting. It would be neat to get in quickly just in case the market suddenly explodes á la iPhone. But, and this is a big but, Android requires Java which is utterly incompatible with web deployment (Flash is the only viable option there).</li>
</ul>
<p>After some consideration, I found that my options are as follows:</p>
<ul>
<li><strong>Java</strong> &#8211; Windows and Mac deployment is possible, and I can deploy on Android as well, eventually. I also looked at Java-to-Actionscript converters, but&#8230;that feels desperate and unreliable. So, web deployment is a no-go for this one.</li>
<li><strong>BlitzMax</strong> &#8211; What, BlitzMax? That only supports Win/Mac! Yes, but I seriously considered trying to write a BMax->Actionscript converter since I already have a lot of BMax code and an abstraction layer API in place. (This means that I would have to write the APIs for drawing/sound in Actionscript from scratch, but convert the game logic at least.)</li>
<li><strong>C++</strong> &#8211; Screw web deployment, and go for a full-fledged C++ engine! That would be the most fun to code in. But&#8230; No. 2010 is coming up and the web is the new black.</li>
<li><strong>HaXe</strong> &#8211; This would allow web deployment, and there&#8217;s a neat HaXe->C++ converter that can be used along with NME/NEASH, an SDL version of the flash API. Essentially, what this promises is that the same code could be used to make a Flash version <em>and</em> a compiled standalone downloadable (&#8230;as well as an iPhone version!). Alas, things aren&#8217;t as good as they sound. I did some quick tests and NME/NEASH lacks a lot of bitmap manipulation support. For example, BitmapData.colorTransform() support is missing &#8211; and this means that the alpha channel of bitmaps cannot be modified in the downloadable version. Things like this make HaXe seem way too shaky at the moment.</li>
<li><strong>PushButton Engine</strong> &#8211; If I&#8217;m considering pure Flash (well, Actionscript) engines, this is a strong candidate. It&#8217;s a well-designed library intended to be used for larger game projects. However&#8230;. After looking at the code a bit, I fail to see exactly what it will bring. The rendering, file-loading and game state management seems to be the biggest things that it provides but to be honest those aren&#8217;t all that tricky to write by yourself.</li>
<li><strong>flixel</strong> &#8211; Another Actionscript/Flash engine. This one seems very attractive at first, but the main problem with flixel is that it makes assumptions. &#8220;You only want to make a platformer style game, right? You&#8217;ll want to use pixelated effects, right? You want to embed all files since you&#8217;re deploy for the web only, right?&#8221; And so on.</li>
<li><strong>Actionscript/Flex</strong> &#8211; Finally, the last option is to go for pure Actionscript with Flex. No no no, I&#8217;m not trying to reinvent the wheel and have a NIH (Not Invented Here) mentality. But to be frank, writing the main framework that flixel or PBE would provide is&#8230;not that much work. Also, I have specific needs: for example, I need to target different platforms and handle files differently on the different platforms (embedded/external).</li>
</ul>
<p>Nothing is decided at all, but I&#8217;m currently leaning towards using PBE, flixel or pure AS/Flex. My main beef with that is whether or not it&#8217;s fast enough to look good on the downloadable versions. HaXe seemed like an interesting choice for a long while, and I&#8217;m sure that it will be in the future, but I simply found too many flaws in it to provide any actual benefit at the moment. I&#8217;m (probably) going for a double-buffer approach with quite a few alpha effects on bitmaps (not in the least for the particles), so the current unstable alpha support in the SDL parts makes HaXe&#8217;s NME/NEASH solution for downloadables and iPhone pretty dubious.</p>
<p>In the end maybe I oughtn&#8217;t spend so much time investigating this, and just choose something and start developing instead. I guess all engines and choices have their flaws, so nothing&#8217;s going to be perfect.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cynicalstuff.com/web-and-downloadable-game-engine-choices-2009/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Game Engine Choices for Indie Developers 2009</title>
		<link>http://www.cynicalstuff.com/game-engine-choices-for-indie-developers-2009</link>
		<comments>http://www.cynicalstuff.com/game-engine-choices-for-indie-developers-2009#comments</comments>
		<pubDate>Thu, 10 Dec 2009 10:15:40 +0000</pubDate>
		<dc:creator>Karja</dc:creator>
				<category><![CDATA[Indie Games]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[casual games]]></category>
		<category><![CDATA[game development]]></category>
		<category><![CDATA[game engines]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.cynicalstuff.com/?p=348</guid>
		<description><![CDATA[This post is going to get a bit technical, so if you&#8217;re easily bored by the gritty details of game development you might want to go somewhere else right now. Maybe to Cute Overload or something. My latest game, Wildhollow, is released and I have some great ideas for my next game. Let&#8217;s just say [...]]]></description>
			<content:encoded><![CDATA[<p>This post is going to get a bit technical, so if you&#8217;re easily bored by the gritty details of game development you might want to go somewhere else right now. Maybe to <a href="http://cuteoverload.com/">Cute Overload</a> or something.</p>
<p>My latest game, <a href="http://www.wildhollow.com">Wildhollow</a>, is released and I have some great ideas for my next game. Let&#8217;s just say that it might include puzzles, RPG elements and some online functionality. Oh, and superheroes or monsters too. Not really sure which yet. Either way, in order to get the game done I need to decide what to implement it in. <a href="http://www.sheeplings.com">Sheeplings</a>, <a href="http://www.spandexforce.com">Spandex Force</a> and <a href="http://www.wildhollow.com">Wildhollow</a> were all developed in BlitzMax, an object oriented BASIC language that&#8217;s extremely easy to develop cross-platform games in.</p>
<p>As long as your cross-platform needs are Windows, Mac or Linux, that is.</p>
<p>As an indie casual games developer I find myself wanting to maximize my potential market (of course), and that means maximizing the number of platforms I can distribute games too. To make things easier for me I&#8217;ve constructed this table of feasible game engines/libraries as things are now in 2009:</p>
<table border="1">
<tr>
<th>Engine Name</th>
<th>Language</th>
<th>Windows</th>
<th>Mac</th>
<th>Web</th>
<th>iPhone</th>
<th>Android</th>
<th>Xbox 360</th>
<th>Linux</th>
</tr>
<tr>
<td>Android SDK</td>
<td>Java</td>
<td>(X)</td>
<td>(X)</td>
<td>(X)</td>
<td></td>
<td>X</td>
<td></td>
<td>(X)</td>
</tr>
<tr>
<td>BlitzMax</td>
<td>Misc</td>
<td>X</td>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>X</td>
</tr>
<tr>
<td>ClanLib</td>
<td>C++</td>
<td>X</td>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>X</td>
</tr>
<tr>
<td>Cocos 2D</td>
<td>Obj-C</td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Flixel</td>
<td>Flash</td>
<td>(X)</td>
<td>(X)</td>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Game Maker</td>
<td>Misc</td>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>HaXe</td>
<td>Misc</td>
<td>(X)</td>
<td>(X)</td>
<td>X</td>
<td>(X)</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Haaf&#8217;s Game Engine</td>
<td>C++</td>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>LWJGL</td>
<td>Java</td>
<td>X</td>
<td>X</td>
<td>(X)</td>
<td></td>
<td></td>
<td></td>
<td>X</td>
</tr>
<tr>
<td>PopCap Framework</td>
<td>C++</td>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>PTK Engine</td>
<td>C++</td>
<td>X</td>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>PushButton Engine</td>
<td>Flash</td>
<td>(X)</td>
<td>(X)</td>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Pygame</td>
<td>Python</td>
<td>X</td>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>X</td>
</tr>
<tr>
<td>Simple DirectMedia Layer</td>
<td>C++</td>
<td>X</td>
<td>X</td>
<td></td>
<td>X</td>
<td></td>
<td></td>
<td>X</td>
</tr>
<tr>
<td>Silverlight</td>
<td>Misc</td>
<td>X</td>
<td>(X)</td>
<td>(X)</td>
<td></td>
<td></td>
<td></td>
<td>(X)</td>
</tr>
<tr>
<td>Slick</td>
<td>Java</td>
<td>X</td>
<td>X</td>
<td>(X)</td>
<td></td>
<td>(X)</td>
<td></td>
<td>X</td>
</tr>
<tr>
<td>Torque 2D</td>
<td>C++</td>
<td>X</td>
<td>X</td>
<td></td>
<td>(X)</td>
<td></td>
<td></td>
<td>X</td>
</tr>
<tr>
<td>Unity</td>
<td>C#/JS</td>
<td>X</td>
<td>X</td>
<td>(X)</td>
<td>X</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>XNA Game Studio</td>
<td>C#</td>
<td>X</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>X</td>
<td></td>
</tr>
</table>
<p></p>
<p>Note that I said feasible engines and libraries. This is not close to a complete list, but they are the ones I&#8217;m considering. I can list some criteria:</p>
<ul>
<li>There must be decent performance, which means preferably no software rendering</li>
<li>All Windows only, Xbox only, etc libraries are of no use to me. I&#8217;ve listed a few anyway just for consideration</li>
<li>I want to be able to create mostly 2D games in an efficient manner. 3D engines are often bloated and unusable. Unity may be free but it&#8217;s of no use to me, for example</li>
<li>Finally, I have a prioritized order of platform preference. You may note that the columns in the table are ordered rather strangely. That&#8217;s because I&#8217;m going from most important to least important platform</li>
</ul>
<p>A quick glance at the table shows that there&#8217;s no single engine or library that fulfills all my needs. An X demarks that the platform is supported, and an (X) means that limited support is possible. That could mean that it&#8217;s possible but requires a lot of messing around (e.g. HaXe for iPhone), or that the solution isn&#8217;t practical (e.g. Java web applets aren&#8217;t very useful), or that it requires unreasonable things (e.g. Unity on the web requires a specific plugin).</p>
<p>Most engines and libraries support Windows and Mac, so that&#8217;s not really a problem. The real problem comes with my third platform of choice: the web. And by the web I mean that it should run seamlessly for most users. Which means that Java is doubtful (too&#8230;clunky, and portals won&#8217;t accept it), and that leaves only Flash. Which, of course, is mostly incompatible with &#8220;normal&#8221; programming languages and engines.</p>
<p>This is not an easy decision&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cynicalstuff.com/game-engine-choices-for-indie-developers-2009/feed</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>KarjaSoft Redesign Concept</title>
		<link>http://www.cynicalstuff.com/karjasoft-redesign-concept</link>
		<comments>http://www.cynicalstuff.com/karjasoft-redesign-concept#comments</comments>
		<pubDate>Mon, 04 Aug 2008 22:41:18 +0000</pubDate>
		<dc:creator>Karja</dc:creator>
				<category><![CDATA[Observations]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[concept]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[karjasoft]]></category>
		<category><![CDATA[redesign]]></category>
		<category><![CDATA[web design]]></category>

		<guid isPermaLink="false">http://www.cynicalstuff.com/?p=189</guid>
		<description><![CDATA[In the beginning of the summer I posted an ad where I asked for web designers interested in having a go at integrating all the KarjaSoft pages into one logical unit. Essentially, what I want is a unified presence in order to explore synergies between my different projects &#8211; e.g. Cynical Stuff, the KarjaSoft company webpage and the [...]]]></description>
			<content:encoded><![CDATA[<p>In the beginning of the summer I posted an ad where I asked for web designers interested in having a go at integrating all the KarjaSoft pages into one logical unit. Essentially, what I want is a unified presence in order to explore synergies between my different projects &#8211; e.g. Cynical Stuff, the KarjaSoft company webpage and the different game pages. Yes, you may now slap me in the face for using both &#8220;unified presence&#8221; and &#8220;explore synergies&#8221; in the same sentence. Either way, I got a couple (as in two) responses&#8230;that somehow missed the mark a little.</p>
<p>What I desperately need is a designer. Not a programmer (I can code PHP myself, goddammit!) or an artist (what good is a pretty logo if it&#8217;s just sitting there like a bloated toad?) &#8211; a web <em>designer</em>! But somehow the word design gets lost when one mentions web design. Web design almost inevitably gets interpreted as either &#8220;make a logo&#8221; or &#8220;do a customized content management system.&#8221; Design is of course present in both making a logo and writing code, but my needs were for a person more keen on usability and design in the classical sense.</p>
<p>To make a short story long: In the end I sighed and shook my blonde curls in dismay, and decided to have a go at it myself instead. Hey, at least it&#8217;s a learning experience, right? Here&#8217;s what I ended up with as my first concept:</p>
<p><img src="http://www.cynicalstuff.com/images/design/games01s.jpg" alt="" width="400" height="362" /></p>
<p>This is supposed to be the Games page; a list of all KarjaSoft games with easily accessible links to each game. Clicking a game logo leads you to the specific game&#8217;s page. The color scheme and the logo is modified for each game, but the main design is kept in order to give a sense of unity. Also, the navigation buttons in the top right are present on all pages. As you can see I&#8217;ve used common terms instead of titles. If someone sees a button with Cynical Stuff it is probably hard to guess that it leads to this blog, but by typing out Blog everyone will instantly know where it leads.</p>
<p>And yes. If I adopt this design, it will mean that Cynical Stuff will be redesigned according to this as well. As long as I can make a decent WordPress template out of it, that is.</p>
<p>Any thoughts? Does it look like cat vomit? Does it look okay?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cynicalstuff.com/karjasoft-redesign-concept/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Entrepreneuring Dilemmas</title>
		<link>http://www.cynicalstuff.com/entrepreneuring-dilemmas</link>
		<comments>http://www.cynicalstuff.com/entrepreneuring-dilemmas#comments</comments>
		<pubDate>Sat, 12 Jul 2008 21:16:43 +0000</pubDate>
		<dc:creator>Karja</dc:creator>
				<category><![CDATA[Indie Games]]></category>
		<category><![CDATA[Observations]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.cynicalstuff.com/?p=187</guid>
		<description><![CDATA[For many years I&#8217;ve been in no rush to make something of myself: I&#8217;ve dabbled in writing some Windows applications, small game experiments, and lately casual games. I&#8217;ve also started writing a fantasy novel, written and performed humorous songs at university parties, written punk songs, metal songs, pseudo-baroque songs, and tried to learn how to draw better. [...]]]></description>
			<content:encoded><![CDATA[<p>For many years I&#8217;ve been in no rush to make something of myself: I&#8217;ve dabbled in writing some Windows applications, small game experiments, and lately casual games. I&#8217;ve also started writing a fantasy novel, written and performed humorous songs at university parties, written punk songs, metal songs, pseudo-baroque songs, and tried to learn how to draw better. But this year I&#8217;m turning 30. I still have long hair and dress all in black; I really should grow up and start doing some worthwhile things.</p>
<p><img src="http://www.coastalgraphics.com/Online_Productions/images/entrepreneur/entrepreneur.jpg" alt="" width="262" height="310" /></p>
<p>My professional life is going well: I like working with embedded software development and my current Field Applications Engineer role could be a much-needed spark of inspiration for me. But that&#8217;s not enough &#8211; I need to have more entrepreneuring projects for my spare time! I have a nagging suspicion that I&#8217;m far from the only one in a position like this, so for all our sakes I&#8217;ll make a short list of my current thoughts. With some luck they might give you inspiration to start something new:</p>
<ol>
<li>Continue with casual games development. Well, this is pretty much a given. I love making games and I have loads of ideas: Spandex Force 2 with multiplayer support, a puzzle game based on Norse mythology, a free Flash verison of my old Word Mahjongg game, an abstract strategy game based on the dawn of civilization, an archaeology adventure/puzzle game, humorous adventure games based on old public domain stories &#8211; and so on. I&#8217;ll definitely keep this up. Especially since Spandex Force has given me funding for both Wildhollow and much of Spandex Force 2.</li>
<li>Import and sell items. I love weird cool stuff, and I&#8217;d love to find something obscure that I can sell in Sweden. I like the idea of a DIY thing with a small stock in my apartment and online distribution. Still haven&#8217;t found the Perfect Cool Thing(TM), though - a big part of the problem is that I don&#8217;t have a lot of capital to invest in a project like this.</li>
<li>Attempt to make one of these cool Web 2.0 places. (Well, it ought to be 3.0 by now.) Maybe &#8220;World Party&#8221; &#8211; a community-like site where you can have both world and city maps, and add locations where there&#8217;s good nightlife. &#8220;Go here, the beer is cheap!&#8221; Others can comment on your suggestions, and you can either use it as a personal &#8220;I&#8217;ve been here and done that&#8221; thing, or search for good places when you&#8217;re travelling. Whatever, there are probably places like this already. The idea itself is just a minor thing IMO - the concept is what&#8217;s interesting from a technical/design point of view.</li>
<li>Use my irreverent sense of humour to make posters/plaques/t-shirts with interesting prints. This would be pretty cool since it would involve taking studio photos of people posing with the products in question. See how much your pretty face is worth now! I&#8217;m the one hiring your services, and you&#8217;re dependent on me! Was it worth it, being one of the Beautiful People(TM)? We hatesss you&#8230; Seriously, this option would be risky since everyone and his dog can make prints these days, and everyone thinks he&#8217;s a bloody comedian. Just like me.</li>
<li>Investigate the market and try to find a simple product that&#8217;s missing. Browse, look around, do a heap of research, and finally decide on something that I can get an investor interested in. I.e., do something on a bigger scale than any of the other projects.</li>
<li>Finish my book. I think I could put together a decent fantasy novel, and I love writing&#8230;in theory. Okay, this is no entrepreneurial enterprise, but it would still be interesting.</li>
</ol>
<p>What I&#8217;m going to do now is print this page, hang it on the wall, throw darts to select three of the six items&#8230;and ignore all of this for now, and have a cup of tea and a slice of pan pizza instead. I need to re-design my websites and finish Wildhollow before any of this, either way.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cynicalstuff.com/entrepreneuring-dilemmas/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Boot in One Second &#8211; Musings About BIOS Evolution</title>
		<link>http://www.cynicalstuff.com/linux-boot-in-one-second-musings-about-bios-evolution</link>
		<comments>http://www.cynicalstuff.com/linux-boot-in-one-second-musings-about-bios-evolution#comments</comments>
		<pubDate>Wed, 12 Mar 2008 14:18:31 +0000</pubDate>
		<dc:creator>Karja</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.cynicalstuff.com/linux-boot-in-one-second-musings-about-bios-evolution</guid>
		<description><![CDATA[The title of this post should be taken with a truckload of salt: as far as I know there&#8217;s no way to boot a complete Linux distribution in one second. But it seems that General Software has developed a BIOS that can boot to LILO in one second &#8211; and that&#8217;s not bad at all! [...]]]></description>
			<content:encoded><![CDATA[<p>The title of this post should be taken with a truckload of salt: as far as I know there&#8217;s no way to boot a complete Linux distribution in one second. But it seems that<a href="http://www.linuxdevices.com/news/NS5429881813.html"> General Software has developed a BIOS</a> that can boot to LILO in one second &#8211; and that&#8217;s not bad at all! Basically, all the unnecessary things are skipped, such as waiting for the video card to load its firmware, detect devices, and so on. This enables the BIOS to boot incredibly quickly.</p>
<p><img border="0" width="392" src="http://www.computerage.com.my/images/bios.jpg" height="296" /></p>
<p>But heey&#8230; Wait a minute. If the hard disk isn&#8217;t detected yet, how can the bootloader start the OS?</p>
<p>Being both lazy and philosophically-minded I&#8217;ll try to speculate about the answer to that. My guess would be that all data that would be detected by a normal BIOS has to be hard-coded one way or another; the BIOS data has to be manually entered, or possibly the BIOS has a &#8220;detect everything now and then save the config&#8221; mode that&#8217;s not always run. That&#8217;s actually pretty neat&#8230;for embedded systems. It sounds completely useless for desktop environments where you change keyboards and mice and video cards and electrical pets (what?!) every now and then. But since the article mentions the medical device market, I&#8217;d wager that this isn&#8217;t a big deal for the target devices.</p>
<p>In fact, I wonder if this kind of optimized BIOS couldn&#8217;t be of value to a other embedded devices like home gateways and such as well.</p>
<p>But hey again, wait another minute or two. The slow boot times of home gateways is probably due to slow flash reading times rather than a second or two on the BIOS level. In fact, come to think of it, I don&#8217;t know if I&#8217;ve ever seen a BIOS on these devices. So, it seems like this optimized BIOS is only relevant to embedded devices of specific architectures - of which maybe the aforementioned medical devices belong. But what about non-embedded devices? Wouldn&#8217;t this improved BIOS be useful for desktop computers too?</p>
<p>Short answer: meh.</p>
<p>Longer answer: don&#8217;t think so.</p>
<p>Full answer: in all probability, optimizing the BIOS would result in minimal boot time improvements. Detecting new devices and loading the video firmware doesn&#8217;t take all that long &#8211; the biggest culprit is loading the actual OS itself.</p>
<p>But, and this is a big but, the article also mentions how they increase the Vista loading time from 74 seconds to 24 by adding a UDMA-capable driver to the BIOS. I don&#8217;t really see how they can group these two BIOS improvements into the same article &#8211; they seem to deal with wildly different things! Stripping the BIOS of unnecessary checks is quite different to adding a driver that increases efficiency a lot; the former isn&#8217;t very useful in most cases, but the second is incredibly useful!</p>
<p>And that got me thinking&#8230; The BIOS is often the bottleneck; wouldn&#8217;t it stand to reason to evolve a BIOS as much as possible to make the OS faster? If adding a UDMA driver speeds up the boot process by 300%, isn&#8217;t that the way to go for other bottlenecks as well &#8211; add improvements at the lowest level?</p>
<p>Oh wait. What this would end up as sounds suspiciously like a <a href="http://en.wikipedia.org/wiki/Microkernel">microkernel</a>. I wonder if there&#8217;ll ever be a hybrid BIOS/microkernel.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cynicalstuff.com/linux-boot-in-one-second-musings-about-bios-evolution/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Software 3D Algorithms Revisited</title>
		<link>http://www.cynicalstuff.com/software-3d-algorithms-revisited</link>
		<comments>http://www.cynicalstuff.com/software-3d-algorithms-revisited#comments</comments>
		<pubDate>Mon, 03 Mar 2008 12:24:16 +0000</pubDate>
		<dc:creator>Karja</dc:creator>
				<category><![CDATA[Indie Games]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Spandex Force]]></category>

		<guid isPermaLink="false">http://www.cynicalstuff.com/software-3d-algorithms-revisited</guid>
		<description><![CDATA[This will be a very nerdy blog post describing some technical aspects of Spandex Force. Sorry in advance. Many moons ago I complained about BlitzMax and 3D, and described how I solved that problem. Well, it turns out that I&#8217;m a moron and the solution described didn&#8217;t solve anything at all. This is essentially what I [...]]]></description>
			<content:encoded><![CDATA[<p>This will be a very nerdy blog post describing some technical aspects of <a href="http://www.spandexforce.com">Spandex Force</a>. Sorry in advance.</p>
<p>Many moons ago I <a href="http://www.cynicalstuff.com/prototyping-software-3d-algorithms-and-sheeplings-v10">complained about BlitzMax and 3D, and described how I solved that problem</a>. Well, it turns out that I&#8217;m a moron and the solution described didn&#8217;t solve anything at all. This is essentially what I wanted to acheive:</p>
<p><img border="0" width="320" src="http://www.cynicalstuff.com/images/np/np_sc1.jpg" height="240" /></p>
<p>Well, when I switched to a more detailed texture everything got jagged and crappy. Which I should have foreseen if I hadn&#8217;t felt so proud of myself for working around my limitations. I know, I suck. Anyway, I needed a better solution.</p>
<p>Someone in the old post mentioned that you can do 3D in BlitzMax by using textured polygons, but I don&#8217;t know if he&#8217;s ever tried. Using the common textured poly functions result in <a href="http://en.wikipedia.org/wiki/Texture_mapping">affine texture mapping</a>, which is completely useless for depth effects. So, the only solution left was to go for proper 3D.</p>
<p>This is surprisingly simple in BlitzMax as long as you know how to do it. (Duh!) All you have to do is set up the projection matrix properly, and then do the primitive drawing commands. I won&#8217;t paste the dull code here, but it involves some trigonometry and a glFrustum() call (for OpenGL). That took care of the background itself.</p>
<p>But wait, that&#8217;s not all! What about the little objects on top of the background? Well, I wanted a billboard effect (the images should always face the screen) so I could either do a lot of rotations and draw everything in 3D&#8230;or draw the icons in 2D afterwards. I chose the latter approach and was thrilled when I noticed that OpenGL has a function called gluProject() which would let me find the screen coordinates from 3D space coordinates. Yay!</p>
<p><img border="0" width="100" src="http://www.spandexforce.com/screenshots/ss9s.jpg" height="75" /><br />
<em>All for this little minigame!</em></p>
<p>Time for a short interlude. &#8220;Why are you mucking around with OpenGL like this,&#8221; the eager reader asks. &#8220;Isn&#8217;t DirectX the standard for Windows?&#8221; Sure it is, but I also want my game to run on Mac and Linux. So in my first approach I chose an OpenGL-only solution. But, as the experienced game developers out there could have told me, that just wouldn&#8217;t do. OpenGL works most of the time, but there are severe compatibility problems with out-of-the-box XP and Vista installations!</p>
<p>I was aware of this limitation, but I just didn&#8217;t know how to get around it. See, the magical gluProject() function has no corresponding function in DirectX. After a lot of messing around with matrices I managed to make the DirectX projection matrix similar to the OpenGL one, so the background could be drawn in both modes. But I still had no way to draw the icons correctly. I tried lots of various interpolative methods but everything looked pretty crappy.</p>
<p>Then it struck me like Mjölner from a clear sky.</p>
<p>In my old blog post I ranted about how old methods can be utilized to good effect even today, and there was one old method that I had overlooked. Can you see what I&#8217;d missed?</p>
<p>Lookup tables!</p>
<p>When running the game in OpenGL I could create a lookup table for the projected X and Y coordinates of the icons. This table could then be used for both the OpenGL and DirectX versions of the game to create identical results for the 2D icons. It worked perfectly, and this enabled me to have DirectX as the default renderer in Spandex Force from v1.1 and onwards.</p>
<p>Many times I thought about skipping the Catch &#8216;n Match minigame completely in order to have DirectX support, or shipping the game with compatibility problems. I&#8217;m happy that things worked out in the end!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cynicalstuff.com/software-3d-algorithms-revisited/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

