Check out Janggi (Korean Chess), our featured variant for December, 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 ]

Single Comment

Jocly. An html-based web platform for playing 2-player abstract stategy games.[All Comments] [Add Comment or Rating]
H. G. Muller wrote on Wed, Mar 10, 2021 09:47 AM UTC in reply to Fergus Duniho from Tue Mar 9 09:43 PM:

I am not sure what this 'dir' argument is supposed to do. It is not needed; just specifying a 'game' as argument to control.html has always been sufficient for me.

It seems the Jocly library uses a summary file jocly-allgames.js that lists all the games by name, one line per game, with the most essential information on that game. This line refers to a file <game name>-config.js (also created during the compilation process that created the library), which contains an elaborate overview of all the 'resources' used by that game, and where to find those. For the chess variants these are also in the chessbase directory.

E.g. a few lines of jocly-allgames.js:

"courier-chess":{title:"Courier Chess",summary:"12x8 chess (12th century)",thumbnail:"courier-thumb.png",module:"chessbase"},
makruk:{title:"Makruk",summary:"Thai Chess",thumbnail:"mk-thumb.png",module:"chessbase"},
"elven-chess":{title:"Elven Chess",summary:"10x10 Chess with a double-capturing piece",thumbnail:"elven-thumb.png",module:"chessbase"},
"spartan-chess":{title:"Spartan Chess",summary:"An unorthodox Spartan army takes on the Persian (FIDE) army",thumbnail:"spartan-thumb.png",module:"chessbase"},
"werewolf-chess":{title:"Werewolf Chess",summary:"Queens are replaced by contageous Werewolfs",thumbnail:"werewolf-thumb.png",module:"chessbase"},
"team-mate-chess":{title:"Team-Mate Chess",summary:"Chess with pieces that can only force mate in pairs",thumbnail:"team-mate-thumb.png",module:"chessbase"},
"scirocco-chess":{title:"Scirocco",summary:"10x10 chess with many weak, bt promoting fairy pieces",thumbnail:"scirocco-thumb.png",module:"chessbase"},

I guess the 'module' field points to the sub-directory in 'games' where Jocly has to look for the <NAME>-config.js, which informs it on what it needs to run the game. Since the config.js files are created in the compilation process, they are uglified. But before I knew how to compile, and was hacking games directly into the library, I made some of these by hand (e.g. elven-chess-config.js).