Kevin Vance - Making a New JavaScript Thing

Entries | Archive | Friends | Friends' Friends | User Info

11:49 pm

Making a New JavaScript Thing

Saturday, September 19th, 2009
Previous Entry Share Next Entry
I've been coding like crazy lately. I just got the idea this afternoon to make Guybrush Threepwood Reads Ron Gilbert's Tweets. I did it (arr matey, before Talk Like a Pirate Day was over!) but it took the rest of the day.

I'm familiar enough with JavaScript that the main programming challenge was looking up documentation on the internet. I have a good enough idea of what's in the language (and the DOM) for my purposes, but I can never remember what anything is called!

The real challenge was getting the graphics. The background is two screenshots of ScummVM pasted together. Okay, that was easy. I managed to rip the sprites with Costume Ripper running in DOSBOX. Once I found the sprites, I used the utility's PCX saver, manually renaming the output each time.

I had real trouble with the fonts. Somehow I managed to miss Charlie and decided to try and capture the font with screenshots of ScummVM. I used SCUMM Revisited to find offsets of text in the game, which I edited to all the ASCII printable characters. But ScummVM doesn't render the fonts 1:1. They're stretched out to preserve the original aspect ratio. And I captured some of them over a dark background. It was getting annoying.

Luckily, I found Charlie, and ran it (also in DOSBOX). It wouldn't work on Monkey Island 1, but I managed to get it to detect Monkey Island 2. The built-in saver did not work, so I just took a screenshot.

Then, a happy coincidence occurred. Several months ago, I wrote a utility for Corner Office to take a paletted image of a multi-color font, squish the characters together, and save the result and a character offset table! EXACTLY THE THING I NEEDED FOR THIS AS WELL! I just converted the resulting offset table from a binary format to a JavaScript object.

Anyway I really need to relax now so no more programming today. Probably.

Other stuff I'll try to write about later: switching from PulseAudio to JACK, writing a JACK driver for mikmod, Corner Office animation editor.
Link )Reply )