Team LiB
Previous Section Next Section

Hack 43. Waste Time with Toys and Games

Amuse and inspire yourself with these decorative inventions made by bored minds.

Not everything's about substance. Sometimes, you just want to be entertained. This hack describes a few such things. Calling them fluff would be unkind, though; there's a fair bit of talent, imagination and effort at work here. Most of them won't get you a pay raise, though.

4.12.1. Messing Around with Games

Any computing environment worth its salt will eventually be able to play Tetris, or at least adventur. Firefox is no different. With lots of scripting and display technology, it's no surprise that simple games are knocking on the door. Of course, the biggest game you can play with Firefox is called "Where's that web page I forgot about?" Text adventures

You can play Zork and other retro text adventures of days gone by. The Gnusto Firefox extension uses JavaScript to implement a virtual Z-machine required for all such games. Some games are listed at Zork, shown in Figure 4-22, can be found at It's best to download the .z5 games to local disk and then open them from the Gnusto window. Don't try to load them directly from web links.

Figure 4-22. Zork I running inside the Gnusto extension Card games

The Card Games extension provides dozens of single-person card games if you happen to be snowed in over winter. Figure 4-23 shows an example of a game in progress.

Figure 4-23. Card Games extension showing game options Console games

It's also possible to play simple 2 1/2 D console games from the 80s and 90s. Dynamic HTML (and Dynamic XUL) provide a fast enough basis for the required sprites. To play these games, you don't even need an extension. Just visit the MozDev Games web page ( You can run the games online by clicking their links, or you can download the games pages to your laptop and open them whenever you want. Figure 4-24 shows Xultris, a Tetris-like game.

Figure 4-24. Xultris block management game

4.12.2. Stretching Your Wings with Gestures and Pie Menus

Pie menus aren't seen much in desktop applications, but they're common in games, ever since they were made popular in fantasy console games (change from sword to potion!). Pie menus link a mouse movement to a context menu in a way that offers fast selection. Such things are innovative enough to get you a job at Microsoft.

The easyGestures extension presents a fully customizable pie menu for your enjoyment. Figure 4-25 illustrates the default set of options.

Figure 4-25. easyGestures extension at work

Move the mouse upward sharply to see the secondary menu, press Alt for the alternate menu, or do both to amaze and confuse yourself.

The easyGestures extension is highly configurable; just double-click it in the Extensions Manager window.

Of all the Firefox extensions, gesture extensions probably sit least well with each other. By all means, try out the many excellent alternatives, such as Mouse Gestures and Radial Context, but it's probably better to have only one installed at any given time.

    Team LiB
    Previous Section Next Section