Check out Glinski's Hexagonal Chess, our featured variant for May, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Comments/Ratings for a Single Item

Earlier Reverse Order LaterLatest
Jocly. An html-based web platform for playing 2-player abstract stategy games.[All Comments] [Add Comment or Rating]
📝Michel Gutierrez wrote on Sun, Apr 30, 2017 01:20 PM UTC:

Jocly is now available in open-source as a library (https://github.com/mi-g/jocly) and as a multi-platform desktop application (https://github.com/mi-g/joclyboard).

50 Chess variants supported, support for external engines (fairymax) for some of them.


Erik Lerouge wrote on Fri, Nov 9, 2018 05:58 PM UTC:

The Jocly website isn't accessible for several days (I don't know exactly how much time), nor embeded games on other websites; and the Jocly Android apps seem to have disappear from Google store. It would be a pity if Jocly wasn't working anymore; it had a graphically beautiful interface. It was a great work from its developers.


H. G. Muller wrote on Fri, Nov 9, 2018 09:56 PM UTC:

Agreed, Jocly is a brilliant piece of software. Too bad I only discovered it two weeks ago, and that the server went off the air a few days later.

The news is about as bad as it can be: the server will be off line at least until mid 2019. Before it went off the air it was continuously crashing, and too messed up for easy repairs. Mi-g currently has no time to fix it. The 'easy-embedding' method through jquery unfortunately was dependent on the server for fetching the required library scripts, so any website that was using this method shares the fate of the jocly.com server.

I have installed the entire Jocly library on my own server, and ported the demo applets for the variants I had made to use that, rather than the now defunct jocly.com. (Mind you, this is not a replacement for the game server, which was not open source, so there is no connectivity with other users; only the Jocly interface works.) So if you want to play against the Jocly AI, you can do it at http://hgm.nubati.net/jocly .

I implemented some new chess variants there, and the mentioned page allows direct access to those. All standard Jocly variants (i.e. those you get with the sources from Github) still work too, though, and you can switch to them from one of the directly accessible demos. The new variants are:

  • Spartan Chess
  • Scirocco
  • Elven Chess
  • Werewolf Chess
  • mini-Shogi
  • regular Shogi
  • Tori Shogi

More will likely follow soon (CwDA?, Chu Shogi?).


H. G. Muller wrote on Tue, Jan 22, 2019 07:05 AM UTC:

I now set up a minimalistic (turn-based) server for on-line game play using the Jocly interface. It supports the functions of registering as a user, logging a game request, subscribing to a game request (so it becomes a game), fetching a game, adding a move to an existing game and resigning a game. Offering draws and keeping track of time usage will soon be added. I am sure much more could be improved as well. It supports all games supported by Jocly, including the chess variants I programmed myself. The client page is at:

http://hgm.nubati.net/jocly/jocly-master/remote.html

Comments and suggestions are welcome!


Kevin Pacey wrote on Tue, Jan 22, 2019 07:24 AM UTC:

H.G.: When I click on the link you gave, the page is blank for me, at the moment.


H. G. Muller wrote on Tue, Jan 22, 2019 08:48 AM UTC:

Strange. For me it looks like this:

I am using FireFox. But I now also tried some others: it also works in Chrome, but in Internet Explorer I only get a blank page. Are you using IE?

Does the standard Jocly demo (at http://hgm.nubati.net/jocly/jocly-master/examples/browser/control.html ) work for you?


Kevin Pacey wrote on Tue, Jan 22, 2019 05:25 PM UTC:

Your latest link doesn't work for me either, unfortunately. I am using Internet Explorer, though. I used Firefox for a while, but my laptop had troubles with it, I vaguely recall (it was long ago).

In any case, I'd be curious to know if blitz time controls would work on your server, as they do with standard chess servers.


H. G. Muller wrote on Tue, Jan 22, 2019 06:13 PM UTC:

It seems that IE is not able to run Jocly, then. I just finished adding code to it to keep track of the players' time usage, but currently the clocks are always initialized to 10 days per player. Pretty far from blitz, I suppose... It was really designed as a turn-based server for correspondence chess (variants).

Of course everything would still work if you initialize the user clocks to a very short time, but the way the interface works would be pretty cumbersome: When your opponent moves you would not automatically get to see it. In stead you would have to keep loading the game by clicking it in the game overview until you see that it is your move again. The idea was that you would typically not sit at the keyboard anyway when your opponent moved, and that the computer might even be switched off. And after you made the move on the display, you would still have to press a 'submit' button before it gets sent, to give you the opportunity to verify it for mouse slips and the like. All that of course takes very significant time compared to a blitz game, slowing you down by perhaps a factor 5.

Of course this can all be fixed; I could of course add an option that would sent the played move automatically, which the user could tick when he considers speed of more importance than reliability. And I could have the web applet keep downloading the selected game automatically for as long as the opponent is still on move, every second or every 10 sec. (The frequency depending on how much time is still left on the clock; if it is days, checking every 10 minutes would probably be fast enough.)


Erik Lerouge wrote on Fri, Jul 19, 2019 05:20 PM UTC:

The Jocly Apps are actually still available on the Apple App Store (but not on the Google Play Store). Of course connection to the server isn't possible anymore, but the IA works.


A. M. DeWitt wrote on Wed, Feb 10, 2021 09:36 PM UTC:

They actually managed to get the site back up. I though Jocly was permanently down.


Jean-Louis Cazaux wrote on Wed, Feb 10, 2021 10:29 PM UTC in reply to A. M. DeWitt from 09:36 PM:

Yes, strange. Not all the games are present, for example Gigachess and Terachess are missing. Jocly is reactivated times by times on other sites. I believe it is because it is mainly open source and some people are able to re-put it on line. I was told by the creator, who I met, that he had gave up because he was finally fed up and demotivated by many many consecutive attacks from hackers. Bad and sad. (His next project was to have Jocly coupled with virtual reality and I had the chance to have a demo. It was impressive to get really projected on the board and be able to fly above the board or move the pieces around yourself. So bad this has been stopped).


H. G. Muller wrote on Thu, Feb 11, 2021 08:52 AM UTC in reply to A. M. DeWitt from Wed Feb 10 09:36 PM:

Well, 'permanently' is a relative notion. At the time when the crash happened the developer was too busy with more important things, for the foreseeable future. But perhaps that has changed now.

The Jocly interface itself is public, but the server software of the jocly.com website was private. So it was easy for many other websites to embed the Jocly interface, but that did not make them a site for on-line play. I also set up Jocly on my own website, and even implemented some new games for it. (Mostly variants with drops, like Shogi, or other variants that posed some challenge that was not supported by the standard code for chess variants, such as multiple royalty for Spartan Chess, multiple Capture for the Chu Shogi Lion, etc.) I even connected Jocly to my own turn-based server, so people could use it to play on-line, and some people actually did.


🕸Fergus Duniho wrote on Thu, Feb 11, 2021 01:18 PM UTC in reply to H. G. Muller from 08:52 AM:

I also set up Jocly on my own website, and even implemented some new games for it.

Could we add local copies of these to the collection of Jocly games on this website?


H. G. Muller wrote on Thu, Feb 11, 2021 03:24 PM UTC in reply to Fergus Duniho from 01:18 PM:

I suppose this should be possible, by replacing the file tree that contains the Jocly 'library' by the corresponding file tree from my website (which supports the new games), and making a separate html page for each game, which embeds Jocly with parameters that request that game. I don't know if the version of Jocly installed here now is the standard version from GitHub, (from which I started), or that there are some additions (like extra games) we don't want to lose. In the latter case things would be a bit more complex, as we would somehow have to merge the additions.


🕸Fergus Duniho wrote on Thu, Feb 11, 2021 03:59 PM UTC in reply to H. G. Muller from 03:24 PM:

I suppose this should be possible, by replacing the file tree that contains the Jocly 'library' by the corresponding file tree from my website (which supports the new games), and making a separate html page for each game, which embeds Jocly with parameters that request that game.

Would you provide me with the files for doing this?

I don't know if the version of Jocly installed here now is the standard version from GitHub, (from which I started),

I installed Jocly in 2016, and the version on Github is older than that. So, I'm presuming it's the same. I can find out whether it works after trying to install one of the games you programmed.

or that there are some additions (like extra games) we don't want to lose.

We just have the games I added to this site in 2016.


H. G. Muller wrote on Fri, Feb 12, 2021 10:25 AM UTC in reply to Fergus Duniho from Thu Feb 11 03:59 PM:

The entire tree for the Jocly files on my website is already present as a tar ball there: http://hgm.nubati.net/jocly/jocly.tar.gz . It should be enough to download and unpack that.


🕸Fergus Duniho wrote on Fri, Feb 12, 2021 06:09 PM UTC in reply to H. G. Muller from 10:25 AM:

The entire tree for the Jocly files on my website is already present as a tar ball there: http://hgm.nubati.net/jocly/jocly.tar.gz . It should be enough to download and unpack that.

I copied that over with wget, but it did not contain the games you programmed, which is what I was asking you for.


H. G. Muller wrote on Fri, Feb 12, 2021 11:05 PM UTC in reply to Fergus Duniho from 06:09 PM:

Oh, sorry, I apparently have two such files there, in different directories. I suppose the one you got is the one I used for installing. The other one is at http://hgm.nubati.net/jocly/jocly-master/jocly.tar.gz . This is of later date, also later as the game files I added to the tree.


🕸Fergus Duniho wrote on Sat, Feb 13, 2021 01:41 AM UTC in reply to H. G. Muller from Fri Feb 12 11:05 PM:

I installed your tar file to /play/jocly/temp/, and I can see that it has files for Shogi, Smess and other games. Assuming this would work as is, what URL should I go to in order to see a game in action? I see that on your site you use a page called control.html, but that page was not included in your tar file.


H. G. Muller wrote on Sat, Feb 13, 2021 09:18 AM UTC in reply to Fergus Duniho from 01:41 AM:

This control.html was a demo file that came with the Jocly source distribution, and it is included in the tree you installed ( /play/jocly/temp/examples/browser/control.html ). It seems operational there. I might have made a copy of it in another directory on my own website. By appending an argument ?game=... it is possible to change the initially-selected game. (But there is a link on the page that can be used to switch to any other game.) I suppose you can see the required game names for the games I implemented on my Jocly starting page.

It seems the other games you have on CVP use another method for embedding Jocly than just linking to control.html with a game-selecting argument; they have their own html page, invoking Jocly through some embedded script, but having a CVP header and some other info, plus some ads added. I am not familiar with this method of embedding. It might be an older one; I remember having seen an obsolete Jocly tutorial, which discussed a very simple method of embedding that was dependent on the jocly.com server. This could be that method, except that it seems to link to a local version of the Jocly library ( /play/jocly/jquery.jocly.min.js ) which the described method would fetch from jocly.com.

I suppose you could also create game-specific pages derived from control.html, by adding the CVP- and game-specific elements to it, deleting the game-switch link from it, and then linking to it with the argument that selects the game it describes. My turn-based server page http://hgm.nubati.net/jocly/jocly-master/remote.html is a similarly adapted version of control.html.

The Jocly version as it now builds from the GitHub sources seems much less monolithic than the jquery.jocly.min.js file; the latter seems to contain everything, while the version I build keeps the Jocly library distributed over a huge tree, and loads the required components on demand. E.g. there all games are in separate files jocly/dist/browser/games, which again has a subdirectory 'chessbase' that contains all chess variants. Where each variant then has 3 .js files (config, model and view), two .html files (description and rules) and a .png thumbnail image, and the config.js then indicates what other components are needed for more basic support (e.g. what type of board view, the general chess model). All the graphics for chess pieces is in a subfolder chessbase/res.


🕸Fergus Duniho wrote on Sun, Feb 14, 2021 06:25 PM UTC in reply to H. G. Muller from Sat Feb 13 09:18 AM:

Although I was tempted to start with Shogi, I decided I had better start with something that doesn't require additional graphics. So, I started with Janus Chess. I copied over files for Janus Chess, changed named from janus-chess to januschess-custom, and adapted a page I had for Capablanca's Chess. The page I created starts up Jocly, but it doesn't display Janus Chess. So, I decided to compare the model and view files I have for Capablanca's Chess with the model and view for Janus Chess. Those for Janus Chess each contain the whole script in a single line, making them difficult to read. Besides that, they are so incredibly different and obfuscated that I cannot make heads or tails of them. It's more like something a compiler would output than a human would write. Since that particular game comes with Jocly, I checked out some that you had written yourself, such as Werewolf Chess and Shogi. These begin with a long block of unformatted text, and then include additional formatted text. These long blocks of text make it very difficult to learn how to program new games for Jocly by studying the code for other games. I think this is holding back the development of games for Jocly. In contrast, Zillions-of-Games and Game Courier both use code that's easier for the programmer to follow and adapt.


H. G. Muller wrote on Sun, Feb 14, 2021 08:17 PM UTC in reply to Fergus Duniho from 06:25 PM:

Those for Janus Chess each contain the whole script in a single line, making them difficult to read. Besides that, they are so incredibly different and obfuscated that I cannot make heads or tails of them. It's more like something a compiler would output than a human would write.

And that is exactly what it is. What you are looking at is the so-called 'uglified' library file, generated in the compilation process that created the library. This is common practice in JavaScript, to minimize the size, and thus the bandwidth use of the server that hosts it. The tar ball only contained that library. The source code is also on my website, at http://hgm.nubati.net/jocly/jocly-master/src/ .

Beware, though: that is the original source code I downloaded from GitHub. It doesn't contain any of the games I implemented. Initially I had so much trouble compiling the thing (I actually never managed that on Windows, and finally had to create a new Virtual Machine running a recent Ubuntu version to get it done), that I just started hacking the new games into the library. Unfortunately the compilation process fuses the general Chess code ('base-model.js') with the variant-specific model file in the compilation process. So what I did is take a file for normal Chess, and replaced the uglified code of the chess model by normal source code for the variant I wanted to implement instead. But leaving the uglified base-model.js that was also in the file just as it was.

In the end I mastered the compilation of Jocly on Linux, and back-ported most of the hacks I had done to decent source code. (But not all yet.) That source code can now be found in my on-line git repository (jocly.git section, 'hgm' branch). If you go to the 'tree' of the latest snapshot ('Fix castling and stalemate in Wildebeest Chess') in that branch, to directory /src/games/chessbase/, you will find the werewolf-model.js and werewolf-view.js files (and spartan, and shogi, and elven, ...) there as decent source code. Since some of these games require originally unsupported chess concepts (such as multiple royalty, double capture) those will only work together with files 'deeper' in Jocly (e.g. base-model and -view for general chess-variant support) that I also modified. You would have to use my versions for these as well, and I am not sure whether the method you were using for embedding Jocly would allow that. (It probably takes those from the jquery.jocly.min.js file, and you would have to somehow overrule that.)

I think it would be a far easier path to adapt the control.html that comes with the new Jocly distro; it is a quite simple page, as all the script to actually make Jocly appear and run it is in an external JavaScript file. It should be very easy to convert the look of that file to what you have for the games already on CVP. Just add the ads at the bottom of the column on the right, and put a description of the game at the bottom, and CVP headers and footers above and below it. The only thing that is dependent on the variant is the rule description. But all these Jocly games already come with rule-description files, and you could just copy-paste those there. Or, if you want to be really smart, put some JavaScript code there that would display the rule description for the variant that the argument in the URL requests in a frame. Then you can use exactly the same page for all variants.


🕸Fergus Duniho wrote on Tue, Mar 9, 2021 06:13 PM UTC in reply to H. G. Muller from Sat Feb 13 09:18 AM:

I'm working on a php version of control.html a couple of directories lower at /play/jocly/control.php. I added an extra parameter to the query string to tell which directory a game is in. The following URL works:

https://www.chessvariants.com/play/jocly/control.php?game=xiangqi&dir=chessbase

Curiously, though, when I reverse the order of the two parameters, it gives me Chess instead of Xiangqi:

https://www.chessvariants.com/play/jocly/control.php?dir=chessbase&game=xiangqi

Bearing this in mind, I created a rewrite rule in .htaccess that lets me use the dir value as a directory name before the game of the name. Given that the following URL show the description and rules for the correct game, I can tell that it is being rewritten correctly, but when I use it, Jocly does not work:

https://www.chessvariants.com/play/jocly/chessbase/xiangqi

I added some code to pass the PHP variable's value to a JavaScript variable called game, but it didn't help. I also tried GAME, but that didn't help either. Any ideas about what I can do?


🕸Fergus Duniho wrote on Tue, Mar 9, 2021 09:43 PM UTC in reply to Fergus Duniho from 06:13 PM:

I solved the problem I described by including the original control.html in an iframe with the correct query string. However, this has introduced a new problem. The text underneath the iframe will not show up anymore.


H. G. Muller wrote on Tue, Mar 9, 2021 10:06 PM UTC in reply to Fergus Duniho from 09:43 PM:

I have no experience with iframes. But can it be a problem that an iframe must have a closing tag </iframe>? Once I forgot to put a </script> tag after an external JavaScript source, and that also made all following text disappear...


25 comments displayed

Earlier Reverse Order LaterLatest

Permalink to the exact comments currently displayed.