Happy Friday, 2008 November 21 12:55 EST
This page has been visited 20 times today.
  >   home   >   projects   >   java   >   applets   >   joggle
Joggle!

Joggle! The insanely addictive word game that is more popular than the MyDoom virus! Featured on Gamestalks.com, Bonus.com the "SuperSite for Kids", listed on GameJUG Arcade Page, the The WordGames Programmers Guide, HughesClan, JARS, and jRoundup. Given two whole stars by GamesDomain.com!

New! A top requested feature has been added. You can now create and solve arbitrary board layouts. This means you can find all the words in, for instance, a layout from the real game (check to see if you got them all). And you can make your own layouts to challenge yourself or the computer. Here's how it works: Before pressing start, click a letter tile, then type the key for the letter you want it to be. When done, press start as normally.

This is version 1.2 of Joggle. It has been tested successfully on Windows (Internet Explorer, Mozilla, Netscape), MacOS 8-9 and Linux (Mozilla, Netscape, and Konqueror 2.1). MacOS 8 or 9 users should make sure they have the latest Mac Runtime for Java.

Screenshot

Please send bug reports and feature requests to me. For technical details, see my programming notes below.

The goal of the game is to find as many words as possible, or at least more than the computer does. Words may be formed from adjacent squares in any direction, and must contain at least three letters. The same square cannot be repeated within a word (but the same letter on a different square is okay).

Joggle Word Scoring
# of letters 3 4 5 6 7 8+
Points 1 1 2 3 5 11

To begin game play, click the board or press "Start." Input words in the text field below the letters. Words may be seperated by spaces or commas. You may also input words by clicking on squares (double clicking to terminate a word). After 180 seconds, matching words between the player and computer will be eliminated. To start a new round, press "Start" again. A game ends whenever you feel like it.

Known Bugs
Various display problems seen mostly in different versions of older Mac JVM's or on Netscape.
  • Netscape: applet stretches a bit beyond display area (top, bottom)
Solution: Upgrade to the latest MRJ, or use Mozilla or IE if possible.

Joggle is free software, released under the GNU Public License. Source code, compiled java classes, the dictionary and every thing else is available in this Java ARchive file (200K).

Programming Notes

I wrote this mainly as a programming exercise to learn Java threads, but also as a trainer to become a better joggle player (I was addicted for a while). At the heart of the code is a simple, fast recursion algorithm (see the class JoggleBoard). Certainly that could have been more cleanly designed (I wrote it between midnight and 2 am on a Saturday night), but it works well.

Dictionary lookups are done with a fast binary search algorithm, and cached in a Hashtable (see the CachingWordList class). It does take a meg or two of memory and a small bit of load time to make a Vector out of the WordList (a random-access data structure would be a better choice), but it seems to work well.

The object design is pretty clean, with a healthy use of inheritance, and using the Observer-Observable to do a simple game event model. It took two days to write all the classes, get everything working, and about another two days of bug fixing.

If you'd like to contribute, the main thing that's needed is corrections to the dictionary. The dictionary file is "words" from GNU/Linux, with some changes (mostly missing words, removing names, proper nouns, and two-letter words).

Also, it'd be cool to get new letter images. I have ray-traced these in POV-Ray, using the true-type font "Comic Sans MS". The images should be no larger than 75x75, and have about a 5 pixel white border, and don't forget the "Qu" square.

I'd also like to try alternate languages sometime. The main requirement is a good dictionary, with plurals, and of course an understanding of letter frequency so the die set could be changed appropriately. Update: the ispell dictionaries are apparently free (and free of copyright) and have the appropriate information. It would be very easy to add in this support.