A minetest programmable bot
(c) 2019 Nigel Garnett
Vbots are single block "turtle" style bots, programmable in an entirely visual way. They came into existence to amuse my 5 year old daughters, and teach them the basics of computer programming, without too much writing.
Punch an idle vbot with an empty hand to make it run it's program (or click the run icon in the menu [see below]).
Punch a running vbot with an empty hand to stop the program.
Right click (double tap on android) to open the menu (see below).
Dig the bot by hitting it with anything except an empty hand, but bear in mind the bot can only be dug out if it's inventory is empty.
The Main menu
The icons and are used to switch between the 2 panels shown here.
The panel above contains the commands for the bot, which can be added to the current sub-program (the red area on the right) simply by clicking on them.
The panel below shows the inventory panel, with the bot's inventory above, and the players inventory below. This panel is used to add things to the bot's inventory (so it can build with them) or to remove things from the bot's inventory after it has been digging.
The trash icon, when pressed, deletes the last instruction on the current sub-program page. Next to this icon is another 1x1 inventory slot which works as a trash can, anything dropped into it is destroyed.
The run icon, works like punching the bot with an open hand, It starts the program runnng.
The save icon saves the current program & sub-programs under the name of the bot.
the load icon allows you to choose and load a program into the bot. Also on this menu are icons which allow the deleting & renaming of programs.
The reset icon clears the main program, and all subprograms, but NOT the bot's inventory.
The sub-program panel (the red one on the right) has 7 pages. The icon is the page for the 'Main' program, execution starts here when the bot is activated. The other 6 pages are sub-programs which can be called via the 6 'run sub program' icons at the bottom of the command panel.
Move the bot forward, backward, up or down. Movement will fail if the new position is not empty.
Move the bot back to the position where the bot was placed. Note: the facing of the bot is NOT restored to it's initial facing direction.
These commands turn the bot clockwise, anticlockwise or in a random direction.
These commands make the bot dig the node in that direction, and then move into the place it dug from. Note: digging will fail if the node being dug has protection which the owner of the bot could not dig.
These commands make the bot place a block in the noted position (if protection allows and the position is empty). The node placed by the bot is the first thing found in the bot's inventory, starting from the first slot.
This pseudo command chooses the speed that the bot runs the program. when followed by a number multiplier it will make the bot run that many times faster. When NOT followed by a number, it resets the bot to normal speed.
The Multipliers work the same for all commands except speed (explained above). For all other commands (including call sub-program commands) they make that command run multiple times.
This program makes the bot move 4 spaces forward (if possible) then turn 180 degrees, move 4 spaces forward (ie back to the start position) and then turn 180 degrees again to face the initial direction.
(just example1 using a sub-program)
In the dinosaur sub program put the following:
Then, in the main program ( the lion), just call it twice like this:
Have fun. Nigel