Thursday, February 2, 2012
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 our (ok, Notch’s) 4-color sprite sheet and rendering tiles from it with our chosen colours.
Friday, December 30, 2011
First things first: I promise to try to limit the Notch related posts in the future and I apologize to the legions of l337 coders for the continued coverage. Right, now, on to todays topic: “Colour like you’re Notch” (Awright, punning on my own blog post titles!). While watching the livestream of Notch coding Minicraft, [...]
Also filed in
|
|
var _this = this. It always does. I write it oh-so-often to keep my JavaScript scope hanging around – and the idiom no longer makes me cringe. It’s like an old friend. The only problem with my old friend is that Textmate doesn’t have the same feelings towards him as I do. He certainly won’t [...]
Also filed in
|
|
It’s been a while since Slashdot was my regular hang out – so perhaps the demographic has swung radically – but I was amused (and a little bit incredulous) to see a stack of mis-informed javascript hate in the comments of an article talking about Harmony (TC39), the proposed next version of ECMAScript. In the [...]
Also filed in
|
|
I’ve had a few queries about some of the code in my Hacker News bookmarklet – which makes use of some JavaScipt 1.6 & 1.8 features: map; reduce; filter; and forEach (sorry, no love for some or every this post). Superficially these are just array methods that take a function and apply it to each [...]
Also filed in
|
|
Hacker News is a fantastic source for up-to-the-minute happenings in the nerd world. It’s highly dynamic – like a calm river of nerditry, in which items of interest ebb and flow unceasingly over the front page. Unfortunately it is also addictive – and the highly procrastinative or inquisitive (or worse still, both) individual can become [...]
Also filed in
|
|
Here’s today’s fun-with-mobiles tidbit of pain. The extremely entertaining Geolocation API (entertaining to use, not to read) provides the current timestamp in DOMTimeStamp format along with geoposition responses. But it seems browsers and devices aren’t 100% in agreement on either what a DOMTimeStamp is, or what it is when it comes back from a geolocation [...]
Tuesday, February 8, 2011
The super-cool Google Jules Verne demo that went up today reminded me that I made an accelerometer tester for the iphone ages ago. It’s an offline app, so don’t be afraid to “add it to home screen” – and if you don’t want to get dizzy, then lock the phone to portrait mode! GO HERE [...]
Inline event handlers… remember them?! Yes, they’ve gone the way of the blink tag and Adobe Flash, but recently I used one while debugging and realised: “Hey! I have no idea how to get the event object in an inline even handler!” and, shortly after “In fact, no idea how to write an anonymous function [...]