All this PPK “iPhone developers are stupid” awesomeness got me thinking. Now, if there’s one guy I’ve got respect for, it’s PPK. And if he tells me to ditch objective-c for JavaScript, then I’m damn well going to do it. Accordingly, I decide to create “Parcycle”: a Particle Emitter system that I re-wrote from a […]
Category: Nerd
Nifty jQuery trick: setting attributes
I’ve been knee deep in the jQuery source code recently. It’s all gooey, but you do get to see some snazzy things. Today’s nifty jQuery trick is about programmatically setting attribute values via a function. To follow along at home you’ll need some scissors, a length of string, and some double sided tape…
The road to jQuery 1.4: at a glance
Ok, here’s something you’ll want to refer to daily… the current status of the jQuery 1.4 “TODO list”, or as I like to call it, “Report 37”. Usually when people on the jQuery dev lists ask “When will jQuery 1.4 be ready?” they are met with a resigned (resigned not resiged) answer: “When it’s ready”. […]
Adding “1UP notification” with jQuery
Now, as many of you know, I’m a big fan of taking interactions from retro gaming and attempting to squish them onto the page as standard UI elements. If I had my way, all sites would look like BMX Simulator from the C64. With that in mind… today something great happened. A win for old-school-gaming-as-ui-elements […]
Selecting JavaScript objects with jQuery
After a bit of prodding around I’ve not only found out that selecting JavaScript objects and arrays with jQuery is fully supported, but there are also some potential use cases! It all started a couple of weeks ago when I thought it would be cool to bind custom events to actual JavaScript objects.
Critical jQuery Info: How to pronounce “live”
After weeks of debate an answer has emerged. Live rhymes with “jive”? Or live rhymes with “give”?… that was the discussion point that was starting to turn ugly… In the live/jive corner: the “live” event is always on – like a live broadcast. In the live/give corner: the corresponding remove event is called “die”, so […]
Using jQuery on JavaScript objects (Part 1)
Today I was trying to decouple some JavaScript classes in a game prototype I’ve been working on. I didn’t want to get into implementing some kind of interface behaviour, and so I thought about a simple Observer pattern. There are a bunch of solutions around the tubes (and indeed I’ll probably use one of them) […]
Game of Life
Conway’s Game of Life is a simple cellular automaton based on a few simple rules. There’s about fifty gabillion implementations of it around. Here’s mine: Game Of Life in Javascript (rendered, of course, on Canvas). I just followed the rules on the Wikipedia entry, so I’m not 100% sure it’s fully “Game Of Life Compliant”, […]
Smoking Canvas
On the way to work today I remembered an old trick to create a “fire” effect: you randomly assign a colour to the pixels on the bottom row of the screen (in the same hue) and for each row above it take the average of the 3 pixels immediately below it, and 1 pixel that […]