May 2010
11 posts
Found this funky little old-skool circuit emulator, built as a Java applet. Quite a nice little tool, although it would be really nice if there was a GUI for building and debugging your own circuits…
So far I’ve built a very rudimentary ‘game loop’, which is essentially the heartbeat of everything that happens. It looks like this:
Because Javascript is single-threaded, it locks up the UI during heavy processing. My game loop is essentially called over and over and over, forever, until the game ends. To get around this ‘UI freeze’, I schedule the gameLoop() function to immediately call itself again, via setTimeout(), with a delay of 0 milliseconds. This is a well-known programming pattern for Javascript developers, but one that I feel could do with a bit more explanation.
So yeah, I’m taking “Command & Conquer - Tiberian Sun” and rebuilding it completely, from scratch, in Javascript. I don’t expect to have it remotely close to finished, but I would like to produce a little fun and interactive demo that mimics the look & feel of the original game.
Those of you who were fans of Westwood Studios back in the ’90s may well agree that Tiberian Sun was one of the most awesome games they ever made. It was buggy, the graphics weren’t a patch on other games coming out at the time, and the gameplay had various inconsistencies due to schedule & budget shortcomings. But it had that special ‘something’ that kept us playing. It was also incredibly easy to mod, as the developers had left a well-documented API for the dedicated modding community to hack against.
Right, blog set up. I’m writing a load of nonsense to pad it out, as it looks a bit bare with no content here… So, here’s what I intend to blog about:
Web tech
Really into Javascript these days (it’s a bloody brilliant language) and I’ve been mucking around with the emerging HTML5 <canvas> tag a lot lately, so I’ll chuck some example playthings up online. Got a very simple ‘spotlight’ effect that follows the mouse, illuminating a radial area of the canvas and casting drop shadows at a (roughly) correct angle and opacity. Also got a massive on-going project I’ve just begun (and re-begun), which is to try and build a very basic version of Command & Conquer: Tiberian Sun entirely in Javascript. Aside from that stuff, I’ll also shout about any cool stuff I do through my work at Yamaha Music R&D London, where we do all sorts of top secret web awesomeness.
Music
Running a 9-piece funk band is a hell of a lot of work in the early stages, but I’m sure deep down that it’ll pay off. Got a great bunch of players on-board and we’re starting to book gigs and write stuff, so checkity-check it out at http://gefunkt.co.uk.
Electronics
When it comes to complicated, unachievable pipe-dreams, it’s not just web tech that gets me going. Therefore, I’ve taken a complete jump-in-at-the-deep-end approach to electronics and set myself the task of building a quadcopter (helicopter with 4 engines) from scratch. Have bought a bunch of microcontrollers, motors, wires, breadboards and other components, and have begun programming my PIC16F818 chips to blink some LEDs. It’s practically flying already!
Whatever
Will I actually do all this and write about it? Who the hell knows. Let’s see what happens.