<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>kometbomb</title>
	
	<link>http://kometbomb.net</link>
	<description>Journal of my adventures in Programming, the Internet and Life.</description>
	<lastBuildDate>Wed, 16 Jun 2010 14:56:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/kometbomb" /><feedburner:info uri="kometbomb" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>kometbomb</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Amegas</title>
		<link>http://feedproxy.google.com/~r/kometbomb/~3/PnF8oZHDo3k/</link>
		<comments>http://kometbomb.net/2010/06/16/amegas/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 14:56:50 +0000</pubDate>
		<dc:creator>kometbomb</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Amiga]]></category>
		<category><![CDATA[Chiptunes]]></category>
		<category><![CDATA[klystrack]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://kometbomb.net/?p=730</guid>
		<description><![CDATA[Original by Karsten Obarski You might also like...AHX Import in klystrack 1.4Some Cool Demoscene StuffReview: The Last ArcadianReview: StarballPlenty of Room, Part II]]></description>
			<content:encoded><![CDATA[<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/_tE5Qd7VFWI&#038;hl=fi_FI&#038;fs=1&#038;color1=0xe1600f&#038;color2=0xfebd01"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/_tE5Qd7VFWI&#038;hl=fi_FI&#038;fs=1&#038;color1=0xe1600f&#038;color2=0xfebd01" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<p>Original by <a href="http://www.bitfellas.org/e107_plugins/radio/radio.php?info&#038;id=5384">Karsten Obarski</a></p>
<h3  class="related_post_title">You might also like...</h3><ul class="related_post"><li><a href="http://kometbomb.net/2010/03/11/ahx-import-in-klystrack-1-4-0/" title="AHX Import in klystrack 1.4">AHX Import in klystrack 1.4</a></li><li><a href="http://kometbomb.net/2008/03/25/some-cool-demoscene-stuff/" title="Some Cool Demoscene Stuff">Some Cool Demoscene Stuff</a></li><li><a href="http://kometbomb.net/2010/03/10/the-last-arcadian/" title="Review: The Last Arcadian">Review: The Last Arcadian</a></li><li><a href="http://kometbomb.net/2010/03/03/review-starball/" title="Review: Starball">Review: Starball</a></li><li><a href="http://kometbomb.net/2009/11/09/plenty-of-room-part-ii/" title="Plenty of Room, Part II">Plenty of Room, Part II</a></li></ul>
<p><a href="http://feedads.g.doubleclick.net/~a/_Ikm2MiqoO8Wt8BBMFx2SOAQ9lQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/_Ikm2MiqoO8Wt8BBMFx2SOAQ9lQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/_Ikm2MiqoO8Wt8BBMFx2SOAQ9lQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/_Ikm2MiqoO8Wt8BBMFx2SOAQ9lQ/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/kometbomb?a=PnF8oZHDo3k:r5Cm2yAsd9M:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=PnF8oZHDo3k:r5Cm2yAsd9M:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=PnF8oZHDo3k:r5Cm2yAsd9M:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/kometbomb?i=PnF8oZHDo3k:r5Cm2yAsd9M:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=PnF8oZHDo3k:r5Cm2yAsd9M:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/kometbomb?i=PnF8oZHDo3k:r5Cm2yAsd9M:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=PnF8oZHDo3k:r5Cm2yAsd9M:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/kometbomb/~4/PnF8oZHDo3k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kometbomb.net/2010/06/16/amegas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://kometbomb.net/wp-content/uploads/2010/06/amegas.mp3" length="6269386" type="audio/mpeg" />
		<feedburner:origLink>http://kometbomb.net/2010/06/16/amegas/</feedburner:origLink></item>
		<item>
		<title>AHX Import in klystrack 1.4</title>
		<link>http://feedproxy.google.com/~r/kometbomb/~3/EnBJHZk6_Pw/</link>
		<comments>http://kometbomb.net/2010/03/11/ahx-import-in-klystrack-1-4-0/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 22:23:38 +0000</pubDate>
		<dc:creator>kometbomb</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Chiptunes]]></category>
		<category><![CDATA[klystrack]]></category>

		<guid isPermaLink="false">http://kometbomb.net/?p=725</guid>
		<description><![CDATA[I've just finished an AHX import feature for <a href="http://code.google.com/p/klystrack/">klystrack</a>. The conversion is not perfect considering not all features are present in klystrack. However, even if the conversion isn't accurate, the tunes sound pretty good.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just finished an AHX import feature for <a href="http://code.google.com/p/klystrack/">klystrack</a>. The conversion is not perfect because not all features are present in klystrack and they have to be emulated using what there is available. However, even if the conversion isn&#8217;t too accurate, the tunes still sound pretty good. This is what the imported tunes sound like if you&#8217;re lucky:</p>
<p><object width="500" height="306"><param name="movie" value="http://www.youtube.com/v/nP8Wsom7Rfk&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/nP8Wsom7Rfk&#038;fs=1" type="application/x-shockwave-flash" width="500" height="306" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>I&#8217;ve also updated the effect system to support separate FX chains, meaning you can have different reverb etc. settings for different instruments. While there will be more effects in future versions, they will still be for fine tuning the oldschool sound.</p>
<p>1.4.0 should be out soon but you can <a href="http://code.google.com/p/klystrack/downloads/list?q=label:Nightly">try the nightly builds</a> that should work pretty well.</p>
<h3  class="related_post_title">You might also like...</h3><ul class="related_post"><li><a href="http://kometbomb.net/2010/06/16/amegas/" title="Amegas">Amegas</a></li></ul>
<p><a href="http://feedads.g.doubleclick.net/~a/lM2NvnfTnQFWL2LnxZWW-6GNdWM/0/da"><img src="http://feedads.g.doubleclick.net/~a/lM2NvnfTnQFWL2LnxZWW-6GNdWM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/lM2NvnfTnQFWL2LnxZWW-6GNdWM/1/da"><img src="http://feedads.g.doubleclick.net/~a/lM2NvnfTnQFWL2LnxZWW-6GNdWM/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/kometbomb?a=EnBJHZk6_Pw:_tm2cHXk88o:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=EnBJHZk6_Pw:_tm2cHXk88o:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=EnBJHZk6_Pw:_tm2cHXk88o:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/kometbomb?i=EnBJHZk6_Pw:_tm2cHXk88o:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=EnBJHZk6_Pw:_tm2cHXk88o:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/kometbomb?i=EnBJHZk6_Pw:_tm2cHXk88o:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=EnBJHZk6_Pw:_tm2cHXk88o:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/kometbomb/~4/EnBJHZk6_Pw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kometbomb.net/2010/03/11/ahx-import-in-klystrack-1-4-0/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
<enclosure url="http://kometbomb.net/wp-content/uploads/2010/03/queen.wav.mp3" length="1045314" type="audio/mpeg" />
		<feedburner:origLink>http://kometbomb.net/2010/03/11/ahx-import-in-klystrack-1-4-0/</feedburner:origLink></item>
		<item>
		<title>Review: The Last Arcadian</title>
		<link>http://feedproxy.google.com/~r/kometbomb/~3/piJZ5MiBeng/</link>
		<comments>http://kometbomb.net/2010/03/10/the-last-arcadian/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 22:00:37 +0000</pubDate>
		<dc:creator>kometbomb</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Atari]]></category>
		<category><![CDATA[Atari ST]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[Video games]]></category>

		<guid isPermaLink="false">http://kometbomb.net/?p=710</guid>
		<description><![CDATA[<strong>The Last Arcadian</strong> is one of those games that in hindsight are pretty strange stuff for a public domain or shareware title. Considering even in the early 1990s a 3D shooter was automatically rather cool and thus profitable, The Last Arcadian makes you think why it wasn't released commercially.]]></description>
			<content:encoded><![CDATA[<p><strong>The Last Arcadian</strong> is one of those games that in hindsight are pretty strange stuff for a public domain or shareware title. Considering even in the early 1990s a 3D shooter was automatically rather cool and thus profitable, The Last Arcadian makes you think why it wasn&#8217;t released commercially. It looks a bit dated even for a 1992 3D title but you have to keep in mind it is a one man show. A bit of money would have made it look much nicer. It could be compared to <em>Epic</em> but I&#8217;m not sure if that&#8217;s a compliment. I have seen worse &#8212; I have <em>paid</em> for worse.</p>
<p><object width="500" height="400"><param name="movie" value="http://www.youtube.com/v/PEISJq0oY_I&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/PEISJq0oY_I&#038;fs=1" type="application/x-shockwave-flash" width="500" height="400" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><small>(Another video below.)</small></p>
<p>The main idea is to go and destroy enemy bases while the enemy tries to do the same to you. The game is over if your base is destroyed. If you, flying a fighter, are killed, you will simply find yourself piloting a nearby fighter that was previously computer controlled. There are multiple wingmen flying around and if you watch the first video, they sometimes manage to win the game for you.</p>
<p>The enemy fighters are killed with lasers and homing rockets and the enemy base needs to be bombed. When you return to your base, you need to make sure nobody else is trying to dock at the same time; you have to request permission to land. You can also repair your fighter in the base and then return to the battle (to save the computer controlled fighters.) The bases can also fire cruise missiles that travel slowly and you need to escort them and also keep the enemy missiles away from your base.</p>
<p><object width="500" height="400"><param name="movie" value="http://www.youtube.com/v/9_YVTprBo8M&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/9_YVTprBo8M&#038;fs=1" type="application/x-shockwave-flash" width="500" height="400" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>Overall, the game is very nice. It is simple but has some quirky features and also some quite modern stuff like the zoom in your ship at the start of each level and the fact everything is three-dimensional. There is a feeling of immersion as the rest of the war goes on around you while you&#8217;re being resupplied &#8212; quite well done as I no longer have the imagination of a kid. If you&#8217;re a fan of the old 3D Star Wars shooters, you probably should check this out if you have an Atari ST lying around.</p>
<p>The game can be found on the ST Format 42 cover disk <a href="http://stos.atari.st/stf.htm">available on this page</a>.</p>
<h3  class="related_post_title">You might also like...</h3><ul class="related_post"><li><a href="http://kometbomb.net/2010/03/03/review-starball/" title="Review: Starball">Review: Starball</a></li><li><a href="http://kometbomb.net/2008/06/18/thrustlikes/" title="Thrustlikes">Thrustlikes</a></li><li><a href="http://kometbomb.net/2008/03/09/dev-stories-from-the-past/" title="Dev Stories from the Past">Dev Stories from the Past</a></li><li><a href="http://kometbomb.net/2009/09/22/introducing-my-latest-projects/" title="Introducing My Latest Projects">Introducing My Latest Projects</a></li><li><a href="http://kometbomb.net/2008/04/10/rom-check-fail/" title="ROM CHECK FAIL">ROM CHECK FAIL</a></li></ul>
<p><a href="http://feedads.g.doubleclick.net/~a/caESz1ImcW24bCeg2yn6Vh3aKZs/0/da"><img src="http://feedads.g.doubleclick.net/~a/caESz1ImcW24bCeg2yn6Vh3aKZs/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/caESz1ImcW24bCeg2yn6Vh3aKZs/1/da"><img src="http://feedads.g.doubleclick.net/~a/caESz1ImcW24bCeg2yn6Vh3aKZs/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/kometbomb?a=piJZ5MiBeng:I3jD3XvseDY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=piJZ5MiBeng:I3jD3XvseDY:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=piJZ5MiBeng:I3jD3XvseDY:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/kometbomb?i=piJZ5MiBeng:I3jD3XvseDY:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=piJZ5MiBeng:I3jD3XvseDY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/kometbomb?i=piJZ5MiBeng:I3jD3XvseDY:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=piJZ5MiBeng:I3jD3XvseDY:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/kometbomb/~4/piJZ5MiBeng" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kometbomb.net/2010/03/10/the-last-arcadian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://kometbomb.net/2010/03/10/the-last-arcadian/</feedburner:origLink></item>
		<item>
		<title>Review: Starball</title>
		<link>http://feedproxy.google.com/~r/kometbomb/~3/FKmJrpy-JTc/</link>
		<comments>http://kometbomb.net/2010/03/03/review-starball/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 21:00:41 +0000</pubDate>
		<dc:creator>kometbomb</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Atari]]></category>
		<category><![CDATA[Atari ST]]></category>
		<category><![CDATA[Nostalgy]]></category>
		<category><![CDATA[Pinball]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[Video games]]></category>

		<guid isPermaLink="false">http://kometbomb.net/?p=706</guid>
		<description><![CDATA[I used to read ST Format back when I had an Atari ST. Later in its existence the magazine started to include better and more complete games and other software on its cover disk, probably because of the Atari was dying and publishers decided to give away their assets (or more like the actual developers [...]]]></description>
			<content:encoded><![CDATA[<p>I used to read <em>ST Format</em> back when I had an Atari ST. Later in its existence the magazine started to include better and more complete games and other software on its cover disk, probably because of the Atari was dying and publishers decided to give away their assets (or more like the actual developers were able to secure rights to the software from the publishers and then give it away so the work wouldn&#8217;t be in vain.) Also, back in the day shareware meant you got the full software to play with and only then you had to decide whether to pay or not to pay for it &#8212; it wasn&#8217;t uncommon for that to be actually profitable. Whatever the reason, I wouldn&#8217;t have probably ever heard of some pretty awesome games.</p>
<p><object width="500" height="400"><param name="movie" value="http://www.youtube.com/v/j0jVAa5_e5I&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/j0jVAa5_e5I&#038;fs=1" type="application/x-shockwave-flash" width="500" height="400" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><strong>Starball</strong> was one of those games. </p>
<p>On the Amiga, there were a few excellent pinball games by <em>Digital Illusions</em>, including <em>Pinball Dreams</em> and <em>Pinball Fantasies</em>. On the Atari ST, there were practically no modern pinball games apart from the STE title <em>Obsession</em> which was most likely created to cash in thanks to the surging interest in pinball games thanks to DI and also because the STE was capable to give the same smoothness as on the Amiga. But for the plain vanilla ST users, there still were none. At least until Starball, that is.</p>
<p>Starball is a modern pinball game &#8212; as in the screen scrolls and it was made in the 1990s &#8212; but it&#8217;s very different from the look and feel of the relatively realistic pinball games on the Amiga. The gameplay and the table is very similar to the <em>Crush</em> series on the PC Engine (Turbografx-16) which realized a pinball video game doesn&#8217;t have to simulate a real pinball table and added common elements from video games in general. While Pinball Dreams had very smooth gameplay based on getting accurate chains of ramp runs, in Starball the ball is used to smash flying spaceships, cultists and Jimmy Hill&#8217;s chin. In addition, Starball has three smaller areas with their own set of flippers and even graphical theme and when you miss and the ball will simply fall down, it will only move your one area down. Unless you are already in the bottom area.</p>
<p>In the middle area, you are building a space ship one part at a time and trying to stop turrets destroying the spaceship parts. On top level, you try to crush little guys walking in circles and there&#8217;s a slimy face in the center. And the face will get slimier each time you kill all the little guys. And the bottom area has a huge fly-eyed alien and more explosions. The fly alien thing also contributes to the game in that its mouth takes you to a bonus level. There are at least two different bonus levels, in general they are much like the small Mario level in NES <em>Pinball</em> keeping in the overall pinball theme.</p>
<p>While the game is very enjoyable at least as a nostalgy trip, there are some faults. First, the gameplay isn&#8217;t nearly as fluid as what the standard set by Dreams was at the time. The flippers feel sluggish and sometimes the ball bounces all weird. However, you can easily adapt to the slight delay in the flipper hit. The table area isn&#8217;t terribly interesting in that there are no huge ramps and other stuff the Amiga games did well but the grimy graphics and the self-awareness of the limitations makes the game stand out. </p>
<p>The game can be found on the ST Format 64 cover disk <a href="http://stos.atari.st/stf.htm">available on this page</a>.</p>
<h3  class="related_post_title">You might also like...</h3><ul class="related_post"><li><a href="http://kometbomb.net/2010/03/10/the-last-arcadian/" title="Review: The Last Arcadian">Review: The Last Arcadian</a></li><li><a href="http://kometbomb.net/2008/06/18/thrustlikes/" title="Thrustlikes">Thrustlikes</a></li><li><a href="http://kometbomb.net/2008/03/09/dev-stories-from-the-past/" title="Dev Stories from the Past">Dev Stories from the Past</a></li><li><a href="http://kometbomb.net/2008/04/10/rom-check-fail/" title="ROM CHECK FAIL">ROM CHECK FAIL</a></li><li><a href="http://kometbomb.net/2009/09/22/introducing-my-latest-projects/" title="Introducing My Latest Projects">Introducing My Latest Projects</a></li></ul>
<p><a href="http://feedads.g.doubleclick.net/~a/f5ZL3u6mhscqycdzxf75HgJYtfI/0/da"><img src="http://feedads.g.doubleclick.net/~a/f5ZL3u6mhscqycdzxf75HgJYtfI/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/f5ZL3u6mhscqycdzxf75HgJYtfI/1/da"><img src="http://feedads.g.doubleclick.net/~a/f5ZL3u6mhscqycdzxf75HgJYtfI/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/kometbomb?a=FKmJrpy-JTc:kXZ0jwXWDkw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=FKmJrpy-JTc:kXZ0jwXWDkw:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=FKmJrpy-JTc:kXZ0jwXWDkw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/kometbomb?i=FKmJrpy-JTc:kXZ0jwXWDkw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=FKmJrpy-JTc:kXZ0jwXWDkw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/kometbomb?i=FKmJrpy-JTc:kXZ0jwXWDkw:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=FKmJrpy-JTc:kXZ0jwXWDkw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/kometbomb/~4/FKmJrpy-JTc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kometbomb.net/2010/03/03/review-starball/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://kometbomb.net/2010/03/03/review-starball/</feedburner:origLink></item>
		<item>
		<title>An Alternative to XML</title>
		<link>http://feedproxy.google.com/~r/kometbomb/~3/apMJRpO8AbI/</link>
		<comments>http://kometbomb.net/2010/02/28/libconfig/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 15:42:06 +0000</pubDate>
		<dc:creator>kometbomb</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Webfinds]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[Libraries]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://kometbomb.net/?p=701</guid>
		<description><![CDATA[XML can be overkill or simply cumbersome to edit manually for example when used in configuration files. Or, it may simply be unavailable for the preferred platform. Here's a great alternative.]]></description>
			<content:encoded><![CDATA[<p>My new weapon of choice. <strong><a href="http://www.hyperrealm.com/libconfig/">libconfig</a></strong> is a configuration file parser that supports arrays, named and typed members, selection by path (e.g. <tt>cfg.users.[3].name</tt>) and more. That is, it has basically all the useful (as in 80% of cases) features of XML and none of the bad. There&#8217;s a minimal but well defined structure that will work for most situations and that can be used to enforce e.g. all array items having to be of the same type. There&#8217;s no overkill markup so it&#8217;s easy to read and write by humans. The library can also write the settings tree into a text file.</p>
<p>The configuration files look like this:</p>
<pre class="brush: plain;">screen = { width = 300; height = 200; }
users = ( { name = &quot;Torgo&quot;; items = [ &quot;Item 1&quot;, &quot;Item 2&quot; ]; } );</pre>
<p>And in C you would do something like this:</p>
<pre class="brush: cpp;">int screen_height = 100;
const char *name;
config_init(&amp;cfg);
config_read_file(&amp;cfg, &quot;config&quot;);
if (!config_lookup_int(&amp;cfg, &quot;screen.height&quot;, &amp;screen_height))
  puts(&quot;Using default screen height&quot;);
if (config_lookup_string(&amp;cfg, &quot;users.[0].name&quot;, &amp;name))
  puts(name);
config_destroy(&amp;cfg);</pre>
<p>You can also iterate the setting tree without the path for easier array or tree traversal. In all, I would say it involves less work compared to any XML library, especially in C. I like to think it&#8217;s a good example of software designed by the same guy who also uses it and not by some external committee.</p>
<ul>
<li><a href="http://www.hyperrealm.com/libconfig/">Homepage</a></li>
<li><a href="http://www.hyperrealm.com/libconfig/test.cfg.txt">An example config file</a></li>
</ul>
<h3  class="related_post_title">You might also like...</h3><ul class="related_post"><li><a href="http://kometbomb.net/2008/03/21/a-tiny-xml-parser/" title="A Tiny XML Parser">A Tiny XML Parser</a></li><li><a href="http://kometbomb.net/2009/09/22/introducing-my-latest-projects/" title="Introducing My Latest Projects">Introducing My Latest Projects</a></li><li><a href="http://kometbomb.net/2008/02/24/google-chart-api-is-pretty-cool/" title="Google Chart API is pretty cool">Google Chart API is pretty cool</a></li><li><a href="http://kometbomb.net/2007/11/07/what-exactly-does-gcc-optimize/" title="What exactly does GCC optimize?">What exactly does GCC optimize?</a></li><li><a href="http://kometbomb.net/2009/12/31/creating-a-simple-gui-from-scratch/" title="Creating a Simple GUI from Scratch">Creating a Simple GUI from Scratch</a></li></ul>
<p><a href="http://feedads.g.doubleclick.net/~a/1Af38eQAgHYRWHLqj9V9I0oHC6c/0/da"><img src="http://feedads.g.doubleclick.net/~a/1Af38eQAgHYRWHLqj9V9I0oHC6c/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/1Af38eQAgHYRWHLqj9V9I0oHC6c/1/da"><img src="http://feedads.g.doubleclick.net/~a/1Af38eQAgHYRWHLqj9V9I0oHC6c/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/kometbomb?a=apMJRpO8AbI:sY9RWfuKP0g:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=apMJRpO8AbI:sY9RWfuKP0g:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=apMJRpO8AbI:sY9RWfuKP0g:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/kometbomb?i=apMJRpO8AbI:sY9RWfuKP0g:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=apMJRpO8AbI:sY9RWfuKP0g:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/kometbomb?i=apMJRpO8AbI:sY9RWfuKP0g:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=apMJRpO8AbI:sY9RWfuKP0g:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/kometbomb/~4/apMJRpO8AbI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kometbomb.net/2010/02/28/libconfig/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://kometbomb.net/2010/02/28/libconfig/</feedburner:origLink></item>
		<item>
		<title>Creating a Simple GUI from Scratch</title>
		<link>http://feedproxy.google.com/~r/kometbomb/~3/DoSug2NRsno/</link>
		<comments>http://kometbomb.net/2009/12/31/creating-a-simple-gui-from-scratch/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 14:27:20 +0000</pubDate>
		<dc:creator>kometbomb</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[GUI]]></category>
		<category><![CDATA[SDL]]></category>

		<guid isPermaLink="false">http://kometbomb.net/?p=695</guid>
		<description><![CDATA[More often than not, the biggest obstacle for a programmer is adding a GUI to a otherwisely ready application. This probably is because you generally can create a program that inputs and outputs text with a few lines of code in any language. ]]></description>
			<content:encoded><![CDATA[<div class="toc">
<ol>
<li><a href="http://kometbomb.net/2009/12/31/creating-a-simple-gui-from-scratch/#toc-introduction">Introduction</a></li>
<li><a href="http://kometbomb.net/2009/12/31/creating-a-simple-gui-from-scratch/#toc-how-to-do-it">How to do it</a></li>
<li><a href="http://kometbomb.net/2009/12/31/creating-a-simple-gui-from-scratch/#toc-solutions-to-common-problems">Solutions to common problems</a></li>
<li><a href="http://kometbomb.net/2009/12/31/creating-a-simple-gui-from-scratch/#toc-faq">FAQ</a>
<ol>
<li><a href="http://kometbomb.net/2009/12/31/creating-a-simple-gui-from-scratch/#toc-i-absolutely-need-a-separate-window">I absolutely need a separate window</a></li>
<li><a href="http://kometbomb.net/2009/12/31/creating-a-simple-gui-from-scratch/#toc-is-this-reusable">Is this reusable?</a></li>
</ol>
</li>
<li><a href="http://kometbomb.net/2009/12/31/creating-a-simple-gui-from-scratch/#toc-conclusion">Conclusion</a></li>
</ol>
</div>
<h3 id="toc-introduction">Introduction</h3>
<p>More often than not, the biggest obstacle for a programmer is adding a GUI to a otherwisely ready application. This probably is because you generally can create a program that inputs and outputs text with a few lines of code in any language. However, if you don&#8217;t count <tt>MessageBox()</tt> and other similar helper APIs that are available in most windowing systems and that are as simple to use as <tt>gets()</tt> and <tt>printf()</tt>, it&#8217;s a unnecessarily big step to change a command line program into a program that outputs the exact same text but with complex command line arguments replaced by a few buttons and a window with the outputted text.</p>
<p>However, if you are developing a program that already draws something on the screen, it&#8217;s really easy to add simple mouse interactivity. This is especially true if you are using SDL (even if it&#8217;s <em>extremely</em> bare bones in these things!) and already use <tt>SDL_rect</tt> (your standard rectangle) to draw things. You can simply change the draw routine so that it takes one more argument which would be the <tt>SDL_event</tt> struct you&#8217;re already using to check for a quit message and so on. Then for every object you are drawing on screen, check if the event if a mouse button down event and that the coordinates are inside the rectangle that will be drawn. This eliminates completely the need for having to plan a separate system that interprets the mouse events. It&#8217;s sort of piggybacking on the existing code with minimal changes to the existing code.</p>
<p>Now, you might already think that is way too simplistic and lazy but think again. Not many programs need a more complex GUI with multiple movable windows and so on. If you really do need that, then be my guest and create a exhaustive windowing system or take the time to learn an existing system. But it is still overhead and you have to do comparatively a lot of work before any real results. At least I hate that kind of mental overhead. And while this whole idea of combining the drawing and the event processing sounds like a bit of a hack, it really isn&#8217;t a &#8220;hack&#8221; as in patching something you will probably have to replace with a better solution later. It&#8217;s just a different way of doing almost the same thing. With <em>less overhead</em>.</p>
<p>I have used this approach in <a href="http://code.google.com/p/klystrack/">my latest project</a> and from direct experience I know it is possible to create scrollbars, scrolling text fields, text input fields, message boxes and pretty much anything I have needed. And it&#8217;s not too much code either even if you have to create absolutely everything from nothing. In other words I do not feel limited or burdened.</p>
<h3 id="toc-how-to-do-it">How to do it</h3>
<p>As explained above, you most likely are drawing to a specific region on the screen for every object you need to check for mouse clicks. It is not necessary to have any kind of array where those regions are. You need to make sure that for every mouse click event runs the draw loop once and that the mouse click event gets passed to the draw routine. Then check if the coordinates are inside the draw region. </p>
<p>This is where the part starts that it admittedly gets a bit hacky: if a button is pressed, the event that the button triggers will be run in the middle of the draw loop (unless you somehow buffer the events). In most cases this doesn&#8217;t matter at all but it could be that what is on the screen is not exactly how it really is; you might have two selected items for a duration of one frame and so on. For the most part this doesn&#8217;t matter since you are getting results with very little overhead.</p>
<p>Consider this example.</p>
<pre class="brush: cpp;">void draw_stuff()
{
  SDL_Rect position = {10, 10, 40, 40};

  SDL_BlitRect(button_gfx, NULL, screen, &amp;position);
}

void draw_stuff_and_check_events(SDL_Event *event)
{
  SDL_Rect position = {10, 10, 40, 40};

  if (event-&gt;type == SDL_MOUSEBUTTONDOWN
   &amp;&amp; event-&gt;button.x &gt;= position.x
   &amp;&amp; event-&gt;button.y &gt;= position.y
   &amp;&amp; event-&gt;button.x &lt; position.x + position.w
   &amp;&amp; event-&gt;button.y &lt; position.y + position.h)
     button_event();

  SDL_BlitRect(button_gfx, NULL, screen, &amp;position);
}

void event_loop()
{
  SDL_Event event;

  while (SDL_PollEvent(&amp;event))
  {
    if (event.type == SDL_QUIT) break;

    draw_stuff(&amp;event);
  }
}</pre>
<p>From the above example, the benefits of this approach are obvious. The event checking can simply be injected anywhere in the code as long as you have the event and a region. </p>
<h3 id="toc-solutions-to-common-problems">Solutions to common problems</h3>
<p>One downside in this is that if you draw multiple overlapping regions, the region drawn last will be the one that is visible on the screen but the click is handled by the first region. Our event checking sees the regions from the other side of the screen. In such cases you can first iterate the regions in reverse order checking the event and then draw them in the correct order. An example in the mentioned project is the menu, submenus often overlap the parent menu; I solved that by first going through the menus in the order the user sees them and then drawing them back to front.</p>
<p>Dragging items is easy: simply check for mouse motion events and if the button is held down and the mouse is moved, just adjust the position of the matching region. You do not need any special &#8220;drag starts now&#8221; and &#8220;drag ends now, update objects&#8221; phases. However, this simplistic method is subject to the previous issue if you move a region over one that seems to be under it. You can also simply record the clicked object when the mouse button is pressed and make the motion events match only the selected region.</p>
<h3 id="toc-faq">FAQ</h3>
<h4 id="toc-i-absolutely-need-a-separate-window">I absolutely need a separate window</h4>
<p>This is possible as long as the window can be modal (like a message or open file dialog that takes over from the window behind it). You simply jump to another event loop until the new window is closed, much like it&#8217;s done in the Windows API with <tt>GetOpenFileName()</tt> or the <tt>MessageBox()</tt> mentioned earlier. Then it&#8217;s just a matter of drawing the new window and checking for the events normally. </p>
<h4 id="toc-is-this-reusable">Is this reusable?</h4>
<p>Of course. You could create a small library that has basic functionality and helper functions. <a href="http://code.google.com/p/klystron/source/browse/#svn/trunk/src/gui">A practical example can be seen here</a>.</p>
<p>Even if you can use the event checking straight in the source code, you can still define the regions in an array and link to relevant event handlers. </p>
<h3 id="toc-conclusion">Conclusion</h3>
<p>Combining the drawing and the event processing code can save time in the short term. Many common GUI elements are perfectly possible to replicate. The idea described above should be considered if a project needs mouse interaction and external libraries are not available, the conversion of existing code seems expensive or the learning curve is too steep compared to the future benefits. Nonetheless, in borderline cases, it can be well worth prototyping due to the minimal overhead and developing considerations.</p>
<h3  class="related_post_title">You might also like...</h3><ul class="related_post"><li><a href="http://kometbomb.net/2010/02/28/libconfig/" title="An Alternative to XML">An Alternative to XML</a></li><li><a href="http://kometbomb.net/2009/09/22/introducing-my-latest-projects/" title="Introducing My Latest Projects">Introducing My Latest Projects</a></li><li><a href="http://kometbomb.net/2009/07/19/opengl-static-arrays-and-glmaterialfv/" title="OpenGL, Static Arrays and glMaterialfv">OpenGL, Static Arrays and glMaterialfv</a></li><li><a href="http://kometbomb.net/2008/08/19/out-of-memory/" title="Out of Memory?">Out of Memory?</a></li><li><a href="http://kometbomb.net/2008/04/22/blog-experiment-desaturating-and-resizing-images/" title="Blog Experiment: Desaturating and resizing images">Blog Experiment: Desaturating and resizing images</a></li></ul>
<p><a href="http://feedads.g.doubleclick.net/~a/Fqrto50eqD8N96cCHus_JxIUMW0/0/da"><img src="http://feedads.g.doubleclick.net/~a/Fqrto50eqD8N96cCHus_JxIUMW0/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Fqrto50eqD8N96cCHus_JxIUMW0/1/da"><img src="http://feedads.g.doubleclick.net/~a/Fqrto50eqD8N96cCHus_JxIUMW0/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/kometbomb?a=DoSug2NRsno:M2FJQU1gkLo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=DoSug2NRsno:M2FJQU1gkLo:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=DoSug2NRsno:M2FJQU1gkLo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/kometbomb?i=DoSug2NRsno:M2FJQU1gkLo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=DoSug2NRsno:M2FJQU1gkLo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/kometbomb?i=DoSug2NRsno:M2FJQU1gkLo:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=DoSug2NRsno:M2FJQU1gkLo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/kometbomb/~4/DoSug2NRsno" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kometbomb.net/2009/12/31/creating-a-simple-gui-from-scratch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://kometbomb.net/2009/12/31/creating-a-simple-gui-from-scratch/</feedburner:origLink></item>
		<item>
		<title>Sheepie</title>
		<link>http://feedproxy.google.com/~r/kometbomb/~3/TofqpzESOWE/</link>
		<comments>http://kometbomb.net/2009/12/25/sheepie/#comments</comments>
		<pubDate>Fri, 25 Dec 2009 18:40:20 +0000</pubDate>
		<dc:creator>kometbomb</dc:creator>
				<category><![CDATA[Nonsense]]></category>
		<category><![CDATA[Cats]]></category>

		<guid isPermaLink="false">http://kometbomb.net/?p=676</guid>
		<description><![CDATA[<a href="http://kometbomb.net/wp-content/uploads/2009/12/PC240025.jpg"><img src="http://kometbomb.net/wp-content/uploads/2009/12/PC240025-250x187.jpg" alt="" title="Sheepie" width="250" height="187" class="alignleft size-thumbnail wp-image-675" style="float:right; margin: 8px" /></a> Sheepie.]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://kometbomb.net/wp-content/uploads/2009/12/PC240025.jpg"><img src="http://kometbomb.net/wp-content/uploads/2009/12/PC240025-533x400.jpg" alt="" title="Sheepie" width="533" height="400" style=" margin-left: auto; margin-right: auto;" class="size-medium wp-image-675" /></a></p>
<h3  class="related_post_title">You might also like...</h3><ul class="related_post"><li>No Related Post</li></ul>
<p><a href="http://feedads.g.doubleclick.net/~a/Q3ROEDCapiNpd2fLz2bj8leiQKM/0/da"><img src="http://feedads.g.doubleclick.net/~a/Q3ROEDCapiNpd2fLz2bj8leiQKM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Q3ROEDCapiNpd2fLz2bj8leiQKM/1/da"><img src="http://feedads.g.doubleclick.net/~a/Q3ROEDCapiNpd2fLz2bj8leiQKM/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/kometbomb?a=TofqpzESOWE:VSA9VhO_hQg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=TofqpzESOWE:VSA9VhO_hQg:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=TofqpzESOWE:VSA9VhO_hQg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/kometbomb?i=TofqpzESOWE:VSA9VhO_hQg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=TofqpzESOWE:VSA9VhO_hQg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/kometbomb?i=TofqpzESOWE:VSA9VhO_hQg:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=TofqpzESOWE:VSA9VhO_hQg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/kometbomb/~4/TofqpzESOWE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kometbomb.net/2009/12/25/sheepie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://kometbomb.net/2009/12/25/sheepie/</feedburner:origLink></item>
		<item>
		<title>Plenty of Room, Part II</title>
		<link>http://feedproxy.google.com/~r/kometbomb/~3/qu7i8KX0JWo/</link>
		<comments>http://kometbomb.net/2009/11/09/plenty-of-room-part-ii/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 16:47:17 +0000</pubDate>
		<dc:creator>kometbomb</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[256B]]></category>
		<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[Assembly]]></category>
		<category><![CDATA[Demoscene]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Source code]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://kometbomb.net/?p=128</guid>
		<description><![CDATA[As stated earlier, tiny intros written in assembly language fascinate me. I have written a few in x86 assembly language, here's one of them. I have tried to make the inner workings of the program as accessible -- or, at least as thought-provoking -- as possible even if assembly wasn't their weapon of choice. ]]></description>
			<content:encoded><![CDATA[<p style="border:1px #eee solid;padding:2px;background-color:#f8f8f8;font-size:11px">This is the second part of the epic (<del datetime="2009-11-09T13:46:36+00:00">two</del> three-part) series of articles about tiny intros, <a href="http://kometbomb.net/2007/10/22/theres-plenty-of-room-at-the-bottom/">the previous part was an essay about 256-byte intros in general</a>.</p>
<p><em><strong>Ed. note:</strong> Since this article seems to take forever to finish, here&#8217;s the first half of it. The (hopefully) final part will detail more of the specifics.</em></p>
<p><img src="http://kometbomb.net/wp-content/uploads/2009/11/rubba.png" alt="rubba" title="rubba" width="320" height="199" class="alignright size-full wp-image-649 iradius8" /> As stated earlier, tiny intros written in assembly language fascinate me. I have written a few in x86 assembly language, here&#8217;s one of them. I have tried to make the inner workings of the program as accessible &#8212; or, at least as thought-provoking &#8212; as possible even if assembly wasn&#8217;t their weapon of choice. </p>
<p>I&#8217;ve included the original DOS intro (you can use <a href="http://dosbox.sourceforge.net/">DOSBox</a> to run it, it should also work on Windows XP) and a Win32 port of it, written in C while trying to keep the original structure intact. I&#8217;ll also try to explain the general idea of the effect in pseudocode where syntax can be an obstacle. The archive <a href='http://kometbomb.net/wp-content/uploads/2009/11/rubba_c.zip'>rubba_c.zip</a> contains the source code, <kbd>rubba_b.exe</kbd> which is the compiled Win32 executable and <kbd>RUBBA.COM</kbd> which is the 16-bit MS-DOS executable. To compile the C program, you need the <a href="http://sourceforge.net/projects/tinyptc/">TinyPTC library</a> (like SDL but even more bare-bones).</p>
<p>I won&#8217;t go into details about x86 assembly language, I suggest anyone interested first reads an introduction and <a href="http://homepage.mac.com/randyhyde/webster.cs.ucr.edu/index.html">learns some of the basics</a>. However, I&#8217;ll try to make the code look interesting, explain some weird or obfuscated code and probably show some basic size optimization tricks.</p>
<div class="toc">
<ol>
<li><a href="http://kometbomb.net/2009/11/09/plenty-of-room-part-ii/#toc-the-effect">The Effect</a></li>
<li><a href="http://kometbomb.net/2009/11/09/plenty-of-room-part-ii/#toc-the-code">The Code</a>
<ol>
<li><a href="http://kometbomb.net/2009/11/09/plenty-of-room-part-ii/#toc-initialization">Initialization</a></li>
<li><a href="http://kometbomb.net/2009/11/09/plenty-of-room-part-ii/#toc-the-main-loop">The Main Loop</a>
<ol>
<li><a href="http://kometbomb.net/2009/11/09/plenty-of-room-part-ii/#toc-self-modifying-code">Self Modifying Code</a></li>
</ol>
</li>
</ol>
</li>
</ol>
</div>
<h3 id="toc-the-effect">The Effect</h3>
<p>The intro, called <b>rubba_b</b>, shows one effect: a twisting bar drawn using primitive light-shaded texture mapping. The color palette and the texture are generated run-time. The texturing is done using linear interpolation and no vector math is used even if the bar looks like it is rotated. The lighting is an extremely simple approximation of the light source being exactly where the camera is located. That is, the length of the textured line directly determines the light. </p>
<p>If looked from above, the bar will be a tower of squares. If one of the squares is rotated around the center, the corners will move in a circular pattern. So, the X coordinate will be equal to <tt>cos(corner_number*(360 degrees/4)+square_rotation)</tt>, the Z coordinate (why Z? Because it goes towards the screen) is equal to the sine but it can be discarded because we will not need it for perspective calculation. Remember, we&#8217;re short on bytes.</p>
<p>We then modulate the bar rotation for each square in the tower. If the amount of rotation changes when moving up or down the tower, the bar will twist. If the rotation stays the same for each square, the bar will rotate uniformly and look uninteresting.</p>
<p>The textured horizontal line is drawn from each corner to the next corner, from left to right. If the line would be drawn from right to left, we know it isn&#8217;t facing towards the camera, another line facing the camera will be drawn over it and we simply skip the line. The color value fetched from the texture is multiplied by the line length which makes short lines darker.</p>
<p>Still with me?</p>
<h3 id="toc-the-code">The Code</h3>
<h4 id="toc-initialization">Initialization</h4>
<p>First things first. We need to set the video mode before we continue. In the Win32 version we simply open a TinyPTC window, in the original version we need to tell BIOS to go in a nice 320x200x8 video mode (the <em>de facto</em> video mode back in the day).</p>
<table>
<tr>
<td><strong>C</strong></td>
<td><strong>asm</strong></td>
</tr>
<tr>
<td>
<pre><code>ptc_open("rubba_b",320,200)</code></pre>
</td>
<td>
<pre><code>mov al,13h
int 10h</code></pre>
</td>
</tr>
</table>
<p>In the above code, the Win32 part is self-explanatory. The assembly bit probably needs some clarification: we put  the number <strong>13h</strong> (hex) in the 8-bit register <strong>al</strong> and we request for interrupt <strong>10h</strong>. This is the BIOS video interrupt and since register <strong>ax</strong> (which consists of <strong>al</strong> &#8211; &#8220;low&#8221; &#8211; and <strong>ah</strong> &#8211; &#8220;high&#8221;) equals to <strong>0013h</strong> (when the program starts, <strong>ax</strong> is always zeroed), BIOS will call the routine for changing the video mode (<strong>ah</strong>=<strong>00h</strong>) to <strong>13h</strong>. </p>
<p>If above sounds complicated, don&#8217;t worry. It&#8217;s just a matter of memorization &#8211; similar to how you would memorize the function name for changing the video mode.</p>
<p>The next thing we need is some space for the texture, the sine table and the double buffer. In the Win32 version this is obvious, we just add a few arrays (although since TinyPTC only supports 32-bit video modes, we will also have an array for the palette). Again, in the assembly version we won&#8217;t use any fancy way to reserve memory to save some precious bytes: we simply decide certain areas of the memory will be used for whatever we want. The benefits of no memory protection and single tasking. ;)</p>
<table>
<tr>
<td><strong>C</strong></td>
<td><strong>asm</strong></td>
</tr>
<tr>
<td>
<pre><code>short int sinetab[SINETAB];
unsigned char palette[256*4];
unsigned char texture[256*256];
unsigned char screen[320*200];</code></pre>
</td>
<td>
<pre><code>mov dh,80h
mov gs,dx
mov dh,70h
mov es,dx
mov dh,60h
mov fs,dx</code></pre>
</td>
</tr>
</table>
<p>The assembly version basically sets the register <strong>dx</strong> to <strong>60xxh-80xxh</strong> (we set only the high byte, i.e. <strong>dh</strong> to save bytes, thus the low byte of <strong>dx</strong> is undefined &#8211; it won&#8217;t matter) and puts the value into various segment registers (<strong>es-gs</strong>). </p>
<p>This makes it so that if we use the different segment registers, we can access each of the three 64 kilobyte segments as a 64 kilobyte array. E.g. the sine is in <strong>gs</strong>, thus <tt>mov ax,[gs:2]</tt> would move the second word in the sine table in <strong>ax</strong>. In C, the equivalent would be <tt>short int value=sinetab[1]</tt> (note how the C compiler knows the fact that a word is 2 bytes but in assembly you have to take care of that yourself &#8211; all memory accesses are always by the exact location, not the array element!).</p>
<p>All this is because in 16-bit memory accessing you can see only 64 kilobytes at one time. You can&#8217;t have a 128 KB array, nor can you have two 64 K arrays in the same segment. It&#8217;s something comparable to having a flashlight and a big sheet of paper in a dark room; you can move the light to show different areas but you will never see more than what there is in the spotlight.</p>
<p>The next two parts calculate the sine table (back in the day you simply could not do trigonometric stuff real-time, even in hardware &#8212; although in the intro it&#8217;s there just for show) and set the palette. This is pretty straight-forward stuff across the two versions. The only difference is that in the Windows version we have to remember the palette has 8-bit color components and the original has 6-bit components (0..255 ~ 0..63). And of course, the Windows version simply puts the values in a palette look-up table (because 32-bit video mode doesn&#8217;t use a palette) and the original actually sets the video mode colors.</p>
<p>I won&#8217;t reiterate the source code for the sine table and palette change here, I think you should be able to figure it out by comparing the source code. But in theory, here&#8217;s how to change a color: first, write the color index in port <strong>3C8h</strong>, then write the three color components in port <strong>3C9h</strong> (hint: <strong>dx</strong> first contains <strong>3C8h</strong> and it&#8217;s incremented to <strong>3C9h</strong> to save bytes). </p>
<p>The sine routine increases the angle (<b>st0</b> the topmost register on the FPU) by <strong>2*PI/32768</strong> (a full circle is 2*PI, the sine table has 32768 elements). You probably should check some FPU tutorial, arithmetic on the 8087 is pretty interesting due to the stack-based architecture. For example, you first push in two numbers and then do an add, which (in most cases) pops out the two values and pushes in the result.</p>
<p>The texture generation bit is interesting. It also was annoying to port to C thanks to the fact you have to emulate how some instructions work &#8211; there are no accurate analogies in the C standard. A big thanks goes to <strong>baze</strong> whose code I originally cannibalized for this (I think). To be honest the conversion doesn&#8217;t work 100 % accurately but does still produce a nice texture.</p>
<p>The algorithm uses addition, bitwise operations and other simple things to achieve complexity thanks to how processors do arithmetics. Mainly, the results from an earlier calculation is carried over to the next calculation &#8212; when an addition or a subtraction overflows, i.e. the result is too large or too small to fit in a register, the processor lets the result wrap over but sets the <strong>carry flag</strong>. </p>
<p>This is quite similar to how you would carry numbers when calculating with a pen and a paper. The flag affects the results unpredictably because it&#8217;s used across quite different operations; usually you would just use to to add big numbers together as in the pen and paper example. </p>
<h4 id="toc-the-main-loop">The Main Loop</h4>
<p>Here is the meat of the code. The C version has many variables that are named after registers in order to see the connection with the original code. Sometimes, as with the 8-bit registers, some code doesn&#8217;t work exactly as in the original because you can&#8217;t do things similarly in C. E.g. you can&#8217;t have two variables that also are a part of one big register similarly how <strong>al</strong> and <strong>ah</strong> form <strong>ax</strong> (well, you can with pointers or unions but that is besides the point, kind of).</p>
<h5 id="toc-self-modifying-code">Self Modifying Code</h5>
<p>I use self modifying code (SMC) in a few places because it produces faster and also much simpler code. For example, if you have a variable that is changed in a few places but used by one instruction only (and the instruction performs arithmetic or otherwise accepts a constant parameter), it&#8217;s much faster to store the variable where the constant for the instruction would be. That way you don&#8217;t have to read the variable in a register and then use the register to do something.</p>
<p>E.g. Let&#8217;s multiply <strong>cx</strong> by the variable <strong>foo</strong>:</p>
<table>
<tr>
<td><strong>Original</strong></td>
<td><strong>SMC</strong></td>
</tr>
<tr>
<td>
<pre><code>  push ax ; save ax
  mov ax,[foo] ; move variable foo in ax
  imul cx,ax ; multiply cx by ax
  pop ax  ; restore ax
  ...
  mov ax,123   ; set foo ...
  mov [foo],ax ; ... to 123
  ...
foo: dw 0</code>
</pre>
</td>
<td>
<pre><code>  imul cx,123
foo equ $-2
  ...
  mov ax,123   ; set foo ...
  mov [foo],ax ; ... to 123</code></pre>
</td>
</tr>
</table>
<p>We can exploit the fact <strong>imul</strong> (signed multiplication) accepts constant multipliers. If you looked at the code with a hex editor, you&#8217;d see 123 next to the opcode. You can change the constant run-time and you do that exactly like you would change a variable: if you just define <b>foo</b> as the address where the constant is (the above code defines it as the last two bytes (i.e. word) of the previous instruction: in NASM, <strong>$</strong> is the current location and <strong>$-2</strong> equals the address of the previous word).</p>
<p><strong><em>To be concluded&#8230;</em></strong></p>
<h3  class="related_post_title">You might also like...</h3><ul class="related_post"><li><a href="http://kometbomb.net/2009/09/08/you-can-stop-programming-now/" title="You Can Stop Programming Now">You Can Stop Programming Now</a></li><li><a href="http://kometbomb.net/2007/10/22/theres-plenty-of-room-at-the-bottom/" title="There&#8217;s Plenty of Room at the Bottom">There&#8217;s Plenty of Room at the Bottom</a></li><li><a href="http://kometbomb.net/2007/09/04/image-retargeting/" title="Image retargeting">Image retargeting</a></li><li><a href="http://kometbomb.net/2007/07/17/nanopond-screensaver/" title="Nanopond Screensaver">Nanopond Screensaver</a></li><li><a href="http://kometbomb.net/2009/09/22/introducing-my-latest-projects/" title="Introducing My Latest Projects">Introducing My Latest Projects</a></li></ul>
<p><a href="http://feedads.g.doubleclick.net/~a/OUU5V8Py1cRtBz-iffMFKyXHXns/0/da"><img src="http://feedads.g.doubleclick.net/~a/OUU5V8Py1cRtBz-iffMFKyXHXns/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/OUU5V8Py1cRtBz-iffMFKyXHXns/1/da"><img src="http://feedads.g.doubleclick.net/~a/OUU5V8Py1cRtBz-iffMFKyXHXns/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/kometbomb?a=qu7i8KX0JWo:hY2W4P-2IiE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=qu7i8KX0JWo:hY2W4P-2IiE:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=qu7i8KX0JWo:hY2W4P-2IiE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/kometbomb?i=qu7i8KX0JWo:hY2W4P-2IiE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=qu7i8KX0JWo:hY2W4P-2IiE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/kometbomb?i=qu7i8KX0JWo:hY2W4P-2IiE:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=qu7i8KX0JWo:hY2W4P-2IiE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/kometbomb/~4/qu7i8KX0JWo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kometbomb.net/2009/11/09/plenty-of-room-part-ii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://kometbomb.net/2009/11/09/plenty-of-room-part-ii/</feedburner:origLink></item>
		<item>
		<title>Introducing My Latest Projects</title>
		<link>http://feedproxy.google.com/~r/kometbomb/~3/I5Xi-Zy1bJg/</link>
		<comments>http://kometbomb.net/2009/09/22/introducing-my-latest-projects/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 22:34:30 +0000</pubDate>
		<dc:creator>kometbomb</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Nonsense]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Game programming]]></category>
		<category><![CDATA[Retro gaming]]></category>
		<category><![CDATA[SDL]]></category>
		<category><![CDATA[Source code]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[Video games]]></category>

		<guid isPermaLink="false">http://kometbomb.net/?p=611</guid>
		<description><![CDATA[<em>... Or, How to Procrastinate Productively.</em> <a href="http://kometbomb.net/wp-content/uploads/2009/09/klystrack3.png"><img src="http://kometbomb.net/wp-content/uploads/2009/09/klystrack3-250x187.png" alt="klystrack3" title="klystrack3" width="192" height="144" class="alignright size-thumbnail wp-image-628" style="width:192px;height:144px" /></a>

I decided to make one of my current projects open source and post them on Google Code just for fun. The project is a toolchain that I'm using to remake <em>Thrust</em>. In reality, I decided to divide the project into two separate projects: <a href="http://code.google.com/p/klystron/">the actual game engine</a> and related tools, and <a href="http://code.google.com/p/klystrack/">a music editor</a> that uses the engine. ]]></description>
			<content:encoded><![CDATA[<p><em>&#8230; Or, How to Procrastinate Productively.</em></p>
<p><a href="http://kometbomb.net/wp-content/uploads/2009/09/klystrack3.png"><img src="http://kometbomb.net/wp-content/uploads/2009/09/klystrack3-250x187.png" alt="klystrack3" title="klystrack3" width="250" height="187" class="alignright size-thumbnail wp-image-628" /></a></p>
<p>I decided to make one of my current projects open source and post them on Google Code just for fun. The project is a tool chain that I&#8217;m using to remake <em>Thrust</em>. In reality, I decided to divide the project into two separate projects: <a href="http://code.google.com/p/klystron/">the actual game engine</a> (called <em>klystron</em>) and related tools, and <a href="http://code.google.com/p/klystrack/">a music editor</a> that uses the engine. </p>
<p>Here are two videos I made a while ago that demonstrate the engine. The first is the music editor (called <em>klystrack</em>) &#8212; it&#8217;s much less ugly at the moment but the sound synthesis is the same, and that&#8217;s what matters:</p>
<p class="aligncenter" style="text-align:center"><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/mJewnkOW42I&#038;hl=en&#038;fs=1&#038;rel=0&#038;color1=0xe1600f&#038;color2=0xfebd01"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/mJewnkOW42I&#038;hl=en&#038;fs=1&#038;rel=0&#038;color1=0xe1600f&#038;color2=0xfebd01" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
<p>The sound engine (&#8220;Cyd&#8221;) is basically a very simple software synthesizer with capabilities comparable to the SID or any 8-bit machine from the 80s. The editor is a fairly standard tracker, much like <a href="http://en.wikipedia.org/wiki/GoatTracker">GoatTracker</a>.</p>
<p>The graphics half of the engine is basically a wrapper around a quite fast collision detection system (pixel-accurate, or it wouldn&#8217;t be much good for a thrustlike) built on <a href="http://www.libsdl.org">SDL</a>. It also does background collisions and drawing as well. As you may have guessed, the whole point is to provide a limited but still helpful set of routines that are useful for creating 2D games not unlike what video games were in 1991.</p>
<p>And, here&#8217;s a proof I&#8217;m actually working on the actual game (the sound effects are created in real time by the sound engine):</p>
<p class="aligncenter" style="text-align:center"><object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/Yt1LtVSv5gw&#038;hl=en&#038;fs=1&#038;rel=0&#038;color1=0xe1600f&#038;color2=0xfebd01"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Yt1LtVSv5gw&#038;hl=en&#038;fs=1&#038;rel=0&#038;color1=0xe1600f&#038;color2=0xfebd01" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"></embed></object></p>
<p>A note on <a href="http://code.google.com/">Google Code</a>: it&#8217;s rather nice. It provides the standard open source development stuff like source control an such but I really like how clean and hassle-free it is. Adding a project takes a minute and after that it&#8217;s simply coding and some quick documentation on the project wiki. The project wiki is good example of how simple but elegant the system is: the wiki pages actually exists inside the source control as files, just like your source code. </p>
<p>Go check Google Code out and while you&#8217;re at it, contribute on my projects. :)</p>
<h3  class="related_post_title">You might also like...</h3><ul class="related_post"><li><a href="http://kometbomb.net/2008/07/23/collision-detection-with-occlusion-queries-redux/" title="Collision Detection with Occlusion Queries Redux">Collision Detection with Occlusion Queries Redux</a></li><li><a href="http://kometbomb.net/2008/06/18/thrustlikes/" title="Thrustlikes">Thrustlikes</a></li><li><a href="http://kometbomb.net/2008/04/10/rom-check-fail/" title="ROM CHECK FAIL">ROM CHECK FAIL</a></li><li><a href="http://kometbomb.net/2008/03/24/show-me-yours-and-ill-show-you-mine/" title="Show Me Yours and I&#8217;ll Show You Mine">Show Me Yours and I&#8217;ll Show You Mine</a></li><li><a href="http://kometbomb.net/2008/03/09/dev-stories-from-the-past/" title="Dev Stories from the Past">Dev Stories from the Past</a></li></ul>
<p><a href="http://feedads.g.doubleclick.net/~a/WqFP4OvF3m69aYk4vKeY8C3N4Ek/0/da"><img src="http://feedads.g.doubleclick.net/~a/WqFP4OvF3m69aYk4vKeY8C3N4Ek/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/WqFP4OvF3m69aYk4vKeY8C3N4Ek/1/da"><img src="http://feedads.g.doubleclick.net/~a/WqFP4OvF3m69aYk4vKeY8C3N4Ek/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/kometbomb?a=I5Xi-Zy1bJg:lu_ivbffBEg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=I5Xi-Zy1bJg:lu_ivbffBEg:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=I5Xi-Zy1bJg:lu_ivbffBEg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/kometbomb?i=I5Xi-Zy1bJg:lu_ivbffBEg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=I5Xi-Zy1bJg:lu_ivbffBEg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/kometbomb?i=I5Xi-Zy1bJg:lu_ivbffBEg:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=I5Xi-Zy1bJg:lu_ivbffBEg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/kometbomb/~4/I5Xi-Zy1bJg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kometbomb.net/2009/09/22/introducing-my-latest-projects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://kometbomb.net/2009/09/22/introducing-my-latest-projects/</feedburner:origLink></item>
		<item>
		<title>You Can Stop Programming Now</title>
		<link>http://feedproxy.google.com/~r/kometbomb/~3/qAsoJYWTp_A/</link>
		<comments>http://kometbomb.net/2009/09/08/you-can-stop-programming-now/#comments</comments>
		<pubDate>Tue, 08 Sep 2009 10:36:26 +0000</pubDate>
		<dc:creator>kometbomb</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[256B]]></category>
		<category><![CDATA[Assembly]]></category>
		<category><![CDATA[Demoscene]]></category>
		<category><![CDATA[Raytracing]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://kometbomb.net/?p=585</guid>
		<description><![CDATA[I'll be deleting all my own source code since perfection has finally been achieved and there is no need for programmers anymore.]]></description>
			<content:encoded><![CDATA[<p class="aligncenter" style="text-align:center"><object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/3vzcMdkvPPg&#038;hl=en&#038;fs=1&#038;rel=0&#038;color1=0xe1600f&#038;color2=0xfebd01"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/3vzcMdkvPPg&#038;hl=en&#038;fs=1&#038;rel=0&#038;color1=0xe1600f&#038;color2=0xfebd01" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"></embed></object></p>
<p>The above is <em>puls</em>, a <a href="http://kometbomb.net/2007/10/22/theres-plenty-of-room-at-the-bottom/">256-byte intro</a> by <a href="http://rrrola.wz.cz/">Řrřola</a>. It&#8217;s basically a raytracer with screen space ambient occlusion (which makes it so much realistic and cooler). While <a href="http://www.pouet.net/prod.php?which=3397"><em>tube</em></a> &#8212; which I think was the best 256-byte intro until now (when design and code are judged together) &#8212; also did raytracing of a cylinders, and after that many other intros did similar tracing of more complex surfaces, <em>puls</em> simply crushes all of them with objects that are formed by multiple plane surfaces (e.g. a cube would be a combination of six intersecting planes), a very nice color palette and that delicious ambient occlusion. </p>
<blockquote cite="http://pouet.net/prod.php?which=53816&#038;howmanycomments=25&#038;page=9"><p>Thinking it out in C and sketching it out in asm took about a week, byte crunching took another one&#8230; that&#8217;s like forty hours of full focus and eighty of playing.</p>
</blockquote>
<p>It&#8217;s also really, really slow which is the only minus especially because you can&#8217;t run 16-bit executables on Windows 7, so you have to use <a href="http://www.dosbox.com/">DOSBox</a> to watch it (or, use a <a href="http://www.kolumbus.fi/xtmb/goatsefloppy/#custom">boot floppy</a> to run it or something). <ins datetime="2009-09-08T14:09:45+00:00">There&#8217;s now a Windows port including a screensaver, <a href="http://pouet.net/prod.php?which=53816">see the Pouet.net page for more</a></ins>. A big thank you to nordak5 who was kind enough to upload a video on Youtube.</p>
<p>Řrřola has also included source code with <a href="http://rrrola.wz.cz/downloads.html">the binary that you can find over here</a>. That said, I&#8217;ll be deleting all my own source code since perfection has finally been achieved and there is no need for programmers anymore.</p>
<h3  class="related_post_title">You might also like...</h3><ul class="related_post"><li><a href="http://kometbomb.net/2009/11/09/plenty-of-room-part-ii/" title="Plenty of Room, Part II">Plenty of Room, Part II</a></li><li><a href="http://kometbomb.net/2007/10/22/theres-plenty-of-room-at-the-bottom/" title="There&#8217;s Plenty of Room at the Bottom">There&#8217;s Plenty of Room at the Bottom</a></li><li><a href="http://kometbomb.net/2009/09/22/introducing-my-latest-projects/" title="Introducing My Latest Projects">Introducing My Latest Projects</a></li><li><a href="http://kometbomb.net/2008/03/28/playstation-3-vs-atari-vcs/" title="Playstation 3 vs. Atari VCS">Playstation 3 vs. Atari VCS</a></li><li><a href="http://kometbomb.net/2008/03/25/some-cool-demoscene-stuff/" title="Some Cool Demoscene Stuff">Some Cool Demoscene Stuff</a></li></ul>
<p><a href="http://feedads.g.doubleclick.net/~a/jbnOTXJh9KYmpo2hojV8iWrZ7fQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/jbnOTXJh9KYmpo2hojV8iWrZ7fQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/jbnOTXJh9KYmpo2hojV8iWrZ7fQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/jbnOTXJh9KYmpo2hojV8iWrZ7fQ/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/kometbomb?a=qAsoJYWTp_A:KNRk5LsxBpQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=qAsoJYWTp_A:KNRk5LsxBpQ:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=qAsoJYWTp_A:KNRk5LsxBpQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/kometbomb?i=qAsoJYWTp_A:KNRk5LsxBpQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=qAsoJYWTp_A:KNRk5LsxBpQ:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/kometbomb?i=qAsoJYWTp_A:KNRk5LsxBpQ:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/kometbomb?a=qAsoJYWTp_A:KNRk5LsxBpQ:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/kometbomb?d=qj6IDK7rITs" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/kometbomb/~4/qAsoJYWTp_A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://kometbomb.net/2009/09/08/you-can-stop-programming-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://kometbomb.net/2009/09/08/you-can-stop-programming-now/</feedburner:origLink></item>
	</channel>
</rss>
