Chess GUI

After seeing the discussion about board games I've decided to put my chess GUI up here for anyone who wants it.


After installing it with the package manager, you will need to save the .png files in the zip to where you want them, then edit chessboard.file_loc in  'chess' script to point to where you stored them.

You can also edit the position and size in here, as well as the board colours.

Once done, you can show the board with the alias 'chesson', or hide it with 'chessoff'.

Start a game with someone and then use 'display ###' to update the GUI. It will keep track of the board number you are playing on.
To move pieces, click on the piece you want to move, then the square you want to move to and the script should do the rest. To deselect, just click on the same square again. It should also recognise when you want to castle.

If you have any issues, let me know.

Enjoy!

Comments

  • Nice job.  You should rename the .zip extention to .mpackage, stick a config.lua file in there with the contents:

    mpackage = "Chess GUI"


    Quazzi said:

    After installing it with the package manager, you will need to save the .png files in the zip to where you want them, then edit chessboard.file_loc in  'chess' script to point to where you stored them.

    Also, after that package change, when it is installed in Mudlet, a new folder will appear under the users profile. You can then access that in your scripts using :

    getMudletHomeDir() .. / "Chess GUI" 

    This will prevent the user from needing to manually changing or setting the picture location. 
  • Ah I was wondering how that was done. I do have the config.lua file, but is it the change to .package that puts the pictures in automatically?
  • OK, put in those changes, so you just need to edit position and size now if you wish.

  • Quazzi said:
    Ah I was wondering how that was done. I do have the config.lua file, but is it the change to .package that puts the pictures in automatically?
    It's the config.lua file and the mpackage extension that let Mudlet handle it by creating the subfolder. 
Sign In or Register to comment.