Mr Speaker

mrspeaker's head in a monitor You find yourself at the entrance to the Hompage of Mr Speaker. In a darkened corner sits a trunk containing HTML5 games and some JavaScript tidbits. Next to it you spy a mastodon account. Exits are North, East, and .

Conquering Flappy Bird


The creator of the current smash-hit game "Flappy Bird" is either a certified genius or an authentic wacko. In either case, this game ignores every rule of good design: plopping you into your own personal crazily-addictive fire-y hell of casual gaming. All you can do is suppress your rage, grit your teeth, and try yet again to beat your standing high-score of "6". But when the rage becomes too much, you're forced to go to the dark side... and cheat.

Read on for more »

Bitcoin market visualizer thing


Having a slight slither of skin in the Bitcoin game, I decided it would be prudent to more closely monitor my investments. There's some fantastic tools for this: Bitcoin Wisdom and Trading View and Co. But they all show a single view, designed to be viewed in a browser tab. I needed something that would show a whole bunch of different views that I could put fullscreen and project on the wall, ensuring I wouldn't miss a single moment of the action. And therefore, bitcoin market visualizer thing.

Read on for more »

Spam, my friend.

Hi there could I allusion some of the perceptiveness from this participant if I minister to a relation help to your site?

I just deleted 18,311 pending comments that had been submitted to this blog. 99.99% were spam, but 0.01% were real comments from real people, so I had to vet them one at a time. And I had to read a lot of spam.

Until now I'd turned a blind eye to the burgeoning mountain of crap - mostly because I'm extremely lazy - but also because at some point I thought it would be interesting to "write" a book about them. You see, individually they cause me pain... but en masse they give me great joy.

Read on for more »

One-line array wrap

I like this lil' one-liner for wrapping around an array forward, or backwards. Given an array, with a current index, you want to move either to the next item, or the previous one. Here's the setup:

var a = ["alice", "bob", "charlie"],
    current = 0; // start with "alice",
    direction = Math.random() < 0.5 ? -1 : 1;

The direction is picked at random. To find the nth + 1, or nth - 1, we use modulus... plus a trick:

current = (current + direction + a.length) % a.length;

See the trick? Modulus will always return us the correct value when incrementing - but when decrementing: -1 % a.length = -1. To fix this, we always add the array length before taking the modulus. The value will never be less than 0. Nifty!

New games ahoy!

Just a quick update, 'cause I haven't been here for a while - but I have been busy making things, promise. Here's a couple of games I did:

Time Flies Straight: a non-usual game of fractal time, staring Carl Sagan.
Glowbougs: a platform adventure for the JS13K comp.

I have many things to say about them, and I'll be sure to bore you with the details shortly. But for now, check out this cool review from Indie Impressions:

Pixelmator save, Project reload.

End result: Hit save in Pixelmator, web page automatically reloads with new PNGs.
Tools: Pixelmator (image editor), Grunt + LiveReload (task runner), Automator (Mac automation thingo), Bash (Bash).

I'm generally not a fan of automating tasks, unless the task is consistent over multiple projects and over long periods of time. Automating things is fun - so you quickly lose track of how much time you reeeaaallly spend on it and, more importantly, automation tends to be subject to "digital decay" - project structure changes, build tools update dependency versions (or disappear entirely), things require maintenance. Finally, the build tools and scripts become part of your code base: which is a cause of incidental complexity. Anyone touching your project needs to not only understand your code, but also all the extra cruft around it to "save time".
Read on for more »