Bord with Winboard look? Well here is mine

Discussions about Winboard/Xboard. News about engines or programs to use with these GUIs (e.g. tournament managers or adapters) belong in this sub forum.

Moderator: Andres Valverde

Bord with Winboard look? Well here is mine

Postby Josh Pettus » 19 Mar 2009, 03:16

After spending many hours getting it the way I like it, I'd thought I'd share my customized look for winboard.


Image
The idea was based off of a nice marble chessboard that I have here at home.

I used these tiles that I made from generic pictures of marble,
plus the Chess Leipzig font available at http://www.enpassant.dk/chess/fonteng.htm

Because black on black is impossible to see, I realized I had to change the color to something that stands out but is still recognizable as being black pieces. The arrow color however, I wanted to stand out but not be too jarring.
So here is what I entered into my winboard.ini

/liteBackTextureFile="marblew.bmp"
/darkBackTextureFile="marbleb.bmp"
/liteBackTextureMode=2
/darkBackTextureMode=2
/renderPiecesWithFont="Chess Leipzig"
/fontPieceToCharTable=""
/fontPieceBackColorWhite=#f4f4f4
/fontPieceForeColorWhite=#494848
/fontPieceBackColorBlack=#d1bdbd
/fontPieceForeColorBlack=#8d0e0e
/fontPieceSize=84
/overrideLineGap=1
......
/highlightMoveWithArrow=true
/highlightArrowColor=#181fa8

I have also been playing with the Xiangqi board and have been using a separate winboard.ini with a second winboard.exe in a subfolder with a shortcut to the main one. This was mainly because I haven't been able to find an alternative font for the Xiangqi pieces, (If anyone knows of any, please speak up.) and you can't change the colors for the default pieces. The result, of course, would lead to black pieces on black marble. So this is what I have.


Image

As you can see, I went with a sort of jadish color for the darker squares which seemed to fit nicely. ;)
The tiles I made can be found here (The white tile is the same as the other one)

For the arrow, I decided to go with bright green to match board better.

/liteBackTextureFile="marblew.bmp"
/darkBackTextureFile="marbleg.bmp"
.....
/overrideLineGap=2
.....
/highlightMoveWithArrow=true
/highlightArrowColor=#18ff39
....

Enjoy!

Feel free to post pictures and settings of your Winboard board in this thread.
Josh Pettus
 
Posts: 317
Joined: 11 Mar 2009, 01:11

Re: Bord with Winboard look? Well here is mine

Postby H.G.Muller » 19 Mar 2009, 09:00

Sure you can change the piece colors in XQ (or any other variant). There even is a menu item for it. (Options -> Board...). If the "black" piecs look a bit vague because you selected a light color, you can even tick the option "All White" there. WB then uses the white piece masks (which have a black outline) also for displaying the "black" pieces (using the "black" color, of course).

If you want to control this not through menus, but through command-line options (in the winboard.ini or on the command line), beware that you need other options as are used for the font-based rendering, (They are the very first in the .ini file.)

What I usually to to prevent that I need multiple WB copies is to create shortcuts for winboard.exe, and then change the command line by adding a command-line option (say) "@xq.ini". I then make a file xq.ini which contains all the special option settings I want for this mode. These then overrule what was originally in the winboard.ini, when I start up WB through that shortcut.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Bord with Winboard look? Well here is mine

Postby Josh Pettus » 19 Mar 2009, 16:26

Thanks a lot! I had completely forgotten about the options->board menu, which is funny as I went trough it many times looking for other functions that weren't there. Simply never clicked :wink: And good idea with the shortcut. I couldn't figure out how to do that before, will certainly give it a try.

Edit
Is there a way to change the back color like you can with the chess fonts?
Josh Pettus
 
Posts: 317
Joined: 11 Mar 2009, 01:11

Re: Bord with Winboard look? Well here is mine

Postby H.G.Muller » 19 Mar 2009, 18:46

No, the outline of the white pieces is always black, and the black pieces have no outline at all.

I am not sure why Allessandro introduced new option fr the piece colors. IMO it would have been more convenient if the foreground / background colors of the font-based pieces would also have been used for the colors of the built-in bitmaps.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Bord with Winboard look? Well here is mine

Postby Josh Pettus » 20 Mar 2009, 04:16

Hmm not sure why either.

In any case, I was getting tired of the default bitmaps for XQ so I took a look for some possible font replacements. Turns out there are not a lot of options, but there is at least one free font made by Kai Wan Leung available here.
The end result looks like this...

Image

It sure took a lot of trial and error trying to get the font to pieces to match up correctly. It was sort of like working on a cryptogram puzzle. ;)

Here is what I put in my .ini file

/renderPiecesWithFont="XIANGQI"
/fontPieceToCharTable="phprpaeppkpcpPHPRPAEPPKPCP"
/fontPieceBackColorWhite=#f4f4f4
/fontPieceForeColorWhite=#8d0e0e
/fontPieceBackColorBlack=#ffffcc
/fontPieceForeColorBlack=#202020
/fontPieceSize=84

It should be noted that all of the "P's" in the fontPieceToCharTable other than the first ones are all, what I'd call, place holders. I'm not sure why the order for the xiangqi pieces is as such, or why I needed the place holder characters, but I know it works. ;) Still, I think it all looks pretty good.
Josh Pettus
 
Posts: 317
Joined: 11 Mar 2009, 01:11

Re: Bord with Winboard look? Well here is mine

Postby H.G.Muller » 20 Mar 2009, 09:15

Yes, this is the same font as I used here. A very nice font. Too bad the white-style pieces (with an outline around them) are not available in it with black-type Chinese characters on them as well.

To get it I defined the following settings in my xq.ini file:

Code: Select all
;
; settings
;
/variant=xiangqi
/boardSize=middling
;
; Piece definition. Use XIANGQI font, set colors to red / blue, and relative size to 70%
;
/renderPiecesWithFont="XIANGQI"
/fontPieceToCharTable="ph.r.ae..k.cxPH.R.AE..K.CX"
/fontPieceBackColorWhite=#ffffff
/fontPieceForeColorWhite=#ff1010
/fontPieceBackColorBlack=#ffffff
/fontPieceForeColorBlack=#8080ff
/fontPieceSize=70
;
; Background bitmap for board. Use same for black and white squares, with fixed orientation, no lines beween squares.
;
/liteBackTextureFile={c:\cygwin\home\website\xiangqi.bmp}
/darkBackTextureFile={c:\cygwin\home\website\xiangqi.bmp}
/liteBackTextureMode=1
/darkBackTextureMode=1
/overrideLineGap=0
;
/saveSettingsOnExit=false


To make a grid-like board, I just made a large-enough bitmap of the wood texture (by tiling it), and drew a grid on it with MS Paint. To suppress the original square boundaries, the line gap has to be set to 0.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Bord with Winboard look? Well here is mine

Postby Josh Pettus » 20 Mar 2009, 14:57

Yeah it is a bit of a shame. Still I think it looks pretty good.
Excellent idea for the board, I will certainly do that. Could I see the bit maps that you used because I'm not exactly sure what you mean by tiling it. you used one texture for both lite and dark squares and how did you get the various iterations of the XQ grid on each tile? I guess it is all just one picture, but how did you get the program to not tile that one picture in a grid? What did you use to measure the spaces?
Josh Pettus
 
Posts: 317
Joined: 11 Mar 2009, 01:11

Re: Bord with Winboard look? Well here is mine

Postby H.G.Muller » 20 Mar 2009, 17:13

With 'tiling' I meant that the originl wood bitmap from David dahlem was not big enough, and I duplicated parts of it and put them next to each other to make a larger one. The trick was to make the size of the bitmap exactly equal to that of the required board. The way the algorithm for cutting the individual squares out of the bitmap works in such a way that in that case the entire bitmap is used unmodified. (The algorithm cut squares out of the bitmap in a regular grid, spread out as much as possible, but overlapping when needed. So if you make N square of M pixels, and the bitmap would be W=N*M wide, it would simply cut it in N contiguous squares. But if the bitmap was only M wide, it would use the entire bitmap for each square. If the bitmap would have been (2*N+1)*M wide, it would use the left M pixels, for the leftmost square, then M pixels unued, then M for the second square, etc. Unfortunately, this algorithm does not leave the grid centered in the squares when you change the board size. So I plan to switch to an algorithm where square i would be centered around x=W/N*(i-0.5), which would be where the grid lines are in a drawing of the XiangQi board. In that case, when you ask for a board size smaler than the supplied bitmap, the board should still look perfectly normal, as the grid lines stay in the center of the square. When you take a larger board, though, the edge squares would pose problems, because when you cut them out centered on the XQ grid, they would partly fall outside of the bitmap. I am still thinking on how this could be prevented. Perhaps by leaving a margin outside the grid, e.g. divide the bitmap in 10x11 squares, in stead of 9x10, and then draw the grid on square edges in stead of square centers, and then cut out squares centered on that grid. Then you could cut out larger squares (partly overlapping) without running into troublle near the edges.)

One other thing is that the cutting seems to change in flip view. (No idea why it does that, but it will have to be fixed...)

I will e-mail you my bitmap, as it is a bit large, and my website has nearly reached its quota.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Bord with Winboard look? Well here is mine

Postby Josh Pettus » 20 Mar 2009, 17:35

Got it, thankyou so much for the info and the board. I think I can make my own now. :)
Josh Pettus
 
Posts: 317
Joined: 11 Mar 2009, 01:11

Re: Bord with Winboard look? Well here is mine

Postby Josh Pettus » 20 Mar 2009, 20:44

Well I have done it,
Here is my first attempt at making a XQ board designed for /boardSize=bulky setting, complete with markers for the soldiers and cannons.
The pieces are posted above

Image

Available here.
This is what I have in my .ini
Code: Select all
/variant=xiangqi
/boardSize=bulky
;
/liteBackTextureFile="textures/xiangqib.bmp"
/darkBackTextureFile="textures/xiangqib.bmp"
/liteBackTextureMode=1
/darkBackTextureMode=1
/renderPiecesWithFont="XIANGQI"
/fontPieceToCharTable="ph.r.ae..k.cxPH.R.AE..K.CX"
/fontPieceBackColorWhite=#f4f4f4
/fontPieceForeColorWhite=#8d0e0e
/fontPieceBackColorBlack=#ffffcc
/fontPieceForeColorBlack=#202020
/fontPieceSize=78
/overrideLineGap=0
;
/saveSettingsOnExit=false
Josh Pettus
 
Posts: 317
Joined: 11 Mar 2009, 01:11


Return to Winboard and related Topics

Who is online

Users browsing this forum: No registered users and 10 guests