Check out my
new book!
HTML5 Games book
3D JavaScript Chess - mouse support Just a quick post to say that my 3D JavaScript chess game has gotten some better mouse support. You can now use the mouse to select and move the pieces (it's a bit sluggish, I know). Also, when a piece is selected, the valid target squares will be shown in green.



Check it out here
⇓ 28 comments Anonymous

Nice. As you noted, it's bit sluggish, but playable.

Still, it's a pity the pieces completely vanish when you rotate the board. Would be nice if one could at least see some representation of where the pieces are.

June 13, 2008 at 5:31 AM
Jacob Seidelin

Yea, I know. It's just not possible to have them visible and still keep a decent framerate, but I have considered replacing them with markers of some sort. Maybe simple boxes will do.

June 13, 2008 at 7:07 AM
Anonymous

Nice, but...
the White Queen starts on d1 and the King on e1!
Also, detection of Check Mate would be cool. :-)

June 14, 2008 at 12:28 AM
Jacob Seidelin

Whoops!
Yes, check and check mate detection is already on the todo list.

June 19, 2008 at 9:14 AM
Anonymous

Very nice app. but can I request you to make a Chinese chess game (in simple)?

Can you?

Pls tell me if you can!
Thanks a lot!

Viet, Bui Quoc
thonvyvn@yahoo.com

July 12, 2008 at 9:38 PM
Anonymous

Man, I'm starting to believe that you don't know how to play chess. In chess, you CAN'T capture the enemy's king, therefore that's NOT how you win. :)) Send me an e-mail (address on the contact page of my blog... check the link on my nickname) to be helped by a real chess master (I studied chess for a while). :D

September 5, 2008 at 4:47 AM
Jacob Seidelin

Man, I'm starting to believe that you don't know what "work in progress" means. It should be pretty clear that all the chess rules are not implemented yet. Thanks for playing.

September 5, 2008 at 4:59 AM
Anonymous

You did not get my idea. Ok, I could capture the enemy's king because the interdiction of doing so is not implemented, but why did it say that I won? The solution is to delete the portion of code where it says to send the "You win!" message when there's a king missing. Easy!

September 9, 2008 at 1:19 PM
Anonymous

The white King and Queen need to switch positions.

November 13, 2008 at 6:38 AM
Divya This comment has been removed by the author. December 19, 2008 at 1:27 AM Jack Matier

What the hell are with these comments?

It's a WORK IN PROGRESS!!

Not only that this is all pretty cutting edge stuff in the world of javascript. I'm looking at this and practically pissing myself.

Nice job.

If you don't mind me asking.. Where did you learn to really understand the core foundation of Javascript?

December 19, 2008 at 1:28 AM
Jacob Seidelin

Ha, thanks Jack.

Everything I know, I've learned by staying up too late and just hacking away at silly things like this.

December 19, 2008 at 2:24 AM
Anonymous

Hm.. Failed to load under Opera Version 9.62 Build 10467.

((

January 17, 2009 at 1:38 PM
Chessforeva Dev

Yeah. I am no alone in this world.
Chessforeva
P.S. Your 3D seems better, incredible for javascript!

August 24, 2009 at 2:20 AM
Christian

Hi,

a couple of tips if you want to progress a little quicker on the chess side (ie full chess capability including en-passant moves (not there) propper castleing and that sort of thing is maybe to imbed a javascript chess engine.
let me know if you are interested.

I think this looks great and in combination it would be great to include it into phpChess (something I look after).

no matter what you decide to do...it rocks. Thanks for putting it up.

November 19, 2009 at 2:51 AM
Anonymous

Queen goes on her color. Black queen to black square. White queen to white square.

May 4, 2010 at 12:12 PM
Anonymous

Hello!
I was able to integrate your three-dimensional chessboard with a powerful javascript chess engine. The result is amazing:) I have corrected the position of king, but we do other corrections:
1) the coordinates are incorrect: x-axis (in your functions) must go from left to right (of white player), the y-axis must go from white to black;
2) the special moves and the king in check are not yet covered;
3) the graphics is problematic about the zoom;
4) numbers and letters on the edge of the chessboard are missing;

The first two fixes I can easily do myself. About he other two adjustments... I have not enough experience with the canvas for them.
With this comment I ask you, if you have time to do it, to adjust the last two problems above.
I ask because... right now the effect is astonishing ... Imagine when all work perfectly!

Regards,
Stefano.

May 23, 2010 at 6:39 AM
Anonymous

Hello!
I was able to integrate your three-dimensional chessboard with a powerful javascript chess engine. The result is amazing:) I have corrected the position of king, but we do other corrections:
1) the coordinates are incorrect: x-axis (in your functions) must go from left to right (of white player), the y-axis must go from white to black;
2) the special moves and the king in check are not yet covered;
3) the graphics is problematic about the zoom;
4) numbers and letters on the edge of the chessboard are missing;

The first two fixes I can easily do myself. About he other two adjustments... I have not enough experience with the canvas for them.
With this comment I ask you, if you have time to do it, to adjust the last two problems above.
I ask because... right now the effect is astonishing ... Imagine when all work perfectly!

Regards,
Stefano.

May 23, 2010 at 6:41 AM
Anonymous

Sorry if I posted the same comment twice :)
..the chess engine which I integrated with your chessboard is this: http://nanochess.110mb.com/chess4.html

I think it's the most powerful javascript chess engine today...

May 23, 2010 at 6:46 AM
Jacob Seidelin

@Stefano: Sounds great, I'd love to see that.

I know there are some pieces missing but I'm afraid I don't time at the moment to dig around in old projects like this. If you manage to get everything working, please share!

Cheers

May 23, 2010 at 6:50 AM
Anonymous

Now it's too messy to be shared... :)
OK... I'll try to complete all possible moves and make efficient the engine both when it governs the white pieces and governs the black ones. Only, I was wondering if changing now your project will make difficult for you to adjust the graphics later (like number and letters around the chessboard, zoom, etc.)...

Stefano.

May 23, 2010 at 7:34 AM
Anonymous

well... :)

1) covered the special moves (castling and en passant)
2) created a coloured canvas for active player's pieces in check
3) updated "isValidMove" function with the obligations depending on whether own king is in check
4) converted all your scripts to json: THEY WILL BE LOADED ONLY IF PLAYER CHOOSE THE "3D VIEW"
5) created a link for the PGN file of the game (which is dynamically created with the Data Uri Scheme)
6) inverted "x-axis" and "y-axis" in functions

Stefano
pincopalla00 ^AT^ gmail ^DOT^ com

May 25, 2010 at 5:48 PM
Anonymous

Hello!
I completed a first working version of our javascript chess. I opened a new project on sourceforge, here's the URL: http://html5chess.sourceforge.net/test/example.html.
Join sourceforge.net to participate in developing the project and... send me your email address...
Soon I will contact the author of the small but very powerful algorithm that permitted to give birth to this idea.

Tell me what do you think about!
My email address is pincopalla00 at gmail.com.

Bye, Stefano.

July 14, 2010 at 6:49 PM
Anonymous

P.S.: you must click on the 3D view button to see the 3D chess....

July 15, 2010 at 4:43 AM
Anonymous

hey??? are you there?
The new URL of the demo is this:
http://htmlchess.sourceforge.net/demo/example.html

bye,
Stefano.

July 17, 2010 at 6:04 AM
Anonymous

Hi is castling supported to further tower?

September 11, 2010 at 7:24 AM
gordon pollock

hey i was wondering how you got it to do the things it does from gordon pollock

cose i am make a game based on chess i was wornder if you could lend a hand with it rebtopollock@hotmail.com is my email

this is where i have bologed my idea

http://www.dreamincode.net/forums/topic/219790-javascript-game/page__gopid__1272070&#entry1272070

thx for any help offerd

March 6, 2011 at 3:56 AM
Anonymous

HTML5 2D/3D chess says the best way to get help with its software is by creating a new item in the Bugs Tracker. Greetings from Colorado! I’m bored to death at work so I decided to browse your site on my iphone during lunch break. I love the information you present here and can’t wait to take a look when I get home. I’m surprised at how fast your blog loaded on my phone .. I’m not even using WIFI, just 3G .. Anyhow, great blog!

March 9, 2012 at 12:22 AM
Post a Comment