Category Archives: Chessmonk

Updates

Lua Gtk Engine

I’ve been working on a Lua based scripting engine for Gtk themes. Right now it isn’t really useful without example themes and documentation, so I will write more about it later. If you want to try it anyway, get gtk-engines from CVS and configure with –enable-lua. It still needs some work, many widgets aren’t supported yet.

For the API I’ve tried to find a middleground between flexibility and simplicity. It is based on simple drawing functions with parameters, for example: rectangle {x=0, y=0, width=200, height=200, radius=3, filled=true, color={1, 0, 0}}. Most parameters are optional. It is possible to specify both colours and gradients (linear and radial) with arbitrary colour stops. The nice thing about passing parameters like this is that you can store and modify them in a Lua table, for example:

myrect = { x=0, y=0, width=200, height=200 }
myrect.color = {1, 0, 0}
rectangle (myrect)

There is also a shape () function which takes an arbitrary number of normal and bezier points to create any shape you want. A screenshot that shows most of the current widget coverage:

Lua Engine

Writing themes like this is a lot more fun, especially since you don’t need a recompile and restart anymore before you can try your changes. But most importantly users will be able to install Lua themes like any other theme via drag and drop, instead of having to install a new engine, just because they prefer their Clearlooks to have square corners… Performance seems to be completely acceptable so far. The difference is measurable, but almost neglectable compared to the actual drawing times. Lua is a scripting language that was developed with speed and size in mind, so it adds minimal overhead.

Chessmonk

For chessmonk, I decided to split up the chess board part into a separate package. Not just the display but also any chess logic will be contained in this package, so it will become easier to create different board window types. I got this idea when reading about a software called Chess Position Trainer, which is based on a similar chess board widget. This still needs a lot of work and isn’t functional yet, but if you are curious you can find it in the gtkboardview branch of the Subversion repository.

Chess Tournament

I didn’t dare blog about this before, because I assumed it must bring bad luck. 😉 I recently played a seven round swiss tournament in Krefeld and surprisingly was able to reach fourth place with a performance of over 2100 (Final Standings).

In the last round I had white against the third seed of the tournament (2060 DWZ). I didn’t really expect to win this game and reach the price ranks, but then it even became a nice miniature after my opponent made a mistake soon after the opening moves:

1.d4 g6 2.c4 Bg7 3.Nc3 d6 4.e4 Nf6 5.Nf3 O-O 6.Be2 e5 7.O-O Nc6 8.d5 Ne7 9.a4 a5 10.b3 Nd7 11.Ba3 h6 12.Ne1 f5 13.f3 b6 14.Nd3 Nf6 15.b4 axb4 16.Bxb4 Nh5 17.a5 c5 18.dxc6 bxa5? 19.Nb5 Be6? 20.c7 Qd7 21.Bxd6 Bxc4 22.Nxe5 1-0

Advertisements

Chessmonk goes Cairo

I rewrote the board view widget to get rid of the dependency on GnomeCanvas, now it only uses GtkDrawingArea and Cairo. In the process I “cleaned up” the animation code by making it automatically figure out all required animations between two positions and added piece fading and (optional) coordinates for good measure. Here is a little screencast showing it in action, of course being a gif it is not of high quality:
Board Widget Screencast

Chessmonk 0.1

Now that Chessmonk is actually very usable as a pretty PGN viewer, I decided to make a release with the intention to generate some feedback.

Get it here:

http://www.chorse.org/stuff/chessmonk/ (hosted by Patrick Schnorbus)

Requirements:

You’ll need recent PyGtk and gnome-python libraries. It also uses GnomeCanvas. Gentoo users, make sure you have the SVG loader for libpixbuf installed. 🙂

Screenshot (click for larger size):

Chessmonk 0.1

Mirage, Chessmonk Progress

Meanwhile I released a new theme and created a project page for Chessmonk on Google hosting, so it now has a SVN repository. If you are looking for a pretty PGN viewer, I strongly suggest you give it a try.

I’m not sure yet whether I will release 0.1 once I took care of the remaining quirks, or if I wait until it has a wider set of features.

Edit: Fixed the links, sorry!

On The Future Of Chessmonk

While I’m mostly doing polishing work (preparing for a first release), I’m getting a better idea about what I ultimately want to accomplish with the Chessmonk GUI. I intend to support the following tasks:

  • Viewing Chessgames – The most simple use-case, which is very straight forward. Opening and viewing PGN files already works. I also intend to add database queries in the future, so you can view a subset of your large reference database.
  • Analysing – Features I intend to add for this task are a free analysis mode, chess engine evaluation and positional database queries (like scid’s tree view).
  • Editing – The ability to enter new moves, variations, comments, etc. Also to save a modified PGN file or to import games into a database.
  • Book and Repertoire – Although I never used it, I very much like the simple philosophy of Bookup. It should be possible to manually evaluate a position in the database and use these evaluations in the positional database reference view. Especially when using back-solving (basically figuring out what’s the best evaluation when both sides play the best moves), this can be a lot more helpful than simple result statistics. Additionally I want to allow the user to flag every position as belonging to his opening repertoire, so the program can mark all games which involve any of these positions and novelties played in lines from the opening repertoire.

So as you can tell, I plan to add complete database support, but in a manner that does not take away from the current simplicity of the interface. I will most likely go for a relational database like PostgreSQL, which would make it easy to add online databases.

All this might sound a little over-ambitious for now, but the good thing is that I can approach one step after another, without being forced to ever complete them all. I still would like to invite additional comments from other chess players who use chess database software (not chess clients).

Chessmonk


I thought it was time to show a first preview shot of another project I’m working on, a PyGtk based PGN (chess game) viewer. Currently it features a completely scalable board (using SVG piece images), clickable moves in the notation display, variations and comments. Pretty much all PGN notations should be parsed already, including legal moves, ambiguity detection, promotions, etc. Oh yeah and moves are smoothly animated.

Initially I wanted this to become a full fledged database application, but then I just couldn’t nail the interface down for all possible use cases. So I decided to try something different and make this a pure PGN reader for viewing and analysing of chess games. I’m thinking about matching this up with a real chess database in the future (possibly web based) and I might add limited editing abilities. But this is all still very unclear, so I will concentrate on plain PGN reading for now. The only major feature I still want to add is UCI chess engine support (for Fruit/Toga and the likes).

Thoughts on the “ideal” chess interface would be appreciated, but judging from the lack of replies to my last blog posting, I doubt that any chess players are reading my blog. 🙂