Mode 13
Games
Miasma
Psychopomp
Gallery
Web Log
Support
Contact Mode 13
About Mode 13

2006 Archive

Back to 2011
2010 archived here
2009 archived here
2008 archived here
2007 archived here

I think my 20Q is planning to kill me in my sleep
December 17, 2006

Seriously, has anyone else tried this thing? It's spooky! A friend and I were Christmas shopping yesterday and she mentioned that she was going to get a 20Q for each of her direct reports at the office. Eventually she decided on different gifts, but I kept asking her more about it. At first I thought it was a simple computer game that came up with subjects for 20 questions, but she said that no, in fact, it would ask the questions and then guess what you were thinking of.

Impossible.

I thought, "I've taken many computer science classes, including one on the subject of artificial intelligence, and there's no way a company could pack that amount of sophistication into a little plastic sphere that costs $10 at Target." And yet they have! We went over to Target and picked one up because I was too fascinated to let this go. We tried it in the store and it was amazing. I thought of a golf ball and answered its questions. After the 20th question it guessed a hockey puck. Based on its questions I could see how it got there: round, non-colorful sporting object. Five more questions and it arrived at golf ball. I was impressed enough that I had to buy one, take it home, and experiment some more. Here are the results so far:

golf ball - 20: hockey puck 25: golf ball
knife - 20:Swiss Army Knife (close enough)
radio - 20:stereo speaker (pretty impressive, didn't go to 25)
vampire - 20:vampire
vampire again (because that was un-fucking-believable) - 20:black hole
Christmas tree - 20:tree (again, close enough)
curtains - 20:curtains
printer - 20:fax machine (pretty close)

The only time it has had any trouble at all is when I over-think my answers. I was thinking of "doctor", but I was also trying to think through the artificial intelligence of the machine, so I started trying to answer based on how it would interpret the answer. The first question is always, "Is it an animal, vegetable, mineral, other, or not sure?" I assume that people are animals, and always answer yes if I'm thinking of a human. My friend (who was the first to succeed with "vampire") puts humanoids as "other". Behold her success on vampire and my subsequent failure. I stuck to my guns on animal for "doctor" but answered some other questions contradictorily, then worried about it. "Are they colorful?" I think of Easter eggs and Christmas lights as colorful, not doctors, so I answered no. Then it came back later with "Are they ever black?" which is a yes, although I thought back to my colorful answer and wondered if I had answered that wrong. When it came back with "ninja" I knew I had. It had come up with a humanoid creature that, as normally depicted in kung fu movies and comic books anyway, is always dressed in black. I fault myself for over-thinking the answers.

What impresses me most is that this tiny machine has access to concepts like ninjas, black holes, and vampires. And that it can come up with something as specific as golf ball as opposed to the more generic (and easier to discover in 20 questions) ball, well that's the icing on the cake. Since they're only $10, I really want to go out and buy another one and take it apart. I'd never be able to see the algorithm obviously, but it would be neat to see what makes this machine tick. How much memory does it have? Is there a hard drive in there? And what hardware device is allowing it to read my thoughts through my hands? To be honest, the thought had occurred to me, as had the possibility that it was really a speech recognition machine and could interpret your speech. I thought of the speech thing because me and my friend were watching old Buffy the Vampire Slayer reruns when I suggested aloud that she try vampire, and I thought there was no way on Earth it was going to get it. When it did I became very suspicious. What's funnier is I'm not the only one who has had these thoughts (check the comments at the bottom of the 20Q About page).

Now I'm resigned to figuring out how it works and being a little scared of it. On the subject of figuring out what I'm thinking it is eerily accurate, so what other dark powers does it possess? Does it know what my hopes and dreams are? Does it know my future? And I don't mean vague Magic 8-Ball stuff, but specific stuff? Should I be asking it about lottery numbers? And most importantly...

...am I safe?

And do I dare wonder about my safety for fear that it will know that I'm wondering (because it always knows) and try to stop me from wondering that? And how would it stop me?

Help!!!

Happy Holidays!

Jon

 

 

My kingdom for a dongle
December 13, 2006

It's no secret that I'm a Luddite, however unlikely that may seem given my choice of profession. I have no cell phone, no cable, and dial-up Internet service. It takes this web log five seconds to load on my PC (and that's if the navigation is already cached). What people might not guess about me is that I'm also a fuddy duddy. Straight-up, Andy Rooney style, crotchety old fuddy duddy. I realized this as I was trying to buy a dongle for my Maya license. For those of you who don't know what a dongle is (or thought it sounded like something much funnier than the thing I'm about to describe), it's a hardware license key for software. USB dongles for Maya look a whole lot like those new USB flash memory sticks you see now days, except that they allow you to run Maya. If the dongle isn't plugged in, the software won't start. Pretty ingenious, and awfully hard to crack (though it's been done). You can have Maya lock itself to your Ethernet card instead (as I did initially), but then it will dawn on you (as it did me) that you'll have to move your NIC around when you buy a new computer or pay Autodesk $150 to transfer the license to the new hardware. The dongles cost $150 and you never have to transfer anything again, so had I been smarter I'd have bought the dongle right off the bat. Sadly, I'm a little slow.

I bought Maya from Alias. I point this out because Alias has since been bought by Autodesk (makers of, among other things, Maya's main competitor 3DS Max) and things have definitely changed. I loved Alias not only because they wrote some incredible software (Maya is hands-down the best designed, most powerful program I've ever used) but they were helpful when it came to trying to get ahold of them. They had lots of FAQ pages on their site about the things they knew might confuse new customers (satellite rendering, mental ray, dongles, etc.), and you could bet that you'd find what you were looking for either in the knowledge base or on the forums.

Enter Autodesk. I went to the on-line store to buy a dongle. Nope. Okay, I'll send them an e-mail and ask if they sell them and how I'd go about moving my license from my NIC to the dongle. No way to contact them by e-mail about store questions. To their credit they do have a pre-sales 800 number, which I'll use, but I'd rather not have a conversation where I'm repeating the word "dongle" over and over again at work. I'd like to be working there for at least a month before facing my first sexual harassment lawsuit. Okay, so maybe I can find information about dongles and licenses in their forums or knowledge base search. Nope. Help on license relocation? Yes! Where? One of the old Alias pages that hadn't been converted yet. I sighed a sad little sigh as I saw the Alias logo in the corner of the page. Ah, the good old days.

And this is why I feel like a fuddy duddy. Can't I just move on? Can't I accept that the Autodesk purchase of Alias was a step forward? I have the same problem with Adobe's purchase of Macromedia, though that one made a little more sense. Right behind Maya on my favorites list is Macromedia's web studio (Dreamweaver, Flash, and Fireworks), and I'm wondering what will become of these programs. Adobe has a competitive product for every program Macromedia has, though with the exception of Illustrator's rightful dominance over Freehand, Macromedia's products are universally more popular (again, rightfully).

So no, I can't move on. I can't accept that these two great companies who made products that were admired for their superiority are now going to be absorbed by their competitors. Competitors whose products, though good, were never quite as good. You see, this not only means that the people in charge of the inferior products are now steering the development of these great programs, but I wonder if they'll strive to make them as good. What I mean by that is, if you're making 3DS Max and you've got multiple-Academy-Award-winning Maya breathing down your neck, you had better give it your best shot or you're dead. If you're making 3DS Max and you don't have Maya breathing down your neck because now the guy in the next cube over is programming it and it no longer represents your competition but another revenue stream, maybe the thrill of competition is gone and the status quo seems reasonable. Sure, Lightwave 3D and Softimage XSI are still in the running, but Max and Maya are the juggernauts of this arena. I really hope Autodesk understands what a gem they've got in Maya, and that they seriously care about keeping it polished.

Next on my list of fuddy duddy things to do: bitch about those bags of peanuts the airlines give you...Rooney style.

Happy rendering,

Jon

 

 

Is that a mushroom cloud? And by "gold" I mean riddled with bugs.
November 12, 2006

When you've been working with a game for the better part of a year it never occurs to you that others might not have the same familiarity with it that you do. I worked for several hours yesterday on the cover art for Psychopomp and, my lack of painting ability aside, I thought I had a good representation of the game. I've got the shore, the pentagram, a grave yard, and...a mushroom cloud. It was supposed to be a tree with magical symbols burned into the bark so that it reminds you of the enchanted logs in the game itself. I went with a reddish bark, red glow for the runes, and dark red leaves so it would feel like a Fall day, somewhere close to Halloween maybe. Then I stepped back and looked at it and realized it looks like something is exploding out of the ground in the cemetary. It's a tree I tell you. A tree!

Also, I was playing around with the "gold" version (which is industry speak for "of sufficient quality to press to CD and sell") and found three more bugs:

  • The "Play Again" button went to wrong place, so the game would stop on the "Hey, this isn't Mode 13!" warning frame instead of letting you play again. The warning frame is where the game is supposed to go if it is being played on a web site other than Mode 13.
  • If you used the deliverance bonus to get your souls across, you didn't receive the camaraderie bonus, even though all three showed up at the same time (the bug happened because they show up at EXACTLY the same time).
  • When the player lost and the game was over, if a skeleton was in the middle of being possessed the green skeleton would not be removed from the screen. So if you decided to play another game, you'd have to play it with that same green skeleton in the same spot for the entire game.

All these bugs are fixed, and hopefully before anyone got a chance to play it (or at least before you spotted the bugs). Enjoy!

Happy coding,

Jon

 

 

Psychopomp goes gold. Now it's all Typhos, all the time.
November 11, 2006

Psychopomp is finally ready for prime time. And by prime time I mean people can visit my web site and play it for free...which I guess they've always been able to do. The good news is it's no longer a beta. This version has the bugs in the beta list fixed, a haunting cover image, and 30 levels of heart-stopping action to entertain you for...well it's not hours, but like several minutes. And let's be honest: you're going to play this at work when you're bored, not at home during a hard-core gaming session, so bite-sized bits of entertainment are just what the doctor ordered.

I want to thank my sister Liz for game design help. She was renting my guest room when I first starting programming this and was kind enough to play test it and give the sort of brutally honest advice that only a sister can:

"Dude, the board is too short. It's taking me no time at all to move these people around. Make it taller."
"Okay. Now what about the glyphs on the log. Do they look sufficiently creepy?"
"Yeah, I suppose...wait. Dude, one of those is a zodiac sign. Not creepy. Kinda girlie."

I also want to thank former colleague and now friend in New York Crystal Burns for a very thorough play test and great list of bugs in the beta. Things I fixed based on her advice:

  • There is a pause button! So help me, there is a pause button.
  • Souls no longer show up on the far left of the south shore. Originally they would show up so far left that, if you did risk going to get one, there was no time to react if a casket or log came from the left, so it was basically luck if you didn't get hit. Now the souls start 100 pixels out from the left of the screen.
  • The instructions now state that if you go off the screen you die.
  • Resetting the game (after the Game Over screen) no longer leaves odd souls and pentagrams behind.
  • Pentagrams no longer stop showing up after a certain (seemingly random) board.

The pentagram bug was especially troubling, as all seemingly random bugs are. If the pentagrams always stopped on the 5th board, then I could just look at the code that runs for that board and find my mistake, but this bug was all over the place, and (what's worse) sometimes didn't happen at all! After spending several hours trying to think about why it might be happening, I finally did what I should have done right away and fired up the debugger with watches on all the pentagram variables. It turned out to be a timer error that only happened under very specific circumstances. The timer limit for pentagrams is stored in a global variable that changes on certain boards. The timer that uses that limit counts up from zero to that limit and, when it reaches it, creates a pentagram and resets the timer. The bug happened when the timer just happened to be lower that the current timer limit (as it always would be), but higher than the next timer limit when the board changed.

So let's say the pentagram timer limit for board two was 400 frames and the pentagram timer limit for board three was 300 frames. As long as I'm playing board two the pentagram timer starts at zero and counts up to 400, at which point it creates a pentagram and resets to zero. The problem was that the timer didn't reset itself between boards (this gives a more consistent flow of pentagrams, so this was desirable), so if the transition between boards two and three happened when the timer value was greater than 300 (past the board three timer limit) but less than 400 (the board two limit that would have reset it), then the timer would never reach its next reset point. Since it would always be larger that the timer limit, it would keep going up forever without producing the next pentagram. I know, I know, why wasn't I checking for greater-than-or-equal-to instead of just equal-to? This problem never occurred to me, and since the timer was always going up by one I figured there was no way it wouldn't eventually equal the limit. Lesson learned.

Why did I finish off Psychopomp with Typhos so far past its release date? A couple of reasons. First, Typhos was supposed to be for Halloween. Now that it's long past that holiday, the urgency of getting it out the door has subsided. Also, while working on Typhos I would find myself thinking about Psychopomp. I like to think I can work multiple projects just as well as the next guy, but when writing code it's easier to focus on a single game, so I thought I'd finish Psychopomp off since it was the closest to being done. This way I can focus all my attention on Typhos, which I'm excited about. It's nearing beta, so I'm hopeful that I can have it done shortly here.

So take Psychopomp for a spin when you get a moment, and stay tuned for more news on Typhos the Plague-Spreading Clown.

Happy coding,

Jon

 

 

I am a big, big, big, big dork, and I'm okay with that.
October 29, 2006

It all started innocently enough. I saw the television commercials for The Source Comics and Games and was intrigued. According to the advertisements, this place sold everything from role-playing games to anime DVD's to manga to art books to miniatures. As an anime fan and art book collector I sometimes have trouble finding everything I'd like in the Twin Cities, so I always get excited when I find out about another specialty store like this. Don't get me wrong; Dreamhaven, Magus, and Big Brain Comics are all plenty good, but they can only hold so much in-store inventory, so I sometimes come out empty-handed if I'm looking for something specific. And I'm sure I could find all these things on the Interweb, but I like browsing stores and asking questions of the (usually very knowledgeable) staff. Half the time after having a fun discussion with one of the employees I will have learned about a new artist or DVD series that I'd never have found if I limited my shopping experiences to clicking hyperlinks and "Purchase Now" buttons in a web browser. In order to keep these brick-and-mortar stores in business, I actually give them my money. If shopping there means dealing with occasional inventory shortages, then so be it. So, having seen these commercials, and having a need to find some new art books, I thought I'd give this store a try.

Walking through the doors was like stepping back in time to a whole different part of my life. You see, back in grade school I was a Dungeons & Dragons player. Me and six or seven of my friends would get together on weekends and play until like two in the morning, subsisting on frozen pizzas, potato chips, and gallons and gallons of Coke. It wasn't the healthiest of leisure activities, and if girls had mattered at that point in our lives I suppose they would have shunned us, but it was a fun diversion and an excuse to get together and hang out.

As we got older we would still get together, but the activities changed. We would intermingle an evening of D&D with watching Star Wars, Monty Python, or a few episodes of Dr. Who. Eventually the D&D stopped altogether (this might have signaled the point at which girls started mattering, and maybe we were smart enough to realize that our favorite hobby was like girl repellent). At any rate, while the friendships remained, the D&D games did not. For several decades this didn't bother me, but after walking into this huge store, it started to.

I initially went about my art book mission (failing to find the titles I was after), then checked out the anime DVD section for any neat titles I had somehow missed. Finally I decided I'd take a stroll down memory lane and visit the role-playing game sections of the store, and that's when nostalgia got the better of me. Not only did I find the latest versions of all the famous D&D tomes, but this store had a special used section with the older versions, including the ones I had used when I was younger. I very nearly dropped $10 just so I could revisit the first edition Fiend Folio I used to lug around to each game (the one with the Githyanki on the cover). Instead I told myself I'd buy a full set of seven dice just to have around as decoration and remind me of simpler times.

But the game developer in me was still fidgeting. I had my dice (cool ethereal green marble with white numbering) and was ready to check out, but I started to think about a possible missed opportunity. D&D is a game that's famous for its depth of play, extensive system rules (and documentation to match), and open-ended adventure possibilities. I decided that re-learning the rules of this game would help me see how the pros go about making something fun, deep, and with enough complexity that the replayability is almost unlimited. That was how I rationalized dropping $60 on the latest editions of the Player's Handbook and the Dungeon Master's Guide. Okay, that and trying to impress the chick wearing the "I [heart] Nerds" t-shirt.

Having spent some time with these books over the weekend (and rolling my new dice for added effect) I'm glad I bought them. I'd forgotten how much work went into thinking about everything from the subtle mechanics of combat to the lore of why elves don't get along with orcs. If you want deep game play, you have to provide it in every aspect of the game, and the latest incarnation of D&D succeeds admirably. I do wish I had picked up the Monster Manual though, because that plus the two I own make up the core rule books, and it would be nice to read about the various enemies the designers came up with.

Luckily for me, next weekend is national D&D day, and The Source is having a big sale along with other cool stuff for the gaming community, so I think I'll head back over, pick up the Monster Manual (and maybe some more dice because they're neat), and experience more of the gaming scene. Will this cause me to start playing? I don't think so, but I'll never say never. I'm an Oblivion nut, and it would be hard to go from computer back to paper, but it might be fun to relive past glories and remember why I dug this game so much. I mean hey, I bought the dice.

Happy coding,

Jon

 

 

Performance hits and pause buttons
October 22, 2006

It's now a week after Typhos the Plague-Spreading Clown was supposed to be done, and here I sit on a Sunday writing code instead of watching a football game or a NASCAR race or whatever the hell else those of us without cable are forced to watch on Sunday afternoons. For the record, I'd rather be writing code than watching a bunch of cars turning left a few hundred times. Oops, did the Formula One snob in me show a little bit? Sorry. I just fail to understand how NASCAR is so wildly popular while Formula One is treated with the same respect as soccer (which is to say, none). Here is a short list of things Formula One drivers have to do that NASCAR drivers do not:

  • turn right
  • shift gears ON THE TRACK (pit road doesn't count)
  • go 220 miles per hour
  • continue racing even if it's raining
  • drive on a course whose shape is more complicated than a circle (hence that whole turning right thing)

Sorry. This isn't about how cool Formula One is. I just had to get that out of my system.

I'm programming because I'm trying to add more bells and whistles to this game without hurting performance too much. The game already runs a little too slow as it is, and it's not done yet, so a reduction in frame rate may be in order. Hopefully it will be seamless. If I drop the frame rate from 30 to 24 and increase the movement rate of Typhos from 4 pixels-per-frame to 5 there should be no difference in movement from a pixels-per-second perspective, although lower frame rates make things look choppy. The goal would be to make sure everything is getting done by the time the next frame has to be drawn, and right now that's not happening. My latest speed hindrance: the pause button.

If you look at the Psychopomp beta you'll find that there is no way to pause that game. As my friend Crystal was quick to point out, if you are engrossed in a game and the phone rings, you will have to either surrender the underworld to the forces of darkness or hope whomever is calling leaves a message. Pressing "P" does nothing. Normally I would have finished up Psychopomp before starting another game, but Typhos is a Halloween game, so it needs to be done fairly quickly or it won't make any sense (from a holiday standpoint anyway. I'm not sure a clown delivering the plague to innocent townsfolk ever makes sense, but it sure is fun). The delivery of Psychopomp, on the other hand, is more flexible, so Typhos gets a pause button first.

The trick with a pause button is getting every entity in the game to be aware of it with the least amount of computational load. In the age of gigahertz clock speeds it seems silly to have to worry about how many "if" statements you're using or whether your loops run as fast as they should, but Flash's performance is such that you really do end up thinking about things like that. Speed of hardware makes it easy to get sloppy. You could write:

if (Key.isDown(Key.LEFT))
{
move_rate_x = -speed;
}
if (Key.isDown(Key.RIGHT))
{
move_rate_x = speed;
}

and you'd be okay. If either one of these keys is pressed the game will behave properly. The problem with it is that you're always checking both states, but no one will ever be pressing both of those buttons at the same time. If you replace the second "if" with an "else if" you will be doing less work whenever the user presses the left key because the right key won't even be checked ("else if" is only checked if the preceding "if" is false). Again, this optimization is positively silly in most programs, but can make a small difference in Flash. Coming up with lots of small differences can mean 30 frames per second instead of 24, and that is a difference users will notice.

The pause button ends up adding an if statement to every moving thing in the game:

if(game_paused == false)
{
//do stuff here
}

so that things only happen if the game is not paused. My test system has 20 moving things on the board and everything still seems to be reasonably fast, so I don't think this method is a bad way to go, although I'm trying to find a way to make it so that each clip doesn't have to poll the game_paused variable every frame. I'm thinking it will have something to do with nullifying each clip's onEnterFrame function so that it does nothing, then replacing it with the original function when the pause button is pressed again (restoring the game). Hey, I think that just might work! I'd better go type that in before I forget it!

Oh wait. NASCAR's at Martinsville this week. Martinsville is one of two really short tracks on the NASCAR circuit (Bristol is the other, for you short-track nuts out there), which means that this week there will be the added excitement of watching them drive really slowly while turning left. Tough call.

Happy coding,

Jon

 

Thankfully my coworkers are as twisted as I am September 28, 2006

Anyone who's looked at my Flash portfolio or my 3D gallery knows that I love Halloween. And not in any healthy way either. I'm filled with the urge to spend lots of money at Target, Michael's, The Quilted Bear, and any place else that sells overpriced Halloween decorations and candy. I have a sickness, and they don't make a pill for it. They do, however, make five-pound bags of mini Snickers bars this time of year, so I'll be taking those until a pill does come along.

Part of my yearly Halloween schedule includes doing something special to this web site, be it a spooky navigation or an animated story. This year I thought I'd try to make a Flash game with a Halloween feel to it, but I needed inspiration. I spent the better part of last week trying to come up with good ideas for a game I could write in three weeks, and got nowhere. I even bought Tim Burton's Sleepy Hollow to try to get the creative juices flowing, and still nothing. Little did I know I work with people who share my odd sense of humor and my complete disregard for what might or might not be offensive. Let me tell you how this year's game came to be.

Earlier in the week Andrew and I were shooting the shit. Andrew is a fellow computer RPG'er (he's partial to Morrowind and I'm addicted to Oblivion) and we talk gaming quite a lot. I mentioned my design conundrum and within 30 seconds he had the name of the game and the premise. The game should be called "Typhos the Plague-Spreading Clown" and you should play a clown who tries to spread the plague. Brilliant! The fact that your goal is to cause suffering on an epic scale is so very Halloween. That you're doing it in a clown suit is the icing on the cake. Plus, I can't even say the name of the game without chuckling. It's perfect. So I set about creating a design around this wonderful idea.

Later in the day I was trying to come up with game elements that would challenge your ability to spread the plague and was coming up blank. Drew cruised on by my cube and I excitedly showed him the game title and asked him what would thwart my efforts to spread the plague. He reached the conclusion any reasonable person would reach when faced with that problem: people need to somehow start on fire. The town would have fire pits, and those stricken with the plague who didn't flee the town would heave themselves into the pits to end their agony. If they die, they can't go to the next town and spread the plague further. This is bad for you. So you need to infect people, and then keep them out of the fire pits after you've infected them. Who knew that human combustion would be the key to adding balance to this game?

The game was filling out nicely, but I needed a reward system and something else that could actually kill the clown. You need to feel as though you're in danger during this game, otherwise it won't be any fun. Enter Crystal, who is on the New York half of my project team. She's what you'd call a traditional female gamer (Zelda, Tetris, Mario, etc.) except for the fact that she's the only woman I've ever met who loved playing Doom (easy fellas, she's married). I hipped her to the design so far and she added some period-specific ideas, since credibility is important here. First of all, there would be rats running around that, if you infected them, would grant you an extra life (they'll be fast and small, so this won't be easy). Why would you need an extra life? Well, Crystal's other idea was to have people trying to douse you with burning oil to kill both you and the plague you carry. If you're set ablaze, you have to get to the Unholy Witch-testing Pool™ within a set amount of time or you'll die.

I think this is a pretty cool game design, and the design exists only because my coworkers had great ideas that spawned other great ideas, and there was no fear of offending anyone. I think self-censorship is the great idea killer. I think when you start worrying about how others will perceive you when you put yourself out there, you start dumbing it down to the point where it's not unique anymore. Is having a character who traditionally entertains children running around giving people a deadly disease a little dark? Sure, although I'm not exactly breaking new ground here (see Poltergeist, then read It). Is the pool thing going to piss off Wiccans? Maybe. The Wiccans I know have great senses of humor and could shrug it off, but what do I know about the greater population? Nothing, and it doesn't matter. The second I start thinking about that stuff the clown becomes a medic, you're helping people instead of hurting them, and nobody needs the pool because nobody is catching on fire. The feel-good Flash game of 2006? Maybe. A unique Halloween game that will have you chuckling as you wince? Not even close. Since I'm going for the latter, I'm thankful I work with people who have a unique perspective on what's funny, can riff on an idea to make it even better, and who know that the only possible reaction to being given the plague by a clown is to run screaming into a pit of fire.

And it doesn't end there. During these design discussions Nick, who to his credit is not a gamer at all, came up with the design for my Christmas Flash game: Jingle the Poo-Flinging Reindeer. I've gotta go and fire up Flash. Heh, fire up. Indeed.

Happy coding,

Jon

 

I should not be allowed anywhere near electronic equipment
September 15, 2006

I took the week off from work to get some side projects done, one of which was replacing the internal battery in my Korg M1 (see New Tricks, Old Dogs, And Bad User Interfaces for why). While I had considered paying someone to do this, I ultimately decided that I was avoiding doing this myself based on fear, and the only way to conquer that fear was to open this sucker up and try not to break anything.

Thankfully Korg UK still provides a set of instructions for those of us dumb enough to try replacing this battery ourselves, and this proved to be incredibly helpful. I can honestly say I would have destroyed this classic machine were it not for a few sentences telling me exactly what to do.

Korg M1 Open

After removing the bottom panel I was staring this in the face. Just like Korg's documentation said it would look and a little less intimidating than I thought it would be. From here it's a matter of removing screws, unhooking two wire groups from neighboring boards, and flipping the main board over. Before I go on, I'd like to list a few things that are definitely NOT listed in Korg's documentation as things you ought to try in order to remove a circuit board screw:

  • Use a really old screwdriver that's way past its prime so you ruin the screw head.
  • Give up on the old screwdriver and try a drill with a screwdriver bit which you think will somehow grab the mangled screw head better, but actually won't get any traction and will grind out what was left of the screw head, leaving you with what amounts to a threaded rivet.
  • Go back to the bad screwdriver and try to drive it into the screw head with a hammer in hopes of somehow getting enough traction to turn the screw.
  • Try gripping the sides of the screw with pliers and / or a wrench in order to turn it. Every time you slip, be sure to hit and scrape the circuit board.
  • Use friction tape (sticky on both sides) attached to the old screwdriver (and later, with the drill) trying to generate enough friction (hey, that's why they call it friction tape, right?) to turn the screw.
  • Finally, in an effort to move on with your life, find a drill bit that is the diameter of the shank of the screw and bore out the head until it pops off like the top of a dandelion.

 

Battered ScrewHere's what the screw looked like just before I popped the head off with the drill. See the nice smooth green surface on the parts of the circuit board that aren't near the screw? That's what the part near the screw looked like before I started trying to turn the screw with pliers. My dexterity isn't everything I hoped it would be. Luckily this is the underside of the board, and I don't think I removed any of the solder in my spastic attempts at holding onto this tricky little bastard with my needle-nosed beauties.

 

 

 

 

 

 

 

 

 

Circuit Board Peeled BackFinally, after getting everything apart and managing not to sweat all over 20-year-old electronics (okay, I was nervous), I was able to peel back the board.

I'll warn anyone else trying this that, while disconnecting the wiring group from the board closest to the keys is no problem (it's big and you can get your hands in there), disconnecting the other wire group is a pain, and this is where I almost blew it.

For the big easy grouping you remove the whole housing, so all that's left on the board are pins and a white base. For the smaller wire group, half of the housing is actually part of the board, so if you grab too far down on this white piece of plastic you will yank the soldered end of the housing right off the board. I got lucky and realized my mistake before I did any damage, but there was some white residue on and around this spot on the board, so I'm wondering if the previous owner made the mistake I almost made and had to repair it himself. There's a clear break in the plastic, so grab above that and you should be okay.

 

M1 BatteryVictory! All that blood, sweat and cursing just to find and replace this little battery. Luckily these batteries last five to seven years, and Korg kindly chose one of the most common batteries on the planet (a CR2032. I chuckled when I discovered that the CMOS battery for my year-old Dell is the very same battery) so it wasn't hard to buy a replacement.

For any other M1 owners who stumble onto this site while searching for battery replacement advice, here are all the files I've collected that involve replacing the battery and restoring the factory sounds.

 

 

 

Battery replacement instructions from Korg
Factory M1 sysex file
Factory M1 MIDI file
Readme for using these files
Sending sysex files using midiox

 

Happy rendering,

Jon

 

 

Getting your Apple to help your PC render in Maya
September 12, 2006

I have two main computers on which I work: my workstation is a Dell Dimension and my laptop is an Apple iBook. I won't bore you with the technical specs of these computers. Suffice it to say that the Dell is built for heavy graphics work and is much faster than the iBook (even Steve Jobs would have a hard time arguing otherwise in this case) and so Maya is on the PC.

When I first bought Maya I figured I'd run it on the PC and that would be that. Imagine my surprise when I find out that Maya 7 Complete comes with two additional rendering licenses so you can build your own render farm in your basement. Joy! I've got the Apple and another seven-year-old PC in my basement that can do some of the lifting! No... wait. mental ray (their lower-case, not mine) satellite rendering requires Windows XP and my seven-year-old, as much as I love it, doesn't begin to meet the hardware requirements of that beefy operating system. So I'm left with the Apple. Autodesk says that, while having a PC master and Apple satellite for rendering should technically work, they don't recommend it. I'm here to tell you that it can be done, and here's how you do it.

My first bit of fun was trying to use the maya.rayhosts file. When Maya starts up it opens this text file and reads in the name or address of any other computers it should use for satellite rendering. To understand why I first had problems with this you need to understand that I have this irrational fear that if I move stuff around or change configuration files too much I'll break something, so I try to change as little as possible. The maya.rayhosts file that installs with Maya has a bunch of comments in it that I didn't want to delete. I mean, what if someday those comments are the difference between a well-rendered scene and losing a contract gig? I can't imagine how that situation could come to pass, but who am I to tempt the fates?

So I try to gingerly add the IP address of my iBook (they say you can use computer name, but I think that only works if you've got another Windows machine) to that text file without stepping on anything, and I think I've got it. But then nothing happens. Oh God! Did I accidentally overwrite some of the comments in the maya.rayhosts file while I was typing the address? No. In my earnest attempt not to change anything I never moved the maya.rayhosts file to a place where Maya would find it. Of the four places Maya will look for a maya.rayhosts file, the place where that file is initially installed isn't one of them. I'm neither surprised nor disappointed by this. If you have no plans to use satellite rendering then there's no point having this file out there. If you are using satellite rendering and are not me, then you probably read the instructions and created your own maya.rayhosts file in the correct directory. For those few who may have simply done a search of the Alias directory for the installed maya.rayhosts file and updated that one in a text editor (like I did), this file needs to go to one of these four places on a computer running Windows:

User preferences folder - My Documents\maya\7.0\prefs
User application folder - My Documents\maya
User's home directory - Usually C:\
Maya installation folder - C:\Program Files\Alias\Maya7.0

Unfortunately for search-and-replacers like me, there is a maya.rayhosts file created in C:\Program Files\Alias\Maya7.0\mentalray during installation. As I mentioned, this folder is never checked, so you can't just update this one and hope Maya finds it.

The more on-line research I did, the more I realized that the maya.rayhosts file is not the lynchpin that holds Maya together, and that I could try making my own without the world ending. It's amazingly easy. Create a text file in Notepad, figure out the IP address of the computer you want to use, and save it as "maya.rayhosts" in one of the four directories listed above. My maya.rayhosts file looks like this:

192.168.0.195:7103

That's it. Just an IP address and a port number (7103 for mental ray satellite, 7003 for mental ray standalone). If I don't want to use the Apple for rendering, I change it to this and save it again

#192.168.0.195:7103

So easy even I can do it (the "#" is the comment character for rayhosts files, so this is like an empty rayhost file).

A special note for people using their Apple over Airport wireless and also using the dial-up modem in their Airport for Internet access (yes, all three of you): If you've got Internet Connection Sharing (ICS) installed on your PC with XP (so it assigns IP addresses) then you have to turn off DHCP on the Airport station when you want to do satellite rendering in the way I've described above. This way, when you turn on your Mac, it will get its IP address from your PC and they will be able to see each other. It seems odd that they wouldn't be able to see each other if they each assign their own IP addresses, but I tried this several times and this is the case. The downside to turning off DHCP on the Airport is that you can't use the Airport's modem. So you end up turning it off when you want to render and turning it back on when you want to surf the web from your patio.

Happy rendering,

Jon

 

What, they didn't have the money?
August 26, 2006

I have a confession to make: for a while there I was entirely ignoring Microsoft updates. I think I had probably gone six months without downloading any of their fixes. I was really tired of having their fixes make unwelcome changes to my setup, and I certainly didn't care about the non-critical ones, so I thought I'd live life on the edge and just browse safely with my anti-virus and firewall at my side. This worked for a while, but then they got me. All of a sudden my internet connection started failing, IE would die, and when I researched it on the web I discovered that to fix this I would have to get up-to-date on my updates. Kicked. Screamed. Downloaded.

I restarted my PC and waited while it installed the 31 (I'm not making this up) "critical" updates, hoping all would be well. I got everything going again and went to my site to make sure all things Internet were still cool. I noticed that when I initially clicked my navigation nothing happened, but if I clicked it again everything was fine. I had seen this behavior at work and assumed that it was part of some corporate security policy that you had to activate Active X components before you could use them. So what on Earth was making me have to click my own navs on my own site twice? Most of you probably knew the answer to this months ago when it actually happened, but for me it's a fairly new pain in my ass.

Because Microsoft lost a patent lawsuit filed by Eolas Technologies, they must change the way Internet Explorer opens embedded content. So if you use the APPLET, OBJECT, or EMBED tags, the items within those tags must now be activated by clicking them before they can be used. I'm a Flash junkie (though I do try to use it tastefully), so I'm using two out of three of those tags each time I put a movie on a page, and if I were still programming Java games I'd have a hat trick. Thankfully Microsoft has provided a workaround so web designers can circumvent this annoying new "feature" of IE and web users can get back to single-clicking everything.

Before I go any further I should state for the record that I am a big fan of patent and copyright laws (excluding DMCA, which takes away too much of what fair use is supposed to provide). I know the subject of software patents is a touchy one, and it's the one in which I find the most gray areas, but I haven't yet heard a compelling argument against them. I say this only so that you'll understand that my beef isn't with Eolas for filing the suit in the first place. And Microsoft can't be too angry about that considering their rather large and spectacularly well-defended portfolio of software patents. Pot, kettle, black and all that. I'm just wondering why Microsoft caved.

Typically in patent lawsuits some sort of settlement can be reached whereby the patented technology is licensed to the defendant for an agreed-upon price. Microsoft lost this suit and has to pay $500 million but still doesn't get to use the patented technology (if they were using it, I wouldn't be writing this right now). I'm wondering why Microsoft didn't pony up the dough and license this. Active X is a Microsoft technology, and the only browser on which it does not work as advertised is the browser Microsoft makes. Firefox anyone?

This weekend was supposed to be simple. I've got Donnie Darko all queued up and ready to go (the song "Mad World" is already on repeat in my head) and would love nothing more than to enjoy that movie tonight. But first I've got to write some JavaScript because someone at the company with the best-funded legal team on the planet couldn't manage what ought to be the relatively simple task of paying someone to use their invention.

Happy coding,

Jon

 

 

Borland, my love, how I've missed you
August 12, 2006

Back in the days before Microsoft Visual Studio and Eclipse ruled the land, there was a company called Borland. Borland came up with a Pascal IDE and endowed it with easy-to-use wrapper classes for the not-so-easy-to-use MFC classes. This hot little number started life as Turbo Pascal and eventually became what is now known as Delphi. Over the years that first set of UI classes (OWL) has been upgraded (VCL), and Borland has offered other languages (most notably C++ and Java). For a while there, Borland was the king of the IDE. So what happened?

First there was the Inprise deal, whereupon the company changed its name from the household name in IDE's to the name of the purchasing company which, as far as I can tell, no one had ever heard of. Someone at the company must have pointed out the lack of foresight there, because they eventually went back to the Borland name. If only all of their problems were so easily solved.

Borland then decided to get into the Software Lifecycle Management biz, which is far more profitable than IDE's. Back in my early years of grad school I remember a professor showing us Eclipse, an open source IDE that is free, followed by Rational Rose, a designer and code generator that costs several tens of thousands of dollars per license. If I was Borland and had to choose between a market where people were giving away what I was selling and a market where the markup is insane and the market is made up entirely of large, well-moneyed corporations, I know which I would choose. What's more idiotic is that Borland is among the companies that make up the stewardship board of Eclipse. I can see where their expertise makes them ideally suited to be on the board, but I don't see the point. If there's an organization out there that represents your competition, and you can either spend time working on your product or spend time helping them out, I would think you'd work on your own stuff.

So, while Borland was busy being on the Eclipse board and buying companies whose lifecycle management offerings they would add to their portfolio, they weren't busy improving their IDE's, and it showed. Over the years Borland had cultivated an image of being a credible alternative to Microsoft. Want to build something easily while not having to be assimilated into the world of Microsoft? Want to write fully ANSI compliant C++? Come to Borland. We've been waiting for you.

Instead of further cultivating this image, Borland decided to toe the line. They released an under-whelming C++ Builder update, a C# IDE, and Delphi for .NET. A couple of products that could have been hits weren't because of the way they were designed. C++ Builder X was their C++ IDE that could be attached to any number of different compilers for any number of different output systems, but it didn't come with the VCL. Now I can be accused of being a fan boy here, but I think most who have used it will agree that the VCL is one of the most productive libraries out there, and it's a major factor differentiating Borland from Microsoft and Eclipse. Borland's IDE's are great, don't get me wrong, but Eclipse and Microsoft both have IDE's that get the job done; neither of them have anything approaching the ease of the VCL.

Another unique product came in the form of Kylix. Kylix was a great idea, but it was directed at a market that didn't exist. Kylix was a RAD environment for Linux. This sounds great in theory, and back when I was considering Linux I looked at Kylix for development, but here Borland ignored an immutable truth of the Linux community: these people expect free software. They seek out free alternatives to commercial software. If they can't find an alternative, someone might even start an open source project to make an alternative. Odds are it won't be as good, but it'll be free, and that's what matters. Kylix cost money. End of story.

While Borland was busy not doing anything important and pissing off its loyal customers, Microsoft was busy coming up with .NET. .NET is the next big thing from Microsoft. It's a whole new way of looking at development. You can write one program using multiple languages. You no longer have to worry about memory leaks. Sound great? All you have to do is make all of your users download a 20-meg runtime environment. If they don't, they can't use your software. Oh, and it will almost certainly run slower than it used to as well. Why slower? Well, the runtime environment converts the intermediate language into machine instructions that can be executed by your CPU. This is exactly what Java does, and this is exactly why most software written using Java is slow. Java's excuse is that a single program is usable on multiple operating systems. The runtime environments for different operating systems make this possible.

.NET is only supposed to run on Windows (we can ignore the Mono effort here, since MS isn't leading that project). Microsoft wants to put a runtime translator between your code, which will only run on Windows, and the CPU. They do this in the name of security and better memory management. The problem with this logic is that computer scientists are trained to manage memory. I'm not saying it's the funnest part of programming, and it is an error-prone endeavor, but we are supposed to be good at this. We count our mallocs and frees, our News and Deletes. I'm not sure I want to take the performance hit of a runtime environment just so I can stop doing that. As for security, I'm not sure I need a runtime environment telling me what programs are or are not safe for my computer. I'm not sure it could reliably tell me that, and I think most people are careful enough that they don't need it. Those who aren't careful enough get viruses, and they either learn their lesson or buy better anti-virus software. Simple enough.

Why should I care about .NET? Ordinarily I wouldn't, except that Visual Studio is so .NET-centric that, with the exception of Visual C++, you can't actually compile an executable anymore. You have to compile a .NET program. So Visual C++ seems like the answer except that it's infamous for its unapologetic standards incompatibility, and I like ANSI quite a lot. Why not Eclipse? Because I used it for school and was under-whelmed. It did a fine job of compiling my stuff, but it's written in Java, and the pokiness of the interface makes that fact painfully obvious. Plus, I believe free software isn't really solving the monopoly problem, just changing the face of the monopoly holder. That and the fact that open source only gets better when someone feels like making it better (rather than when they're compensated for making it better) makes me not want to stake my commercial success or failure on such a product.

I looked around at commercial alternatives and discovered none (thanks Eclipse). I thought I had a winner in SlickEdit and the Intel C++ compiler, but it turns out you have to have Visual Studio to use the Intel compiler, so that's a bust. I wrote Intel an e-mail asking why they require that you buy another compiler to use their compiler. I got a canned response that suggested I go to the products page (from whence I came) to find the answer to my question. I'd write a blog about Intel's truly embarrassing pre-sales information process, but ranting about how big companies are out of touch with their customers seems a bit too obvious.

In the end, Borland decided to spin off the IDE business and focus on software lifecycle vaporware. The resulting company (called DevCo in all the company literature, though I think they'll come up with another name eventually) will sell single-language IDE's that will compile an executable program that doesn't depend upon the .NET runtime at all! Machine instructions from a compiler! Who'd have thunk it? And what about the VCL library dependencies? You can compile those components right into your executable, so all you distribute is your software. What a novel concept. It's appropriate that the new company is bringing back the vintage "Turbo" name to their products, because in their forward-thinking way they're taking us back to a time in development when things really made sense.

Happy coding,

Jon

 

 

Open Source Finally Bites The Hand That It Claims Never Needs To Feed It
July 30, 2006

I should start this by saying that I don't really understand the open source software movement, as a business plan I mean. I get that people like to code, like to solve problems, and like the recognition that comes from being the lead developer on an open source project. I understand why people want to know how their software works and be able to make changes without having to beg a faceless corporation to make them. What I don't fully understand is the desire to give away your hard work and, in the case of most open source licenses, let other people sell your work without having to compensate you in any way.

Understand that this isn't just some knee-jerk response to people giving away what others make their living trying to sell. I really wanted to know what the appeal was, and went about researching it. I picked up The Cathedral and the Bazaar and Free as in Freedom and read both cover-to-cover in search of a rationale for giving software away. I understood the points about making money off of support and consulting, and I got the parts about the community and how vibrant it was, and I did feel like some large corporations were part of the problem, not the solution. What I still didn't get was what would compel someone to donate their time and watch someone else take their effort and resell it. Community? No. Recognition? Perhaps, and maybe recognition gets you a better job in the commercial software world (you know, that place where work is exchanged for money?), so I can see the motivation there.

Too often I found that both books talked lovingly about giving software tools to everyone so that no corporation can hold technology in an ivory tower, while glossing over the fact that programmers need to eat and pay their mortgages. Maybe I missed the chapter that explained why food should be given away and home loans forgiven so that the software world could liberate itself. In Free as in Freedom they mention that Stallman had to use space donated by a commercial software company, and then completely ignore the irony.

I pay for all my software, so I decided that I didn't really need to find an explanation for open source. I could just keep doing what I was doing, open source programmers could keep doing what they were doing, and maybe some day I would have an epiphany and figure out why free was the way to go. Then I saw a blog entry on John's .NET/SQL Brain Dump that gave me a different sort of a-ha moment than I was hoping for.

It seems the head of the open source project NDoc (a free software program used to document .NET class libraries) has called it quits. He has given up because of an automated mail attack and lack of support for the project. And by "support" he means monetary. Let me repeat that: a man who has been giving his software away for free is quitting because the project wasn't making enough money.

He says, "...if only roughly 1-in-10 of the those who downloaded NDoc had donated the minimum allowable amount of $5 then I could have worked on NDoc 2.0 full-time." If the software is free then the minimum allowable donation is not $5, it's $0. He goes on to say, "Now, I am not suggesting that this should have occurred, or that anyone owes me anything for the work I have done, rather I am trying to demonstrate that if the community values open-source projects then it should do *something* to support them." I think he is suggesting that this should have occurred, and that doing "*something*" means donating money and / or development time, and I don't blame him. I think if a group comes up with an idea for a software project that is useful to each member of the group, and each member helps develop the software, then why have any money change hands? The problem arises when a member or members feel as though they are carrying too much of the development or financial burden on their own and that the rest of the community is taking advantage of them. This is the point at which I believe the leader of NDoc finds himself. While I feel sorry for him (I'm calling neither his intellect nor his noble intentions into question here), he needs to know that he brought it on himself.

I saw a great post in a forum about software development from a guy who had decided to release his software as open source. He likened it to spending a lot of time and money building a beautiful house, inviting everyone in, and having a bunch of homeless people show up. I think he was hoping that other like-minded individuals (other OSS coders with similar projects who would share ideas, code, and a sense of community) would take part, and what he got was everyone who didn't want to pay for software. If you price your product at $0, that's exactly what people are willing to pay. Don't expect anything from them, because you haven't asked for anything.

If you price it at $0 and ask for a donation of at least $5, those of us with a conscience will most likely give a donation. Your problem is that those of us who would have given a donation would have done so because we feel that your work has value, and we have a desire to provide you with something of value (money) in exchange for the value you've given us (your software). Why is this a problem? Because people like that generally are happy to pay for software, and usually buy their software from people who make a living at it (your commercial competition), because that software is generally better than the free alternative you're offering. These then are not your likliest customers. So, as a revenue source what you're left with are people who like to have the source code to their software and are willing to donate money, people who want an alternative to the commercial software out there and are willing to donate money, and people who don't want to pay for software. One of these groups eclipses the other two groups by a staggering margin, and it's not the ones with the money.

And so I wait. Wait for some event that convinces me that open source is a viable option. Wait for a program from the open source community that is superior in functionality to its commercial equivalent. Wait for that a-ha moment that makes me believe. Wait, because all I seem to be getting are a-ha moments that make me skeptical.

Happy rendering,

Jon

 

New Tricks, Old Dogs, and Bad User Interfaces
July 17, 2006

PROG I00 Init Prog
Battery Low (Internal)

I fired up my Korg M1 the other day and saw these two lines of text in the display. I knew this day was coming, but I had hoped to avoid it for a bit longer. You see, the M1 is a synthesizer from a bygone era. Bands like Depeche Mode and The Cure used it during their heydays (you can play almost every song on Disintegration with it) and twenty years ago it was the state of the art. One of its quirks is that the memory that holds all the program data is kept alive using a battery. Yes, an (Internal) battery, and according to the display this battery was low.

"That's okay." I said to myself. I just wanted to jam a little anyway. I'd call around for service shops on Monday and get it in before the battery died entirely. Service? To replace a battery? I know, I should be able to do this, but the battery is on the twenty-year-old mother board, they stopped making these altogether over ten years ago, and I'm afraid I'll break something. Despite the fact that it still holds the record for most units sold of any synthesizer in history, they're pretty hard to find in good condition.

So I started it up, ready to experiment with some 80's music. I had just picked up a CD full of Alphaville remixes and wanted to try my hand at Forever Young. I started to hunt around for that elusive stringy, symphonic sort of sound that all the one-hit 80's bands used. Give me "Strings!" Give me "Saw Wave!" Give me "Brass!" Let's dance in style, let's dance for a while...

PROG I00 Piano
PROG I01 Piano
PROG I02 Piano
PROG I03 Piano

Yes, all 100 programs had reverted to the same piano sound, and all 100 combinations were combinations involving that piano sound. So apparently "Battery Low" really means "Remember that cool program you made so you could play Tainted Love by Soft Cell? Yeah, that's gone. Along with all the rest of your stuff. Wanna play piano?"

So since all my stuff's gone and I'm still getting quotes for the work, I thought "What better time to experiment with this thing?" Normally I try to retain as many of the factory original sounds because they're pretty good, and if you create your own sound you have to overwrite a factory sound (permanently losing it) in order to save it. With all of the factory sounds gone, I had nothing left to lose. I was trying to think of ways to create strange new sounds and I thought, "I wonder if I could get Hypersaw out of a twenty-year-old synth." Hypersaw is something Access (think Virus TI Polar) came up with. Basically it's this wonderful sound that is achieved by playing all 9 saw tooth oscillators in unison, each slightly detuned from the rest. It's essentially the "unison" setting on some newer synths, except it sounds even better. I liked it so much I think I might have actually drooled on the display model at Guitar Center.

It turns out that the M1 can have up to eight different oscillators assigned to a combination, and you can detune each of these oscillators as you like, by percentages of one semi-tone (half a whole note). So, after twiddling a few switches and pushing some buttons I had eight saw wave oscillators, each slightly off from the one before it, in a beautiful chorus. I did it! Sort of. Playing oscillators in unison eats up polyphony, and the M1 in single-voice mode starts with 16. Playing all these oscillators together gets you down to two-note polyphony, and you can't play any major chords with only two notes. You can, however, play the meanest, fattest, otherworldliest rendition of Chopsticks ever!

Happy rendering,

Jon

 

 

The Singularity is Near St. Paul
July 14, 2006

Two nights ago I was lucky enough to attend a presentation by Ray Kurzweil; genius inventor, author, philosopher, AI and nanotechnology guru, and a large list of other things that make me feel utterly ordinary by comparison. In my defense, he's been in the industry longer than I've been alive. So he had, you know, a head start and all. Whatever helps me sleep at night, right?

St. Thomas was celebrating the twentieth anniversary of the founding of their Graduate Programs in Software school and invited alumni and professors to hear Mr. Kurzweil speak. While the turnout was good, I was surprised that it wasn't standing-room only. Sending an invitation to see the guy who invented text-to-speech synthesis to a bunch of grad school computer nerds like me should guarantee a mob. Instead it was a respectable group that included a few people I knew from back in the day, but nothing overwhelming. This is the guy who came up with omni-font optical character recognition, people! And Kurzweil synthesizers? Anyone?

Despite the fact that my fellow computer scientists had forsaken me, I settled in for a very interesting talk. He showed us the progress he had made in combining character recognition with text-to-speech by pulling out a machine that was about the size of a digital camera, holding it above his latest book (The Singularity is Near), and letting us hear what it had to say.

"Seventy-two percent of the page is visible. Upper-left edge. Twenty-three degrees counter-clockwise off-axis." This is the machine recognizing a page of text, telling the user where the text is, and how much of the text it will be able to read. Then the magic show continued as he pushed a button, a bulb flashed, he put the machine down, and it started reading aloud the page it had just snapped. Then he said it can recognize all kinds of text, so a blind person could hold this up to a menu at a restaurant, an exit sign in an auditorium, or a bus schedule at a bus stop, and it would read the text to them.

With the entire audience in awe, he spent much of his time talking about the stuff of science fiction. Except he was serious, and is developing most of these things right now:

  • Robotic red blood cells that will allow you to sprint full speed for twenty minutes without taking a breath.
  • Super high-resolution mapping of the neurons in the cerebral cortex. This is the first step (in an admittedly very long journey) towards computer emulation of a human brain.
  • A genetic engineering solution to heart attacks.
  • Robotic white blood cells that aren't stymied by cancer the way the biological ones are.

He talked about the various epochs and how science has progressed over the millennia. Funny side note: in this Catholic school auditorium no one batted an eyelash as he talked about pre-history, the big bang, and cro-magnon man. We were all scientists and business folk, so I shouldn't be surprised, but I still had to chuckle at the thought. This is the same school that retracted a job announcement e-mail to current students when they realized that the employer was Planned Parenthood.

After he finished credibly predicting the future of technology, biology, and life as we know it, he decided to wow us one last time. He started a film that showed him demonstrating his latest product. He spoke into a microphone and his speech was transcribed on a computer screen behind him. Pretty impressive, but then we all knew he had invented this technology several years ago. What have you done for us lately? And then my jaw dropped.

The computer translated the text on the screen to another language accurately and spoke it with a perfect accent in the output language he had selected. He then, and this I just couldn't believe, switched from speaking English to speaking French and the computer didn't miss a beat. It printed the French text as he had spoken it and accurately translated it into German, after which it repeated the sentence with a perfect German accent. He says we will all have this technology on our cell phones within the next decade. This guys has made the Babel fish a reality!

Continuous speech recognition, accurate language translation, discerning the speaker's language while they're speaking. Any one of these would be called non-trivial problems, which is the polite way academics describe problems that make most people's heads explode. This guy has solved all three and found an incredibly useful and commercially viable outlet for his invention.

It was a hell of a show. A life-changer really. However, as impressed as I was with this incredible showing of science gone right, it also saddened me a little. Why? Not because we can't all be as smart as Mr. Kurzweil. He's a rarity and an inspiration, and I'm just thankful that he's willing to go around and speak to ordinary folks so that we can enjoy a glimpse of what brilliance really is, if only for an hour. What saddens me is that people like this are relegated to inspiring the academics who bother to show up. There's no shortage of Americans who revere the guy who eats bugs on Fear Factor, the childish whiners on Survivor, or the twit being fired by Donald Trump. We look up to cry-baby sports figures who care only about the money, couldn't give a shit about the fans, and act like the world owes them something. We idolize business leaders who make speeches about "empowering employees" and "leveraging synergy," all the while drawing company-crippling salaries in the name of "retaining top talent." So why is it that when one of the world's great thinkers and inventors (a class of people far more valuable and interesting than any in the preceding list) comes to town to speak, there were empty seats on both sides of me?

Happy rendering,

Jon

 

 

<Yawn> Psychopomp Reaches Beta </Yawn>
July 9, 2006

Well, I spent most of my week off frantically typing code and recording sound for Psychopomp, and finally the beta is available for play. Okay, perhaps "frantically" is a bit of an exaggeration. I did take breaks to go biking, watch some kickball, play some tennis, and watch the following movies:

  • Hoodwinked - Nicely done 3D on a shoestring budget. Inspirational to those of us with similar aspirations (and budgets).
  • Dazed and Confused - It was great to see Matthew McConaughay (sp?) and Parker Posey pre-fame, but other than that and a few funny marijuana jokes, I'm not sure why everyone loves this movie.
  • The Village - Even after you know the "secret" to this movie, it's still great to watch. Beautiful cinematography, great love story, and Bryce Dallas Howard.
  • Mean Girls - This movie is so "fetch." Lohan and McAdams are great, and I'll watch anything Tina Fey writes.
  • Grosse Pointe Blank - Both Cusacks, Driver, and Aykroyd plus 80's music equals fun. And it's about hit men!
  • The Rules of Attraction - Wanna see James Van der Beek deal drugs and treat women like disposable playthings? Wanna see Fred Savage shoot up heroine between his toes while playing the clarinet and balancing a lit cigarette in his belly button? Wanna see Jessica Biel...wanna see Jessica Biel? This is your movie.

So somehow between those activities I stitched together ten representative levels for Psychopomp. As I think about the concept of a beta I don't really know if it's warranted for something like a Flash game. I mean, shouldn't I just add forty more difficulty levels and call it a day? Move on to the next project? It's not like the game is complicated enough or has the revenue potential to merit extensive testing by members of the public. And by "public" I mean the people who know about this site and know Psychopomp is in beta. So to the five of you I say, "Here's why."

On the day I released this thing I had misspelled "Camaraderie" and "Despair." Not just in the instructions, but in the game itself! Thank goodness Dreamweaver has spell check because otherwise players, upon bringing multiple souls to the far shore of the river, would have received either the "Comraderie" bonus or the "Dispair" penalty. It was only when typing (and spell-checking) the instructions that I saw this. And this was the least intrusive of flaws. Earlier in the week you could sail anywhere you wanted (off the screen) and not die, the pre-loader wasn't working, and there was no way to actually receive an extra boat, despite my instructions to the contrary.

Things break, and staring at the code for days on end trying to figure out why they break isn't always productive. Sometimes you get so close to it that you can no longer see the flaws, and that's when you have to step back and let others take a crack at it. So take Psychopomp version 0.4 out for a test drive and, if it moves you to words, let me know what's right with it and what's wrong with it. The point isn't to add quality to make the game more profitable (anyone who visits this site can play it for free, with no ads) nor is it to make a more popular game to attract more visitors, though I would love more visitors. The point of this is to get used to making quality games. To get used to criticism; to someone telling you that the thing on which you've been working for the past few months sucks more that anything else sucks, and that you suck for creating it. To learn from my mistakes (D-E-S-P-A-I-R, despair). Mostly, to make sure this game is actually mildly entertaining. Certainly not Half Life 2 fun, but something you could play at work, when you're supposed to be working but the thought of doing more work makes you physically ill. The thought of ferrying souls across a river, on the other hand...

Happy rendering,

Jon

 

 

"Line level" and the subtleties of the Sound object in Flash 8
July 4, 2006

Up until yesterday all of my work with sound in Flash had been pretty simple: record the sound in Sound Forge, import the sound into the library, load it in the code, play it in the code. I didn't have to understand the nuances of timeline control and the target parameter of the attachSound() method, and all was good.

Yesterday I decided to polish off the remaining sound engineering for Psychopomp, my first Flash game. For the first time I was working with a more complicated sound setup than usual, and I hadn't yet worked out the kinks. On prior projects I had simply fed the audio-out cable from a synthesizer directly into the audio-in on my sound card and recorded away. Audiophile snobbery aside, this arrangement worked pretty well. ("Serious" audio people will be quick to tell you that the fields caused by all the fans, power supplies, and other electric gizmos can introduce noise into your signal. While I cannot dispute this, the noise is minimal.) Because I wanted to expand my recording horizons I picked up a mixing board. This allowed me to plug all of my sources into the same place, then plug the mixer into the sound card.

The trick with this arrangement is that it introduces new signal amplification, and I'm still trying to find that nice place between "bitchin' sound, man" and "so that's what clipping sounds like." I'm using the Yamaha MG10/2 mixer, which includes pre-amps for four of the six sources, and to say I was confused about amplification would be putting it mildly. Yamaha includes a very helpful guide on how not to make your speakers explode, but I still managed to go overboard a little. Synthesizers produce sound at line-level, which in the past has always sounded fine out of the amp (since it's, you know, amplified), but really quiet out of the computer. Even at full volume there wasn't much there. With the mixer I was introduced to my friend the Gain knob. "Hello, knob." It turns out the pre-amp is only the beginning of the amplification chain on any mixer, and after I was done getting it to my computer...clip, clippity clip clip clip.

So what does any of this speaker chicanery have to do with Flash's Sound object? Well, once I got the hang of the Gain knob, I had my sounds in Flash and was ready to play them. I stitched them into the code and played the game, and noticed that some were still a little loud. Volume, volume, volume...what say you, Moock? And Moock sayeth setVolume(int), and it was good. So I tried to twiddle the volume in code, but it wasn't working. What was I doing?

my_sound = new Sound(this);

First of all, this is just wrong. The Sound constructor requires a string that is the name of an object, not a reference to an object, which "this" (minus the quotes) is. The reason I couldn't produce a string with a name was because I was duplicating a MovieClip over and over and naming it sequentially, so putting "this" seemed like the only answer if I wanted the sound associated with the clip. And, in case you're wondering, new Sound("this") is no better. Basically,

my_sound = new Sound(this); //meaningless, so its target is the whole movie

is the same as

my_sound = new Sound("this"); //meaningless, so its target is the whole movie

Targeting the whole movie sounds good on paper until you try to adjust the volume of one clip and every clip in the movie goes to that same volume level. Then you cry a little. And then you read the book again. Moock's book explains all of this really well, but I didn't grasp it during my first reading, so I made the above mistakes, pretty much in that order. Finally I realized I didn't have to have each duplicated clip contain the sound, just that each clip had to know where it was in order to play it. So as an example, there are souls in this game. An off-screen clip called "soul_0" creates copies of itself that are used to represent them, but soul_0 itself will never be destroyed. So,

my_soul_sound = new Sound("_root.soul_0"); //muuuuuuch better

_root.soul_0.my_soul_sound.attachSound("cool_sound1.wav");

_root.soul_0.my_soul_sound.setVolume(50);

_root.soul_0.my_soul_sound.start(0,1);

This code correctly sets the volume of the soul sound, and ONLY the soul sound, and plays it. So the lesson here is that while encapsulation is nice, keeping a clip's sounds with its code really isn't necessary and introduces needless complexity to the fairly simple matter of loading and playing a sound. Oh, and go easy on the Gain knob.

Happy Independence Day,

Jon

 

 

New York State of Mind
June 20, 2006

Two days ago I returned from my first trip to Manhattan, and I think it went pretty well given my hick midwestern sensibilities and inability to fully understand the New York City subway system. I was part of a team that went there on business (I promised to write about interesting and relevant things here, and the business was neither, so I'll speak about it no more), and I stayed a few extra days to really soak up the place and see what all the hype was about.

Historically I've been unusually lucky when it comes to the view I get from my hotel rooms. In L.A. I was staring at Santa Monica rooftops and the ocean. In San Francisco it was the Fisherman's Wharf and Alcatraz. I opened my curtains at the Millennium Hilton and what did I see? Construction. Lots of it. Four square blocks of it. Then it hit me.

Oh, THAT construction.

The first thing I got to see in New York after La Guardia and the inside of a cab was the place where the World Trade Center used to be. And I would see it every time I looked out the window for the next five days. It was pretty depressing to think that all those horrifying images I had seen on TV happened three traffic lanes from my window.

How does one counteract such a depressing introduction to New York City besides eating too much and getting drunk? I don't know, so we all went out, ate too much, and got drunk. We looked at touristy things, took lousy pictures on camera phones, and for the first time in our lives the sound of cars honking became white noise. And then there were the street vendors.

Now I'd heard stories about the ubiquitous peddlers along the sidewalks, and even decided against buying the traditional fake Rolex only because it has become such a cliche that it is no longer funny. What I was not ready for was the book sellers. As we walked through the city we saw all manner of crap jewelry, knock-off handbags, and some truly bad art, but I was not sure what to think when I saw a new copy of Learning Maya Unlimited on the table. A single license of Maya Unlimited costs $7,000, so I was trying to imagine the circumstances under which this book would ever be sold. On the one hand, people who could properly be called regulars of street vendors probably can't drop that kind of money on art software. On the other end of the spectrum, I can't really picture the person buying Maya on Alias' (now Autodesk's) site and thinking, "I've spent several months' salary on this software. Now if only there were some way I could learn it. What will I do? Where can an artist like me go (besides Borders, Barnes & Noble, Amazon, and Alias' own book section on their web site) to find a book that might teach me how to use such a complex tool? Canal street? Of course! Why didn't I think of that?" Sold!

All in all, it was a great trip and, other than a little hiccup on the subways, I made it home in one piece. I've got a new favorite library (New York Public), a new favorite museum (MoMA), and a new favorite place where even at 11:00 at night it's like broad daylight (Times Square). And hey, if I ever need another book on Maya Complete, I'll know where to look.

Happy rendering,

Jon

 

 

Just who do I think I am?
June 06, 2006

Most of the web logs I read regularly offer great insight on important topics, with a little humor thrown in for good measure. Whether it's an argument for or against Microsoft, a dissertation on the dubious merits of publicly subsidized stadiums, or the possibility that Canada might be the next oil power, the more popular blogs out there are full of passionate opinion backed up by varying amounts of research. So what made me finally join the ranks of bloggers across the web? What made me think I was capable of a) passion and b) any amount of research? What do I have to say that hasn't been said by a hundred other people with blogs on similar topics?

Well, I'll try to type with a Minnesota accent. Other than my own unique take on events in the world as they relate to computers, art, animation, 3D, and the grand scheme of things, I can offer nothing. So I hope my unique take is compelling enough. After all, I'm a guy who has swam the murky waters of corporate America for the last decade and lived to tell about it. I'm a suit (at least metaphorically. I'm an office casual literally) by day and an artist by night. I've actually been in meetings where someone used the words, "leverage," "synergy," and "paradigm" in the same sentence and managed not to run screaming from the room. Having been emotionally scarred by watching as otherwise intelligent executives paid to have their e-mail boxes rearranged by a Feng Shui expert (I'm seriously thinking about getting in on this racket while the getting is good), I think my artistic perspective on the world has changed and evolved, and I'd love to share it with you.

I also hope to offer the occasional needle in the haystack. I don't foresee legions of people surfing to this site to see if I've written anything new, although that would be super. I do, however, know that people use Google when they run into an unsolvable problem, and that typically Google will point them towards some odd blog site they've never visited, with an article about the very question they had. As a guy who has been on the receiving end of that transaction several hundred times, I'll do my best to return the favor.

Happy rendering,

Jon