BDS Software

Chess Helper

This is NOT a Chess Game.

In fact, it's not actually a game at all.

Basically, it's just a chess board and a box full of chess pieces.

Technically, you could use the set to play a game of chess with a friend, using the "hotseat" mechanism. That is, you both sit in front of the same computer. First, your friend takes the mouse and uses it to make a move. Then, you take the mouse and use it to make a move. etc.

But the primary purpose of this Chess Helper is to provide you with a tool with which to analyze games and positions, and thus learn more about chess, and improve your game.

The Chess Helper doesn't care whether you place pieces in illegal positions, and it doesn't care if you make illegal moves. It's just a dumb board and a box of pieces!

There are two ways to set up the chess board. If you click the "New Game" button, the Chess Helper sets up the board in the normal starting position for a chess game. Alternatively, you can set up a particular position by clicking on a piece in the "Piece Supply" and then clicking on any square on the board. The Chess Helper then places the piece on that board square. If there was a piece already on that square, that piece is discarded. Just keep repeating this until you achieve the position you want.

If you make a massive mistake during the setup, just click the "Clear the Board" button, and all the pieces on the board will be discarded so that you can start over.

If you click on a piece in the "Piece Supply" and then click the "Discard" box, that piece is discarded. The "Piece Supply" is bottomless: you never run out of pieces. The "Discard" box is also bottomless - you can keep dropping pieces on it and it never fills up. You can never take any pieces out of the "Discard" box because, when you drop a piece on the box, it drops into infinite oblivion.

I'll use the metaphor of your hand being the mouse click. Click on a piece, and your hand picks it up. Then click on a board square, and your hand puts the piece on that square.

If you click on a piece in the "Piece Supply", and then click on another piece in the "Piece Supply", you drop (and thus discard) the first piece and pick up the new piece.

If you click on a square on the chess board, and there is no piece on that square, nothing happens.

If there is a piece on the square you clicked, then your hand picks that piece up (although it still appears on its original square for the moment). Then, when you click on another square, the piece is moved from its original square to the new target square and your hand places it on that square. If there was already a piece on that target square, that piece is discarded.

Technically, you could click on a piece square and then click on the same square, although I don't know why you would want to - basically, nothing happens.

If you click on a piece square and then click on the "Discard" box, that piece is discarded.

As I said before, the Chess Helper doesn't care if you make illegal moves - it's just a dumb board and a box of pieces!

One of the main purposes of this Chess Helper (and the main reason for my developing it) is to be able to follow along, move-for-move, with chess games published in Chess Life and other magazines and books.

At some point in the game article, the author may say something like, "If White had done this instead..." At that point, you can click the "Save the Position" button to mark your place, and then follow the author's alternative moves to analyze their relative worth. You may choose whatever name you want for the position. (I tend to just use "p1", "p2", etc.)

After you're done with the alternative, you can click the "Load a Position" button to return to the position where you left the main line to follow the alternative. You just have to enter the name you previously chose for the position.

Of course, if you're playing a game with a friend, you can also use this method to suspend the game and then return to it at a later time.

Enjoy!



Piece Supply:
















-----

Notes:

● I used Burnett's 45 x 45 pixel .svg chess piece images, but, first, I added "white" and "black" backgrounds to them to match the squares of the chess board, and then I converted them to .png images and resized them to 63 x 63 pixels each.

● Someday, I hope to develop a formalized "file dialog" mechanism for client-side javascript which will let you see all the position names that have been created and pick and choose from among them with a click of the mouse. Until then, you'll have to remember which names you have used. You can, of course, use the same names over and over again. Saving a position to a name which has already been used simply overwrites the previously saved position.

● I recommend using short position names when saving a position - they're easier to remember. For example, I use position file names like "p1", "p2", etc. When the file is saved, the Position Name is decorated to minimize the likelihood of file name collisions. For example, if you use "p1" as your Position Name, then the position will actually be saved as "mdjbdsChessHelper_p1".

● The saving and loading of positions conforms to HTML5's security restrictions against access to anything out of its local domain. For example, if you save a position while using Chess Helper in a Firefox browser, you won't be able to access that saved position when you're later using Chess Helper in a Chrome browser. If you go back to the Firefox browser, that saved position will be available.

● The position saving and loading is also local to the computer you're using. If you save the position at home, it won't be available on your neighbor's computer. But, it'll still be there when you come back to your own computer.

● The saving and loading of positions may not be possible on library or other public computers if they have Local Storage disabled. Local Storage should, however, be available on your private home computer, unless you've disabled it yourself. Local Storage is safe - we DO NOT access any personal data on your computer at any time! This game does NOT use cookies. Your position files are entirely private.

● Chess Helper currently uses a modified Forsyth-Edwards Notation (FEN) for saving and retrieving positions. The modifications are 1. It only records the piece positions, not the other information included in formal FEN, and 2. It is recorded in javascript's native UTF-16 (16-bit) character set, rather than in formal FEN's ASCII (7-bit) character set.

● To explore this page's code, just right-click this page and then click on "View Page Source" (in Firefox browsers - other browsers are similar.

● To download Chess Helper's image files, click here.

● To download Chess Helper's sound files, click here.

● The button and canvas (board) click sounds were constructed in Audacity 2.1.0. They work in Edge, Firefox, Chrome, Opera, and Slimjet browsers, but not in Internet Explorer. In order to get these .wav sound files to work in Firefox, I had to make sure they were exported at 48kHz rather than at Audacity's default 44.1kHz.


-----

                                                                                                                                                                M.D.J. 2018/07/03


----------

References:

Burnett, Colin (2006). Chess Piece .svg image files. https://commons.wikimedia.org/wiki/Category:SVG_chess_pieces/Standard_transparent. Used under the GNU General Public License.

Wikipedia - Forsyth-Edwards Notation. https://en.wikipedia.org/wiki/Forsyth%E2%80%93Edwards_Notation.