Chess Web Publishing

What is Chess Viewer Deluxe?
Chess Viewer Deluxe is the most full-featured and powerful Java chess viewer on the internet.

Here are some free PGN viewers that you can use for this purpose:

  1. Chess Filemate (Windows, shareware)
  2. PGN Mentor (Windows, free demo available)
  3. Mini-PGN (Windows, free)
  4. Pgn Reader 1.52 (Windows, free)

Chess Viewer Deluxe

by Nikolai Pilafov


chess viewer deluxe


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 environ­ment. 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.


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.


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:

  1. 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.
  2. 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 &lt;APPLET&gt; tag!
    The meaning of various parameters and their usage is listed below:
    • 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) ||
      Please refer to Games Samples's HTML source for an example how to include the code on the page.
    • 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.


    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.)


    What are the differences between the viewers?

    1. Chess Viewer Deluxe - A powerful and easy to use java viewer that contains many powerful features, such as allowing you to analyze the board position by moving pieces, move through the game with your arrow keys, and play games automatically. As such, it is our default viewer. Please see Chess Viewer Deluxe Quickstart Guide for more information on this application.
    2. MyChess - A happy medium between features and reliability. Chess Viewer Deluxe is an improved version of MyChess.
    3. ChessTutor - The fanciest java chess viewer; contains many features such as resizing the board, automatic move progression, and more. It is the least stable; some users report not getting it to work.
    4. MistyBeach - The least-fancy java chess viewer; very simple and plain, but it gets the job done. It does not support odds games, nor does it support games that use RAV (recursive annotated variations). Very few users have reported problems with it, although there are a few games in the database (with annotation) that cannot be viewed with it.
    5. Sjkbase - Its operation seems a little odd at times, but the board looks great and it has a very powerful feature: it lets you actually move the pieces on the board so that you can analyze positions. It is a relatively old piece of software, and no longer supported, so use it at your own risk.
    6. None (Display Moves Only) - This option simply displays the moves of the game in a little box. However, the "Download PGN" link found on each page will activate a PGN viewer on your PC if your browser is configured properly. Use this option if none of the above choices work for you, or if you simply prefer to use your own PGN viewer.

    Another CHESS VIEWER

    WiseBoard Chess Board Editor

    • Set up arbitrary chess positions.
    • Generate JPG chess board images (diagrams).
    • Play chess by making legal chess moves on the chessboard on the right.
    • Share these dynamic chessboards with others.
    • Embed such dynamic chessboards in your own pages about chess.
    • Play email chess with your friends by exchanging these dynamic chessboards.
    • Play chess online for free against a chess playing applet.
    • Set up any chess position and play computer from this position online for free.
    • Adjust the playing strength of the chess playing Java applet.
    • Set up chess puzzles with an analysis board and play them online against a chess playing computer applet.
    • Share chess puzzles over email by links to dynamic chessboards or to the chess playing computer applet with the puzzle as the starting position.

    The WiseBoard Editor is an interactive chessboard whose width and height can be set arbitrarily. The chessboard can be edited by adding chess figurines to the board, moving chess figurines on the board, and removing chess figurines from the board. The editing history - the history of changes to the board - is stored in memory giving you full undo support and the possibility to play chess games with yourself. Additionally, you can open the current editing situation in a new window. Notice that The WiseBoard Editor can be a useful tool for position analysis: you can have as many chessboards as you please and each chessboard remembers what has happened on it. Moreover, you can save the results of your chess analysis.

    Our Plans for a Mighty Online Chess Website

    We are going to offer the following chess services on our website:

    • Play Chess Online
    • Chess Discussion Forum
    • Position Analysis Tools

    Whether you will be playing a private game, participating in a tournament, or reading the discussion forum, you will always have access to an interactive chessboard (WiseBoard Editor) allowing you to do the following things:

    • set an arbitrary position on the board
    • add new figurines to the board
    • move existing figurines on the board without restriction
    • remove figurines from the board
    • make regular chess moves
    • navigate back and forward through your editing changes (full undo support)
    • open the board in a new window - as many windows as you please
    • save such editing windows for future access
    • post chess diagrams to the discussion forum
    • post interactive diagrams (with a game history) to the discussion forum.

    Analysis Tools and Discussion Forum

    Notice that the WiseBoard Editor can be a useful tool for position analysis because you can have as many chessboards as you please and each chessboard remembers what has happened on it - allowing you to return to previous positions in the analysis history and open them in new windows to reflect the branching nature of chess analysis. Additionally, you can save your analysis results for future access or post them to the discussion forum.

    Our chess discussion forum is going to be a really suitable place for exchanging chess ideas, asking chess questions, and solving chess problems collectively - thanks to the option of posting static diagrams or dynamic diagrams with an embedded game history. Such dynamic diagrams can start with any arbitrarily set position and allow navigation through the embedded history.

    Forum readers will be able to open such posted diagrams into their private WiseBoard Editor windows, do all things mentioned above to these diagrams, and post a response diagram to the forum as a reply. Of course, it will be possible to write normal text in the forum.

    Comfort and Focus on Good Play

    Our interface is going to be easy to use and rich in possibilities to make it comfortable for you to play good chess. We will give you the option to choose between many sets of images for the chess figurines, and you will be able to adjust the size of the squares to make the board larger or smaller. (Try out different square sizes in our WiseBoard Editor demo version.) Our powerful analysis tools will make it easy for you to think and analyze your position before you make your move. We hope to bring out your best chess skills by giving you a good chess-playing interface.

    We are already writing the code to make this all work

    We have already started writing the programs that are necessary to set this project going. At the present moment, we are showing the first crude version for demo purposes. Take a look at the WiseBoard Editor to get a foretaste of the future power of WiseBoard Chess at

    If you are interested in the future of the WiseBoard Chess project, you can increase our motivation to keep on working on this project by subscribing to the WiseBoard Chess mailing list. If we see many people signing up for the mailing list, we will know that there is interest in our solution for the problem of playing good chess online and discussing chess online, and so we will work harder to get it started as soon as possible.


    What is PGN?
    PGN stands for Portable Game Notation. It is a method for storing chess games in simple text format which can then be imported into various software. Because Chessgames does all of its PGN processing automatically "behind the scenes", you don't need to understand anything about PGN to enjoy Chessgames. However, if you use software that can import from PGN, offers several ways to download this data to your computer. Please see How do I download PGN files? from the Chessgames Premium Membership FAQ for more information.

    External links:

    1. Overview of PGN from
    2. PGN Specification and Implementation Guide (technical)