Monday, 9 November 2009

Design Chess


Chess pieces created by the Spanish designer Jaime Hayon for The Tournament, a centrepiece of the 2009 London Design Festival at Trafalgar Square by Victius.

Sunday, 8 November 2009

Using more than one chess board

This post demonstrates the use of two chess boards in an article about chess which may be useful when you want to publish a game with a lot of comments and/or variations.

Saturday, 7 November 2009

Champagne Chess


Chess with champagne by Mukumbura on Flickr.

A beautiful chess picture by Mukumbura. He experimented with different backgrounds and lighting, here sunlight and flash bounced off a mirror.

Friday, 6 November 2009

Smothered Mate

This post is intended as a demonstration of the Chess Game Viewer that we have configured in the previous posts. I have used some different styles to show that you can change the lay-out and the colour of the fonts.

Smothered mate!

Thursday, 5 November 2009

The code of Smothered Mate

Below you can find the code that is used in the post of the Smothered Mate. I have added some line breaks to make it more readable, but it is supposed to be one line.
You can also see that an empty string can be used to indicate the initial position of the board if this corresponds to the normal starting position.

<SCRIPT language='JavaScript' type='text/javascript'>
Game('','sc@@K[@@}l@@@Q@@|a@@DY@@qi@@JR@@ETA@rbA@[bADibADY`AB{}@prbA@[bADibADY`ABET@@rb@@[b@Dib@DYP@@vn@@Tc@@|{@@RZ@@aZ@@BZ@@xi@@ZB@@{c@BQK@@zs@@AS@@A\\A@y]@@BR@@]K@@CK@@bZ@@FB@Dl]@@IQ@@]S@@LS@DcS@BRS@@sS@BKD@@ZR@@BC@@S\\@BDE@@ic@@CD@@\\S@BEF@@c]@@Pt@BDtA@}v@@?C@D]L@BFE@@LV@BEF@@SE@BDE@@VL@A',
'1.e4 e5 2.Nf3 Nc6 3.Bc4 Bc5 {<p>The Giuoco Piano Variation of the
Italian Opening. This often results in rather boring games, but this
game has an interesting ending.</p>} 4.c3 d6 {<p><i>}( 4...Nf6
5.d4 exd4 6.cxd4 Bb4+ {is played more frequently}){</i></p>} 5.O-O
( {<i>Just like} 5.d4 exd4 6.cxd4 Bb4+ {</i>}){<br /><br />}
5...Nf6 6.d4 exd4 7.cxd4 Bb6 8.h3 Nxe4 9.Re1 d5 10.Bxd5 Qxd5 11.Nc3
Qd8 +/- 12.Rxe4+ Ne7 13.Qe2 Be6 ( 13...Bf5! ) 14.Bg5 Qd6?! +-
15.Bxe7!! {<font color="red">and now Black is in trouble!</font>
<br /><br />} 15...Kxe7 16.d5 Rhd8 17.Ng5 c6 18.Nxe6 fxe6
19.Rxe6+ Qxe6 20.Qxe6+ Kf8 21.d6 Re8 22.Qf5+ Kg8 23.Ne4 Rf8
24.Qe6+ Kh8 25.Ng5 Bxf2+ ( 25...Rxf2 {would have been better,
but not enough to share the point} ) 26.Kh2 Rae8? {<br /><br />
and now it\'s a Mate in four.} 27.Nf7+! Kg8 28.Nh6+ Kh8 29.Qg8+
Rxg8 30.Nf7# 1-0',1,6);</SCRIPT><NOSCRIPT>An example
game of the Blogspot Chess Game Viewer</NOSCRIPT>Smothered mate!

Sunday, 1 November 2009

Chinese Chess Set


A Chinese chess set by ๑۩۞۩๑~OTH~๑۩۞۩๑ on Flickr
All sizes of this photo are available for download under a Creative Commons license.

Saturday, 31 October 2009

How to configure the chess game viewer?

This post explains how you can adapt your template in order to use the Chess Game Viewer, but first configure and try the FEN-viewer.

If the FEN-viewer is working fine we start to configure the chess game viewer.
Go to Layout » Edit html
and make a backup of your template

Then find something like
]]></b:skin>
</head>
<body>
We are going to add some lines above and below this, but also adding an onLoad statement to the body tag.
#pc1 {position:absolute; visibility:hidden; cursor:hand;}
.qzs {position:relative; visibility:hidden;}

]]></b:skin>
</head>
<body onLoad='InitSys();'>
<div id='pc1' onClick='DropPc(cg)'>
<img name='dpc'
src='http://sites.google.com/site/viewchessgame/pcs/i.gif'/>
</div>
And (after saving your template) the configuration part is finished.



Let's try it by adding the following code to a post.
<SCRIPT language='JavaScript' 
type='text/javascript'>
Game('rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR 1',
'sc@@K[@@z^@@@Q@@|a@@ET@@^L@A',
'1.e4 e5 2.Qh5 Nc6 3.Bc4 Nf6 4.Qxf7# 1-0',
1,6);</SCRIPT>


This is the Scholar's Mate.

The arguments for the Game function are similar to the Fen2Page function. At the moment we still have to add the coded moves (that can be copied from the file generated by Palview). The last optional argument indicates the initial position that has to be shown, because the starting position of the chess board isn't very informative.

Monday, 19 October 2009

Night Chess



Night Chess by Wiccked
All sizes of this photo are available for download under a Creative Commons license

Thursday, 15 October 2009

How to configure the FEN viewer?

I'm going to explain how you can publish re-playable chess games on your blogspot blog without the need to use another external site. This will be done in some different steps, which will enable you to detect possible problems as early as possible (without having done a lot of work).

This first step will enable you to use the FEN viewer.

First, Go to Layout » Edit html
and make a backup of your template

Now we look for the line with the title tag. This is probably something like <title><data:blog.pageTitle/></title> and copy the following lines just before this line.
<script src='http://sites.google.com/site/viewchessgame/js/gv.js'
type='text/javascript'/>

Next you have to add the following lines to the css part
.board img{margin:0;padding:0;border:0;background:none transparent}
.board table,tr{margin:0;line-height:9px}

If you don't know where to add it an appropriate place is probably just before the line
]]></b:skin>
And now the configuration part is finished (after you have saved your template) and you are able to use the FEN-viewer in your posts, just like in the post about displaying a diagram and about the improved blogspot FEN viewer.
Use the edit html to insert this kind of code in a post. The used code (in your post) for this last mentioned diagram with the letters, figures and Black to move indication is
<script language="JavaScript">
Fen2Page('rnbqk2r/ppp2pp1/5n1p/3p2B1/1b1P4/2N5/PPQ1PPPP/R3KBNR',2,1);
</script>
  • The first argument is the FEN code of the diagram that has to be displayed
  • The second optional argument (0, 1 or 2) indicates if the White/Black-to-move indication has to be shown. No move indication: 0, White to move: 1 and Black to move:2
  • The third optional argument indicates if the figures and letters have to be shown.


The code mentioned above results in:

Tuesday, 6 October 2009

Overview of Chess Publishing Methods

This blog is in fact an overview of all kind of Chess Publishing Methods. This post tries to give a short overview of my personal opinions about these methods.


Chesspastebin
Chesspastebin is based on JsPGNViewer, which can also be used if you are able to include the jsPgnViewer.js in your webpage.
The jsPgnViewer library takes the PGN of the chess game and parses it on the fly, which makes this JavaScript code very interesting.

The main disadvantages are:
  • It runs within an iframe on another site
  • There is an additional scrollbar, which makes that you have to scroll to see all the moves
  • Sometimes the games seem to disappear making that you have to publish them again

Chesspublisher

Chesspublisher creates a nice replayable diagram, but the result is limited to a diagram with some buttons. The main drawbacks of Chesspublisher are:
  • the lack of clickable moves and the fact that it is impossible to add variations.
  • and it also runs within an iframe like almost all chess publishing methods
  • In addition you have to genertate the diagram on their site

Chess Publisher 2

Chess Publisher 2 was an improved version of the original Chesspublisher, but not available anymore. This emphasizes that you can't really depend on other sites for the publishing of your chess games.


HTML Code Generator for Blogs

Quite another method to publish chess games on your blog is by means of the HTML Code Generator for Blogs, The method to publish chess games is described very well on their site and it can also be used for puzzles.

Some of the disadvantages
  • Fixed width and very limited possibilities to configure, like having a fixed width
  • Comments and variations are hidden
  • This method uses Java which takes a rather long time to load
  • The code runs and is dependatn on an external site.

LT-PGN Editor and Viewer

The LT-PGN Editor and Viewer is another rather nice method to publish chess games. There is no need to visit a site in order to convert your games or to generate the diagrams. You just have to add an iframe in your post with the url and the pgn data.

Some disadvantages:
  • Uses external site
  • The method uses iframes which makes that the viewer code is loaded for each game to be published
All files are available to run them on your own host.


Adapted version LT-PGN Viewer

An adapted version can be created that even has some more advantages. An example of this can be found in Some traps in the Sicilian game, but I used Google Pages to host the files which will probably be discontinued in the future.
The method can still be used on another host.

This adapted version fulfilled most of my requirements and I even thought that the Mission to find the right chess publishing method was accomplished, but I still had to do some experiments with chess puzzles and the method was still dependant on another site.
The originals requirements/wishes also stated that it should all be integrated within the blogspot template. Therefore the search continued.


Blogspot Chess Diagram Viewer

If you only want to display a chess diagram it can rather easy be accomplished by JavaScript that you include in your blogspot template as you can see in this improved version post.


Blogspot Chess Game Viewer

I also am convinced that it is rather easy to add replayable games based on a combination of Palview and the method I used to display the diagrams. You already can see some of the experiments with this method (see the two previous posts) and I will explain it in more detail later, but at the moment the code is still changing every day.

Monday, 5 October 2009

Mate in three


The moves above will be shown as soon as you make the correct move or after three wrong attempts. You can make a move by clicking at a piece followed by clicking the target square.

This mate in three diagram is only used as an experiment of this new chess publishing method.

Friday, 2 October 2009

Kramnik - Kasparov, SuperGM 2003


It seems to work rather well, but let me know in the comments if you experience some difficulties.

Wednesday, 30 September 2009

The Real World


NYC - Battery Park City: Nelson A. Rockefeller Park - The Real World by wallyg

Sunday, 13 September 2009

Improved version of blogspot PGN Viewer

I have added a White circle at the upper right corner to indicate that it's White's turn to move. The circle will be black if it's Black's turn to move. I also added some figures and letters at the sides of the board. Both indications are optional.

All the needed JavaScript is still incorporated within the blogger/blogspot template.

This is still a static diagram, but I am going to extend it to a complete game viewer.

Sunday, 6 September 2009

Chess cake

To celebrate the new start, we would like to have some chess cake.

Chess cake by clarescupcakes.co.uk on Flickr

Friday, 4 September 2009

Displaying a diagram

Looking back at all the Chess Publishing possibilities that we have evaluated in the past they all have one major disadvantage in common: they depend on files on other sites. With some of the discussed methods these files could be our own, which assures that they probably don't disappear without our knowledge.

Therefore the requirement that the method to publish chess games has to be incorporated within the template is a raher important one.
The initial position. At first sight this may look like a picture, but it is in fact a function that creates the diagram based on a FEN-string.

The used code in the post itself is:

<script language="JavaScript" type="text/javascript">Fen2Page ('rnbqkbnr/pppppppp/8/8/8/8/ PPPPPPPP/RNBQKBNR');< /script>

In addition I have added some alternative content in case JavaScript was disabled.

I am going to use this as a starting point to develop something that makes it possible to publish chess games on blogspot without the need for other hosts.

Wednesday, 2 September 2009

A new start


A nice chess set, (cc) striatic on Flickr

I have moved this site to its new home (ChessPublishing.blogspot.com) and have changed the theme. It's time for a new start and I am going to continue my search for a real good method to publish chess games on blogspot/blogger.

Sunday, 15 February 2009

HTML Code Generator for Blogs

Another possibility to publish chess games on your blog.
In this post I have used the HTML Code Generator for Blogs from the Chess Web Publishing blog as mentioned in the comments on one of the previous posts.

In order to make this work you also have to plugin the extension in your template as described in "How to publish a chess game on your blog".

I have replaced the interactive chessboard with a picture end of august 2009, because this method prevented me to test other chess publishing methods.


 
Next to move 2...e6 a red A was visible. This indicates that an annotation has been made for this move. The annotation became visible after I selected this move.

If you try to use this chess publishing method and vistit the site by means of Internet Explorer you may experience a problem on the right side (Black's moves are not visible anymore), but this may be solved in the future.

Wednesday, 11 February 2009

From Pages to Sites

Google is no longer accepting new sign-ups for Page Creator because they have shifted their focus to Google Sites
Google sites offers many of the capabilities of Page Creator, but seems to miss storage of HTML and JavaScript files.
This means that one of the most interesting ways to publish chess games (as used in the post about some of the traps in the Sicilian Defence) had disappeared, though you may use another (free) site for your JavaScript files.

Maybe I have to learn how to write a chess viewer gadget, but since the original problem with the LT-PGN-Viewer had been fixed you may also use the LT-PGN-Viewer as demonstrated in this post about this PGN viewer.