One project I've always wanted to undertake was to re-write Hans' PDN viewer. Nothing against Hans', but I prefer writing things myself so I can better understand them.
I also wanted to improve on some aspects of it and add some more things to it.
Current Version:
http://playground.usacheckers.com/boardTest.html
Current Features:
Setup Mode (drag and drop pieces onto a board)
Show/Hide Numbers
Flip Board
Resize Board on the fly
Capture Current position as FEN
Read javascript string and display position (string is currently a string of length x where x corresponds to the number of playable squares. For standard checkers m = white single, b = black single, W = white king, B = black king, . = empty)
Adjustable Board size (by default an 8x8 board is drawn, but it is built dynamically and therefore can accommodate 10x10 or others.)
Base Class (The base class is simply a board, any color square can be made "playable" so it could extend to chess boards as well)
Replaceable pieces and colors. (The board and pieces can be changed)
Current Limitations:
No front end user functions for most things yet
No PDN interaction
Interface not clean in all browsers
Future Features:
Convert PDN to javascript array of positions (done server-side most likely)
Generate/Display moves list so any move can be clicked to see the position
Multiple Modes to change functionality (setup mode, play mode, view mode, etc. For instance view mode would only show the board and hide movelist, comments, draggable pieces, etc)
One nice neat file to give to other developers for use.
Game search (search for games by players,year,events,etc)
Position Search (search the online archive for a given position)
Nice to Have:
Interface into forums (be able to draw a position and embed it into your post or to paste a PDN into the post and wrap it with [pdn] tags similar to images)
Allow users to make comments on positions and have those comments show up to other viewers.
Simple multiplayer interface (because it's javascript it won't be very secure, but it would be fun to attempt)
Oh and in case anyone is interested I'm using the dojo javascript toolkit to help with this project.
http://www.dojotoolkit.org/
Javascript Checkerboard
-
- Site Admin
- Posts: 294
- Joined: Sat Jul 16, 2005 4:50 pm
- Location: Pennsylvania
-
- Site Admin
- Posts: 294
- Joined: Sat Jul 16, 2005 4:50 pm
- Location: Pennsylvania
Re: Javascript Checkerboard
I'm planning on re-coding a PDN parser. The one I wrote 5-6 years ago works ok, but it's pretty limited.
After seeing the updated specifications (http://10x10.dse.nl/pdn/index.html) I think there is some more stuff to add.
After the parser is created, a section on the site will be opened up that anyone can upload games.
However, since this is the official ACF Site, we have to be careful because of copyright issues when it comes to the games. I can always strip out the comments from games (the copyrighted piece), but it can still be a touchy subject.
The utility pages were basically the first PHP pages I've ever written. They are pure garbage. I started working on the tournament announcements page a few weeks back and is the next thing I will work on when I get some free time.
After seeing the updated specifications (http://10x10.dse.nl/pdn/index.html) I think there is some more stuff to add.
After the parser is created, a section on the site will be opened up that anyone can upload games.
However, since this is the official ACF Site, we have to be careful because of copyright issues when it comes to the games. I can always strip out the comments from games (the copyrighted piece), but it can still be a touchy subject.
The utility pages were basically the first PHP pages I've ever written. They are pure garbage. I started working on the tournament announcements page a few weeks back and is the next thing I will work on when I get some free time.
- Eric Strange
- Posts: 438
- Joined: Thu Mar 12, 2009 12:10 pm
- What do you like about checkers?: What's not to like?
- Location: Colorado
- Contact:
Re: Javascript Checkerboard
Jason,
I have been using kurniks archive board to display everything but I do not have source to the board so I am very limited on what data the board can read. Take a look here:
http://cross-board.com/forums/index.php?act=checkers
look at the OCA database thats what works right now.
I have basically gotten stuck because of the board I am using.
I plan to have every bit of endgame, positions, shots, and gameplay that I can get my hands on put here for everyone to be able to enjoy and watch played out on a board. My coder that was working on this kinda bailed on me because he has money to make. If you would like to help contribute to this I would love to speak with you more and maybe we could work together and really make a difference.
message me when you get a chance and we can talk.
I have been using kurniks archive board to display everything but I do not have source to the board so I am very limited on what data the board can read. Take a look here:
http://cross-board.com/forums/index.php?act=checkers
look at the OCA database thats what works right now.
I have basically gotten stuck because of the board I am using.
I plan to have every bit of endgame, positions, shots, and gameplay that I can get my hands on put here for everyone to be able to enjoy and watch played out on a board. My coder that was working on this kinda bailed on me because he has money to make. If you would like to help contribute to this I would love to speak with you more and maybe we could work together and really make a difference.
message me when you get a chance and we can talk.
-
- Site Admin
- Posts: 294
- Joined: Sat Jul 16, 2005 4:50 pm
- Location: Pennsylvania
Re: Javascript Checkerboard
Just finished re-working the PDN parser and creating/restructuring db tables.
I'm away from my PC with checkerboard on it right now, can somebody post a relatively simple game in PDN format that includes a triple+ jump? The examples I have with me only have double jumps max and I need to test that the new parser handles multi-jumps correctly.
Hoping to have something good by labor day. At least a position search and if all goes well the updated game animator with the ability for anyone to upload new games.
Players and events will be searchable, but setting up those game details may need some cleanup. For instance, Marion Tinsley may be listed in some files as Marion Tinsley, Marion T., or even just Tinsley. Without human cleanup, we can't store them all under the same person.
Openings and known positions to follow soon after. Once positions can be defined, problems shouldn't be too far off, which would enable us to get rid of the current problem creation form and also allow users to visually see the moves to the end rather than just the movelist.
I'm away from my PC with checkerboard on it right now, can somebody post a relatively simple game in PDN format that includes a triple+ jump? The examples I have with me only have double jumps max and I need to test that the new parser handles multi-jumps correctly.
Hoping to have something good by labor day. At least a position search and if all goes well the updated game animator with the ability for anyone to upload new games.
Players and events will be searchable, but setting up those game details may need some cleanup. For instance, Marion Tinsley may be listed in some files as Marion Tinsley, Marion T., or even just Tinsley. Without human cleanup, we can't store them all under the same person.
Openings and known positions to follow soon after. Once positions can be defined, problems shouldn't be too far off, which would enable us to get rid of the current problem creation form and also allow users to visually see the moves to the end rather than just the movelist.
-
- Site Admin
- Posts: 294
- Joined: Sat Jul 16, 2005 4:50 pm
- Location: Pennsylvania
Re: Javascript Checkerboard
Once again I missed my goal. I ran into some issues converting the old games to the new format. We have a little over 9000 games so far and Jim has a lot more to add soon. I ran into some timeout problems during conversion which ended up eating up the free time I thought I was going to have labor day weekend.
http://playground.usacheckers.com/gameTest.php
Anyway here's a rough sample of the new games viewer. I know it looks pretty ugly right now, but if i get some free time this week I'll clean that up.
Currently I have it set at just 1 game, but after it gets beautified, the full list of games should be available as well as a search.
Games will be organized the following categories, please let me know if there are others you would like to see added.
National Tournament
World Title Match
State/District Tournament
International Tournament
Friendly Game
Online Tournament
ID Mail Play
Mail Play
http://playground.usacheckers.com/gameTest.php
Anyway here's a rough sample of the new games viewer. I know it looks pretty ugly right now, but if i get some free time this week I'll clean that up.
Currently I have it set at just 1 game, but after it gets beautified, the full list of games should be available as well as a search.
Games will be organized the following categories, please let me know if there are others you would like to see added.
National Tournament
World Title Match
State/District Tournament
International Tournament
Friendly Game
Online Tournament
ID Mail Play
Mail Play
-
- Site Admin
- Posts: 294
- Joined: Sat Jul 16, 2005 4:50 pm
- Location: Pennsylvania
Re: Javascript Checkerboard
Question.... would it be nice to know if the game came back into published play?JohnAcker wrote:Hmm. A mobile app that could take a game in PDN, compare it to a database of published play, and identify where the game goes off book would be awesome.
My thinking is this:
There are certain lines in which a player has 2 choices of jumps. Neither way matters because the landing will eventually be the same. However if trying to compare move by move against a book, then the order of moves would matter.
So my thought was after missing a book move, to check X (3?) number of moves ahead in the book to see if the game came back on track. This will undoubtedly increase processing time though for a situation that happens once in a blue moon.
Thoughts? Ideas? Suggestions?
I think I could add this feature this in this weekend.
-
- Site Admin
- Posts: 294
- Joined: Sat Jul 16, 2005 4:50 pm
- Location: Pennsylvania
Re: Javascript Checkerboard
Transpositions are nice, but not if the game was played incorrectly. If white goes off book, red misses the win, then allows white to transpose back into book play.
I'm thinking for first crack I'll check for exact matches. Then when a match is not found, allow you to click a button and dig deeper into the matching games to check for transpositions later. That way it should be faster for a majority of uses.
I was kind of hoping for a snow storm today so I could call off work and work on this. We didn't get what they were calling for so I'll have to wait for tonight to see just how much more work I need to do.
The new database format I have captures every position of every game uploaded, so I don't think it will be hard to do. However the server we use is shared among many other sites so the processing power we have available isn't the greatest and I may have to break the search into sections.
I'm thinking for first crack I'll check for exact matches. Then when a match is not found, allow you to click a button and dig deeper into the matching games to check for transpositions later. That way it should be faster for a majority of uses.
I was kind of hoping for a snow storm today so I could call off work and work on this. We didn't get what they were calling for so I'll have to wait for tonight to see just how much more work I need to do.
The new database format I have captures every position of every game uploaded, so I don't think it will be hard to do. However the server we use is shared among many other sites so the processing power we have available isn't the greatest and I may have to break the search into sections.
-
- Site Admin
- Posts: 294
- Joined: Sat Jul 16, 2005 4:50 pm
- Location: Pennsylvania
Re: Javascript Checkerboard
Found a fatal flaw in my current system (as is evident in this weeks game of the week at move 67). I'm going to attempt to fix this problem this weekend as well as load some new games and put together a comprehensive page for finding games/positions.
I had some preliminary work on transpositions, but lost track of where I was at. It basically only compares exact matches so I don't know if I'll put it in yet.
I had some preliminary work on transpositions, but lost track of where I was at. It basically only compares exact matches so I don't know if I'll put it in yet.
-
- Site Admin
- Posts: 294
- Joined: Sat Jul 16, 2005 4:50 pm
- Location: Pennsylvania
Re: Javascript Checkerboard
I've started migrating the ACF games archive and putting everything together at a new page. There's a brief howto about current features of the board on the first tab. The archive and game search tabs also work, but I'm still in the process of cleaning up and categorizing some of the games. It's still a work in progress, but I wanted to throw the link out there now and hopefully get some feedback.
http://games.usacheckers.com/archive.php
Recently our hosting provider has made some changes that causes a problem with my games viewer when trying to view medium-long games. You'll notice some of the old posts on the forum which used to display games no longer work. I'm in the process of fixing that, but it will take a few more days.
http://games.usacheckers.com/archive.php
Recently our hosting provider has made some changes that causes a problem with my games viewer when trying to view medium-long games. You'll notice some of the old posts on the forum which used to display games no longer work. I'm in the process of fixing that, but it will take a few more days.