10863 Players currently online!
Man vs. Machine - good luck!
Turn-based games at any time!
Vote for the best move to win!
Do you have what it takes?
Sharpen your tactical vision!
Get advice and game insights!
Learn from top players & pros!
View millions of master games!
Your virtual chess coach!
Perfect your opening moves!
Test your skills vs. computer!
Find the right private coach!
Can you solve it each day?
Bring it all together!
Beginners, start here!
Make friends & play team games!
News from the world of chess!
Search all Chess.com members!
Find local clubs & events!
Who's the best of your friends?
Read what members are saying!
Actually it would not be difficult using ChessBoardJS as a PGN viewer when used in combination with the chess.js library. http://chessboardjs.com/examples#5000 and https://github.com/jhlywa/chess.js (load_pgn) should be all you need to get started.
Of course there are several PGN viewers around, however most of them I find are rather outdated, require additional browser plugins such as Java or are rather restrictive with what you can do with them. The ability to setup positions via a FEN string, or simply being able to move pieces on the board by dragging and dropping with no need for PGN files is awesome, and necessary for the current project I am working on.
Sounds complicated and I don't think I have that skill set. :(
This all does sound complicated.
Thought this community might be interested. Feedback welcome!
If exploring an opening I would start with a sequence like this: 1. e4 e5 2.Nf3 Nc6 3.Bb5 and I don't see how that can be done with the "moves" example. You can either make a bunch of 1-moves or 2_moves but that is not how I can show an opening to a student. It needs so be sequential. One move at a time.
I can make moves on your ChessBoard and record them but the output is not a 'valid' FEN string that I can feed into chess.com analyzer board. I think the FEN string needs to know about 'en passant' and who is to move next and who has and who has not castled.
It would be nice if I could give a PGN String as an argument just the way I can do that with a FEN string and then play through the sequnce of moves.
I love the graphics and the size of the board! I like that I can include it on my server and generate a board. I can see it would be great for a presenting a puzzle.
I guess the chess.com analyzer board would be a model for your ChessBoard?
I will see if I can do anything with what Trahald suggested but I would have to learn a lot of JS and Jquery is my guess.
I have the two, ChessBoard and Chess, working together. :)
Now I will see how to use the png functionality of Chess to display a board via CHessBoard and then play through the png string so an opening can be explored.
I will keep you posted.
By the way the source for the images of the pieces is hard coded and if you want to move a srcipt out of the parent directory you will need to either change the hardwire code or copy the img/chesspieces/wikipedia png images to the current directory.
Let me know if anyone wants more details on how. I can post or send the test scripts.
So where can I get the HTML code for the board?
The above presumes you have downloaded the files from http://chessboardjs.com/ and https://github.com/jhlywa/chess.js
I renamed the folder from chess.js to chess_J. The folders chessboard and chess_J reside in a folder named chess. I run the script from the chess folder and that necessitates having to copy img/chesspieces/wikipedia into the chess folder.
The html code displays a chessboard in the start position and then random moves are displayed. That is as far as I have gotten.
I hope this is as clear as mud. :)
I have a few questions about the code.
1->What does do??
I have seen it in a lot of places where they tell you how to make chessboards.
2->what does do??
be in head section if you are using HTML 5 or did I get that concept wrong?
4->Can you show the out put of the code using insert position or game??
5-> can we discuss this at length using messages?
oakmac posted his ChessBoard software, which displays a chessborard, and some basic functions, here: http://chessboardjs.com/ This needs to be downloaded and unzipped.
The other piece of software that is needed can be found here: https://github.com/jhlywa/chess.js and it is the same sceanrio > you need to unzip, etc.
And my demo script takes advantage of these two two software apps and show a random game being played.
I am not an HTML or HTML 5 expert and have no clue how things should work.
All I know I have a script that works for me and you will have to adapt it after you figure out: http://chessboardjs.com/ and https://github.com/jhlywa/chess.js
What are you trying to do?
Hi folks :)
I posted here a while ago and promptly forgot about it; sorry!
Appreciate the kind words and feedback.
If anyone runs into issues the best place to get help is on the GitHub project issues: https://github.com/oakmac/chessboardjs/issues?state=open
This is awesome!
I have been using it to teach my students :=)
There is an embedding option which gives the html to embed starting with <script src="http://www.apronus.com/chess/playboard.js"></script>. If you download the script and put it on your server then you can use the whole thing without linking off to apronus.com.
Static and animated diagrams are images to be saved so there is no problem here.
I agree. This is what I have done by utilising chessboardjs, chess.js, sunfish chess engine. The application is hosted at www.chessbro.com
Anatoly Karpov is 64!
by DrSpudnik a few minutes ago
7/4/2015 - IM Bosboom - IM Bitalzadeh, Corus C, 2009
by slaverobbie a few minutes ago
by amilton542 3 minutes ago
Your analysis chess set
by cgrau 5 minutes ago
when should a lossed game be resigned
by delcarpenter 9 minutes ago
Hurt/Heal World Chess Champions
by 8_x_8 20 minutes ago
i am really getting bored of chess what should i do
by RonaldJosephCote 25 minutes ago
Admins: Spam alert, you may wish to check this
by RonaldJosephCote 28 minutes ago
Disconnect in live Chess and lose?
by Clopin 33 minutes ago
by Tiger-Woodie 36 minutes ago
Why Join | Chess Topics |
Help & Support |
© 2015 Chess.com
• Chess - English
We are working hard to make Chess.com available in over 70 languages. Check back over the year as we develop the technology to add more, and we will try our best to notify you when your language is ready for translating!