Sunday, July 16, 2006

Decent Sound on KGS with cgoban2

The two things that have bothered me most about KGS are both related to the cgoban2 java client program: sound and graphics. Considering that go is such a beautiful game played on equipment unmatched (IMO, of course!) by any other game for its aesthetic value, it always stuck me as odd that I'd be clicking down virtual stones on a drab lifeless board with dull thunks.

For reasons unfathomable to me as a programmer (considering that there is such a broad user support base around the application), the author of KGS has decided that there will be no graphical or sound-related options. So, I decided to take a closer look at the jar file in hopes of finding a simple structure of sounds and graphics which I could then replace at will.

Well, one fix is better than none...sounds are clearly to be seen inside the jar structure. Board and stone graphics are not, so I am guessing that they are embedded xpm code inside the class files. :( Oh, well. At any rate, after a bit of trial and error, I have changed the stone placement sound! If you are interested, here is a brief step-by-step.

Prework:

  • Find a stone sound you like. Personally, I love the stone click sound from MultiGo (beware, Windows only). Any wav file (or 8-bit u-law sun audio file, I think) should do just fine.
  • Make a copy of your cgoban.jar file for safe keeping. If you break anything, you can simply copy it back. For unix people, I assume you know where you installed the cgoban directory. For Windows users, check out C:\Program Files\kiseido\cgoban. The cgoban.jar is right in there.
  • Make a temporary directory and copy cgoban.jar into it.


Steps:

  • Open up a terminal window (or command prompt for Windows users) and navigate to your temp directory.
  • "unjar" the cgoban.jar file with the command:

    jar xvf cgoban.jar

    This will extract the contents of the jar file.
  • From there, copy your good sound file as:

    org/igoweb/client/swing/sounds/stone.au

    Don't worry if your file is .wav...changing the extension to .au will not hurt anything as java will still be able to open it.
  • Update your cgoban.jar file:

    jar uvf cgoban.jar org/igoweb/client/swing/sounds/stone.au

    This will replace the existing stone.au in the jar file with your new stone.au file.
  • Copy the new cgoban.jar file into place in your cgoban installation directory (where you found it in the first place).


That's it! Hopefully, when you run the app your dull thunk sounds will now be melodious. :)

PS: I would love to simply place an updated jar file here that you could download, but that would probably go against both the cgoban and MultiGo distribution terms. :(

UPDATE:

The BETA of version 3.0 has been released. Unfortunately, it includes no improvements to the graphics or sound. Fortunately, though, this procedure will still work. The only change is that, now, the path for the sound file is:

org/igoweb/igoweb/client/swing/sounds/stone.au

Note the extra "igoweb" directory.

Saturday, July 08, 2006

Bubble Breaker Game High Scores

I've been asked a few times about Bubble Breaker high scores...unfortunately, the game shipped with Pocket PCs and smartphones does not have a convenient means to share high scores. The Bubblet version does, though, so you can easily compare:

Bubblets for Pocket PC High Scores

I do question a few of the top scores, but most look reasonable.