DIY Kinect TV Mount

January 4th, 2011

Apparently the Kinect works better when mounted above the TV, allowing you to stand up to 30cm closer, ideal in smaller rooms. The only problem is the official Kinect TV Mount is way too expensive (£40!) for what it is (two rods and a platform).

Nonetheless it gave me an idea, the way it used the wall mounting holes (the four screws on the back of most flat screen TV’s used to attach wall mounting brackets) was a good idea, but I was sure I could make something similar for considerably less money. So off I trotted to the shops looking for materials and inspiration.

Read the rest of this entry »

Javascript Canvas Experiment pt 2

November 27th, 2010

New version! Nothing hugely different, i’ve just tweaked a few things to make it more fun. The enemies are smaller, and turn a bit slower to make it feel fairer. Give it a go and let me know what you think in the comments.

Javascript Canvas Experiment pt 1

November 26th, 2010

I’ve been having a play around with building games using the HTML5 Canvas element lately, and I thought i’d post what i’ve done so far. It’s nothing special at the moment, just a collection of entities who wander randomly around the screen and kill you if you touch them, but, you know, acorns and oak trees…

Click the preview below to try it out.

I was experimenting with a bit of Javascript and the HTML canvas element the other day and came across a very unhelpful error when trying to call the drawImage function:

INDEX_SIZE_ERR: DOM Exception 1

A quick internet search didn’t help much, but after a bit of head scratching I finally got to the bottom of it, and thought i’d share the answer for anyone else googling the same error code.

The error is thrown if you attempt to draw an image which hasn’t fully loaded yet, so the solution is to move the code which draws the image into a function called by the images’ onload event, like so:

var img = new Image();
img.onload = function()
{
    canvas.drawImage(img, 0, 0) ;
}
img.src = 'image.png';

And voila, no more error.