rnd wrote:basic_robot is a lightweight minetest programmable robot for multiplayer.
When pointing at a robot, It would be nice if a text
like "basic_robot belongs to playerX" would be shown
(instead of "GenericCAO ...").
Giving a name to the bot would be nice and probably easy (*1).
Different colors for the bots of each player would be nice too, or maybe skins.
Could the robot emit light (i.e. like a mese-lamp, or front-only, i.e. headlights) ?
instructions:
place spawner (basic_robot:spawner) and right click it to write program
eg.
* press "Reset" to clear the program text
* press "OK"-button to save the program text
* press "Spawn" to create a robot, to execute the program (*2)
(changes to the code are ignored while the bot is running)
* press "Remove" to dismiss the robot.
Only one bot at a time per spawner (*3).
BTW, it would be nice to have a different picture on the front side of the CPU-box.
Also, a different texture for "ready" and "working" (maybe green/red). (*3)
The robot can 'fly' one space away from any solid nodes,
and moves right thru the player (and an RC Car, (and likely mobs too).
No inventory (yet?).
The player can stand on it, but can not ride it (like a boat).
Also, a right-click on the bot does nothing (maybe pause/resume, or tell status?)
It looks like the execution of the program is repeated, about once every second:
Code: Select all
if (i==nil) then say("Hi !"); i=0 end
turn.left()
i = i+1
say(i)
Is there a way to stop/exit a program ?
(*1) Perhaps just a command/setting like 'robotname="Hugo"'.
How about a "personal library", i.e. a book that the player creates,
with a title like "basic_robot lib#1", where the text from that book
would be included into the code for the robot (e.g. with "#include lib#1") ?
So people could have their own code for customizing their bots,
included every time, without much typing/copy/paste.
(*2) So, the buttons "Spawn" and "Remove" would better be placed at the top right,
and "Reset" renamed to "Clear".
(*3) If the spawner is picked up while the bot is running,
and placed again, it shows a form with an empty code-area,
and gives an error "robot already active".
BTW, how could the robot read button-presses on a remote-controller ?
E.g. the controller as a formspec, with some buttons like left/right/forward/action.
(*4) That means, it can build itself into the sky on top of a column, with
Code: Select all
move.up()
place.down("default:dirt")
BTW, it looks funny when the spawn-position is covered in dirt :)
Also how to check for success of an action ?
And it would be nice to have a view from the robot, e.g. in the place of the minimap.
Edit:
When using "find_nodes()", eg.
Code: Select all
f = find_nodes(3,"default:stone_with_coal")
I get an errormessage:
Code: Select all
#ROBOT ERROR: ... init.lua 69: attempt to compare number with string