<?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>matt.west.co.tt &#187; Javascript</title>
	<atom:link href="http://matt.west.co.tt/category/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://matt.west.co.tt</link>
	<description>adventures of a retro electro media hacker type person</description>
	<lastBuildDate>Sat, 14 Aug 2010 15:32:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>JSModPlayer &#8211; a Javascript .MOD player</title>
		<link>http://matt.west.co.tt/music/jsmodplayer/</link>
		<comments>http://matt.west.co.tt/music/jsmodplayer/#comments</comments>
		<pubDate>Sun, 23 May 2010 02:22:27 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Demoscene]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://matt.west.co.tt/?p=156</guid>
		<description><![CDATA[The epic Pacman 30th anniversary Google Doodle, along with Ben Firshman&#8217;s dynamicaudio.js library for dynamically generating audio, collectively persuaded me that I haven&#8217;t done any mad Javascript hacking for far too long. My response to this state of affairs is JSModPlayer, a player for .MOD music files (the mainstay of Amiga and PC sample-based music [...]]]></description>
			<content:encoded><![CDATA[<p>The epic Pacman 30th anniversary Google Doodle, along with Ben Firshman&#8217;s <a href="http://github.com/bfirsh/dynamicaudio.js">dynamicaudio.js</a> library for dynamically generating audio, collectively persuaded me that I haven&#8217;t done any mad Javascript hacking for far too long. My response to this state of affairs is <b><a href="http://jsspeccy.zxdemo.org/jsmodplayer/">JSModPlayer</a></b>, a player for .MOD music files (the mainstay of Amiga and PC sample-based music circa 1990).</p>
<p>So far it only implements a subset of the possible sample effects, and it demands a very fast Javascript engine &#8211; luckily all the new breed of browsers are pretty competitive at that now. Even so, unless your CPU is an absolute behemoth, it&#8217;ll probably struggle to keep up &#8211; the audio output is fixed at 44100Hz, and that&#8217;s rather a lot of numbers for Javascript to crunch, especially when the MOD file gets up to 16 or more channels. Which, amusingly enough, is exactly the situation we had back when we were using Gravis Ultrasounds on 386es. Hurrah for progress!</p>
<p><strong>Update 2010-06-08:</strong> Oops. In the process of testing how Safari 5 shapes up, I discovered a rather silly oversight: the audio buffering routine was set up to never use more than 10% of CPU. Now that I&#8217;ve fixed it, it turns out that Chrome and Safari (at least) have no trouble at all playing Jugi&#8217;s <em>Dope</em> theme in its 28-channel glory. (However, taking the brakes off the buffering does mean that we can&#8217;t reliably pause the audio any more. A small price to pay, I think you&#8217;ll agree.)</p>
]]></content:encoded>
			<wfw:commentRss>http://matt.west.co.tt/music/jsmodplayer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>JSSpeccy v20091121</title>
		<link>http://matt.west.co.tt/spectrum/jsspeccy-20091121/</link>
		<comments>http://matt.west.co.tt/spectrum/jsspeccy-20091121/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 23:12:29 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[JSSpeccy]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Spectrum]]></category>

		<guid isPermaLink="false">http://matt.west.co.tt/?p=139</guid>
		<description><![CDATA[Yesterday&#8217;s Full Frontal javascript conference turned out to be the ideal setting to compare notes with Ben Firshman of JSNES fame on the finer points of implementing emulators in Javascript &#8211; so this new release of JSSpeccy is the natural consequence of that. I&#8217;ve put in an optimisation which might possibly be a speed boost [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday&#8217;s <a href="http://2009.full-frontal.org/">Full Frontal javascript conference</a> turned out to be the ideal setting to compare notes with Ben Firshman of <a href="http://benfirshman.com/projects/jsnes/">JSNES</a> fame on the finer points of implementing emulators in Javascript &#8211; so this new release of JSSpeccy is the natural consequence of that. I&#8217;ve put in an optimisation which might possibly be a speed boost on Chrome (only writing bytes to ImageData when absolutely <em>absolutely</em> necessary), and the much-needed ability to load your own snapshot files, using the little-known getAsBinary method on file upload objects. (Unfortunately Firefox 3.5 is the only browser which supports it right now, but it looks like it may be in the process of getting the official W3C blessing right now.) And since I was on a roll, on the train back I implemented tape loading traps and the ability to load .TAP files (again, only on Firefox 3.5). Wahey!</p>
<ul>
<li><a href="http://jsspeccy.zxdemo.org/">Play online</a></li>
<li><a href="http://jsspeccy.zxdemo.org/jsspeccy-20091121.zip">Download JSSpeccy v20091121</a> (680Kb)</li>
<li><a href="http://svn.matt.west.co.tt/svn/jsspec/">JSSpeccy subversion repository</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://matt.west.co.tt/spectrum/jsspeccy-20091121/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>JSSpeccy v20090929 (Don&#8217;t-Mess-With-Geeks Edition)</title>
		<link>http://matt.west.co.tt/spectrum/jsspeccy-20090929/</link>
		<comments>http://matt.west.co.tt/spectrum/jsspeccy-20090929/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 00:21:19 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[JSSpeccy]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Spectrum]]></category>

		<guid isPermaLink="false">http://matt.west.co.tt/?p=127</guid>
		<description><![CDATA[I wasn&#8217;t really planning on developing JSSpeccy further, because I didn&#8217;t consider it a serious project with a future. However, it turns out that someone else did. Enough to rip it off wholesale and pass it off as their own work on the iPhone app store for Â£1.29 a pop, no less. Yes, thanks to [...]]]></description>
			<content:encoded><![CDATA[<p>I wasn&#8217;t really planning on developing JSSpeccy further, because I didn&#8217;t consider it a serious project with a future. However, it turns out that someone else <em>did</em>. Enough to rip it off wholesale and pass it off as their own work on the iPhone app store for Â£1.29 a pop, no less. Yes, thanks to <a href="http://jorallan.livejournal.com/9645.html">the detective work of Phil Kendall</a> we now know that ZXGamer, the much heralded Spectrum emulator for the iPhone, was nothing more than JSSpeccy with a fancy title screen tacked on. (Which of course is a blatant violation of the GPL, and being pure Javascript, would explain why it ran at less than the speed of a real Spectrum on a 600 MHz device, and why it was overwhelmingly rated at one out of five stars. Epic fail.) It&#8217;s been pulled from the app store now &#8211; so while ZXGamer is gradually disappearing from the internet, it&#8217;s time to redress the balance a bit.</p>
<p><a href="http://jsspeccy.zxdemo.org/">A new version of JSSpeccy is out</a>. It doesn&#8217;t run at full speed on an iPhone either (although it positively speeds along on recent versions of Safari on real computers), but it does boast the following changes:</p>
<ul>
<li><strong>GPL v3 licenced</strong>, with prominent notices to make it clear that playing silly buggers like the above will not be tolerated (even if they do include source&#8230;)</li>
<li><strong>A bit of speed optimisation</strong> (about 15% faster maybe)</li>
<li><strong>A pimped-up user interface</strong> with shiny icons</li>
<li>And most relevantly, <strong>entirely controllable via iPhone / iPod Touch touchscreen</strong>. In principle. (If you&#8217;re expecting an immersive gaming experience, you&#8217;ll be disappointed.)</li>
</ul>
<p>So there you go &#8211; probably the best Spectrum emulator for the iPhone ever. And it&#8217;s free.</p>
<ul>
<li><a href="http://jsspeccy.zxdemo.org/">Play online</a></li>
<li><a href="http://jsspeccy.zxdemo.org/jsspeccy-20090929.zip">Download, inc source</a> (674Kb)</li>
<li><a href="http://svn.matt.west.co.tt/svn/jsspec/">JSSpeccy Subversion repository</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://matt.west.co.tt/spectrum/jsspeccy-20090929/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>JSSpeccy: A ZX Spectrum emulator in Javascript</title>
		<link>http://matt.west.co.tt/spectrum/jsspeccy/</link>
		<comments>http://matt.west.co.tt/spectrum/jsspeccy/#comments</comments>
		<pubDate>Sun, 19 Oct 2008 21:23:26 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[JSSpeccy]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Spectrum]]></category>

		<guid isPermaLink="false">http://matt.west.co.tt/?p=110</guid>
		<description><![CDATA[I&#8217;m really typecasting myself here. If there were an international &#8220;Person most likely to write a Spectrum emulator in Javascript&#8221; award, I&#8217;d have taken it for the last five years running. So here it is &#8211; probably the most stereotypical project I&#8217;ll ever come up with. Readme file Run JSSpeccy online (includes 10 classic games!) [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m really typecasting myself here. If there were an international &#8220;Person most likely to write a Spectrum emulator in Javascript&#8221; award, I&#8217;d have taken it for the last five years running. So here it is &#8211; probably the most stereotypical project I&#8217;ll ever come up with.</p>
<ul>
<li><a href="http://jsspeccy.zxdemo.org/README">Readme file</a></li>
<li><strong><a href="http://jsspeccy.zxdemo.org/">Run JSSpeccy online</a> (includes 10 classic games!)</strong></li>
<li><a href="http://jsspeccy.zxdemo.org/jsspeccy-20081019.zip">Download JSSpeccy</a> (644Kb)</li>
<li><a href="http://svn.matt.west.co.tt/svn/jsspec/">JSSpeccy Subversion repository</a></li>
</ul>
<p>Writing this wasn&#8217;t actually such a big deal &#8211; the Z80 core was ported from the one in <a href="http://fuse-emulator.sourceforge.net/">Fuse</a>, with the Perl-and-C-preprocessor-munging trickery still intact, and Javascript is syntactically close enough to C that that wasn&#8217;t a mammoth task. (I got 90% of it done on the train journey back from International Vodka Party alongside <a href="http://matt.west.co.tt/music/5090-2008/#edgware-road">recording silly songs about tube stations</a>.) The one fiddly bit was working around the places where the Fuse code used low-level C constructs to its advantage: using unions to chop and change between individual registers and 16-bit register pairs, and relying on limited-size C data types (often in pretty subtle ways) to truncate 8-bit and 16-bit values at the right time, whereas Javascript only has integers. (Actually, the really time-consuming bit was debugging it all&#8230; luckily, Fuse has a rather excellent test suite too.)</p>
<p>The rest is just creative abuse of the &lt;canvas&gt; element, as usual&#8230; it&#8217;ll take advantage of the putImageData interface to do the pixel pushing if available (on my machine Firefox has it, Safari doesn&#8217;t) and fall back on drawing 1&#215;1 pixel rectangles otherwise. This time I&#8217;ve thrown in Google&#8217;s <a href="http://excanvas.sourceforge.net/">ExplorerCanvas</a> as a nod to those poor unfortunates still stuck with Internet Explorer. Incidentally, I&#8217;d be curious to know how it rates on Google Chrome (I don&#8217;t have an XP/Vista box to test on) &#8211; if the hype is true (and it implements the putImageData interface like all good up-to-date browsers should) then I&#8217;d expect it to comfortably reach 100% Spectrum speed on modest hardware.</p>
]]></content:encoded>
			<wfw:commentRss>http://matt.west.co.tt/spectrum/jsspeccy/feed/</wfw:commentRss>
		<slash:comments>82</slash:comments>
		</item>
		<item>
		<title>Antisocial</title>
		<link>http://matt.west.co.tt/demoscene/antisocial/</link>
		<comments>http://matt.west.co.tt/demoscene/antisocial/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 00:08:02 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Canvastastic]]></category>
		<category><![CDATA[Demoscene]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Talks]]></category>

		<guid isPermaLink="false">http://matt.west.co.tt/?p=108</guid>
		<description><![CDATA[This is it then&#8230; my big comeback to the Javascript demo scene after a two year absence, and also the moment when my demo coding muse returned from a long holiday, I guess. Ladies and gentlemen, I give you&#8230; Antisocial, a biting satire on social networking phenomena. Visit the Antisocial microsite&#8230; With my characteristic lack [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/images/antisocial.png" width="177" height="200" alt="" style="float:right; border:8px solid silver;margin-left: 16px;" /> This is it then&#8230; my big comeback to the Javascript demo scene after a two year absence, and also the moment when my demo coding muse returned from a long holiday, I guess. Ladies and gentlemen, I give you&#8230; <strong>Antisocial</strong>, a biting satire on social networking phenomena.</p>
<p><strong><a href="http://antisocial.demozoo.org/">Visit the <em>Antisocial</em> microsite&#8230;</a></strong></p>
<p>With my characteristic lack of organisation, I found myself with two weeks to go to the <a href="http://sundowndemoparty.org/">Sundown</a> party, having promised a demo release, and with nothing specific in the pipeline. So, I decided to take a chance and run with an idea that had been sitting on top of my &#8220;demos to write when I have more free time than I do right now&#8221; pile for the best part of a year. I had it all planned out in my head, right down to the soundtrack: a mysterious track from an unlabelled CD I picked up at a <a href="http://myspace.com/zxspectrumorchestra">ZX Spectrum Orchestra</a> gig in 2005 (which turned out to be <i>Round</i>, from their Clive Live^3 EP). A quick bit of permission-getting later, and I was at the point of no return.</p>
<p>I knew it would be an ambitious job, and a bit of a leap artistically and technically from my usual stuff. I pencilled in a rough project plan in my diary. I drew up storyboards. I read up on the maths that was too nasty to contemplate on previous projects. And shockingly enough, I actually <em>enjoyed</em> all of the above.</p>
<p><span id="more-108"></span><br />
As it happens, browser technology (as far as the <tt>&lt;canvas&gt;</tt> element goes at least) has not moved on one jot in the last two years, so I was able to dust off the <a href="http://matt.west.co.tt/javascript/canvastastic-beta-1/">Canvastastic</a> codebase and found it still pleasantly usable and not too affected by code rot. I gave it a slightly more OpenGL-ish API (within the limitations of my &#8220;someone at the pub described it to me once&#8221; knowledge of OpenGL) and patched up the more glaring omissions (like Z-plane clipping, so that you can have polygons going behind the camera. Proper <a href="http://www.cubic.org/docs/3dclip.htm">frustum clipping</a> would have been a better idea, so that I didn&#8217;t end up with it trying to plot 20000&#215;40000 pixel triangles and sending Windows into a stroboscopic flashing fit and having to hack up a fix after the party. Macs are fine with it&#8230;).</p>
<p>The demo code was only half the job though; to handle the camera paths and synchronisation and the million other details where hard-coding wouldn&#8217;t cut it this time, I joined the big league of the demoscene by building a demo tool (still all in Javascript) that probably only I can understand. (It&#8217;s included in the final release, so have a play. I dare you.) As I didn&#8217;t have any meaningful experience in 3dMAX, or Flash, or Werkkzeug, or Quartz Composer, or any of the other things I really ought to have been using as reference points, it was a grand exercise in Making It Up As I Went Along. I&#8217;d almost forgotten how much fun it is to code that way, but naturally a fair few bad decisions came out of that as well. Firstly, it turns out that organising things around a timeline interface doesn&#8217;t really fit all that well; it means that every object and event is treated as independent of everything else, so things get a bit clunky when they have to share resources (such as lots of camera shots of the same scene). Looks like you can&#8217;t beat the good old boxes-and-arrows-all-over-the-place approach.</p>
<p>Secondly, and what probably comes as no surprise to anyone but me &#8211; Javascript is a bit horrible for building demo tools in. The demo itself, no problem &#8211; but for the user interface widgets I found myself constantly wishing for nice, sensible class-based inheritance. Yep, I know the language boffins will say that prototype-based OOP is more powerful, but I guess I&#8217;ve just had my mind addled by programming in the real world. I know of a few attempts to graft class-like behaviour onto Javascript, and that should probably be at the heart of any attempted rewrite of this. Alternatively, there&#8217;s a growing-but-not-quite-there-yet buzz around alternative scripting languages in the browser (just like there&#8217;s a buzz in the opposite direction for server-side Javascript), so perhaps it wouldn&#8217;t be out of the question to have a browser demo tool written in Ruby or Python. Or have the browser environment embedded in a ruby/python desktop app &#8211; at which point, why stop at browser demos? Could it be designed as a more general tool, where the browser is just one of many platforms that can be swapped in? It&#8217;s tempting. Onward and upward!</p>
]]></content:encoded>
			<wfw:commentRss>http://matt.west.co.tt/demoscene/antisocial/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Comet Chaos</title>
		<link>http://matt.west.co.tt/spectrum/comet-chaos/</link>
		<comments>http://matt.west.co.tt/spectrum/comet-chaos/#comments</comments>
		<pubDate>Mon, 07 Jul 2008 00:01:16 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Spectrum]]></category>
		<category><![CDATA[Talks]]></category>

		<guid isPermaLink="false">http://matt.west.co.tt/?p=103</guid>
		<description><![CDATA[Thanks to Oleg for reminding me at OpenTech that I still hadn&#8217;t written this up yet&#8230; This started out as an experiment in Comet techniques (which allow you to actively push data out from web servers without the client having to initiate the request) which quickly ballooned in ambitiousness &#8211; I didn&#8217;t set out to [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to Oleg for reminding me at <a href="http://www.ukuug.org/events/opentech2008/">OpenTech</a> that I still hadn&#8217;t written this up yet&#8230;</p>
<p>This started out as an experiment in Comet techniques (which allow you to actively push data out from web servers without the client having to initiate the request) which quickly ballooned in ambitiousness &#8211; I didn&#8217;t set out to write Just Another Chat Application after all. The end result is a realtime multiplayer Javascript conversion of the Spectrum wargame Chaos&#8230; or a reasonable chunk of it, at least.</p>
<p><strong><a href="http://chaos.zxdemo.org/">Play Comet Chaos now</a></strong></p>
<p>If you&#8217;re interested in the workings behind it, check out this video from my <a href="http://oxford.geeknights.net/2008/jun-25th/">Oxford Geek Nights</a> presentation to hear about how Comet is like a small child on a car journey, find out how close web developers can get to world domination, and watch a live demonstration going pear-shaped. </p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/zz11l8IlPsg&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/zz11l8IlPsg&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p><span id="more-103"></span><br />
Other resources:</p>
<ul>
<li><a href="http://oxford.geeknights.net/2008/jun-25th/talks/microslot-MatthewWestcott.pdf">Presentation slides</a></li>
<li><a href="http://rubyforge.org/projects/shooting-star">Shooting Star</a>, the Rails Comet library</li>
<li><a href="http://shooting-star.rubyforge.org/wiki/wiki.pl?Making_A_Chat_System_Within_5_Minutes">Shooting Star walkthrough</a></li>
<li><a href="http://svn.matt.west.co.tt/svn/chaos/trunk/">Comet Chaos Subversion repository</a></li>
</ul>
<p>But if you&#8217;d rather just dive in and have a play, that&#8217;s fine too&#8230; For those of you unfamiliar with Chaos, it&#8217;s a turn-based game for 2-8 players, each one playing a wizard who has to try and kill of all opponents by casting spells. Most of these come in the form of creatures which you can move across the board to attack opposing creatures and wizards. As ever, <a href="ftp://ftp.worldofspectrum.org/pub/sinclair/games-info/c/Chaos.txt">World Of Spectrum has the full instructions</a>.</p>
<p>Be aware that the current release is rather incomplete and experimental: the repertoire of spells is limited to creatures, &#8216;disbelieve&#8217; and lightning bolts, the combat system is virtually non-existent (everything has a 50% chance of killing everything else), killing wizards isn&#8217;t tested, and the finer points of game mechanics (flying/mountable/undead creatures, ranged combat, law vs chaos) are unimplemented. But don&#8217;t let that put you off&#8230;</p>
<p>An equally important omission &#8211; and possibly the major reason why it&#8217;s attracted minimal user testing and feedback right now &#8211; is that there&#8217;s no way to invite other players, other than marking your game as &#8216;public&#8217; so that it appears on the homepage. (Non-public games still have guessable URLs, though.) To join up with other players you&#8217;ll need to organise things on other channels, such as IRC. Ideally it needs proper user signups, invitations, notifications and friend lists&#8230;</p>
<p>Gosh. I wonder if this could be one of those &#8220;social network&#8221; things all the cool kids are talking about? And that various wise people at conferences say you should never implement yourself, but piggyback on an established one instead? I suppose that means it&#8217;s time for me to swallow my pride and investigate the Facebook and/or OpenSocial APIs soon then.</p>
]]></content:encoded>
			<wfw:commentRss>http://matt.west.co.tt/spectrum/comet-chaos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ZXpaintyONE</title>
		<link>http://matt.west.co.tt/demoscene/zxpaintyone/</link>
		<comments>http://matt.west.co.tt/demoscene/zxpaintyone/#comments</comments>
		<pubDate>Fri, 06 Jul 2007 19:49:54 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Demoscene]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Spectrum]]></category>

		<guid isPermaLink="false">http://matt.west.co.tt/demoscene/zxpaintyone/</guid>
		<description><![CDATA[So I wanted to enter the ZX81 Graphic Competition 2007. But I didn&#8217;t particularly want to type out block graphics character by character into a Basic program on an emulated ZX81 keyboard. So I wrote a ZX81 art package. In Javascript. It does make sense &#8211; Javascript is one of the few languages you can [...]]]></description>
			<content:encoded><![CDATA[<p><img src="/images/zxpaintyone.png" width="300" height="235" alt="" style="float:right; border: 5px solid #cccccc; margin: 0px 0px 10px 10px;" />So I wanted to enter the <a href="http://zx81.republika.pl/">ZX81 Graphic Competition 2007</a>. But I didn&#8217;t particularly want to type out block graphics character by character into a Basic program on an emulated ZX81 keyboard. So I wrote a ZX81 art package. In Javascript.</p>
<p>It does make sense &#8211; Javascript is one of the few languages you can write graphical applications in that&#8217;s truly cross-platform &#8211; as in &#8216;doesn&#8217;t require Windows users to install a massive runtime and a bundle of libraries&#8217;. Well, in this case we do require them to install Firefox, but come on, who&#8217;s going to object to that?</p>
<p>It&#8217;s dead easy to use (painting in three shades of grey is hardly rocket science after all) and it exports directly to ZX81 .P format courtesy of <a href="http://groups.google.com/group/comp.sys.sinclair/msg/eeb95f7af8b5ef5f">a neat Basic snippet from Russell Marks</a>. So if you&#8217;re feeling artistic, give it a go &#8211; you don&#8217;t even need to download it. (But if you do, you get the additional perk of being able to supply an overlay image to trace around.)</p>
<p><strong>Update (2008-07-12):</strong> Now features a handy clickable palette, as requested by Yerzmyey &#8211; so that people with less than three buttons on their mouse can use it. You&#8217;d think that a Mac user like me would have thought of that, really&#8230;</p>
<ul>
<li><a href="http://matt.west.co.tt/apps/zxpaintyone/">ZXpaintyONE &#8211; online version</a></li>
<li><a href="http://matt.west.co.tt/apps/zxpaintyone/zxpaintyone_v2.zip">ZXpaintyONE &#8211; download</a> (ZIP, 8Kb)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://matt.west.co.tt/demoscene/zxpaintyone/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Canvastastic beta_1 released</title>
		<link>http://matt.west.co.tt/javascript/canvastastic-beta-1/</link>
		<comments>http://matt.west.co.tt/javascript/canvastastic-beta-1/#comments</comments>
		<pubDate>Mon, 11 Sep 2006 22:52:41 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Canvastastic]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://matt.west.co.tt/javascript/canvastastic-beta-1/</guid>
		<description><![CDATA[The loose ends are now tied up and Canvastastic is ready for a not-chronically-rushed release. It&#8217;s now placed under a proper licence (the LGPL) and, more importantly, it has actual API documentation! Download: Canvastastic beta_1 (20K, .tar.gz) If you&#8217;re anything like me, you&#8217;ll probably be turning your nose up at having to download the thing [...]]]></description>
			<content:encoded><![CDATA[<p>The loose ends are now tied up and Canvastastic is ready for a not-chronically-rushed release. It&#8217;s now placed under a proper licence (the <a href="http://www.gnu.org/licenses/lgpl.html">LGPL</a>) and, more importantly, it has <a href="http://matt.west.co.tt/files/canvastastic/canvastastic_beta_1/doc/canvastastic.html">actual API documentation!</a></p>
<p>Download: <a href="http://matt.west.co.tt/files/canvastastic/canvastastic_beta_1.tar.gz">Canvastastic beta_1</a> (20K, .tar.gz)</p>
<p>If you&#8217;re anything like me, you&#8217;ll probably be turning your nose up at having to <em>download</em> the thing just to see what the fuss is about, so I&#8217;m happy to oblige with some online demos&#8230;</p>
<ul>
<li><a href="http://matt.west.co.tt/files/canvastastic/canvastastic_beta_1/eg/boxes.html">Boxes</a> (demonstrates lighting and camera movement)</li>
<li><a href="http://matt.west.co.tt/files/canvastastic/canvastastic_beta_1/eg/robot.html">Robot</a> (demonstrates transforms and animation)</li>
<li>and finally, the <a href="http://matt.west.co.tt/files/canvastastic/canvastastic_beta_1/lib/canvastastic.js">library source</a> itself, for those wanting a spot of light bedtime reading.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://matt.west.co.tt/javascript/canvastastic-beta-1/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Canvastastic</title>
		<link>http://matt.west.co.tt/talks/canvastastic/</link>
		<comments>http://matt.west.co.tt/talks/canvastastic/#comments</comments>
		<pubDate>Mon, 04 Sep 2006 23:55:02 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Canvastastic]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Talks]]></category>

		<guid isPermaLink="false">http://matt.west.co.tt/talks/canvastastic/</guid>
		<description><![CDATA[At this weekend&#8217;s BarCamp London, I announced a new Javascript library which takes the 3D engine from my Gallions Reach demo and promises to place it in the hands of industrious web developers, hackers and masher-uppers everywhere. The presentation seemed to go down well, so it&#8217;s only right that I should get this first release [...]]]></description>
			<content:encoded><![CDATA[<p>At this weekend&#8217;s <a href="http://barcamp.org/BarCampLondon">BarCamp London</a>, I announced a new Javascript library which takes the 3D engine from my <a href="http://matt.west.co.tt/demoscene/gallions-reach/">Gallions Reach</a> demo and promises to place it in the hands of industrious web developers, hackers and masher-uppers everywhere. The presentation seemed to go down well, so it&#8217;s only right that I should get this first release out, as promised. Strictly raw materials right now (and still no real documentation), so be prepared to fill in the gaps&#8230;</p>
<ul>
<li><a href="http://matt.west.co.tt/files/canvastastic/canvastastic_beta_0.tar.gz">Canvastastic beta 0</a></li>
<li><a href="http://matt.west.co.tt/files/canvastastic/javascript_3d.pdf">Tales From The Third Dimension</a> &#8211; slides from the talk (PDF, 220K)</li>
<li>Additional (pre-&lt;canvas&gt;) examples were taken from my 2004 demo <a href="http://www.pouet.net/prod.php?which=13121">Mooncheese</a></li>
</ul>
<p>You shouldn&#8217;t have to wait too long for proper documentation, especially in view of the valiant effort <a href="http://simon.incutio.com/">Simon</a> has already made. That Willison is a crafty one, as anyone who witnessed him <a href="http://adactio.com/journal/1171/">pretending not to be a werewolf</a> will testify. I borrowed his laptop for my talk, and within half an hour of getting it back he&#8217;d trawled through the code I&#8217;d left on it and more or less written up the complete API documentation &#8211; and promptly set about drawing diagrams to explain 3D coordinate transformations. Zero-day w4r3z, anyone?</p>
<p>(technorati fodder: <a href="http://technorati.com/tag/Barcamp" rel="tag">barcamp</a>, <a href="http://technorati.com/tag/Barcamplondon" rel="tag">barcamplondon</a>, <a href="http://technorati.com/tag/Barcamplondon06" rel="tag">barcamplondon06</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://matt.west.co.tt/talks/canvastastic/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Gallions Reach</title>
		<link>http://matt.west.co.tt/demoscene/gallions-reach/</link>
		<comments>http://matt.west.co.tt/demoscene/gallions-reach/#comments</comments>
		<pubDate>Tue, 08 Aug 2006 21:43:50 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[Demoscene]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://matt.west.co.tt/demoscene/gallions-reach/</guid>
		<description><![CDATA[It&#8217;s been a good while since my last serious demoscene production, and it could have been even longer if I&#8217;d gone ahead with my plan to sit out this year&#8217;s Assembly competitions and take a break for once. But then along came Opera to sponsor the browser demo compo and assign it an &#8220;Open Web [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a good while since my last serious demoscene production, and it could have been even longer if I&#8217;d gone ahead with my plan to sit out this year&#8217;s <a href="http://www.assembly.org/">Assembly</a> competitions and take a break for once. But then along came <a href="http://www.opera.com/">Opera</a> to sponsor the browser demo compo and assign it an &#8220;Open Web Standards&#8221; (read: anything but Flash) angle. How could a Javascript afficionado like me resist? And so, after a long coding slog, I give you: <strong>Gallions Reach</strong>.</p>
<p style="text-align: center"><img src="/images/gallions_reach.jpg" width="321" height="241" alt="" /></p>
<ul>
<li><a href="http://www.pouet.net/prod.php?which=25800">Gallions Reach on Pouet</a></li>
<li><a href="http://www.zxdemo.org/gasman/browser/gallions_reach.txt">Info file</a> (inc. system requirements)</li>
<li><a href="http://www.zxdemo.org/gasman/browser/gasman_-_gallions_reach.zip">Download Gallions Reach</a> (ZIP, 3.0 Mb)</li>
</ul>
<p><span id="more-40"></span><br />
The demo came 4th, so no compo win hat-trick unfortunately; the Flash faction had raised their game this time, although I did receive Opera&#8217;s prize for best web-standards-based demo. In all, it wasn&#8217;t quite as polished as I&#8217;d have liked &#8211; I spent too much time fixing basic 3D bugs that I would rather have spent improving the design &#8211; but still I reckon it&#8217;s my most &#8216;mature&#8217; production yet in several important respects. It&#8217;s the first time I&#8217;ve written a full 3D engine with controllable object and camera positioning, which in turn forced me to think about the composition of scenes in a much more artistic way; the soundtrack is my first ever piece of &#8220;real&#8221; music, as opposed to chiptunes and MIDI; and it&#8217;s also one of the rare occasions I&#8217;ve actively sought assistance from outside to make up for my numerous gaps in talent&#8230; in this case, my colleague and Flickr devotee <a href="http://www.flickr.com/photos/nataliedowne/">NatBat</a>, whose wonderful photos enhanced the stylishness of the final demo by several orders of magnitude.</p>
<p>Some random pieces of trivia:</p>
<ul>
<li>Gallions Reach is <a href="http://www.tfl.gov.uk/dlr/stations/gallions_reach.shtml">a station on the Docklands Light Railway</a> with nothing at all notable about it besides its vaguely poetic name. It also has nothing whatsoever to do with the content of this demo, but if Fairlight can randomly name one of their intros after <a href="http://www.pouet.net/prod.php?which=18339"><del>a Cuban</del> an Argentinian revolutionary</a> then I can do the same.</li>
<li>The gouraud shading is done by drawing triangles with strategically placed gradient fills. The maths required to do this is surprisingly horrible.</li>
<li><tt>PERSPECTIVE_ALTERING_MINDF***_RATIO</tt> is possibly the best variable name I&#8217;ve ever used. (And since someone&#8217;s bound to ask: no, stars aren&#8217;t valid characters in Javascript variable names)</li>
<li>The music was made with no trackers or sequencing tools at all. In particular, the flute section started out as a three minute keyboard improvisation, from which I repeatedly selected and edited out the 10-second clip I thought was the crappest, until I got it down to 30-40 seconds.</li>
<li>The final shot of the flowers is a dirty great cheat.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://matt.west.co.tt/demoscene/gallions-reach/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>
