[Mod] basic_robot [basic_robot]

hajo
Member
 
Posts: 262
Joined: Thu Oct 13, 2016 10:45

Re: [Mod] basic_robot [basic_robot]

by hajo » Mon Nov 14, 2016 21:49

For the command 'place.up("default.torch")',
I got the errormessage "attempt to index a nil value".

Sure, the item to be placed should have been "default:torch",
but with the font used in the formspec, the difference is hard to see,
and the text of the errormessage is not very helpful.

So, before place(), a check for valid items seems to be in order.
Probably with an option "may place anything" / "place only items from inventory".

rnd wrote:-has library inventory, containing 32 books
-can read books or write to them

The spawner cannot be picked up when items are still in its inventory or library.
I'm not sure how that is supposed to work - moving all stuff in&out every time would be impractical.
I had assumed the library-books would be located in a bookshelf at the players home.


Also, good work !
This has been an amazing progress in the last few days.
Some of 'my' wiki-pages: Build-a-home - basic-robot - basic-machines - digtron
 

User avatar
rnd
Member
 
Posts: 136
Joined: Sun Dec 28, 2014 12:24
IRC: ac_minetest
In-game: rnd

Re: [Mod] basic_robot [basic_robot]

by rnd » Tue Nov 15, 2016 06:50

1.
hajo"]For the command 'place.up("default.torch")',
I got the errormessage "attempt to index a nil value".


if you play as "admin" it doesnt check if item is in inventory, it just gives it

2. if i were allow spawner dig with stuff in it, comments would be:

omg, i had so much books and stuff, now its all gone. The quickest way to remove spawner is just eat it with another robot
 

hajo
Member
 
Posts: 262
Joined: Thu Oct 13, 2016 10:45

Re: [Mod] basic_robot [basic_robot]

by hajo » Tue Nov 15, 2016 16:24

rnd wrote:1.
hajo"]For the command 'place.up("default.torch")',
I got the errormessage "attempt to index a nil value".

if you play as "admin" it doesnt check if item is in inventory, it just gives it

Instead of an option, you could just check if game is running in creative-mode.

But my point was that mis-spelled items don't give a meaningful error.

2. if i were allow spawner dig with stuff in it, comments would be:
omg, i had so much books and stuff, now its all gone.

Yes, but then the user has to carry around his library-books in his inventory,
and plug/unplug them into the spawner every time he goes to some other place.

Why not look for books with titles like "library X" in the users bookshelf ?

Also, I set up a github-account, and made a little patch,
to add description.txt, and top/front-textures for the cpu-box.

I haven't used github yet, so I hope that's the correct way to do collaboration here.


Also, I had the robot digging stairs downward, and it has already found
several "ignore"-blocks. Mapgen used was v5.

Edit:
I made a "User-documentation"-page on the wiki,
with some example-programs as an introduction.
Some of 'my' wiki-pages: Build-a-home - basic-robot - basic-machines - digtron
 

hajo
Member
 
Posts: 262
Joined: Thu Oct 13, 2016 10:45

Re: [Mod] basic_robot [basic_robot]

by hajo » Wed Nov 23, 2016 17:47

hajo wrote:I made a "User-documentation"-page on the wiki,
with some example-programs as an introduction.

I also figured out how the remotecontrol works,
and made an new chapter about it.

Github is still missing the texture for the control,
and sometimes the form doesn't come up when rightclicking an rc.

The manual-mode of the remote is very useful to get the bot
to a new place to do some action (without pickup/place spawner, re-enter program, etc).

I was thinking of an alternate layout, e.g.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
TLeft   FWD   TRight
DigUp   Up    BuildFwd
DigFwd  Down  BuildDownFwd
DigDown info  Action/change build-stuff

but how about a table of strings (filled with some default),
where each button just gets a text and a line of code ?
So the player just needs to change that table to customize his remote.
This setting would also make a good candidate for saving into a library-book.

Also, it would be nice if the remotes could have different names,
and maybe colors, to tell them apart.

Can the robot sense mobs as well as players ?
Last edited by hajo on Wed Nov 23, 2016 20:17, edited 2 times in total.
Some of 'my' wiki-pages: Build-a-home - basic-robot - basic-machines - digtron
 

User avatar
DS-minetest
Member
 
Posts: 707
Joined: Thu Jun 19, 2014 19:49
GitHub: DS-Minetest
In-game: DS

Re: [Mod] basic_robot [basic_robot]

by DS-minetest » Wed Nov 23, 2016 18:31

hajo wrote:Also, I set up a github-account, and made a little patch,
to add description.txt, and top/front-textures for the cpu-box.

I haven't used github yet, so I hope that's the correct way to do collaboration here.

its not, make a pull request on github

hajo wrote:Also, I had the robot digging stairs downward, and it has already found
several "ignore"-blocks. Mapgen used was v5.

so, it got "ignore" items in storage. unloaded mapblocks are made of ignore nodes. the robot dug into an unloaded mapblock.

hajo wrote:sometimes the form doesn't come up when rightclicking an rc.

the formspec doesnt come if you are pointing a node while right clicking
this is good, you can right click nodes with rc

hajo wrote:Also, it would be nice of the remotes could have different names,
and maybe colors, to tell them apart.

this isnt possible that easy

hajo wrote:Can the robot sense mobs as well as players ?

only players, i think
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

hajo
Member
 
Posts: 262
Joined: Thu Oct 13, 2016 10:45

Re: [Mod] basic_robot [basic_robot]

by hajo » Wed Nov 23, 2016 19:19

DS-minetest wrote:make a pull request on github

I think I did, but then there was no further activity (on github and here),
so I just assumed everybody was busy elsewhere.

hajo wrote:it would be nice of the remotes could have different names,
and maybe colors, to tell them apart.
this isnt possible that easy

Maybe just use a bunch of colored textures (like the wool-colors)
or at least different textures for empty-rc and rc-with-code (like book/with text) ?
Some of 'my' wiki-pages: Build-a-home - basic-robot - basic-machines - digtron
 

User avatar
DS-minetest
Member
 
Posts: 707
Joined: Thu Jun 19, 2014 19:49
GitHub: DS-Minetest
In-game: DS

Re: [Mod] basic_robot [basic_robot]

by DS-minetest » Thu Nov 24, 2016 15:09

hajo wrote:
DS-minetest wrote:make a pull request on github

I think I did, but then there was no further activity (on github and here),
so I just assumed everybody was busy elsewhere.

hajo wrote:it would be nice of the remotes could have different names,
and maybe colors, to tell them apart.
this isnt possible that easy

Maybe just use a bunch of colored textures (like the wool-colors)
or at least different textures for empty-rc and rc-with-code (like book/with text) ?

there are no open pull requests https://github.com/ac-minetest/basic_robot/pulls
you would have to add many new items : |
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

Byakuren
Member
 
Posts: 441
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri

Re: [Mod] basic_robot [basic_robot]

by Byakuren » Fri Nov 25, 2016 07:18

I noticed the earlier freeze exploit I posted doesn't work. I found two more, and I've tested in-game that they will freeze the game: https://github.com/ac-minetest/basic_robot/issues/5
Every time a mod API is left undocumented, a koala dies.
 

User avatar
rnd
Member
 
Posts: 136
Joined: Sun Dec 28, 2014 12:24
IRC: ac_minetest
In-game: rnd

Re: [Mod] basic_robot [basic_robot]

by rnd » Sat Nov 26, 2016 18:15

updates:
-remote control displays move/dig controls in case there are no user set commands
-better ingame help
-robots can now send messages to each other with self.send_mail and read them with read_mail
-fixes various sandbox exploits ( thanks to Byakuren for discovering them)
-fixes string modification problem, i.e. can use stuff like say("while i<5 do say(1)") inside programs
-robot can now only dig limited number of nodes per operation ( default 1) to make programming dig operations more interesting

remote control movement/dig commands
Image
Attachments
robot_control.jpg
robot_control.jpg (71.46 KiB) Viewed 4442 times
 

Byakuren
Member
 
Posts: 441
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri

Re: [Mod] basic_robot [basic_robot]

by Byakuren » Sun Nov 27, 2016 04:40

You closed the Github issue without solving all the freeze exploits. Did you even test that they were fixed?

In particular, this one
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
while (function(f) return f(f) end)(function(f) return f(f) end) do print("a") end

will still freeze the server.
Every time a mod API is left undocumented, a koala dies.
 

hajo
Member
 
Posts: 262
Joined: Thu Oct 13, 2016 10:45

Re: [Mod] basic_robot [basic_robot]

by hajo » Sun Nov 27, 2016 12:58

DS-minetest wrote:there are no open pull requests https://github.com/ac-minetest/basic_robot/pulls

I made a fresh attempt, starting with basic_robot v11/26a.

* Texture for front and top of cpubox, to show the direction robot would point when spawned
* Texture for the remotecontrol
* Save-button now doesn't exit, so you can go on to press Start without another click on spawner
* write entry to logfile "robot started"
* "GO" --> "FWD"
* bigger/wider textbox for help
* empty lines before each chapter
* added "function" to helptext
* slightly bigger editbox for rc - now 7 lines, and shows frame of box at bottom
* added type() to list of sandbox-functions
* some formatting/aligning of code
* added metafiles for mod, e.g. depends.txt and description.txt
* (still missing a good,small screenshot.png, showing spawner+robot+rc)

As the texture for the remote was missing on github (so mt makes up a green blob),
I whipped up something based on the rc from kaeza's rc-car (CC-BY-SA).

Edit:
I noticed some issues with the robot's inventory:
* the itemcount is not always correct
** e.g. the bot digs 2 oreblocks, but only 1 ore shows up in inventory
* moving stuff from one space to another doesn't always work
* moving stuff with shift-click doesn't work

Also, I checked the new Minetest 0.4.14-785a9a6 by sfan5 - 2016-11-26.

It comes packaged with the games Carbone-ng and Voxelgarden,
and when run with basic_robot, I get some messages:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
WARNING[Server]: Assignment to undeclared global "placename" inside a function at ...test-0.4.14_785a9a6\bin\..\mods\basic_robot/commands.lua:217.
..
WARNING[Server]: Assignment to undeclared global "script" inside a function at ...minetest-0.4.14_785a9a6\bin\..\mods\basic_robot\init.lua:1057.
Some of 'my' wiki-pages: Build-a-home - basic-robot - basic-machines - digtron
 

hajo
Member
 
Posts: 262
Joined: Thu Oct 13, 2016 10:45

Re: [Mod] basic_robot [basic_robot]

by hajo » Thu Dec 15, 2016 11:34

I have been playing a bit with TurtleMiner, and it has
a rather nice editor with tabs, that supports multiple 'files'.

I think that editor would be a good addition to basic_robot.

In fact, it enhances the usefulness of those turtles,
almost like a remote with programmable buttons.
Some of 'my' wiki-pages: Build-a-home - basic-robot - basic-machines - digtron
 

rgh
Member
 
Posts: 22
Joined: Fri Oct 07, 2016 13:32

Re: [Mod] basic_robot [basic_robot]

by rgh » Sat Dec 24, 2016 21:11

Do robots stop working when they get a certain distance away from their owner, or an observer?

The first thing I tried was just building an endless column. The robot seems to go up & then stop. However, If I fly up alongside it, the robot continues.
 

hajo
Member
 
Posts: 262
Joined: Thu Oct 13, 2016 10:45

Re: [Mod] basic_robot [basic_robot]

by hajo » Sat Dec 24, 2016 21:48

rgh wrote:Do robots stop working when they get a certain distance away from their owner, or an observer?

The first thing I tried was just building an endless column. The robot seems to go up & then stop.
However, If I fly up alongside it, the robot continues.

Same problem as above:
the robot got to an unloaded mapblock.
When you are around, the server keeps loading them.
Some of 'my' wiki-pages: Build-a-home - basic-robot - basic-machines - digtron
 

User avatar
rnd
Member
 
Posts: 136
Joined: Sun Dec 28, 2014 12:24
IRC: ac_minetest
In-game: rnd

Re: [Mod] basic_robot [basic_robot]

by rnd » Sat Dec 24, 2016 23:21

robots are minetest entities and will as such vanish when noone is around - but they will reactivate and restart once players come nearby. You can save/recall data using the self.send_mail/self.read_mail feature

ONLINE PLAY: possible on ROBOTS server

UPDATES:

0. everything now works with 0.4.15, added lots of features like: robot can read/write text to other blocks, admin robot (can run any minetest command, but only admin can edit its code), ability to grab players, ability to receive/send other robots data ("email")...

1.improved library (contains books, robots can read/write persistent data to books), can use remote library now. Library shows list of books with titles, double click title to see book contents
Image

2. normal players can have up to 2 robots while players with "robot" priv can have up to 16. Simply enter id inside spawner or remote control to choose which robot to activate/control.
Image

3. it is possible to do interesting games with available features: here 2 players can do battle with tanks that shoot fire. If you hit nearby enemy player their tank is destroyed. You can control direction and pitch of fire, other parameters are random
Image
Attachments
robot3.jpg
robot3.jpg (33.74 KiB) Viewed 4442 times
robot2.jpg
robot2.jpg (72.38 KiB) Viewed 4442 times
robot1.jpg
robot1.jpg (65.98 KiB) Viewed 4442 times
 

ManElevation
Member
 
Posts: 213
Joined: Tue Aug 02, 2016 22:04
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation

Re: [Mod] basic_robot [basic_robot]

by ManElevation » Sun Dec 25, 2016 09:07

thats cool ;), Happy Xmas rnd
Hey there im going to be off minetest for a while because my company has been deleloping a game called Ground Conflict, if you wish to see some screenshots or have some info, than please join our discord server https://discord.gg/C9ygXJn
 

rgh
Member
 
Posts: 22
Joined: Fri Oct 07, 2016 13:32

Re: [Mod] basic_robot [basic_robot]

by rgh » Sun Dec 25, 2016 09:59

hajo wrote:Same problem as above:
the robot got to an unloaded mapblock.
When you are around, the server keeps loading them.


Is is predictable what happens when that occurs? When I experimented (0.4.14) having a robot build a never ending column, sometimes the robot was paused at the top & resumed building when I flew up to look at it, sometimes the robot had I think vanished from the top.
 

User avatar
rnd
Member
 
Posts: 136
Joined: Sun Dec 28, 2014 12:24
IRC: ac_minetest
In-game: rnd

Re: [Mod] basic_robot [basic_robot]

by rnd » Sun Dec 25, 2016 11:56

Is is predictable what happens when that occurs?


all minetest objects hide when no player around. areas will unload after some time if noone around.

Robot always checks what its moving into. It cant move into solid wall for example. If it tries to move into unloaded area, it sees that node name is "ignore" and stops. Same with digging - it wont dig "ignore" nodes.
 

rgh
Member
 
Posts: 22
Joined: Fri Oct 07, 2016 13:32

Re: [Mod] basic_robot [basic_robot]

by rgh » Sun Dec 25, 2016 12:34

ok, but when a chunk reloads, any robot in that chunk should reappear where it last was?
It can't get somehow moved back to the robot spawner from which it came?
 

hajo
Member
 
Posts: 262
Joined: Thu Oct 13, 2016 10:45

Re: [Mod] basic_robot [basic_robot]

by hajo » Sun Dec 25, 2016 16:57

rgh wrote:It can't get somehow moved back to the robot spawner from which it came?

Just press the stop-button.
Then press Start/Run to get a fresh robot at the spawner.
Some of 'my' wiki-pages: Build-a-home - basic-robot - basic-machines - digtron
 

hajo
Member
 
Posts: 262
Joined: Thu Oct 13, 2016 10:45

Re: [Mod] basic_robot [basic_robot]

by hajo » Mon Dec 26, 2016 13:11

rnd wrote:UPDATES:
0. everything now works with 0.4.15, added lots of features

Thanks - that is an impressive list.

3. 2 players can do battle with tanks that shoot

I'm not into PvP.
Can the bots detect and shoot at mobs too ?
Ballistic shooting in 3D (i.e. at ghosts) might be a fun challenge...

Also, I made a fork/patch/pull-request some time ago.
Did you notice it, were there any problems with it ?

Edit:
I was just checking the programs from my tutorial with the new version,
and noticed that some simple programs now don't work as expected,
e.g. RC4b - Dig6
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
--Dig one block in every direction
dig.forward()  dig.backward()
dig.left()  dig.right()
dig.up()   dig.down()

does only 1 or 2 digs when run.
So, it probably ran against basic_robot.maxdig

Likewise, Build3 runs against the execution-limit.

How exactly should a program check for success/errors/restrictions ?

I think it would be nice to have at least some more feedback,
e.g. instead of
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
return false

also return a message, like
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
return false, "exceeded maxdig"


So, I came up with Build3a, that is essentially a turtle/l-system - interpreter
with some canned example-programs for building houses.
How about putting something like that interpreter into the standard basic_robot ?

The exact instruction-set for that interpreter is of course open for discussion.
The one in Build3a uses too many instruction-chars for digging and building, so
perhaps "build with material #0=air means digging", to streamline the set of commands.

I also would like to add simple macros, e.g. ":x=[fff>]" to define char x as a macro for "fff>".
And maybe "*4x" for repeating an instruction, and something like
"?xy" for 'check condition, if true do x, else do y'.
Also, a stack and/or a few registers :)
Some of 'my' wiki-pages: Build-a-home - basic-robot - basic-machines - digtron
 

hajo
Member
 
Posts: 262
Joined: Thu Oct 13, 2016 10:45

Re: [Mod] basic_robot [basic_robot]

by hajo » Fri Jan 13, 2017 09:34

As it turns out, buttons can have colored text.
And the remote didn't have buttons for placeing/building,
so I added them - see wiki:
Image

Also, I noticed that read_book() only return the contents, not the title.
Is there a reason for that?
The book-lister in the spawner/library lists titles just fine.
Some of 'my' wiki-pages: Build-a-home - basic-robot - basic-machines - digtron
 

User avatar
rnd
Member
 
Posts: 136
Joined: Sun Dec 28, 2014 12:24
IRC: ac_minetest
In-game: rnd

Re: [Mod] basic_robot [basic_robot]

by rnd » Fri Jan 13, 2017 11:48

UPDATES: too much too list, just some stuff. To see new features visit ROBOTS server.
- rom to store persistent robot data ( persistent between robot restarts, clears only on server shutdown)
- robots have now built in console that can display 256 modified ascii chars
Image
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
if not s then s=1;text = ""; for i=0,255 do text=text..string.char(i) end; self.display_text(text,16,1) end

- robots can activate things
- robot with id 0 wont spawn entity and can be used as a powerful CPU - it only runs when activated by mesecons/basic_machines signal
-------------------

1. i want to keep robots as simple as possible. This means very basic system without "featuritis".
Robot coding is kept simple - it just runs the code 1x per second - thats it. If you want to do stuff that only runs 1x you can just use lua property: variables are nil until value is given and write
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
if not init then DO STUFF init = true end

that takes good care of init. If something needs to be added you can make admin robot that implements it and sends program to client robots ( yes thats possible too )

2. digging its not bugged - its intentionaly limited to 1 dig per operation. before that i had players dig 32 or more blocks each operation causing BIG LAG GRIEF in mines. no thx..

3. l-system is nice, good work. I will add area for robot programs on github. Btw admin robot can run any minetest/lua command so there is nothing you cant do with it. On ROBOTS server there is for example SHOP robot and even property selling robot which will make you owner of protector you buy.

4. If you use basic_machines mod you can use keypad machine as an input device for robot ( keypad writes your input to block, robot reads it)
Attachments
robot_display.jpg
robot_display.jpg (120.81 KiB) Viewed 4467 times
Last edited by rnd on Fri Jan 13, 2017 13:37, edited 1 time in total.
 

User avatar
rnd
Member
 
Posts: 136
Joined: Sun Dec 28, 2014 12:24
IRC: ac_minetest
In-game: rnd

Re: [Mod] basic_robot [basic_robot]

by rnd » Fri Jan 13, 2017 13:24

robot shop on ROBOTS server
-it scans nearby shops to know what to sell/buy
-use chat commands to buy stuff
-displays time and prices on large display

Image

+ Spoiler
Attachments
robot shop.jpg
robot shop.jpg (102.18 KiB) Viewed 4467 times
 

hajo
Member
 
Posts: 262
Joined: Thu Oct 13, 2016 10:45

Re: [Mod] basic_robot [basic_robot]

by hajo » Fri Jan 13, 2017 22:00

rnd wrote:UPDATES: too much too list, just some stuff.

No update on github yet.

To see new features visit ROBOTS server.

When is it usually online,
is there a webpage for the server ?

1. i want to keep robots as simple as possible.
This means very basic system without "featuritis".

This robot with the current design is way beyond "basic". (*)
OTOH, it still needs some more features. (**)
Seriously, we should consider splitting it into a "basic" and an "advanced" fork.

2. digging its not bugged - its intentionaly limited to 1 dig per operation.
before that i had players dig 32 or more blocks each operation causing BIG LAG GRIEF in mines. no thx..

It is, from the viewpoint of a schoolkid / programmer-newbie.
I understand the motivation, but the player needs a way to check.

Maybe use "action-points per second",
and a command to just wait until enough are available again ?

4. If you use basic_machines mod you can use keypad machine as an input device

I will try that.

(*) For "basic features", look at turtleminer: just move/turn/mine/build, and a remote.
It still needs commands to set which stuff to build.
Also yet missing are all the control-structures, and lua.
Nevertheless, it can be used as a flexible, programmable mining-tool.

(**) There are some 'simple' tasks that cannot be done with the current commands, e.g. :

    * Follow / Move to the player (simple move in the direction, and follow terrain up/down)

    * "Look around, run to the next torch / red flower / fully-grown wheat"
    (direct line/shortest path, as opposed to blind area-search)
    - this needs a variant of read_node() for nodes a few blocks away

    * "If ore X is in range, move/dig towards it, and mine it." (might need flying / support-building)

    * Look for mobs / sound alarm / shoot at them (Guard / watchdog)

    * Custom skin for the robot - maybe include the textures from existing mobs,
    such as Workers and/or CUTE CUBIC MOBS just to choose as skins ?

    * play error-sound
Including rubenward's editor (persistent, multifile) would be very useful,
as well as simple, user-configurable remote.
Some of 'my' wiki-pages: Build-a-home - basic-robot - basic-machines - digtron
 

User avatar
rnd
Member
 
Posts: 136
Joined: Sun Dec 28, 2014 12:24
IRC: ac_minetest
In-game: rnd

Re: [Mod] basic_robot [basic_robot]

by rnd » Sat Jan 14, 2017 09:28

* Follow / Move to the player (simple move in the direction, and follow terrain up/down)

* "Look around, run to the next torch / red flower / fully-grown wheat"
(direct line/shortest path, as opposed to blind area-search)
- this needs a variant of read_node() for nodes a few blocks away

* "If ore X is in range, move/dig towards it, and mine it." (might need flying / support-building)

* Look for mobs / sound alarm / shoot at them (Guard / watchdog)

* Custom skin for the robot - maybe include the textures from existing mobs,
such as Workers and/or CUTE CUBIC MOBS just to choose as skins ?

* play error-sound


players on server already did all of this and much more ingame with robots. If it isnt included, do it yourself; ingame - means no mod change just write program for robot.
 

hajo
Member
 
Posts: 262
Joined: Thu Oct 13, 2016 10:45

Re: [Mod] basic_robot [basic_robot]

by hajo » Sat Jan 14, 2017 22:54

rnd wrote:
* "Look around, run to the next torch / red flower ..
- this needs a variant of read_node() for nodes a few blocks away
* Look for mobs ..
* Custom skin for the robot

players on server already did all of this and much more ingame with robots.
If it isnt included, do it yourself; ingame - means no mod change just write program for robot.

You mean accessing the minetest-api directly ?
How would that work, without breaking out from the sandbox ?
Some of 'my' wiki-pages: Build-a-home - basic-robot - basic-machines - digtron
 

User avatar
rnd
Member
 
Posts: 136
Joined: Sun Dec 28, 2014 12:24
IRC: ac_minetest
In-game: rnd

Re: [Mod] basic_robot [basic_robot]

by rnd » Sun Jan 15, 2017 09:04

There is mail system and robot placed by admin can access global enviroment _G. So it is possible for admin robot to simply send anything other robot might need - like minetest.sound_play for example - it works like client/server
 

hajo
Member
 
Posts: 262
Joined: Thu Oct 13, 2016 10:45

Re: [Mod] basic_robot [basic_robot]

by hajo » Sun Jan 15, 2017 13:43

rnd wrote:There is mail system and robot placed by admin can access global enviroment _G.

That is fine for singleplayer.
So it is possible for admin robot to simply send anything other robot might need

This system is very flexible, because it makes available the whole minetest-api.
OTOH, it needs a system to announce/document what is available where, and how.

I looked at a few of the robots stationed at your server, and it is impressive
what they do.

But to make all that accessable and useful, to more than some developers,
that needs a lot of documentation, examples with comments etc.

I haven't seen any documents etc. outside your github-download,
so my tutorial-page at the wiki was an attempt to improve on that.

But I think there must be more docs somewhere ?
Some of 'my' wiki-pages: Build-a-home - basic-robot - basic-machines - digtron
 

User avatar
rnd
Member
 
Posts: 136
Joined: Sun Dec 28, 2014 12:24
IRC: ac_minetest
In-game: rnd

Re: [Mod] basic_robot [basic_robot]

by rnd » Sun Jan 15, 2017 22:02

There is complete reference inside robot
Image
so you can quickly see the commands and what they do
Image

UPDATES:
-keyboard events for robot: place special key blocks that intercept punch events. Robot can read those and react to them. Here a simple demo sokoban like game where you push blocks around with simple rules: when block lands it takes the color of bottom block, unless it lands on yellow. Red blocks are immovable. Goal is to make all blocks blue.
Image

code for game
+ Spoiler
Attachments
robot keys.jpg
robot keys.jpg (72.46 KiB) Viewed 4434 times
robot_help.jpg
robot_help.jpg (55.71 KiB) Viewed 4434 times
robot_help_0.jpg
robot_help_0.jpg (63.23 KiB) Viewed 4434 times
 

PreviousNext

Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 36 guests

cron