No description
Find a file
ecobabush b9b3284205 Made castling behavior right.
As I understood, have made change to remove bug with castling.
2017-08-16 13:40:41 +03:00
examples allow snapshots in jpeg format 2017-05-11 22:38:01 +02:00
panorama added panorama 2017-05-10 14:27:51 +02:00
src Made castling behavior right. 2017-08-16 13:40:41 +03:00
third-party do not use es2015 here 2017-05-17 16:03:45 +02:00
.gitignore ignore npm-debug.log 2017-04-28 17:29:22 +02:00
.npmignore packaged for publishing 2017-04-27 07:14:02 +02:00
AGPL-3.0.txt initial commit 2017-03-29 17:30:37 +02:00
CONTRIBUTING.md initial commit 2017-03-29 17:30:37 +02:00
COPYING.md initial commit 2017-03-29 17:30:37 +02:00
favicon.ico added favicon for running browser examples 2017-04-04 23:35:55 +02:00
gulpfile.js added camera view controls 2017-05-17 09:43:27 +02:00
package.json moved to 0.9.12 2017-06-20 09:15:45 +02:00
README.md removed unstable api warning 2017-05-26 00:29:36 +02:00

Jocly is a library and set of tools to integrate boards games into Web environments. It comes with a large collection of abstract strategy games, 2D and 3D user interface, artificial intelligence to play against.

Demos

Controlled interface for playing Chess. Click Other Jocly games to switch to other games.

Simple human vs computer: Classic chess, Circular chess, Multi layers chess, Hexagonal chess, Chinese chess, Middle-age chess, Scrum

Or see and try all available games

JoclyBoard is a multi-platform desktop application based on Jocly and Electron.

Install

npm install jocly

Using Jocly in a Web page

Insert this line to your HTML source code:

<script src="node_modules/jocly/dist/browser/jocly.js"></script>

You are now ready to use the Jocly API through the Jocly global object.

Using Jocly in a node.js application

const Jocly = require("jocly");

You are now ready to use the Jocly API through the Jocly entry point.

Building

  • install the node.js environment (using nvm is probably a good idea)
  • install gulp: npm install -g gulp
  • install git
  • clone Jocly from github: git clone https://github.com/mi-g/jocly.git
  • enter the jocly directory
  • download required modules: npm install
  • build: gulp build
  • dist/browser contains the javascript library to build web applications, dist/node is the module to be used for node.js applications

Notes:

  • using gulp build watch instead of gulp build makes gulp start watching files after the build. Whenever a file is changed, a build is automatically generated
  • you can use --no-default-games to prevent including the game modules from directory, and --modules <colon-separated-directories> to specify additional game modules to include. For instance, gulp --no-default-games --modules src/games/chessbase:src/games/checkers build will only generate distribution for Chess and checkers games
  • you can specify the games to be built in the distribution with the --games option. For instance, gulp --no-default-games --modules src/games --games xiangqi:classic-chess build only generates Jocly for Classic Chess and XiangQi
  • using the no-obsolete option filters out the games marked as obsolete

API Documentation

Jocly offers two distinct APIs: