December 28, 2006
Anthony's Fireball for the Wii
The reason I like teaching Anthony how to program computers is that it dispels the mystery behind modern gadgets. Computers are just boxes for running software, and even though the software can seem very magical, it is not. Regular people put together software one bit at a time, just like anything else.
But one of the the funny things about making things simple enough for a third grader to learn is that Anthony seems to imagine the computing world is simpler than it actually is.
A few months ago Anthony programmed a little Python game (with my help - we used curses) that involved chasing three 'x' characters around the screen. He called his game "Gethex" and he wanted to share it with all his friends. But he was mystified about one thing. "Why can't we post Gethex on the web? You know, so you can play it in a web browser?"
To Anthony, there is no difference between Age of Empires, VT-100 games, webpages, and Wii Sports... They are all programs - once you make a program, why can't you run it everywhere?
Learning that the World is Complex
So I explained to Anthony how different platforms are different. Not all computers are the same, and not all programs can run on all computers. The entire web runs inside web browsers, and browsers can really only show documents: web pages. You can't do something like Age of Empires or Gethex in a web browser.
"I could post the code for your program on the web," I explained, "but your friends would have to have Python to run it. Or even if they had Python, they would need to install your program and run it. They can't run a game like this in a web browser. Web pages are documents that you read, and games are programs that you need to install."
But who am I fooling? At eight years old, Anthony knows that the web isn't just about reading hypertext documents. It might have been like that in 1996 when Netscape 3.0 ruled the web, but now it is a decade later, and we live in a world of AJAX and other forms of mobile code. It is easy to forget that Anthony wasn't even alive in 1996.
Sometimes when you know something is possible, you just have to do it. If we wanted to post a game on the web, we would learn the same language that was used for Dora and Bowman. We would use Flash. Flash is just another programming language. I explained to Anthony, "it's like Python, but different."
Anthony's Fireball Game
Flash does not have the simple elegance of Python, but it is certainly not impossible to learn. Nowadays, you can take the open-source route and use tools like mtasc and swfmill to assemble Flash programs out of all-text source code, for free.
So on occasional weekends, in bits and pieces, I helped Anthony put together a simple Flash game. We started with a single bouncing object, added the ability to steer it using the arrow keys, and then moved on from there.
Very quickly programming the simple game involved enough complexity that I had to do most of the coding, but I think it has been a worthwhile father-son experience anyway. Anthony designed the rules and picked the graphics; he did all the testing and found the bugs. He learned how to edit the source code to tune the gameplay, and he pestered me to write the "hard" stuff to add each feature that he wanted. ("It should pause when you press P," he insisted.)
He even sat in front of Audacity all Saturday afternoon recording a few simple sound effects for the game. ("Schwooosh," he said as he tried to make an explosion sound with his mouth. "Oh, that doesn't sound good. Let's try again.")
The end result is here: Anthony's Fireball Game. You get to play as the Sun God, and you battle it out with the Rock of Darkness. Right now there is no way to win or lose - the game just keeps score.
The World is Simple Again
So surely now Anthony understands that the world is more complex than he originally imagined. Not every program runs everywhere, and there are a lot of different computer platforms. The programs you can run in a character terminal are different from what you can run in a web browser or installed on a PC or, say, on the new Wii we got.
But then last week Nintendo sent out the Opera browser for the Wii, and Anthony and I decided to try to play Fireball on it too. We modified the game to match the aspect ratio of the Wii (Opera reports 800x500 pixels; our game seems to look best by stretching a 400x250 stage). And we added a little mouse control since the Wii has no keyboard.
It works great. The only problem (noticed promptly by Anthony) is that the "A" button doesn't respond to repeated clicks as quickly as the mouse button on a regular computer. I wonder why - I even wonder if that is an intentional limitation.... Nevertheless the game works. If you want to try the game on the Wii, just visit davidbau.com/fireball.
We are now Wii Game Developers. And in Anthony's eyes, the world no longer seems complex at all.
"Dad," he said, "we should burn Fireball to a disk. Like Twilight Princess."
Oh boy. You'd actually have to be a real licensed Nintendo developer to be able to burn a Wii disk. These game consoles are intentionally closed platforms, built on a business model that is all about licensing authoring rights to software developers. A friend of mine spent a chunk of his life designing the encryption schemes for the Xbox motherboard just to prevent hackers from hijacking the system to run their own software. The console companies justify their investment in hardware as a bet on future software licensing fees. How can you explain that sort of thing to an eight-year-old?
"How come you want to burn a disk, Anthony?"
"Just because." He smiled. He was giddy with the idea of making a game that was "real" in every way, just like Wii Sports and Zelda and Elebits. "If we burned it to a disk, I wonder what the title screen would look like."
In the eyes of a third grader, the world will always be simple.Posted by David at December 28, 2006 11:22 PM
|Copyright 2006 © David Bau. All Rights Reserved.|