No description
Find a file
2023-11-15 06:40:17 -05:00
convert.php first 2023-05-20 00:00:14 -04:00
COPYING first 2023-05-20 00:00:14 -04:00
draw.lua first 2023-05-20 00:00:14 -04:00
imagefit.sh first 2023-05-20 00:00:14 -04:00
README.md fix broken link 2023-11-15 06:40:17 -05:00

Minetest canvas_game printer

This is a lua script for hydra-dragonfire that can print a full colour image onto a canvas of a minetest server running canvas_game

Dependancies

  • hydra-dragonfire
  • php-cli
  • imagemagick (optional)

How To Install

These are the steps needed to get this working on Linux. I have not tried doing this on Windows so I can't help with that.

Clone and build hydra-dragonfire per its instructions.

Open a terminal and clone this repo. git clone https://bowels-of-the.macrofox.org/git/mtpt/canvas_printer.git

How To Use

cd into the directory of the git repo cd canvas_printer/

Find the image you want to print. If it is larger than 500 by 500, it will need to be resized. To do this, imagemagick is needed. Run ./imagefit.sh /path/to/image.png outputname.png

Use the php script to convert the image into a set of instructions for the minetest bot. php convert.php /path/to/image-or-output.png This will create a file named inst.txt which contains the instructions.

Now run draw.lua with hydra-dragonfire and set the server info. /path/to/hydra-dragonfire ./draw.lua <ip>:<port> <username> [<password>]

If everything goes to plan, a bot should now join the server and start printing your image onto the canvas. Once it is done, the bot will leave the server.