Mr Speaker

Category: Nerd

Nerdy stuff

Nicer random colours, with HSL

As many of you may know from my complaining, I’ve currently embarked on a new writing mission: a CoffeeScript book for SitePoint. The example project that runs throughout is an HTML5 game using Canvas. While I was trying to create a random colour palette – for instructional purposes – I fell over this “trick” of […]

#rimshot: zingers from tweetland

I just finished typing all this code, and boy are my arms tired! Wait, that doesn’t really work. Anyway, I did a search on twitter for the hash tag #rimshot yesterday and the results were not very funny. The problem was that seeing the term #rimshot is not the same as hearing “budum ching”. Hence, […]

Typesafe Console: behind the scenes

Scala, Play 2.0, CoffeeScript, real-time streams, server-sent events, (lots of) HTML5 canvas, local storage, push state, easter egg, … If you’ve worked in IT for long enough, you make sure you get yourself in a position where you no longer have to work on dull projects. It’s hard (dull projects are often very lucrative – […]

Weird EventSource problems? Watch your content-length!

Super short version: If you’re using Server Sent Events, and it doesn’t work in Firefox because “Firefox can’t establish a connection to the server at…” and it’s not a CORS problem… make sure you’re not setting a content-length header. The end.

Colourising sprites in Canvas – part 2

And we’re back! In part one we looked at setting up a tinted palette for drawing our 8-bit masterpieces to canvas. Here’s what we’re going for today: rendering colourised sprites and tiles. We’ll be loading in the 4-color sprite sheet and rendering tiles from it with our chosen colours.

Navigate the web with your gamepad

How crap is the mouse, right? Yeah, I know! So I made a greasemonkey script to do my websurfin’ using my NES-style USB gamepad. For those of you too excited to read on, take your gamepad-enabled build of Firefox and install Gamepad Navigator now! Up and down to scroll the page up and down. The […]

What I learned from watching people watching Notch

Last weekend was the 22nd Ludum Dare 48 hour game comp. Again Notch livestreamed it, again I watched pretty much all of it, and again I learned a lot. But having seen Notch in action before, this time I could afford to take my eyes off the code from time to time, and spend a […]

A Minecraft soundtrack for your daily grind

The problem with the real world is it’s not enough like Minecraft. The fix is simple: pipe haunting and beautiful C418 tracks at various random times throughout the day, in a Minecraft-y fashion. To keep you on your toes, add in some rare-but-scary cave sounds. And that’s exactly what my Grindcraft python script is for. […]

My grandmother was immutable

As I move into my twilight years (mid 30s) I start to have flashbacks surrounding various aspects of my youth. This very morn’, for example, I was whisked back to an endless summer evening circa the mid 80s… The scene is composed of; a large christmas tree, me, my grandmother, and our TV. Connected to […]