Category Archives: Programming

“Bubbles” canvas tutorial: Introduction

HTML5 Bubbles

After my early forays into canvas and Javascript I commented on Twitter how good it felt to be learning something new, something that felt like it opened up a whole new toolbox to me and the attendant possibilities.

The main upshot of this is that I finally have the tools at my disposal to make the game I’ve been promising my two-year-old son for a while now. This project is ongoing but “functionally usable” now. It hit a few bumps along the road so I’m writing this series of articles to describe the development of the game, the problems I encountered and how I overcame them.
Read More →

A whole bunch of HTML 5

HTML5 Canvas Banner

The last animation I posted was just a work in progress, halfway to something a little more complex. As promised, here’s the fruits of that work. I’ve put together a page of my little collection of animations.

Mostly this was an excuse to put up another of my HTML5 logos with the stolen XKCD people.

More fun with the HTML5 canvas

HTML5 canvas - not as confusing as prototypes

Oh go on then. Here’s another canvas animation. It’s pretty simplistic but so far it’s just a work in progress of something more fun. And after that, some thoughts on what comes next on a technical level.
Read More →

First steps in HTML 5 – Getting to grips with the canvas


Today I discovered r/loadingicon and promptly spent an unwise amount of my precious free time staring mesmerised at the screen. When I finally snapped out of it I finally resolved to actually sit down and learn how to use the HTML5 canvas element. I’m not claiming to have the arty chops of the people posting those icons, but it seemed like a really fun way of getting into the spirit of things.

And you know what? Basic canvas drawing with Javascript is easy. Really, really easy. An hour later I had something I’m going to call halfway fun to sit and stare at.
Read More →

Quadtree Art

QuadtreeOracle Banner

I’ve always had an interest in computer generated imagery and art, even though I’ll be the first to admit I level a level of artistic skill roughly on par with underdeveloped slime-mould. Fractals, Lorenz Attractors, cellular automata, and so on. All fascinating.

So after seeing a few pictures generated using Quadtrees to approximate actual images, I thought I’d give it a shot.
Read More →

Success! Responsive goodness

Chiron Responsive Banner

Earlier I said I was going to have a crack at making the theme I use for Pixieland a little more responsive and you know what? I actually did it.

Clunky and coarse, yes, but now if the page width drops below the previous minimum of 960px things will get out of the way and let the width drop sanely to the content minimum of 640px. It actually looks kind of OK too, though I’m sure I’ve missed some inevitable side-effects of being a bit over-zealous with the CSS selectors I’ve overridden.
Read More →

Reset validation in Flex

Random code snippet time…

In Flex it’s very common to run validation on a form field before submitting – from ensuring a field isn’t empty to checking a phone number or email address is correctly formatted. Generally if validation fails you get a red border and some hover text derived from the component’s errorString field.

Resetting a validation result is less straightforward. The internet is full of this answer:

textfield.errorString = "";

At first glance this seems to work, but future validation fails, since all you’ve done is clear the error message, not clear the validation status. What you need to do is to actually set the validation status to OK:

textfield.dispatchEvent(new ValidationResultEvent(ValidationResultEvent.VALID));

Et voilà. Clear and repeatable.

LaTeX, apacite and bibliographies

LaTeX LogoJust a LaTeX issue and solution, in case anyone else ever spends half an afternoon banging their heads against this particular brick wall.
Read More →

Extraction: The game

Extraction IconHaving covered the map generation and the AI, let’s wrap up the Extraction series with an overview of the game itself, how the previous topics feed into the gameplay, and just where it might go in the future.
Read More →

Extraction: AI and behaviour

Extraction - AI ThumbnailThis is the third part of my game design series. In part one I gave an overview of the game and in part two I described the map generation algorithm. This post describes the AI used in the game and how a combination of simple rules play off each other and combine to create useful and engaging simulation.
Read More →