Tuirgin

HOWTO: Chess Diagrams with Aquarium

by Tuirgin on Apr.10, 2009, under Chess

The Chunky Rook had a good idea. He is creating animated chess diagrams using the new UCI/Winboard interface, Aquarium. ChessOK sells the Aquarium interface bundled with various versions of Rybka—if you opt for the freeware version of Rybka, your price for Aquarium is only $25. That’s pretty affordable for the range of analysis and documentation tools it provides. In the remainder of this post, I’m going to show you my workflow for producing diagrams and animations using Aquarium and—for fancy stuff—an image editor.

Let’s get started!

Collect Your Images

The first thing you need to do is collect your images, so go ahead and fire up Aquarium. Once Aquarium is open you can set up a board position or find an existing game you would like to use for your images. Once the position you want to capture is on the board you have two options for getting an image from it:

  1. Copy an image of the board to the Windows clipboard, after which you can paste it into a program or file of your choosing.
  2. Save a bitmap image of the board to a file, which can be opened and edited as needed.

To copy an image to the clipboard, make sure you are on the Home - View tab of the Aquarium ribbon, and select Board Image. You may then paste it as you would any other data from the clipboard.

Copy Board Image to Clipboard

The method I prefer is to save an image to a file. There are a few reasons why I prefer this method—for one, I can zip right along a series of positions without having to switch back and forth between Aquarium and my image editor; another reason is that when saving to file, the size of the image is configurable. I use relatively small diagrams: 256×256 pixels, however by default Aquarium’s saved images are 1024×1024 pixels. To change this go to the folder where Aquarium is installed and find the BoardImages folder. Inside this folder is a text file named picsize.txt, and within this file you should find a single integer: 1024. Change this number to whatever size you prefer. A couple notes at this point: even though I have my file set to 256, the images I get out of it are 252 pixels—who knows why, and who really cares?—secondly, for whatever reason I had to delete and recreate this file from scratch before it worked properly. Once you have the picsize.txt set up the way you want, you are ready to start saving images.

This is really complicated. It’s so complicated you might just break something. Are you ready? Here we go… Right click on the board and select Save board image. Shew! Did you survive? You’re still with me? Good. Save Board Image to File (bmp) Remember that folder where the picsize.txt file lives? You can go back there now to see all your position images. Move them wherever you wish, then fire up your image editor if you need to do any prep work on them, or to save them to an animated GIF.

Before we move on to editing, I should mention some of the annotation and diagram features of Aquarium. It supports all the normal annotation features you would expect, plus colorful arrows, boxes, etc. The best idea is just to click on the Comments tab and play around with the options.

Annotation

These tools alone give you enough functionality that you can produce attractive static diagrams for your website. But what about those cool animations? It’s pretty easy, actually. I’ll show you one way to do it using freely available open-source software. And no, it doesn’t hurt.

When I Say Dance, You Best Dance, Mother&@#$%^!

How do we make the images move, you know, when the Violent Femmes aren’t around to… encourage them? You have to have a program that can take a series of images and combine them into an animated GIF. There are lots of tools that you can use to do this, but I’m going to use Free Software. I’m going to use the GIMP.

The GIMP, which stands for GNU Image Manipulation Program (GNU stands for GNU is Not Unix. Geeks like recursion, what can I say?), is a cross-platform image editor, which means that there are versions available for Unix, Linux, Macintosh, and Windows. The most well-known program in the same category as GIMP is Photoshop. Photoshop still has a lot of professional features that GIMP doesn’t have, yet, but GIMP is the 2nd most powerful image editor I’ve used. It’s certainly worth many times the price of admission: $0.00.

To create an animated GIF with the GIMP, you’re going to go to GIMP’s File menu and choose Open As Layers, then browse to the series of images you saved, highlight them all, and click Open.

GIMP: Open As Layers

Next you’ll go to the Filters menu to Animation, and finally to Optimize (for GIF). This will make a few changes to our layers, decreasing the overall file size, and preparing them for animation.

GIMP: Optimize for GIF

One of the more significant changes for our purposes is the time-delay argument that the optimization adds to our images layer names. By default the GIMP uses 100ms, which is way too fast for chess board animations, so consider changing the names of your layers to something around 1000ms (1 second). I like to set the first and last layers to 2000ms or 3000ms so that there is a delay before the animation loops through again.

GIMP: Layers

To test it out, go back to the Filters\Animation menu, and choose Playback. You can either play the animation sequence, or step through frame by frame to make sure everything is the way you want it. If the delay needs to be changed, you can go ahead and do that now, and try it again, repeating as needed until you have the settings you want.

When everything is right, you will go to the File menu and choose Save As, and change the file extension to gif. Once you click Save, the Export File dialog box pops up. You need to pay attention here. If you do not select Save as Animation the GIF will be flattened and there will be no animation!

GIMP: Save As Animation

Select Save as Animation, then Export. There is another dialog box that pops up, but if you have already set the time-delay the way you want it you can continue on to completion.

Congratulations! You have an animated chess diagram!

Aquarium Animation

:,

23 Comments for this entry

  • CMoB

    Cool! Thanks, i’ll go download Aquarium now ;)

  • CMoB

    Or not :roll:

    I thought it was freeware. I’m not really willing to pay for something i won’t put to good use.

    • Tuirgin

      Not freeware, nor open-source, but it’s only $25 and has a lot of analysis and documentation features–I might post something about the i-book features, eventually. I got mine as the free bonus app when I bought two training titles from ChessOK.

  • Farbror the Guru

    Very interesting! I will take this chance to confirm my position as Top 10 on the list of computer illiterates: Then what? Do I post the output file as any old picture at my blog?

    • Tuirgin

      Yep, once you’re done you have image files that you can post just like any other. I should probably have better noted that the save to file feature produced *.bmp files, which should be converted to PNG, JPG, or GIF before posting to the web. GIMP can do that for you if you don’t have a different utility to take care of conversions.

      But if you follow the directions for animation, you’ll have a web-ready image file—nothing more needed.

  • Chunky Rook

    Thanks once again for putting your expertise out there. A couple of comments: - I, for one, care a lot about the correct picture size and the fact that output of picsize.txt set to “400″ is a 396×396 image drives me insane. ;) - If you copy board images directly from the clipart, be aware that you’ll get the size of the board as is, not as defined by picsize (sucks). - I still prefer using copy/paste because switching back and forth actually works faster in Photoshop than saving the files, accessing the folder, and inserting / copy & pasting them all within Photoshop. Unbelievably, Photoshop has no “insert as layers”; at least I haven’t discovered it yet. - GIMP looks sweet.

    • Tuirgin

      Yeah, what is with that tax on the image size??? Why lose 4 pixels x 4 pixels? Probably just something goofy in the code. What happens if you specify 404?

      Re: copy not using picsize: Oh, really—I actually figured it defaulted to some predefined size. But it just copies whatever size is on display? That’s one more reason to go by file, for me. I’m constantly moving things around.

      re: Photoshop: You can select a group of files and drag and drop them into an open image file in Photoshop. That should do the equivalent of GIMP’s open as layers.

      GIMP has come a long way. It’s been a powerful program for years, but back when I first started playing with it you couldn’t see the effect of any of the filters you were using until after you’d applied them… drove me NUTS. My favorite feature from Photoshop that GIMP doesn’t have are the adjustment layers. I have a hard time living without adjustment layers when working on photos, but I get by just fine on the chess files.

    • DJ

      > output of picsize.txt set to “400″ is a 396×396 image drives me insane.

      This is fixed in the upcoming Aquarium 3.2 version.

      Btw. after the release of version 3.2, Tuirgin’s excellent tutorial will be obsolete ;)

  • chess?

    so let me get this straight. aquarium is the same as the over priced chessbase software? you da-man!

    • Tuirgin

      Well, no… Chessbase is a fully featured chess database manager. It allows kibitzing, gads of databases, and all kinds of features for working against databases. Fritz, by Chessbase, is their UCI interface which you can use to analyze games, but it doesn’t have very many database features. It seems like Aquarium is somewhere in between. You can only have two databases open at a time: your working database and a reference database. It’s real focus is engine analysis. Over time they will be adding more database features to the product, but they have said it is probably not the software that will replace their Chess Assistant. Aquarium also, as I’ve mentioned, has documentation features that are pretty nice. The i-book feature which is still in early stages but in active development looks quite promising as an alternative to Chessbase’s multimedia documentation features.

      So in summary:

      A) Aquarium is a chess engine interface

      • Play against UCI engines with a wide range of features, including various ways of handicapping the engine
      • Use engines to analyize full games, and deep analysis of individual positions. The novelty here is IDeA which is a user influenced deep analysis, which saves the entire analysis to a tree. This is another fairly early feature, but definitely in active development

      B) Aquarium is a documentation tool

      • i-Book is an html/wiki-like electronic documentation format which allows multimedia, diagrams, and a fairly robust way of interacting with games in a database
      • Game annotation exportable to PGN, HTML, or RTF, allowing diagrams (when printed or exported to HTML or RTF), and the full range of NAG glyphs
      • Exporting of board images (as discussed in my post) for documenting in whatever 3rd party documentation system you choose.

      C) Acts as a client for ChessOK’s server-based chess.

      If you’re interested in a free chess database with a large range of features, try out SCID.

  • tommyg

    WOW! So I purchased aquarium standard because of various things I have read about it(not just on your blog..) and I was really excited to use it as analysis tool and play against it. BUT MAN was I disappointed. The GUI has a lot of bells and whistles but when it comes to down to getting to work it is extremely unfriendly (in my opinion anyway). I should have stuck with Shredder (which I am going to do). Shredder’s interface can’t do some of the neat publishing tricks but it is VERY user friendly for getting down to some hardcore analysis and work. (I am venting a little) Am I missing something about Aquarium?? I am VERY open to the possibility that I am indeed missing something. (Which is another beef of mine, their documentation is somewhat cryptic)

    • Tuirgin

      For help using the software try their forums. Not the ChessOK forums, but the Rybka forums. I’d give a link but I’m posting by phone.

      The new analysis features are still in a pretty early state, as are the i-book features, but development is active, and the forums are pretty helpful from what I’ve seen. I’d definitely check in there for some help and perspective on what it does and where it’s headed before chucking it. I use SCID for most things, myself, but like the documentation features that are developing in Aquarium.

  • tommyg

    Thanks I know the link for the forums. I have been messing with the program for an hour or so and now I don’t know if I trust the analysis! I played a game against it and blundered on purpose but it didn’t catch all of them as blunders during the blunder check (that is the most I have ever used the word blunder in one sentence!!). After I play a game against the computer it changes the rating of that engine and I get the feeling that somehow affects the analysis.

    The Analysis with Shredder is much more intuitive but the GUI doesn’t look as pretty. I am not ready to give up on Aquarium but I have already emailed them requesting a refund. If they do offer me one (which I doubt) I will just upgrade my Shredder engine.

    Now it is off to another fun piece of software–Taxcut! :)

    We should play a game on Chess.com sometime if you are still playing at the site.

    • Tuirgin

      I can’t tell you much about the analysis features as I haven’t spent much time with them. I haven’t been doing analysis on my games of late. I keep meaning to do my own analysis then follow up with computer analysis, but, well, there’s only so much time in a day.

      I do know, however, that the analysis which you are talking about is configurable. You can set how duration and/or how many plies to analyze on first pass and second pass for blunder checking, and you can also configure the threshold of what it will report as a blunder. This is documented in in the Help file under Game Analysis in the Quick Tutorials. The documentation on this, at least, seems thorough, though not much like a tutorial.

    • Tuirgin

      Also, I do still play on Chess.com. I keep an account on both Chess.com and SchemingMind. My nickname at both places is “Tuirgin” so feel free to look me up and challenge me.

  • tommyg

    Sorry to be bothersome..but how would I use the html publishing feature to post a game or link of a game to a blog? I have figured out how to use “dynamic html” but I don’t know how to actually get it onto a blog. I have searched the forums and help menus and manual.

    Thanks for putting up with my questions. I have a tendency to get frustrated with software pretty easily. I like good lucid manuals which seem to be a dying art form these days.

    Tommyg

    • Tuirgin

      The Publish tab in the ribbon has Save as HTML and Save as RTF. Check the Options for settings you can change.

      Once you’ve exported, you’ll have to upload to a web server. You can link from your blog, but posting within your blog would be tricky (though not impossible) due to the use of frames.

  • tommyg

    WOW! The makers of Aquarium are going to give me a refund!! That is impressive. I have already deleted it off of my computer. I am going to stick with Shredder. Aquarium was just so uninviting to me. I was able to get to work right away with Shredder and playing games was more inviting as well. Shredder’s interface is just much more intuitive But that is just my opinion and it is great that there are so many different programs to choose from.

    I MAY buy the Rybka 3 engine as a standalone and use it with my Shredder interface since Rybka 3 is such an outstanding engine. It was Aquarium that I found uninviting.

    Anyway thanks for your help! I will look you up on chess.com

  • chessx

    Tuirgin you are the man, you should get a fee from the makers of Aquarium. I downloaded a free copy a while ago but like tommyg i could not get on with it. It is good to hear from tommyg again,he used to be on blogger hope he is doing ok.

    • Tuirgin

      I can’t say that I really think that the ribbon is a massive improvement to UI design. I prefer buttons to be out of the way and to use keyboard shortcuts for as much as possible, myself. I’d agree that the program isn’t exactly intuitive, but in the long run I hope they have success with it. Chess programs need some new ideas and Chessbase definitely needs strong competitors.

      • tommyg

        I agree that Chessbase needs competition! I wasn’t all that keen on their interface either. That is why I went with Shredder’s own GUI (and their engine) last year. Shredder’s own GUI is very streamlined compared to anything that I have seen in chess base. I like streamlined. :)

  • Glenn Wilson

    Cool. Thanks for the tips.

    You can do something similar (but different) using http://chessflash.com/chessflash.html with “Board Only” checked. It is not animated, but you can click through the diagram. For Chunky Rook, on wordpress, ChessFlash is not an option (at least not that I can tell).

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!