Contents
Introduction
Chess Viewer Deluxe (CVD) is a full featured Java applet, designed to present chess games on the Web. Its main purpose is to let users enjoy the games in an intuitive, user-friendly environment. The presentation is complete, with support for recursive variations, annotations and glyphs. The games are being stored in their native PGN format which makes Web publishing simple and easy, free from any clumsy steps. In addition, many advanced features are included to provide robust chess-related functionality. Special effort is made to keep the applet's size small realizing that users can still be concerned about download speed.
This software was originally inspired by the well-known chess viewer MyChessViewer (by Michael Keating). I was impressed how elegant and efficient Mike's solution was and how he managed to implement it in such a small package. His viewer remains one of the most reliable chess viewers and is still very popular. I liked it a lot and I turned it into my personal stand-alone viewer.
After a while I felt the need and decided to introduce some new functionality. Going through Mike's code was fun and I could quickly identify the areas which I wanted to improve. Then, as I kept including more and more features, modifications affected whole modules and soon a complete re-design was inevitable. I made a lot of enhancements to the original GUI design but tried to preserve the main ideas. Also, the browser's program interface to the applet is quite compatible with the original.
Compliance with PGN Standard
One of the most important aspects of any publishing is sharing our ideas with others. The most valuable way of sharing chess information, no doubt, is by providing a notation that complies with the PGN format. By mean of such, well documented and widely spread, standard others are able to fully reproduce our ideas. In other words, PGN is for chess enthusiasts what sheet music is for musicians.
Thorough interpretation of every part of the PGN Specification is among CVD's best features. That expertise can be seen in several areas. Take for example the PGN file that is about to be loaded by the viewer. Being a text file makes it prone to errors and it often contains incorrect syntax or invalid chess moves. While parsing the PGN file a great effort is made to handle all possible situations. If a move is found to be "invalid" and cannot be played according to the rules it will be shown as "illegal" (drawn in red). A common bad practice, seen even in commercial parsers, is to turn such moves into annotations (as if by magic). Doing the right thing helps users get a better idea of what's wrong. Meaningful error handling also affects the rest of the game and improves the overall quality. If you want to learn more about PGN parsing in general and how CVD takes care of it feel free to visit this page.
Many examples can be found in the PGN Specification and Implementation Guide. Section 8 deals with PGN parsing and suggests ways of implementing it. A good parser should strictly comply in order to be taken seriously. Even better, attention should be paid to extra guidelines (eg 8.2.3) -- non-canonical SAN, applying transformations, etc. For instance, a check/checkmate indicator ('+', '#') must only appear on moves that are true check/checkmate and has to be removed from those that are not. That feature, alone, isn't as obvious or trivial as it may seem at first sight. On the contrary, many software titles don't bother implementing it. Once again, CVD won't disappoint and your source PGN will be improved wherever possible.
Another part of PGN Specification has to do with Date representation. To avoid the confusion of various international standards for representing dates, PGN defined date format to be "YYYY.MM.DD". This is the format used by CVD for on-screen and internal representation of Date fields (e.g. "Date", "EventDate").
Keyboard support
Wasting time with the mouse can be very annoying at times.
Keyboard control allows you to stay focused on the chessboard (the only important thing).
Shortcuts are provided for faster game navigation and for most common GUI functions.
Note: If the applet doesn't get the initial focus you may need to click inside it
once and use the keyboard onwards.
Copy/Paste support
Copy/Paste is clearly a must-have feature of any software. The ability to quickly share data between applications has always been part of modern GUI design. In chess terms it means much easier transfer of position/game data for the purpose of analyses. I thought, for my own sake, how wonderful it would be to have this feature in a Web based chess viewer. That's why I put it on my high priority list when I started the CVD project. In the latest version, there are four types of commands in this category - "Copy/Paste Game" of PGN data which applies to the current game; "Copy Position" which applies to the current position and "Paste Moves Sequence" which insert a sequence of moves just after the current move.
Be aware that a security concern exists about whether to allow access to the clipboard from the content of a Web page loaded in the browser. If you are in habit of placing sensitive information in the clipboard you might be in danger. The question is big and some people consider it important. For example, Flash player's designers allowed only write (and no read) access to the clipboard. There are people who even consider that not safe enough. Java designers went further in JVM and completely disabled clipboard access from inside applets. Other people, not so paranoid about security, will explain that clipboard data is stored along with its data type (plain-text, image, spreadsheet etc.). Since only plain-text clipboard data has ever been accessible from a Web page content all our spreadsheets (and other proprietary formats) are pretty safe and not likely to be stolen by a malicious script reading the clipboard.
To implement copy/paste functionality CVD depends on copy/paste availability through the browser application. For example, IE6 always allows access and the functionality is available; IE7 gives us an option to allow/disallow it (so that we can decide) and Firefox always disallows it. In other words, if the browser of your choice doesn't allow so copy/paste functionality of CVD will not work for you.
Context menus
All powerful GUI applications provide this feature to their users. Context menus enhance the experience by simplifying the interface. They are a very efficient way of getting the right function at the right time. Taking the shortcut allows us to get the job done as fast as possible. Such a convenience often makes us forget about the alternatives.
The Chess Viewer Deluxe is no exception. There are three different contexts -- Chessboard, Scoresheet and Toolbar. A pop-up menu will appear when right-clicking on the corresponding area of the GUI. (I'm told that people in Mac world call it "apple-click") A list of options, relevant to the current context, will be presented. Every implemented command can be found and executed from these menus. Simply put, everything is exactly the way we're used to from the real applications.
Making chess moves
In addition to viewing our favorite games very often we feel like trying some lines of our own. In this kind of computer-assisted analyses we do the thinking and the computer just helps us organize the process by keeping track of the moves. I think of it as an improved version of a real chessboard and a notepad. With Chess Viewer Deluxe this process is very straightforward. New variations and branching points will be created automatically if necessary. At any time you will be able to delete or promote the current variation using a keystroke or a menu command.
In a complex game, things can get really messy when you branch several levels deep inside several variations. Well, they won't if you are using Chess Viewer Deluxe. You will always have a clear idea of the exact game path and an easy way to navigate back to any branching point. I don't know about professional players but for a casual/average player (like me) this is a great help.
Requirements
The client Web browser must support Java 1.1 (or above). Older machines are likely to have MS Java (e.g. preinstalled with Windows 2000) which will work just fine. On newer machines you will have to install Java in order to use the applet.
Installation
You only need to install the CVD on your Web server if you 1) are a Webmaster; 2) have the technical background and 3) are interested in having full control of your installation. In most cases, a much faster result can be achieved by following How to publish a chess game on your blog. Think of it as an alternative way of installing (so called cloud-version), which is not only simpler but also functionally identical.
If you're already using MyChessViewer on your Web site you will be able to install
Chess Viewer Deluxe with no (OK, a tiny) effort.
Here is the short list of steps to follow:
- Download the viewer's code Viewer-Deluxe.jar. It is compressed for fastest loading, packed for convenience and you don't need to unpack it. Just save it to any folder of the Web space on your server.
- Take a look at the HTML source of Games Samples
to get an idea how to use the applet on a page. Here is the essential part.
<APPLET archive="Viewer-Deluxe.jar" code="ChessBoard.class" codebase="/bin" width="631" height="560" mayscript="true"> <PARAM name=PgnGameFile value="/games/Samples.Pgn"> <PARAM name=LightSquares value=F3DCC2> <PARAM name=DarkSquares value=DDA37B> <PARAM name=Background value=CCCCCC> <PARAM name=ImagesFolder value=images> <PARAM name=PuzzleMode value="off"> Your browser is completely ignoring the <APPLET> tag! </APPLET>
- MayScript is an important attribute. The value of "true" means "enabled" and is highly recommended. This way the applet is granted the same access to JavaScript as the rest of the Web page already has. Several extended functions (e.g. copy/paste) rely on that in order to work properly. The default value is "false".
- PgnGameFile specifies the actual GameFile relative to the Web page home folder. It could reside is any folder (accessible, of course) and have any extension. This parameter is mandatory.
- Use LightSquares, DarkSquares and Background to specify RGB custom colors to replace system defaults. These parameters are optional.
- ImagesFolder specifies a folder inside the JAR file that contains the images. It allows for alternative sets of chess pieces. Unless you have modified the JAR file to include an extra folder there is no need to modify the value. This parameter is mandatory.
- PuzzleMode is an optional parameter. The default value is "off". When turned "on" the viewer will start in puzzle mode -- showing the problem but hiding the answer.
- It is a good idea for your Web page to include code to verify if the client's browser supports Java first.
This will make it more pleasant for users who load the page and need further instructions.
The following piece of JavaScript code does the job.
<SCRIPT LANGUAGE="JavaScript"> // make sure this browser supports Java 1.1 if ((navigator.appName == "Microsoft Internet Explorer" && parseFloat(navigator.appVersion) < 4) || (navigator.appName == "Netscape" && parseFloat(navigator.appVersion) < 4.06) || !navigator.javaEnabled()) { window.location="UpgradeBrowser.htm"; } </SCRIPT>
- To make the previous step work you need to provide an "UpgradeBrowser.htm" file.
Easiest is to use the one here but feel free to modify or replace it to your taste.
Now you are ready to present the Chess Viewer Deluxe to your site's visitors.
Version history
Read the change log document.
License
This software is free for anybody to use. The meaning of "free" is exactly the same as in "free beer" - you don't have to pay for using it. You may like it or even enjoy it but no promises of any kind are made. The beer recipe is not included and there's no point asking for it. There are no special clauses and no freedom of yours is taken away from you. I mean no harm with my offering and my ultimate goal (or rather a dream) is to make this software bugs-free. (Note: For the very same reason I also like my beer to be bugs-free.)
Resources
Chess Viewer Deluxe quickstart guideHow to View Games Using Chess Viewer Deluxe
The Chess Nut Blog: 5 Steps to Chess Viewer Deluxe
Any suggestions or feedback can be sent to pilafov ‹at› hotmail ‹dot› com and will be appreciated.
Regards,
Nikolai Pilafov
92 comments:
Hello.
Great sofware for viewing pgn !! Love it.
Leave a question: is there an option to load the PGN data from the parameter instead of a file.
Something like :
Instead of PARA PgnGameFile
use a inline pgn data:
PARA name=PgnGameDATA value="[event "someone"][Site "aplace"]...">
Thanks! Ignacio
PS: cant understand nobody commenting your page wuth such a great program.
Hi Ignacio,
I do have a solution that requires no separate PGN file but the answer to your direct question is “no”. That’s more of a software architecture/design problem so let me give you some of my reasoning. Cramming the input PGN data on a single line has many disadvantages:
1) It destroys the original PGN formatting and makes modifications (after publishing) close to impossible. Preserving the PGN data the way users entered it in first place is also very important in case of PGN errors. Hopefully not very often but users would need to have a way of going back and fixing them;
2) A single PGN can contain many games and grow bigger quickly. Even a single game can be large enough if it is fully annotated and contains many variations. Unfortunately HTML attributes (like “value” from the PARAM tag in your example) are limited in size and cannot contain too big data. On top of that different browsers impose different restrictions. Strictly speaking HTML attributes were never meant to contain bulky data so we can’t blame others;
3) A quick look at your example above shows another tricky aspect – the surrounding quotes problem. Apparently the PGN string has to be enclosed in quotes (single or double) but the same one cannot appear inside the string. I know that’s too much information for an average user but we shouldn’t pretend that the restriction doesn’t exist. Not speaking about a problem wouldn’t make it disappear, would it.
The bottom line is that the one-liner solution is too weak no matter how we look at it. It also creates a feeling (at least for me) that the software problems are getting resolved at the user’s expense.
Now, my solution to your question is simple and powerful at the same time. The PgnGameFile parameter supports “javascript:” protocol and you can provide your own Javascript function as follows:
<PARAM name=’PgnGameFile’ value=’javascript: getPgnText()’>
Then the function getPgnText() will be invoked by CVD to obtain the PGN data. Of course, the function needs to be written but there is nothing fancy about it. Just make sure it returns back the PGN string.
Let us know how it goes
Regards
WOW! incredably fast and accurate repply. Thanks a lot.
I agree on all your points. And i have experience on programming and manipulating PGN, mainly with perl. But i do programming as a hobby.
Now, I will tell you why I was asking you for this fearture: currently im making a "mate in" problem viewer. Not the viewer it self, but doing the pgn selection and all the stuff need to be done (save file, load another problem and cosmetic things).
Till now i was ussing ChessTempo viewer, very nice but it can not allow you to continue a game o play variations. It will only allow to continue the moves in the PGN.
The PGN is big, so i do build on the fly an html with ONE SINGLE problem in PGN fromat. Chesstempo allow you to load from a string. It will work if there is no single-quote characters in the PGN file.
If you like, you can check the work in progress here:
http://atandila.awardspace.biz/visor_problemas.pl
And I like to do something simmilar with your viewer. Is not possible because complete PGN file sizes to send all the problems. Will be extreme inneficient.
Now, Knowing this trick I will give a try. Javascript is not my loved lang but I think will manage to build the file on the fly :)
Thanks very much man!
Regards
Ignacio
PS: Here (link below) you can see your progam displaing one problem. Is a phisical pgn file in this case.
http://atandila.awardspace.biz/p5.pl?fn=prob_1761.pgn&v=cvdp
Oh, I see.
I’ve written many Perl scripts myself and I know what you’re talking about.
In your particular case PGN errors wouldn’t be such a concern. Also, for individual puzzles, PGN size should be manageable. To help you further I’ve put together this small sample:
<SCRIPT laguage='Javascript'>
function getPgnText()
{
return '[Event "?"]\n' +
'[Site "?"]\n' +
'[Date "2008.12.27"]\n' +
'[Round "?"]\n' +
'[White "?"]\n' +
'[Black "?"]\n' +
'[Result "1-0"]\n' +
'[SetUp "1"]\n' +
'[FEN "8/8/6pp/6pk/R7/6KP/8/8 w - -"]\n' +
'1.Rh4+ gxh4+ 2.Kf4 g5+ 3.Kf5 g4 4.hxg4# 1-0';
}
</SCRIPT>
Later inside the APPLET tag you can use this entry:
<PARAM name='PgnGameFile' value='javascript: getPgnText()'>
Please, note the need for a new-line ("\n") delimiter at the end of each tag in the PGN header. If you want to minimize the modifications to your Perl code you can even make the PGN string a one-long-liner (equivalent to what you had before, but inside the getPgnText function.)
Stay in touch
Hello,
Did you draw the images yourself? They look really good. Also can I use them in my application?
Nikolai,
I just come back from a nice weekend and tweaked the code i already had for the chesstempo viewer and it workd great. I do have to work with colors and display because im reuing the code from chesstempo. But i was testing and works amazing well.
The perl code is very simple, and is the SAME used for chesstempo, only had to escape the \n by ading an extra backslash so can be later be interpreted by javascript :)
This is the perl code
(I already have the FEN in a variable $FEN and the moves in a variable called $movetext.)
So I create empty fields for all tags exept the result, fen and moves...
my $tags="[Event \"?\"]\\n[Site \"?\"]\\n[Date \"?\"]\\n[Round \"?\"]\\n[White \"?\"]\\n[Black \"?\"]\\n";
my $restag="";
if ($turn eq "w") { $restag="[Result \"1-0\"]\\n";}
else {$restag="[Result \"0-1\"]\\n";}
$tags.=$restag."[Setup \"1\"]\\n";
$tags.="[FEN \"$FEN\"]\\n";
$PGN_OUT=$tags.$movetext;
}
PGN_OUT is a golbal var used in the pint_html subbutine...
it contains:
function getPgnText() {
return '$PGN_OUT';
}
Among other html code and the applet. TY very much.
You can see working here:
http://atandila.awardspace.biz/visor_pr_cvd.pl
Big Thanks sir!
PS: i dont know how the code will be formated and as a anonimous user will be impossible to edit post. Hope it get readable.
Re: Anonymous#1 @ Jan 17, 2010
The pieces’ images are based on the Chess Alpha chess font. Probably the most well known place, where you can find it, is here Chess Fonts. Yes, I did some customizations to it and my set is slightly different. Sure, if you like mine better you can use it but don’t forget to give me some credit
:-)
Thanks. I will :)
Very good job, Ignacio
I’m glad you figured it out so nicely. Even a one-long-liner (of PGN text) doesn’t look so bad inside a SCRIPT tag's body. I haven’t heard of any restriction on the Javascript line length and the solution is as solid as it gets.
BTW, I love your DB of puzzles and I’d be a regular visitor if you had the GUI in English.
Would it be too much of a trouble?
Keep up the good work.
By "The beer recipe is not included and there's no point asking for it." do you mean do not ask for source code?
Nikolai,
Solution was only possible thanks your help.
The GUI needs a lot of work. As told I just reused the code i had for chesstempo viewer.
Sure I can translate to english, I will add to the TODO list. Just for information there is no need of spanish to use it. Just know White = Blancas and Black = Negras. Then you can select a mate in x moves, a random puzzle (the green button) and save game. Optionaly you can enter a problem number. But yes, better I can translate.
Im finishing processing the "mate in 2 colection". Its a 36000+ problems database and Im procesing with stokfish 1.62 engine to discard problems not mate in 2, no more than one solution and taking out duplicated. Almost finished and the database will be arround 34000 problems.
Current problems are from the book "1001 Brilliant Ways to Checkmate" plus 2000+ from this site:
http://www.anders.thulin.name/SUBJECTS/CHESS_PROBLEMS/
Actually, there you have many old problems books in a PBI format. So I also procesing them to convert them back to a PGN. Later check for unique solution, duplicates out, etc etc.
I will let you know when things get better in shape. And of course I will improve the GUI and link to your page as viewer credits.
Btw, this blog is moving! Seems nobody want to post first.
Regards. Ignacio
Ignacio,
I just noticed a small glitch in the documentation that might be relevant to you.
It has to do with the mayscript parameter. A while ago I noticed that some versions of FF would work better when this parameter is specified as an attribute (as oppose to a separate PARAM). Since no other browsers seem to mind I concluded that it would be more portable to have it that way and I modified the APPLET tag suggestion above.
In other words instead of,
<PARAM name=MayScript value="on">
we now have a mayscript="true" as an attribute on the APPLET tag itself.
Feel free to do some more testing and decide on your own especially if you have access to different platforms and browsers. Unfortunately, there aren’t any solid recommendations in that area and applet’s deployment gets even trickier if OBJECT tags are used.
> Btw, this blog is moving! Seems nobody want to post first.
The thing is that I moved the Home Page here quite recently. The previous host completely shutdown their service and I had no choice.
Wow, your DB of puzzles is going to be one of the best. Even mate-in-2 problems can be quite tricky at times. I enjoyed this example Mate in two can be really tough.
Cheers
Nikolai,
Finally managed to compile the problem database it will be default.
It has 5005 problems.The sources are old problem books, from years 1857~1923 all of them aviable in pdf format from the link I posted previously.
In firtst starge I deleted all problems with same FEN.
Then, the problems where all checked with stocksfih 1.6.2 engine,using 8 second time search with 2 principal variations. I only selected the problems with a pv1 having a score "mate in X" and pv2 was not mate or mate >X.
The idea was to search for problems where there is only one initial move to reach the "mate in X", trying to skip problems with multiple solutions (several first moves giving mate in X). But is not granted its always true, because limited time of search.
Finally they where checked again for "same solution". This is because some problems has a simmilar but different FEN and the problema is the same.
Example:
[Event "?"]
[Site "?"]
[Date "?"]
[Round "?"]
[White "?"]
[Black "?"]
[Result "1-0"]
[SetUp "1"]
[FEN "8/K7/6Q1/3Pk3/8/8/8/3N2B1 w - - 0 1"]
1. Bc5 Kf4 2. Nf2 Kf3 3. Qg4# 1-0
[Event "?"]
[Site "?"]
[Date "?"]
[Round "?"]
[White "?"]
[Black "?"]
[Result "1-0"]
[SetUp "1"]
[FEN "8/K7/6Q1/3Pk3/8/8/5B2/3N4 w - - 0 1"]
1. Bc5 Kf4 2. Nf2 Kf3 3. Qg4# 1-0
On the glitch:
I updated the code in the way you told, now sending mayscript="true" as an atribute. Works equal great. Only getting a warning from HTML validation, not big problem I think:
Line 58, Column 53: Attribute "MAYSCRIPT" is not a valid attribute
On the problem:
Thats realy complex to solve. Yestedau I spent good time and cant figure out. I will keep trying. :) Btw, I done a search and I do have this problem in the "mate in 2" with number order 18616 in this way:
[Event "La Strategie"]
[Site "1er Premio"]
[Date "1909.??.??"]
[Round "-"]
[White "MARBLE Murray"]
[Black "#2"]
[Result "1-0"]
[Annotator "Preti Memorial Tourney"]
[SetUp "1"]
[FEN "Q7/6N1/Kp4B1/3pp1n1/3k1r2/p1R4R/4rn2/B6q w - - 0 1"]
I have updated a bit the problem visualizator (not translated yet) and now both viewers are aviable from same script. There is an Icon to swich btween versions. BTW, do you have a CVD-LOGO? It will be nice to use it as icon to switch. Now there is a link in your viewer pointing to your root homepage. (There is already one pointing this page in yor viewer).
Now im headed for the 36000 "mate in 2" problems.. Working in the same way as explained before.
Thanks again.
Ignacio.
Nikolai
I want to deploy CVD on a tactics website. I like to publish the games in their entirety, as opposed to a fen position. This way, the tactical position can be viewed in the context of an entire game.
The fact that the games all open at the start position doesn't work for what I want to do. Is there a way to make CVD open a game at a specified move number by inserting some code in the game score?
Please share with me any ideas you may have. Thanks!
Gary
Ignacio,
I like the way you pay attention to details and the extra effort you’re putting into cleaning up your DB collection. Maybe you should create a separate page explaining the process of building the DB. Or maybe you already have one?
The mayscript attribute causing a warning during HTML validation is news to me. It all boils down to portability and I don’t know of ideal solution, at least not using the APPLET tag. The biggest problem with it is that in newer HTML standards APPLET tag is deprecated. When I started this publishing method I decided to use only the recommended OBJECT tag. Unfortunately, cross browser support doesn’t get any easier with it either.
Yeah, CVD-LOGO is a long over due on my to-do list. I do have few ideas but haven’t gotten closer to finishing them yet.
I’m not sure what you mean about the Home Page link but it’s included so that users can provide feedback and as a token of credit for my work. I hope you don’t mind.
Regards
Gary,
In CVD tactics are considered puzzles and puzzles are treated quite differently from whole games.
1) Moves’ text, if any, is hidden and the user is given a chance to solve the puzzle by moving the pieces on the board;
2) There is a new GUI element (a goal indicator) showing which side is to move next and what the goal is (win or draw) based on the result;
3) If the initial position is on black’s move, the board is pre-rotated so that users can naturally start solving the puzzle;
4) There is another GUI element (a button) to reveal the solution when/if the user is willing to see it.
When whole games are presented none of the above applies and there’s nothing for users to solve. I understand that the context of the entire game could be of value but I doubt if playing the game backwards is what users are looking forward to.
So, the short answer to your question is “no” but I do remember Chess Teacher bringing up very similar ideas in the comment’s of "How to publish a chess game on your blog ". There, I shared some suggestions of mine and possible workarounds (A mid-game position example). Also, his product seems to have that functionality built-in already so you may take a closer look.
Regards
Nikolai
Thanks for your response to my previous post. I have the CVD up and running on a joomla site. What I want to be able to do is call on a game or a game list from mysql and have the result returned in CVD. The result will be based on user input.
First, I have to import the pgn database and set it up so that I can call on individual games stored in a mysql database. I just today got my hands on a free-ware script that converts PGN to XML.
My guess is, it's all feasible. my aim is to implement it.
Your suggestions and comments will be much appreciated.
Gary
Nikolai
For some reason, when I deploy the CVD applet, the refresh button on the board doesn't work. Everything else works fine. Do you have any ideas why this might be so? See this example page:
http://www.chesstacticstraining.com/alekhine_games.html
Is there a reason why you haven't added the mouse scroller function to scroll through the game score in CVD?
I am still working on developing a method to import pgn to mysql in the joomla interface. The learning curve is steep.
Gary
Gary,
This might not be a concern to every user but from developer’s point of view there’re few distinct steps before the visitor gets the chess data and is given a chance to begin using it.
1) The browser receives the HTML page from the server and starts rendering it.
2) The APPLET tag creates an instance of CVD which then gets invoked to initialize itself.
3) During init CVD creates the GUI (with no chess data yet) so that visitors have a quick feedback. Then a new thread is created which will be responsible for loading the chess data. This way the visitor (and the rest of the page) doesn’t have to wait until the next step is finished.
4) In its own thread CVD downloads the PGN using the “PgnGameFile” parameter. This is done through a separate call to the server. All kind of errors, including parsing ones, are handled and the visitor receives a clean feedback explaining the situation. Your latest example demonstrates the progress indicator which is shown in case of bigger PGNs.
Of course, all of the above happens behind the scenes and quickly enough not to bother most of us. But if you’re designing a fully blown Web application you might find it useful.
A good practice, if your application is DB driven, is to consider a dedicated server-based script, which is solely responsible to feed the PGN data to the applet. It usually takes a Game-ID to be passed back/forth in the “PgnGameFile” parameter. The advantage is that the server doesn’t spend any PGN-related time during the initial HTML generation. An excellent example of this architecture is the way chessgames.com is using the viewer.
In other situations a slightly different approach may be preferred. For example, in various blogging environments (blogger.com, WP, etc) and CMS systems (drupal, joomla, etc) users already have full power of creating/editing their Web content. If we want to allow the chess data (PGN) to be handled with the same tools it essentially becomes an integral part of the content. Now, during the initial HTML generation the server will be querying the DB anyway and it may be beneficial to pass the PGN data along with the rest of the page. The advantage is that the need for a second call to the server is eliminated. I use this approach in my publishing method for both blogger.com and WP. Another example is Ignacio’s application (see above).
Hope I’m helping
Gary,
The refresh button is more useful when broadcasting live games. In fact, the function in CVD works very similar to the way refresh works in the browser. It re-loads the game from the server provided it has been modified since the last time.
If the server reports that there has been no modification than no action is performed at all.
In other words, if the PGN’s last modification date stays the same there will be no effect of pressing the button.
Here is a quick background of how the mechanism works (both in CVD and the browser).
When serving a static content (a regular PGN file) servers will supply the “Last-Modified” field in the HTTP header resulting in no action for the refresh function since there’s no need for such. On the contrary, when a dynamic content is served (and if the server side chooses so) the “Last-Modified” field could be omitted. In that case CVD has no choice but to think that the game was modified and reload it on request. This behavior can be seen on chessgames.com and is solely server controlled.
Oh, mouse-wheel scrolling function might look as a good idea at first but it actually isn’t when we consider portability. More importantly, the overall GUI design of CVD encourages mouse-free navigation, so I’m not sure if that functionality is indeed missing.
Have you tried the auto-replay?
Adjust the speed to your liking and you can enjoy the game mouse-free and hands-free.
hello
this wiewer is open source ? if so where can i download it ?
Nikolai,
I have a Joomla site and I just recently figured out how to parse pgn into mysql. What is the recommended way to set-up queried game results in CVD? If you can share code snippets, or point me to some, it would be appreciated.
Which version of CVD should I use, the cloud version or the locally hosted version?
Thanks in advance!
The previous post gives the wrong impression about "versions" of CVD. What I meant to ask was what are the benefits and downsides of the two methods?
Gary,
The exact way of deploying CVD on your site should be based on your preference which could be derived from the rest of your application. In my reply above (dated Feb 4, 2010) I explained all the internal operations that might be relevant when a developer makes one choice or the other. Excellent results can be achieved using either method and the users’ experience will be exactly the same.
Generally speaking you have to decide between these two:
1) Hosting the JAR file on your server. This will give you all the flexibility you can get. In exchange you’ll have to baby-sit the installation by troubleshooting it, updating to new versions, etc. Also you will have to make a somewhat harder choice between using the APPLET tag (which is already deprecated) and OBJECT tag (which is NOT cross browser friendly).
2) Using the “cloud” version. This will save you all the technical details and you can start using it instantly (without too much installation or other decisions to make). As I explained above the WP plug-in is an excellent example how user-friendly this approach can get. You can definitely use something very similar in any CMS and people are using this method even on built-it-from-scratch Web sites of their own (take a look at 17ChessClub’s site here modernscraptrading.weebly.com)
Hello
I have a request for Chessviewer Deluxe. But first I would like to say that this is clearly the best chess game publisher for web sites, without doubt.
My problem is when I use the puzzle mode. When i choose a game from the games list and the moves are hidden, and I make some moves on the board trying to find the solution things get problematic.
After i have made some moves and I press the "show answer" button, the only moves that comes up in the move-list is the moves I made.
Is this a bug or can this be changed? I want the correct moves to show in the moves list when I press the "show answer" button and not the ones I made.
Please help me with this.
If this can be corrected, CVD is perfect.
Best regards
John
Hi John,
Thanks for your nice review. I’m also happy to assure you that your concern is not an issue at all. The key concept to understand is the way variations are handled by CVD so here’s how things will start making sense:
There is one rule of thumb that always applies: If we are in the middle of a game and we make a new move on the board CVD will start a new variation for us.
That’s especially true in puzzle mode because we’re always in the middle of a game when we start solving a puzzle. So, even if we guess the very first move our own solution will be separate from the original. One convincing reason for doing it this way is because by mere guessing of a move we might’ve missed some important aspects of it (a sub-variation) or simply there might be other comments on this move by the original author (we have no way of guessing them). The bottom line is that even if our solution is correct, the original one will be intact and we can explore it later.
When we press the “Show Answer” button we just reveal the whole scoresheet with both ours and the original solution. How do we tell one from the other? The help comes from the “Variations Navigator” in the upper-left corner of the board. Whenever we see the GUI element we’d know for sure that we’re inside a variation. By clicking the branching points (yes, they act as links) we can easily jump back and forth. Practice is the best way to learn about it but some extra info can be found here Six Must-Have Features of a user-friendly Chess Viewer.
Finally, I want to admit that an uninitiated user might need to put little effort but it’s quite normal for a GUI with so many features to take some getting used to.
Regards
hi everybody,
i've got a problem.
if i open my site i get the error
"java.io.fileNotFoundException: http://www.deschaakveste.nl/cvd/Polgar-Anand.pgn"
this happens when I use Chess Viewer De Luxe (http://www.deschaakveste.nl/cvd/Polgar-Anand.htm)and MyChess (http://www.deschaakveste.nl/cvd/Polgar-Anand.htm)
What do I do wrong?
Best regards,
Wim
Excuses. The site with Chess Viewer is http://www.deschaakveste.nl/bianca2010stellingenoplossingentest.htm
Hi Wim,
The “"java.io.fileNotFoundException …” means exactly that – the PGN file was not found. In your case it simply doesn’t exist, at least not in the location you told CVD it would.
You need to fix the URL location to point to the actual file. If a separate file for every post seems too much a hassle, you can try the publishing method for blogs which is definitely easier to maintain.
Stay in touch
Dear Nikolai,
in both cases the files are very certain on the right place.
But...
'could not find a way to show that, so I renamed the extension in .txt Quess what: chess viewer DELUXE now works!!! See: http://www.deschaakveste.nl/bianca2010stellingenoplossingen.htm
May be because I connect the .pgn extension with ChessTheatre/ .pgn is not displayable in the browser???
BTW
I Like Chess Viewer Deluxe very much. It looks great and its functionality is perfect. Thanks a lot!!!
One remark: it took me a lot of time before I understood that you first need to install the mychess.com viewer
Best regards,
Wim
Congratulations, Wim
I’m glad you figured it out. This kind of problems belongs to the installation “baby-sitting” category as I explained in my reply to Gary (above). Yeah, many settings of the Web server can (and will) affect availability and if the PGN page isn’t being served properly there’s nothing CVD can do about it.
I doubt that ChessTheatre (or other local application) has anything to do with it unless you run the Web server for deschaakveste.nl domain on your local machine (not very common).
Unfortunately, you also managed to confuse yourself about the mychess.com viewer. No, there is NO requirement whatsoever for installing that viewer along with CVD. The two are quite independent products which only share few common features. Think of MyChessViewer as a grandfather of CVD.
Shortly, the JAR deployment isn’t the easiest option and you may like the “cloud” version better. See my reply to Gary (dated Feb 28, 2010).
Stay in touch
Hi Nikolai,
I left you a note on one of your websites/blogs concerning a problem I was having on March 27,2010 with Chessviewer Deluxe. I wanted to tell you that I found out what the problem was so you do not have to email me reagarding this problem. (It pays to proofread (more than onece) your pgn files after you convert them to the code for Chessviewer Deluxe!
Take care,
chessically yours,
Wayne
“Chess is imagination”
(GM David Bronstein)
Hi Wayne,
Yes, I read your note and I posted an answer to your question earlier today. I prefer doing it here because this way we can help others in similar situations. I can see that your problem is solved now, so I guess you figured it on your own.
Anyway, I’m including a link to our exchange in case anybody needs it.
Wayne's problem of Mar-27
Hi,
For my school project I am working on something similar to this and I have one question please. How does the program analyses a PGN file and extracts the moves from it? What classes/techniques do you use? I'll be very glad if you can outline this to me.
Thanks.
Hi Anon,
The process of breaking the source into meaningful tokens ("moves" in our case) is called parsing. That's a well known and studied subject and it's widely used in every programming language implementation.
Have you looked at PGN Specification and Implementation Guide? There you can find a lot about PGN parsing and "Section 18: Formal syntax" contains the Backus-Naur Form (BNF) of the grammer.
I went a few extra miles in my project and implemented advanced error handling similar to what we have in computer languages parsers. The point is to show a particular syntax error or invalid move without affecting the rest of the PGN source. Exactly the way compilers treat our computer language source code. That's a tremendous help for users when they try to fix/improve the PGN by hand. Take a look at "Step 2/3 - PGN Validator"of my "HTML Code Generator for Blogs" application.
My guess is that the project might require more than average effort.
What's the name of your school?
Hi Nikolai,
Thank you very much for your hints, I will look at them.
As for my school I doubt you know it since I am from Africa and I think you're in the US?
Actually I am making an entire platform to play Chess in, and now I want to add a feature for viewing games. So far I have almost finished writing the client/server part. Here are some screenshots :
http://img199.imageshack.us/img199/690/sanstitrecrj.png
http://img697.imageshack.us/img697/738/sanstditre.png
You'll notice that I use the Look and Feel of CVD because I think it's the best and I have asked you some months ago if I could do so.
Tell me what you think.
Regards.
Hi Anon (?!?),
Developing a complete platform for playing chess is definitely a lot of fun. I hope your school appreciates it the way we do.
I’m glad you liked the “look and feel” of CVD. The appearance is very much affected by the dark squares’ cross-hatching. I also prefer the moves in a table format as opposed to traditional paper-oriented style. You can find my ideas about the GUI here: Six Must-Have Features of a user-friendly Chess Viewer
Good luck and keep us posted!
I have renamed the .pgn file to .txt file,as my webserver was not allowing me to upload a file with .pgn extension.
Also the file is in the same folder as that of CVD.
The text below is the error I get.
"java.lang.ClassFormatError: Incompatible magic value 1008813135 in class file ChessBoard"
Now I don't know what to do.
Usually, this has to do with applet security. First step, try spelling out the full URLs (staring with http://...) in the “archive” attribute for the JAR file and also in the “PgnGameFile” parameter. After you have it working you can optimize the path and use “codebase” attribute. For the record, there is no requirement to have the PGN file in the same folder as the JAR file.
BTW, don’t forget to refresh your browser’s page and also clean the client’s side cache from the JRE control panel.
With the newest edition of Java, thecolour around the board of the Chess Viewer has been affected and is no longer present on the top, bottom, or righthand side. Is there a way to fix this?
Click here for an example:
http://www.ozchess.com.au/28439-post232.html
Alex
allegation@gmail.com
Hi Alex,
Are you talking about JRE 6_21 update? What is your OS/browser? Can you send me a snapshot?
The thing is that just few days ago I had to try out JRE 6_20 update because of a user’s complaint. All was well on CVD’s side but it took me a while to verify it. If I keep switching like that I might eventually mess up my machine because I depend on Java for few other products.
What you’re saying doesn’t surprise me because JRE developers have caused problems in the past. Rest assured that if your experienced is confirmed the issue will be addressed are resolved one way or the other.
The new ie9 browser causes a java exception error with the Viewer Deluxe.
That’s quite possible but a lot more input is needed to make a clear picture.
What does the exception message say?
Are you talking about a single (your) machine?
Do all test Java applets at Sun’s site work properly?
Which is the exact version of JRE?
Have you tried others?
You can call it the whole nine yards of Java troubleshooting.
Probably the easiest test for CVD is chessgames.com. Can you use the viewer there?
The funny thing is that there’re no tracks of ANY visitor to my site using IE9. Not even your visit. For the record, I’m not questioning what you see on your screen but the reasons behind it.
Hello,
Some readers reported that the applet makes IE8 die, under Vista.
Is it a bug or a feature?
Please tell me it's a feature...
Joking aside, I could ask them to test if you need.
:-P
Ben,
One good question to ask is whether this happens while visiting your site or mine. If you suspect that CVD applet may be failing I suggest you contact chessgames.com. They have huge number of visitors and would know for sure about the reliability of CVD on a specific platform. Also, you can check their forums for posts related to your problem.
Here’s some relevant facts about IE8 visitors on my own blog. Over 2000 unique guests spent over 19min each by visiting 4.8 pages. These numbers are average but they clearly show that user’s browsers were doing fine. At the same time Vista’s users were 24% of all Windows users. I find it hard to believe that none of 480 users had anything to say before (or after) you.
As we all know, there’re many ways for an individual machine to get miss-configured over time. Unfortunately that happens to all of us. But before we jump to conclusions and blame somebody else it’s best to double check our observations.
Your program is awesome! I have several pages on my website which use Chess Viewer Deluxe.
I am experiencing a problem where my Windows 7 will not load CVD, but it works fine on Windows Vista.
For example, the following page on my website:
http://chess.geniusprophecy.com/tal-candidates-1959.html
Oh yeah, my Windows 7 does not display CVD or Java programs like MyChess on ChessGames.com either.
Hi GeniusProphecy,
You probably figured this out by now. Usually re-installing the JRE would fix it but your mileage may vary. You can also try a different browser in case your Java is fine but the browser’s installation/configuration isn’t.
Hello
is it possible to change N Q K B R ?
because in french we use another : C D R F T
thanks
Hi FredJust,
At first sight, it looks like a good feature to have and, yes, you can find it in other chess viewers. The foremost concern of CVD, however, was to provide comprehensive PGN implementation. I don’t have to tell you that English based notation (KQBNR) is widely used and internationally accepted for sharing PGN games. My position is that anybody who’s serious about studying chess should invest a bit of time in learning that notation. It is similar to the way Greek letters are used in math. Once you get used to them they become just symbols with no national origin.
Yes, in the PGN file we must use N Q K B R.
but on screen, lot of program translate this letters in an other language (like Fritz 12). And when I note my game on paper, I use C D R F T.
So it's possible but not easy to use 2 differents notation (especially for young player). I'm sure if you were French this possibility is already in your program ;-)
If I have source, I can add myself T(Q)=D, T(K)=R, T(B)=F, T(N)=C, T(R)=T in a text file ...
Thanks for your PGN viewer
is the best I've found
FredJust,
I’m sorry I was late with my first reply and I’m glad you noticed it. No, I’m not French but I’m not English either. Are you saying that a young player might prefer to use too different notations? I respectfully disagree. A young player should never have learnt a restricted-use notation. Who suggested it to them in first place? Why didn’t we use their young energy to learn chess instead?
Let’s say, you visited a chess forum and somebody speculated that 17.Rf1 was a very strong move. Would you think of your King moving or your Rook? That’s the point -- chess notation is the one we use to share chess games/ideas and screen alternatives (like figurine) are no more then just “cool”. I’m not convinced they improve anything.
Now, speaking of programming, Sure, I’ve tried symbol re-mapping but it isn’t such a piece of cake as you’re describing. Here is a hint for you – promotions. Another example are illegal moves where we can’t just brutally replace characters (we don’t know which part is illegal). Unfortunately, most chess viewers assume that there’s no such thing as an illegal move and tackle parsing as another piece of cake. Bottom line is that I prefer things to be done the right way.
If I ever get enough free time I might consider a new functionality for alternative screen notation. But it won’t be hardcoded or tied up to a specific language and it will be easy to switch on-the-fly (via menus) so that serious players can return to PGN style.
Hello Nikolai, I am having trouble loading CVD to my website. After entering the HTML code recommended in the installation instructions and changing the path where my games are being stored on my host, I get the following error message:
Java Plug-in 1.6.0_23
Using JRE version 1.6.0_23-b05 Java HotSpot(TM) Client VM
User home directory = C:\Users\Tim
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to
----------------------------------------------------
load: class ChessBoard.class not found.
java.lang.ClassNotFoundException: ChessBoard.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://www.littlerockchess.org/bin/ChessBoard/class.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 9 more
Exception: java.lang.ClassNotFoundException: ChessBoard.class
I was wondering if you had any suggestions?
Thank you.
Tim
Hi timboone,
In the installation instructions above I was using:
/
/bin/Viewer-Deluxe.jar
/games/Samples.Pgn
You can have them placed in any folder in your Web space but make sure it’s been served properly. As an alternative, you may try out the steps in How to publish a chess game on your blog
Doing it that way allows you to combine your PGN with your HTML code, meaning less file maintenance. Also, you won’t need to bother about the APPLET tags or JAR upgrades.
Hello Nikolai,
awesome applet, thanks a lot.
One Question:
Is there a way to use only a whitespace (e.g. space) in the tag roster of the pgn-file? In chess puzzles for example there are normally no players and to fill the tag with a white space would purge the "somehow annoying" "?"
Fussy users, I know! :-)
Hi gray,
That’s a good question. The answer can be found in the PGN specification (see link above). The standard defines a set of seven tags (Seven Tag Roster) which are required to have values and cannot be omitted. To enforce it CVD trims out spaces for those tags resulting in a warning. The common way around, suggested in the PGN document, is to use “?” where the data isn’t available. In fact, you can use any other character, eg “.” or “_” instead.
Nikolai, I just wanted to let you know that I was successful in getting the viewer installed on my club website. I simply made a mistake in naming the file path for my games data, saving it to my host as ".pgn" instead of ".Pgn". That the frustrating little lower case "p" turned out to be the source of my error message ;-)
Anyway, it now works great!
One other questions, do you have any suggestions for a viewer that will work with mobile devices such as iPhone and iPad that don't use java? I'm curious how chessgames.com gets their viewer to work on those devices.
Thanks again for the great viewer!
Best regards,
Tim
You’re welcome, Tim
Glad to hear your immediate problem is solved. There are many ways you can use CVD and if you intent to grow your site you may find that file maintenance of numerous PGN files is taking longer than you’d like. One obvious solution is the way chessgames.com makes use of CVD to access their database of PGNs.
As far as I know, CG.com doesn’t have a chess viewer of their own. For mobile devices they use a third party solution. If you’re asking about my opinion of hardware that is disabled and won’t support Java (and other well known, portable platforms) I won’t be alone telling you that your choices will be limited. Sure, if you convince yourself that Javascript is up to the task then you should seek solutions in that direction.
Regards
Hello Nikolai,
thanks for your fast and - as alway - competent reply. I knew there must be a deeper reason for the error-message.
Best Regards,
Gray
Hello Nikolai,
I started using your viewer today. One question: when I make a change to the pgn file, the viewer doesn't update on reload, so I have to save the pgn to a new name for the viewer to load it. Am I doing something wrong? Thanks.
Hi FredJ,
I assume you’re using the JAR file installation and you have your PGN file (e.g. “Samples.Pgn”). If you load the page with CVD and later modify “Samples.Pgn” file you can use the “Reload” button (second from the left) which will reload the content into the viewer. If you want this to happen automatically that’s a different question. Both work very well in CVD. You have to tell me more and, if possible, include a link to your page.
Hi, mr Pifalov:
I really like your software, especially the feature to use the keyboard; it's anoying use the mouse all the time. There is any chances to personalize the colors and pieces?
Thanks in advance
Carlos
Hi Carlos,
I agree that the mouse can get very annoying at times. For example, I find it impossible to navigate using the mouse into a deeply analyzed game with many variations.
Yes, board and background colors can be easily changed to your liking. Pieces are trickier but it’s not impossible. There are no ready-to-choose pieces that you can select from. You will have to work with the JAR file to achieve that. If you know how to edit/modify/resize and transform your favorite pieces into transparent GIF format, the rest will be relatively easy. Send me an e-mail if you’re interested.
Hi again, mr Pilafov:
I can prepare the gifs for pieces and the board... but I can't see any email address in the blog. Maybe is in front of my nose, but I can't see it. :(
Let me know what to do. Thanks
Lol, yup, the email was just in front of my nose... at the bottom of this page! :)
Actually, I cant see nothing. the link takes you nowhere.
I want to add CVM to our website, but I'm uncomfortable doing it. Our site is at: spacecitychess.net. I'm using a 1&1 business plus web development package to create our site. I've downloaded your JAVA code to a folder on my desktop. What do I do next? THanks.
Hi James,
Installation using the JAR file should be done by a Webmaster or somebody with the technical skills. If you aren’t sure, maybe you should try the alternative way as I suggested in the “Installation” section above (the “cloud” version). The results will be exactly the same from visitor’s POV and you can focus straight way on the essential part – the chess content (instead of spending hours troubleshooting various issues).
Hi Nikolai,
Thanks so much for this excellent software. I have a question about your point under "Installation" bullet 3 where you say...
"It is a good idea for your Web page to include code to verify if the client's browser supports Java first. This will make it more pleasant for users who load the page and need further instructions."
Can this code also be used in a blog and if sonwhere should I put it? Does it belong with the code I copied into my page template?
Cheers,
'mezzo
Hi Intermezzo,
That piece of code is only useful when CVD is deployed by a JAR file installation to your Web server. In fact, even in that case the code is rather old and is not the best way to provide feedback when Java is missing. It gets more complicated because APPLET tag was deprecated a while ago but browsers keep supporting it which makes things trickier with newer versions of Java.
On the other hand, when the cloud-version of CVD is used the implementation takes care of the warning and modern browsers will prompt the user if Java is missing. In that case there’s no need for any extra effort.
Thanks Nikolai. That's useful to know. As I've just started using your viewer I think I'll put a couple of lines into my first few posts to let readers know that I've switched and tell them "if you can't see the board then you need to download Java" with a link. This should cover those readers who are technically less proficient and may miss their browser prompting them to get Java.
Chreers,
'mezzo (Dave)'
Hello thank you for your excellent software. Do you think it is possible to incorporate chess engine into it?
Also, copy+paste would be nice to see.
Regarding the viewer deluxe 3.5a. I don't see any active link to where download,is any place where to get it guys
Hi Alexander.L.,
You can find the link in the “Installation” section – it’s the very first step. I double checked it and it works fine.
Let me know
Hello
I use your applet on my site
I have a suggestion for version 3.6 :
not display text between [ and ] in comments.
Some program add new function in PGN and write it between [ ]
like this :
{[%csl Ga1,Ra5,Ra6,Ra8,Gd3,Gh5][%cal Ga1f1,Ga1e1] look this ! }
is the syntax used by ChessBase to color the squares and add colored arrows
So CVD display this : http://www.cpe95.org/IMG/png/cvdsample.png
And an another flash viewer display this http://www.cpe95.org/IMG/png/scvsample.png
Most difficult for version 4.0, add this feature and display colored arrows and squares
using same syntax ;-)
Thanks a lot for CVD, I make a french help here
http://www.cpe95.org/IMG/png/cvdAide.png
and I explain how to use it on this page
http://www.cpe95.org/spip.php?article35
PS : ChessBase syntax :
http://www.chessbase.com/support/support.asp?pid=227
Hi FredJust,
These are excellent suggestions indeed. And thanks for all the links. I like this way of expanding PGN from inside the comments. I have two observations to make.
1) Out of your examples it looks like we can ignore everything enclosed between [% and ]. If possible, I would rather implement that and preserve the square brackets usage as in “[Reykjavik, 1972]”.
2) PGN standard allows for multiple comments and CVD supports them nicely. If we make use of that we can define special comments as those enclosed between {[% and ]}. When recognized those can be ignored as a token (ie the whole comment). This approach will preserve the usage of square brackets in other comments. Most importantly, it will allow better compatibility with chess viewers that aren’t special-comments savvy. For instance, comments after move #20 in your example should be coded like this:
{Le roi noir est sans defense face au surnombre des pieces Blanches.}
{[%csl Ga1,Ra5,Ra6,Ra8,Gd3,Gh5]}{[%cal Ga1f1,Ga1e1]}
In other words, there’s no need of polluting the regular comments by mixing them with special ones.
Obviously, the full support of this feature will require some serious work but filtering out the special comments is feasible. Let me know what you think.
hello
Actually special codes are always between [% and].
I used Fritz 12 program to generate this PGN file (or ChessBase).
there are other special codes, but always between [% and].
So it is possible to ignore all the text between [% and].
ChessBase and Fritz use only 3 colors (Red, Green and Yellow) for squares and arrows.
Here is a new PGN file, I add a lot of special codes to understand the syntax :
color one square : [%csl Ge4]
color several square : [%csl Ye4,Ye5,R..,G..,G..]
draw one arrow : [%cal Gd5a5]
draw several arrows : [%cal Ga5b6,Gc8g4,G....]
the PGN file : www.cpe95.org/IMG/pgn/ChessBaseVersion.pgn
In Fritz interface : http://www.cpe95.org/IMG/png/FritzInterface.png
and I found the free game scid interpreted this chessbase syntax (but not completely) : http://www.cpe95.org/IMG/png/ScidInterface.png
but these codes are not separated into differents comments as you can see in PGN 3. Nc3 {[%csl Rd5] attaque la dame}
I forgot, if you want to see the flash viewer in action :
http://www.europe-echecs.com/actualites/anand-conserve-son-titre-2221.html
But I don't think it's free of use,
I found it only on two public page of this site !
Hello
I add ChessViewerDeluxe in the french CMS SPIP
now SPIP users can easily add CVD on their pages
http://www.spip-contrib.net/Afficher-des-parties-d-echecs-avec-ChessViewerDeluxe
they can also add chess diagrams with FEN syntax
http://www.spip-contrib.net/Inserer-un-diagramme-de-positions-d-echecs
http://www.cpe95.org/IMG/png/merida35.png
I created CVD icons for this SPIP pluggin to get this
http://www.cpe95.org/IMG/png/cvd45
can I add this icons in SPIP ?
like that all users can use CVD style
Bravo, beau travail. Merci
I make a website for a schoolchess in my village near Dijon (France), a free school.
The site is made with googlesites.
Do you know how I can use CVD in it ?
Hi LeDruide,
No problem at all, even if your site is built from scratch the method explained at How to publish a chess game on your blog can be used directly. If you still have questions send me an e-mail and will send you back some samples.
Thanks for your disponibity.
I'm going to see it.
And, may be it's possible to do an embed gadget (googlesites) with CVD and pass it the pgnfile as parameter. So the chess webmasters would use it without difficulty.
I try it and say you the result by mail.
http://sites.google.com/site/echecsvaroisetchaignot
Sorry for my poor english ...
LeDruide,
Interesting that you should mention gadgets. A while ago I considered making a CVD gadget for blogs. It turned out that, by design, gadgets can only be inserted in the sidebars and outside of the post content. Just on the contrary, I wanted my posts to contain the chess data so the whole concept didn’t work. Things might be different in case of googlesites where every page could have its own layout. I agree that it would simplify the installation even further.
On the other hand, both deployment options that I provide here work with, practically, any Web hosting solutions. Also, the extension for WordPress blogs is very powerful and gives users an opportunity to be in full control of the software on their site.
Niko,
That I said is for the websites made with googlesites only.
Java applets and javascriots are not allowed in Googlesites; for that, you have to put the aplets in an embed gadget.
Hi Nikolai, I need help. How to replace PGN data in html code link on pgn.files? I have a pgn files saved on another server. Thank you
Branislav Karel
Hi,
The viewer is too wide to see on iphones(mobile devices) which have around 315 px screen width.
I wish there would be a viewer like that which can be resized somehow to make it smaller.
If the games which are shown on the right side could be shown underneath the viewer, this would help a bit to make it smaller.
Could you please develop a smaller version that shows games underneath and that would fit a mobile screen of 315px?
Regards
Norbert
Post a Comment