WebGL Chess Board.
Work in progress, does not play actual game yet - http://userspace.org/CHESS-BOARDz/
DESIGN GUIDELINES:
*Using different materials for each piece and designating its name in it.
Did not use the mesh since it coud be multiple and animate in the DAE.
*Using indivdual squares for board that can be selected.
*Each model is a one piece mesh. Not multiple. Made and exported in Blender.
*On top of using WebGL I want to use latest HTML5 and CSS3 elements.
*Want to keep basic colors and not textures for now. If a texture is used
convert it into a CSS element, so it can be transfered easily with script.
*Keep this version of the game classical, any major
variations can be forked off.
Had to genereate the squares after pieces inside init(), order of operation made it work.
The init() function does not kick off correctly,you will have to manaully click the "init hack"
button to get it to work. The loading of the DAE meshes are different rotation alignments than the
three.js meshes.So when animating or moving the mesh it gets converted to a three mesh after you
remove then add it back. So I had to add hacks into the script to deal with this issue. The
fix will be to "add" and "remove" then "add" again to syncronizes up all the parts. this will be
needing done if I want to do animation or drag moves. For now moving piece from one square to another
will be fine.
IRC: You can catch me online as user factor using
an irc client asimov.freenode.net or web - http://webchat.freenode.net/
Chat Rooms #tulsalug #three.js #webgl ##chess #blender
Other sites and githubs used
P4WN https://github.com/douglasbagnall/p4wn
CHESSBOARD.JS http://chessboardjs.com https://github.com/oakmac/chessboardjs/
THREE.JS http://threejs.org/ https://github.com/mrdoob/three.js/
HTML5 audio API XM MOD player https://github.com/junghans-schneider/ModPlayer.js
TODO:
P = Priority Get Done item (only one per list)
N = Normal Get Done item.
L = Low level Get Done item.
I = Idea to research
F = Good feature to have,if I get a chance to add it.
X = COMPLETED
[N] Integrate modified p4wn javascript chess engine to get put FEN data.
[F] Add AI and rules with p4wn chess engine for computer player.
[X] Convert board positions to FEN board positions.
[F] Import / Export / Record FEN moves.(Menu Option)
[N] Limit piece selector to side that is active In Play
[L] Make Start Game Button Work.
[L] Remove selector for Rotate mode.
[I] Add HTML5 Web Audio API XM MOD Player for background music selection.
[N] Fix init() location , so that it makes sense and works on load.
[X] Show options the piece can move once selected.
[F] Make DAE meshes convert to three mesh by removing and add back to scene.(remove conversion hacks)
[I] Animate / make draggable a selected piece.(Have to remove mesh hacks first.)
[F] Once mouse up event detected on draggable object,make sure location is within chess rules.Else revert back.
[X] Rotate TOP view so pieces that have been taken out of game can be seen.
[N] Start game with white mode in view instead of rotate mode.
[I] Make Multiplayer with remote players.(Need FEN get and put working.)
[I] Add rules of game section.
[N] Fix roatation after first move of knight.
[N] Add END GAME options to actions.