I'll give it a whirl soon however...
But I really would like that game history window and stuff.

Moderator: Ras
There should not be any need for you to convert the bitmaps: all pixmaps were already included in the source distribution. Or did you change some of the windows bitmaps?Guetti wrote:I just compiled this new version of xboard on my Mac, it compiled and starts fine with and without Xaw3d. And didn't make any engine matches yet.
One small problem, I tried to convert the winboard bitmaps with the convert utility in pixmaps, however this crashes on my core2duo with a bus error.
I just thought I would then get the nicer looking board of winboard, that's why I tried to convert them after reading the Readme in pixmaps.hgm wrote:There should not be any need for you to convert the bitmaps: all pixmaps were already included in the source distribution. Or did you change some of the windows bitmaps?Guetti wrote:I just compiled this new version of xboard on my Mac, it compiled and starts fine with and without Xaw3d. And didn't make any engine matches yet.
One small problem, I tried to convert the winboard bitmaps with the convert utility in pixmaps, however this crashes on my core2duo with a bus error.
I indeed see a big oops in the convert.c source: in main(), name is declaired as a pointer, while it should be an array. (char *name should become char name[80]).So name is just using any memory area for building the string with the pixmap name that the uninitialized pointer happened to point to, and I was just lucky that in my case this happened to be a piece of menmory that was available, and not used for anything else!
Unfortunately, that doesn't work. The texture of the board squares in WinBoard does not come from the piece bitmaps. The latter are plotted on top of the board, which is drawn first separately. This is quite different than the way it works in xboard: the pixmaps contain both square and piece (requiring each piece to have two versions of the pixmap, one on light, one on dark squares. Yegh!. This also makes it impossible to introduce a third square color, e.g. for the Crazyhouse holdings, without providing yet another complete set of piece pixmaps.)Guetti wrote:I just thought I would then get the nicer looking board of winboard, that's why I tried to convert them after reading the Readme in pixmaps.![]()
I guess this is indeed because there are 22 piece types now in stead of 6. Perhaps we should make the reading routine less critical, that if it does not find a file it simply keeps using the built-in pixmap for that piece (which is likely not to get used at all), rather than giving up.For winboard 4.2.7, I had my own pieces bitmaps for standard chess, but the new version doesn't use them anymore, because probably it needs more pixmaps.
$xboard_new -ncp
Loading XPMs...
1 2 3 4 5 6 Error -1 loading XPM file "/Users/andreas/Chess/pieces/dyche/.ll40.xpm"
orcabox:~ andreas% Chess/xboard-4.2.7/xboard -ncp
$xboard_old -ncp
Loading XPMs...
1 2 3 4 5 6 light square dark square Done.
Then in .Xresources I had an entry
xboard*pixmapDirectory: ~/Chess/pieces/dyche
Code: Select all
if(PieceToChar((ChessSquare)piece) == '.') continue;
I am afraid not. Some of the pixmaps are 3-color, so I guess you could also make them more color, but you would really have to create the marble-like background somehow. And tthat pattern would then move with the piece. Plus, I have no idea where the isolated pieces (without square backrground) that appear when you are dragging with the mouse come from. They must somehow be derived from the pixmaps by setting the square color to transparent, but if the square has multiple colors, that probably would not work, and you would drag the piece square an all. (Like is done in monochrome mode, btw.)Is it somehow possible to have the winboard bitmaps for standard chess in xboard with this nice green and grey squares?
As stated above everything else runs fine. Thanks for you work to improve winboard, and I'm glad changes finally also make it to xboard.
hgm wrote:It worked when i provided the .files, however, it is still a lot of work when you have many sizes. I don't quite understand why these .files are needed, if there is no pixmap for a piece of the variant then it could just drop back to the included bitmaps.Guetti wrote: I guess this is indeed because there are 22 piece types now in stead of 6. Perhaps we should make the reading routine less critical, that if it does not find a file it simply keeps using the built-in pixmap for that piece (which is likely not to get used at all), rather than giving up.
I guess as long as we don't switch variant or board size during the run (as can be done in WInBoard), it woulld also be sufficient to refreain from trying to load any piece that does not occur in the selected variant. That would require the addition:in the (second) loop over pieces ("for(piece = ...") in the routine CreateXPMPieces() in xboard.c.Code: Select all
if(PieceToChar((ChessSquare)piece) == '.') continue;
I guess a fairly simple work-around would be to provide the files
.ll40.xpm
.ld40.xpm
.dl40.xpm
.dd40.xpm
(note the period at the beginning) as copies of sme other file (say King), i.e. kll40.xpm, kld40.xpm atc. And then do that for all sizes you plan to use (not only 40). In the current code every piece that does not participate in the current variant is named '.', so you would only have to provide that name (in the various color combinations and sizes) to make it work. That is a lot less than supplying all the 22 piece names in 4 color flavors and 18 sizes as copies of some existing piece.
I will try to change the source as you suggested to see if I can save the work of generating all .files for all sizes.
I think the way xboard handels this is by comparing the piece and square color with the empty square of the same color and subtracting everything that it is the same. It works with complex backgrounds such as marble when done very carefully, but it is a huge mess. One dither operation over the image (i.e. during scaling) and the background is not the same anymore on the resulting image and you will see dots of the background moving with the piece. Because of that, I use only single color square colors for now.I am afraid not. Some of the pixmaps are 3-color, so I guess you could also make them more color, but you would really have to create the marble-like background somehow. And tthat pattern would then move with the piece. Plus, I have no idea where the isolated pieces (without square backrground) that appear when you are dragging with the mouse come from. They must somehow be derived from the pixmaps by setting the square color to transparent, but if the square has multiple colors, that probably would not work, and you would drag the piece square an all. (Like is done in monochrome mode, btw.)Is it somehow possible to have the winboard bitmaps for standard chess in xboard with this nice green and grey squares?
As stated above everything else runs fine. Thanks for you work to improve winboard, and I'm glad changes finally also make it to xboard.
And neat way would be to just provide one svg (scalable vector graphics) image for each piece of each color (they have transparent background) and xboard would generate the sizes appropriate.This might be one of the more difficult things to implement in xboard, as it is purely a front-end thing, and quite incompatible with the way the xboard front-end now draws piece+square combinations, rather than first drawing squares and then overlaying them with partly transparent piece bitmaps. So we would have to completely overhaul the board drawing code, before we could even begin implementing this.
Here is a page of somebody who drew svg files an manually scaled them for xboard and the result looks very nice. (Although he also introduced shadows, which unfortunately lead to them problem discussed above when moving pieces).
http://linuz.sns.it/~monge/wiki/index.php/Chess_pieces