[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]
Comments/Ratings for a Single Item
I am not sure what exactly you have in mind. You want to drag and drop gifs in an NxM table of checkered background? Without any interpretation of what happens? Or should it be communicated somewhere? I have a Javascript script to view a game it downloads from the web.
I should have explained myself better. What I want is a PGN (portable game notation) which includes fairy pieces and alternative boards. The program in question creates a Javascript for HTML which can traverse the chess variant PGN, graphically, on a gif board. There are such generators for Fide-chess, i.e. which generate the games graphically from PGN. One can then traverse the game by clicking on a button, or the arrow key. Text comments will become visible in the mean time. /Mats
So if I understand you corectly, you want to have a smart program (not necessarily in Javascript) which is aware of the rules of the variant, so it can parse PGN (properly disambiguating the SAN moves and taking account of their implied side effects). This then should pepare an intermediate format of the game, which can be viewed through a dumb viewer written in Javascript. Sounds very close to what I already have, and was using in my 'Battle of the Goths' Championships. ( http://home.hccnet.nl/h.g.muller/goths.html ) I use WinBoard as the smart PGN parser, which then prepares a data file that is loaded by the Javascript-powered HTML page, and unambiguously specifies how the latter should juggle around gif images to replay the game. Only thing that is missing is buttons to scroll through the game, just one to replay it completely from the beginning. But I guess that would be a comparatively simple addition.
Oh, you have already begun the work. Good, then you can continue improving it. No, there needn't be any rules checking. The PGN parser could accept anything, e.g. 5.Xg1-c7. In this way all variants are supported. It would be great to have such a tool. Then people could begin to analyse chess variants, using text comments. In the PGN header one must introduce a board-type tag (e.g. BOARDTYPE 5). See the PGN standard here: http://www.tim-mann.org/Standard The chess variant PGN standard would accept M, X, Z, R, etc., as piece denominators. One needn't have special gifs for every piece. One could have generic gifs, too. The program should be open license so that people also can use it for commercial purposes (e.g. create chess variant CD:s). /Mats
The WinBoard move parser actually does accept a very wide range of move notations, and Xa1-b2 is one of those. This is fine in 'perfect' Chess variants like Shatranj, Xiangqi, and Shogi, where the only capture is replacement capture, and moves never have side effects. But in FIDE Chess there ae already problems with castling and e.p. capture: somewhere along the line from PGN to display it should be known that Ke1-g1 means that a Rook should be moved as well, and that on e5xf6 a Pawn should be removed from f5. In the ChessLive! viewer I solved those problems by recording such moves in the intermediate format as multiple move: in general a move can consist of multiple (fromSquare,toSquare) pairs, and for 0-0 I write, say, e1g1h1f1, and for e5xf6 e.p. I write e5f5f5f6 (or f5f6e5e6). This can keep the viewer totally dumb. But you can't expect that information to be present in the original PGN. it seems that you have a different concept of PGN from what it really is already: you would not find a move like Xa1-b2 in any PGN file, as PGN is supposed to use Standard Algebraic Notation (SAN), which would list the move as Xb2. Or, if there are multiple X on the board that could move to b2, like (preferably) Xab2 or X1b2. I guess in theory Xa1b2 could occur, if there are three pieces of type X, located on the intersections of two files and two ranks (e.g. Na1, Nc1, Na5) that could all go to the same square (b3). So it could occur even in FIDE Chess. But I have never seen it happen. So in SAN normally a full specification of the from-square is absent, even if the instance gnerating the SAN is totally unaware of how the pieces move, so that it has to add a disambiguating rank or file indicator for every move with a piece of which there are multiple copies on the board. This puts the burden on the SAN parser to keep track of the board state, so that it knows where each piece of a given type is located. Anyway, the sitution in WinBoard is that it currently supports 22 different piece types (for both black and white), that you can assign any letter to. If you switch legality testing off, the pieces can move any way you want. (With legality testing on, it has a pre-programmed notion of how every piece should move.) Each piece has a standard pictogram representation on the screen, but this can be overruled as well by user-provided graphics. Board size is adjustable, but in practice the SAN parser does not work beyond 12x10 yet (e.g. it does not understand double-digit rank indicators). PGN defines a variant tag (e.g. [Variant 'xiangqi']). The WinBoard convention for variant naming is such that you can use non-standard board sizes by prefixing them to the variant name, and that a catchall name 'fairy' is defined, where every piece can partcipate. So you could specify 6x6_fairy for a mini-variant on a 6x6 board including Elephants and Achbishops, or even 6x6+4_fairy if it was a Shogi-like variant with piece drops and holdings for 4 piece types.
Long PGN is accepted in all chess databases. You can verify this by copying and pasting the below into ChessBase, for instance. 1.Pe2-e4 Pe7-e5 2.Ng1-f3 Nb8-c6 In an expanded PGN on can have additional header tags which can turn off castling and e.p. [CASTLING 0] would mean turn off castling. Castle-on is default. I find it inexplicable that so few people think it worthwhile with a chess variant PGN viewer for HTML. Such viewers are used everywhere on the net for Fide-chess. It would greatly enhance the analytic aspect, since people are almost only involved in inventing variants. With a viewer, they can begin to analyse them. This is also the first step to a chess variants database. /Mats
What I don't fully understand is why you stress that it should be HTML and JavaScript. Perhaps because I don't fully understand how you envision this to be used. When I encounter a PGN game somewhere (as text on a web page, or as a downloadable .pgn file), I always view it with WinBoard (by pasting it in, or loading it from the downloaded file). Then you have all the functionality you say: you can step through the game, while viewing the comments, edit the game by adding or deleting moves at the end, add comments to it, or edit the exsting comments, save the (edited) game on file, or copy it (or the position) to the clipboard, save positions as a diagram on a bitmap file. Plus you can do more, as it is also possible to have an engine analyze the positions in the game, and show its scores and PVs in a separate window. I always have a WinBoard shortcut on my desktop to quickly start it up when I need to view PGN. I don't see how HTML would add anything to this. The reason I made the JavaScript viewer was to allow people to follow games live with a browser. It was never meant as an analysis tool. BTW, the castling tag is not really needed, absense of castling could simply be indicated in the FEN for the initial position.
8 comments displayed
Permalink to the exact comments currently displayed.