The Microsoft Agent software offers a unique way for you to differentiate your application from the competition. While adding the code to display an Agent and letting him speak isn’t difficult, planning how to effectively use the Agent is. Agents shouldn’t detract from the main purpose of your application; they should somehow augment what the application is trying to do. For example, Agents would be useful as helpers in showing people how to accomplish something. You could have the Agent move to various locations, push buttons, or make text appear. You could also use the Agent characters to help challenged users by reading the contents of various fields and captions and accepting spoken commands.
You should consider this chapter as only an introduction to the Microsoft Agent software. There’s a lot more that you can do with this technology. For instance, it is very easy to incorporate Agents into VBScript code, so web developers can easily add Agents to their web pages. In fact, if you are using an HTML-capable e-mail program such as Microsoft Outlook or Outlook Express, you can even add Agents to your e-mail messages so that they could read the message to the recipient.
With the proper programming, one Agent could be shared among several applications. After all, people generally have only one application active at a time. You may have noticed that Microsoft Office 97, Excel, Word, and Access all share the same little animated paper clip. This saves memory since each animation takes between 2.5MB and 3.5MB of disk space. It also saves other system resources.
The I’m Thinking of a Color game I presented here could use a little work. I didn’t go through the entire program in this chapter, but I did cover how everything works. The rest of the program is similar to the PlayerWelcome routine, where I control how the players interact with each other and the host. The hardest part was trying to coordinate the interaction between the human and the various Agent characters, and I showed you how to do that. You can review the complete program on the CD-ROM.
You could improve the game by incorporating the ability to add and delete colors and putting in an ImageCombo control to display a graphic of the color next to the word. It would also be nice to keep score. I had originally envisioned a nice scoreboard similar to the classic baseball scoreboard with the player names, the score, and maybe a series of scores for each individual game with the number of guesses that it took to get the answer. You might even be able to configure the number of rounds that would make up a single game.
Another improvement would be to add more animations and different actions for each of the characters, especially those that aren’t input-active at the moment. This might be something like blinking eyes or looking toward the character who is speaking. Also, you could add some background music similar to what Jeopardy uses. And thinking of backgrounds, since the characters float on top of whatever else is on the screen, it might be nice to put up some sort of background so the user doesn’t see just the normal Desktop.