Blog Page 1 of 1 (7 posts) :: archive :: feeds


Earlier this week I wrote a small Asteroids clone in JavaScript:

Video of the game

Instructions and the link to the game are on the project page.

FYI, here’s how I made the animated GIF: I used Quicktime Player to record a portion of the screen, then used ImageMagick to convert the .mov file to a series of PNGs:

convert png/asteroids_%03d.png

I deleted the extra frames at beginning and end that I didn’t care about (unpausing the game, figuring out how to turn the recording off), then used ImageMagick again to make the GIF:

convert -delay 1x30 png/*.png -layers optimize +dither -colors 32 asteroids.gif

Outline map of Britain and Ireland

So I got this idea of making an outline map of Britain and Ireland and then compiling a list of fifty populous/famous towns and cities, to see how well I can locate them on the map. Being an Anglophile, I thought I’d do pretty well. Ha. It was sad. (But I did get London.)

Anyway, should you care to test your knowledge, you can now download PDFs of both the map and my semi-arbitrary list of towns and cities. Enjoy.

Notes on how I made these

For the map, I used TileMill to style and generate the map lines. I exported the map to SVG, converted it to Illustrator, and then imported it into InDesign and added the label.

For the list of towns and cities, I took a list of the most populous cities and added in some literary places as well. Basically, it’s a very-not-comprehensive list of places in Britain and Ireland that I’ve heard of.


Introducing Spin, a game I threw together hastily for a little game jam I did with some friends.

Basically, you’re in a maze and have to get out before the timer runs out (ten minutes, which I display as 600 seconds because hey, I didn’t have much time) (pun not intended?). The world rotates 90° every five seconds with gravity changing as well, and the walls and obstacles hurt you if you touch them. And that’s about it. I threw most of the level together in, oh, about twenty minutes, so gameplay may end up being more frustrating than fun. But there is an exit, I promise. It may just take several rounds to find it without dying.

Technology-wise, Spin uses Box2D for the physics and THREE.js (WebGL) for rendering. I recommend playing it in Chrome, since Firefox’s WebGL wasn’t hardware accelerated (at least on my Mac) and was dog slow. (Safari works fine, but you have to enable the developer menu and then enable WebGL.)

Update: I realized this morning that it would be fairly trivial to add a first-person mode, since all I’d need to do is change the camera. So I did. It’s more boring of a game — with the gravity and world-rotation gone, it’s just maze exploration — but it’s kind of cool that WebGL makes it easy to do both kinds. The README has more info on how to activate the first-person mode.

Botswana 2.0

Two years ago my friend Chad and I released Botswana, a browser-based arena game with programmable bots written in JavaScript.

But the original was kind of boring. So we tweaked the game mechanics a bit and made a number of other modifications (multiple bots per team, extensible rulesets, etc.). And now we present Botswana 2.0, a culmination of rampant nerdiness.

The thing that interests me most about the game now is the customizable rulesets. For example, it took all of ten minutes to change the game so it’s played on a series of conveyor belts that move the bots up and down:

It likewise took less than half an hour to make the bots orbit the Death Star instead:

Since the drawing code is part of the ruleset, it’s fairly easy to get a radically different look:

Switching between the rulesets is just a matter of changing the URL in the ruleset box and starting a new tournament.

Anyway, as before, the release is on GitHub, with a README that explains how to write bots and customize rulesets and stuff.

Old DOS games

I’ve been thinking about some of the old DOS games I used to play as a kid, as part of a goal this year to collect family stories — more on that in an upcoming post. In trying to find one of the games I remembered playing, I discovered that people have posted gameplay videos to YouTube for most if not all of these. Enter a bucketload of nostalgia.

My childhood was spent playing games like Command Keen:

And Joust:

And SkyRoads:

Here, then, are most of the DOS games I remember with fondness (or at least remember playing more than once), with links to videos:

Going through these is making me feel ten years old all over again. Ah, childhood. (You can play pretty much all of these through DOSBox, by the way. Most are still shareware, and a lot have been released as freeware.)


As previewed a little while ago, I’d like to introduce Botswana:

A couple weeks ago at work I was talking with two of my coworkers and Core War came up somehow. I got excited about the idea of writing AI bots to compete with each other. Conferring with my friend Chad, we decided to make it web-based and use Javascript as the scripting language for both the bots and the game engine. A couple days later, we had a working engine, and we’ve been fine-tuning it since then.

Each turn, the engine sends the current state of the world to each bot. The bot can then give the engine its command — to move forward, move backward, turn left, turn right, or fire. Last bot standing wins. We’ve gone with an intentionally simple rule system for now, but we’ve got some fun plans for future improvements.

The code’s open source and is on Github.