JDuplicate Console Client v0.5.10 README
by Luc Vo Van
luc [at] jduplicate [dot] org

Licensed under GPL
February 26th 2004, Paris, France
Latest revision: January 21st 2005


JDuplicate Console Client (JDCC) is a client to the JDuplicate server. Unlike the JDuplicate Swing client developed by Jeremy Grumbach, JDCCs main goal was to be command line oriented, thus allowing gameplay through simple text based SSH or telnet sessions. JDCC currently supports version 0.2 of the JDuplicate protocol and was initially developed to develop/debug the JDuplicate server while Jeremy was developing the reference, completely Swing based, GUI client.
A graphical, more intuitive, Swing based interface to JDCC is also available by default for those willing to benefit from both the intuitive of a graphical interface, and the power of command line based input: it features colored texts, command history recalls, macros as well as a basic point & click GUI interface. The choice of using JDCC rather than the reference JDuplicate Swing client is available is a matter of personal taste.

JDuplicate is written by Luc Vo Van, based on the Java API developed by the JDuplicate team.
Board and tile art by Tobias Sargeant
French localization by Ahmed Ait Mouss
Russian localization by Akkerman 'Volt' Sergey

Playing, for the impatient

Connecting to a server and joining a game has been made significantly simpler as of version 0.5.7 of JDCC.

Connecting, Disconnecting and Quitting

You can connect to a JDuplicate server by issuing a /C command, short for /CONNECT, optionally followed by the servers IP and port. Omitting those parameters will make JDCC connect to the default server and port, eventually specified by the environment variables SERVERIP and SERVERPORT.
Disconnecting from a server at any time is possible by issuing the /DISCONNECT command. It is ethically recommended to part from any game you are currently in before disconnecting from the server.
Quitting JDCC is done with the /QUIT command when not connected, and with the /QUIT! command when connected. The use of the /QUIT! command is not recommended.

Playing a game

Upon connection, you will be greeted into what is commonly called "The Hall", where people not currently participating in a game are able to chat. You can list the games currently available on the server with the "/LIST GAMES" command, and join a game with the "/JOIN" command, followed by a space and the game name.

After joining a game, you will be able to chat with the other players in the same game. Chatting is simple: Just type in your message. All text not starting with a slash '/' is considered chat text. You can also whisper to another player with the /W command, followed by the nick of that player, and the message (ie: "/W joe what's up joe?"). Whispers can cross games: you can whisper to a player not currently in your game.

Another fun thing you can do is performing action chats, with the /me command. It is similar to the IRC command, and if you don't know what it does, just try it out it can be quite fun.

The game will start when the creator issues the /START command, and all players in the game will be given the first hand of the game. See the moves input section to learn how to input a move.

A player can leave a game at anytime by using the /PART command, this command can be followed by a reason which the other players will be able to read (i.e.: "/PART Mom is calling for diner sorry folks!")

A game ending does not mean players being thrown out of it. The game will stay alive until all players have parted from it.

/? will give you a reminder of what commands are available; a section of it describes the commands which are available when in-game. Useful ones are:

Inputting moves

Prompt-based input can seem a bit tricky at first, but is in fact quite easy to get used to. You can input a move by issuing a /P command, followed by three parameters: two coordinates and a word. The orientation of the word is dependant on the order in which you provide the coordinates:

For example, inputting the play command: /P 1 A hello will issue a vertical word "HELLO" starting from the upper left corner of the board. Typing /P A 1 hello will issue the very same word, but this time horizontally across. Playing words across other words is possible: just do as if the crossed letter wasn't there: JDCC will automatically strip pre-existent letters from your move. JDCC's Swing interface simplifies the tedious task of finding out coordinates: just point, left click on the square you wish to start placing your word and type your word. Just click back on the arrow to change its orientation. You can also hold the button, drag the cursor in the direction in which you want to play, and let the button go and type in your word. The proper commands and coordinates will appear in the prompt, you can then just type in your word. If a mistaken move has been typed in, playing a new move before the turn timeout will overwrite it. As the moves are sent only on timeout, players are able to change their moves until the very last second. If you are really sure you want to validate your move even though the time has not run out, you can do so with the /VALIDATE command.

Interfacing JDCC with a moves server

JDCC can be configured to use a moves server. A moves server is, basically, a program that plays like a player does. Interfacing JDCC with such a server means that instead of letting the player play moves entirely on his own, he can query a moves server for a suggestion. JDCC can also be configured to play the suggested move automatically.

When connected to a moves server, board updates are handled automatically in order to always keep the moves server informed. If you're interested in developping your own moves server, you can get the specifications from the JDuplicate Server documentation package (xmlrpc_format.txt), and can use JDCC as debug tool.

/SET, environment variables and the configuration file

JDCC makes use of environment variables (local to JDCC, and completely unrelated to your operating system's environment variables) to allow easy customization. You can set a variable to any alphanumeric value by using the /SET command. Some variables are protected and cannot be modified (like GAMENAME or SERVERNAME, which are set by the server). You can display a list of currently set variables by issuing the /VARS command.

A simple example would be modifying the USERNAME environment variable to modify the current nickname.

Instead of having to change manually the values of your environment variables everytime you launch JDCC, you might want to make use of a configuration file, named jdcc.cfg, which you can create at the base of your binaries directory. The file format is simple and to be repeated every line as needed:

[variable name]=[value]

An example jdcc.cfg file that sets the default server and nickname would be:

JDCC pre-defined environment variable

USERNAME Your nickname
SERVERIP Default server IP adress used with /C
SERVERPORT Default server port used with /C
LOCALE Determines in which language JDCC texts are displayed. EN, FR and RU are currently supported.
FONT Changes the font used when in graphics mode.
Values can be courrier, helvetica or other fonts recognized by your JRE)
FONTSIZE Changes the size of the font used in graphics mode.
A value between 8 or 16 is usually used.
BOARDTYPE Changes the art used to draw the game board in graphics mode, only two values are currently supported.
You can set this to 0 or 1.
SOUND Set to ON to enable sound support
SORTSCORES Set it to ON if you want the scores to be sorted when displayed.
MACROx (x=1 to 16) commands bound to the F function keys
AUTOVALIDATEMACRO Set to TRUE if you do not want to press ENTER after pressing a macro key
TIMESTAMP Set to ON to enable timestamping of all messages in the text window
DEBUG Enables debugging mode, more detailed messages will be ouputted to the screen.
MSRV_ENABLE Set to ON to enable moves server support. When moves server support is enabled, game creations, board updates, moves applications (at the end of a turn) are forwarded to the moves server.
MSRV_URL IP address of the moves server to use
MSRV_GID The game id obtained when last connected to a moves server. Can't be changed by the user.
MSRV_AUTOPLAY When set to ON, the moves received by issuing a /MSRV_GETMOVE command is automatically played.
MSRV_AUTOVALIDATE When set to ON, and MSRV_AUTOPLAY set ton ON too, moves will be validated automatically.
MSRV_DICT_language These variables are used to specify the dictionary/language relation used when connecting to a moves server. For example, if you are joining a game where the language setting is italian the moves server dictionary that will be used is $MSRV_DICT_ITALIAN. When first connecting to a moves server, issue the /MSRV_GETINFO command to know what dictionaries (and tilesets) are available in order to set your MSRV_DICT_language variables properly.
MSRV_TSET_language Specifies the tileset to use for a specific language. See MSRV_DICT_language.

Commands listing

JDCC has many commands, each with its own purpose and parameters.

/MSRV_GETINFO Queries the moves server for its capabilities.
/MSRV_GETMOVE Queries the moves server with the current situation in order to get a moves suggestion. If the MSRV_AUTOPLAY variable is set the suggestion is submitted.
/MSRV_CHECKWORD word [language] Checks a word in the moves server's dictionary. The language used is the one specified in the curren't room's language, or optionally with the language given as second argument


You can setup your own macros in JDCC by assigning single commands and parameters to the function keys (F1 to F16) on your keyboard. Pressing the corresponding function key will fill the prompt with the content of the macro, which you can then validate by pressing the ENTER key. You can also set the AUTOVALIDATEMACRO environment variable to TRUE if you want your macros to be validated without having to press ENTER everytime.

Setting up your macros is easy: each function key Fn is bound to an environment variable MACROn. For example, setting the environment variable MACRO3 to /NICK IloveF3 will input/execute the command /NICK JohnDoe. Of course, macros are most useful when defined in your jdcc.cfg file.

Another jdcc.cfg example with macros, recursive use of environement variables

      FRGAME=myfrenchgame 90 fr 5 Partie en francais 90s par tour
      ENGAME=myenglishgame 90 en 10 English game with 90s per turn
With this last configuration file, all text display will be in French due to the LOCALE variable being fr (that doesn't mean the games have to be played in French! Only the local texts shown will be in that language).
Pressing F1 would connect you to the jdupserver.thelemmings.net server, with a username johndoe. Pressing F2 would create a game in French (since $DEFAULTCREATE would return the value of FRGAME). And pressing F3 would start the game. F5 and F6 are used to switch DEFAULTGAME value so that games created by the F2 macro can be either in French or in English.

Luc Vo Van
Last modified: Fri Feb 4 02:30:38 CET 2005