[Mod] TurtleMiner ... programmable turtles in Minetest

u34

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by u34 » Post

+1
nice...

User avatar
BirgitLachner
Member
Posts: 393
Joined: Thu May 05, 2016 10:18
In-game: Bibs

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by BirgitLachner » Post

The easiest way to to get turtles is to be in creative mod and search in the inventory for "turtle".

The "Pokemon Idee" is quite far away :-)

hajo
Member
Posts: 606
Joined: Thu Oct 13, 2016 10:45
Location: DE
Contact:

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by hajo » Post

BirgitLachner wrote:The easiest way to to get turtles is to be in creative mode
Ok, I tried that.
It looks like all those different types of turtles currently have the same abilities,
i.e. they all can dig, and have no inventory yet.

They don't look very different, so it would be nice if you could paint and/or
name them, so that it showed "turtle Hugo owned by singleplayer" when looked at.

Stacking one on top of another looks strange, because it doesn't actually land.

It would be nice if you could ride turtles, like the boat.

Also, the controler could use some work:
* up/down and forward/backward are easy to get wrong
** maybe change of layout
** tooltips
* input-field, for turtle-name

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by octacian » Post

hajo wrote:
BirgitLachner wrote:The easiest way to to get turtles is to be in creative mode
Ok, I tried that.
It looks like all those different types of turtles currently have the same abilities,
i.e. they all can dig, and have no inventory yet.

They don't look very different, so it would be nice if you could paint and/or
name them, so that it showed "turtle Hugo owned by singleplayer" when looked at.

Stacking one on top of another looks strange, because it doesn't actually land.

It would be nice if you could ride turtles, like the boat.

Also, the controler could use some work:
* up/down and forward/backward are easy to get wrong
** maybe change of layout
** tooltips
* input-field, for turtle-name
hmm, all those are great ideas. I'll consider working on implementing some of those in testing :D

However, riding, and making sure they actually "land" on top of each other, is impossible with them as nodes. This would require entities, which is currently far in the future, still a great idea though.

Nametags also require the use of entities, but I will make a commit that uses the infotext for now.

As for the controller, I'm soon to be working on new icons. Not only that, but once I complete the upgrade system, some turtles will be able to access the player's controls, and for example, move forwards when the player presses "w", as well as show a camera view.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

hajo
Member
Posts: 606
Joined: Thu Oct 13, 2016 10:45
Location: DE
Contact:

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by hajo » Post

BirgitLachner wrote:@twoelk ... "Remote Car" sounds good. I'll have a look at it.
You place the car on the ground,
activate it by clicking with the remote,
then click on some spot on the ground,
and the car drives back+forth between those points...

But the model of the car looks cool :)

It would add a lot of replay-value if it had a remote like the turtles,
maybe with just buttons forward/left/right / exit.

The deluxe-version could have additional buttons,
like "mark waypoint" and "start race = replay",
where the car would move from waypoint to waypoint.

So, how about a fork of rc-cars ?

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by octacian » Post

  • allow naming turtles
  • function to show / set turtle formspec more uniformly
  • make turtles move player
BirgitLachner:

How do you feel about removing the need for using the remote controller to access the turtle at all times, and allow the player to access the turtle at any time without a remote? The remote could then be used for literal remote access. I had considered "locking" the turtle so that only the player who placed it could access it, but I think this should be an upgrade rather than default.

If you'd like there to be something in between the player using a turtle after making it, taming could be easily implemented. I had considered this originally, but it doesn't really make sense because the player will have just crafted and placed the turtle. Still, if you'd rather taming, what should they "eat?" I was originally thinking apples, but that just doesn't make sense. Could use something else from the farming mod (e.g. wheat), but I think that it'd be better to register a custom item for this purpose.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

hajo
Member
Posts: 606
Joined: Thu Oct 13, 2016 10:45
Location: DE
Contact:

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by hajo » Post

endev15 wrote: How .. about removing the need for using the remote controller to access the turtle
How about an inventory for each turtle, with some spaces dedicated
to turtle-name, config, fuel, code, logfile.

Config: put in dye to color the turtle.
Maybe more spaces to put in other items (wood, ingots) to change the appearance.

Code and logfile: use books, or make a similar recipe for punchcards/disks/whatever.
Then we just need to define the commands/language.
With short commands, a single inputline might be enough for the code.

E.g. a set of simple one-letter-commands:
F=Forward, R=Right, L=Left, U=Up, D=Down, G/M=Get/Mine, P/B=Put/Place/Build,
T1=select slot 1 as tool, S5=select slot 5 as storage, L=Look at stuff in front,
.=Stop, !Hello=output a message, #comment ...

To make this a language, we need to add control-statements, e.g.
:=label, ^=goto, &=call/gosub .=stop/return, ?=if, @=do/loop, ...
also commands to move stuff around the inventory.

Logging: off / log-output to chat / log to book
what should they "eat?"
How about using the existing fuel-items that work in the furnace,
maybe with burntime * someFactor ?

Edit:
I just notice there is ComputercraftEdu - do you want something close to that,
or would you prefer to have a more or less different design/concept for your turtles ?

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by octacian » Post

hajo wrote:
endev15 wrote: How .. about removing the need for using the remote controller to access the turtle
How about an inventory for each turtle, with some spaces dedicated
to turtle-name, config, fuel, code, logfile.

Config: put in dye to color the turtle.
Maybe more spaces to put in other items (wood, ingots) to change the appearance.
Right now, config (settings) would only store things such as the turtle name, as until the meta-nodedef branch of MT gets finished and merged. Once it is merged, we will be able to allow customization of the turtle, even drawing your own texture for your turtle (note: in game).
hajo wrote:Code and logfile: use books, or make a similar recipe for punchcards/disks/whatever.
Then we just need to define the commands/language.
With short commands, a single inputline might be enough for the code.
If you take a look at the "editor" branch of TurtleMiner, you'll see what I was planning for the code editor. In the end, that branch will not be used, and only the formspec will likely be saved, though it will be redone. Instead of books / storage devices, the code and log will be stored in meta for now. The same will be done for logs, as there will be a debug section of the formspec. I'm definitely going to plan on disks to store the info, as it would allow transferring between turtles.

The "language" will still be plain Lua, but code will be run in an environment with custom function defined (e.g. move("left")), and the turtles will not be able to access minetest.* functions, etc... This means the kids will get experience using an actual, real-world language. Later on, a visual editor will be implemented like that used in ComputerCraftEDU. It will probably end up seeming almost identical to the one in ComputerCraftEDU, as it is a very good way to help the kids learn, and is more than possible in MT.
hajo wrote:
endev15 wrote:what should they "eat?"
How about using the existing fuel-items that work in the furnace,
maybe with burntime * someFactor ?
Great idea, if BirgitLacher is OK with it, once the inventory is implemented, turtles will require fuel of some type to run, and not need any taming at all. Just fuel. Note that a turtle would be able to collect more fuel and refuel itself.
hajo wrote:Edit:
I just notice there is ComputercraftEdu - do you want something close to that,
or would you prefer to have a more or less different design/concept for your turtles ?
Yes, I believe that the goal is to implement something like this for MT. It will be by no means identical, especially Birgit's textures and nodeboxes that I can't talk her into changing :P
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

hajo
Member
Posts: 606
Joined: Thu Oct 13, 2016 10:45
Location: DE
Contact:

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by hajo » Post

endev15 wrote:
hajo wrote:inventory for each turtle, with some spaces dedicated to turtle-name, config, fuel, code, logfile. ..
Code and logfile: use books, or make a similar recipe for punchcards/disks/whatever.
Then we just need to define the commands/language.
If you take a look at the "editor" branch of TurtleMiner, you'll see what I was planning for the code editor.
Do you have a link to that branch ?
In the end, that branch will not be used, and only the formspec will likely be saved, though it will be redone.
Instead of books / storage devices, the code and log will be stored in meta for now.
The same will be done for logs, as there will be a debug section of the formspec.
When looking at simple_robots and miner_robots,
a lot of the code is needed for the gui.
That makes it hard to change/extend.
With books/disks, just an inventory-type formspec is needed,
and code to access the books (plus processing the commands).
No change to the gui required when changing the commands or language.

Using 1-letter commands (mostly) to minimize typing for the user.
BTW, one of the config-slots could be for a disk with a language-definition,
e.g. with lines like "move forward = F", "turn right = R", etc.
I'm definitely going to plan on disks to store the info, as it would allow transferring between turtles.
So, a formspec as well a disks ?

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by octacian » Post

hajo wrote:Do you have a link to that branch ?
It's right here. Note that it will not be merged, as other changes will be made first. All that will be saved from it is the formspec.
hajo wrote:When looking at simple_robots and miner_robots,
a lot of the code is needed for the gui.
That makes it hard to change/extend.
With books/disks, just an inventory-type formspec is needed,
and code to access the books (plus processing the commands).
No change to the gui required when changing the commands or language.
Formspec GUIs are inherently kinda complex, due to the format used to create them. They don't have to be. I really don't see how a disk would remove the need for a GUI. You still have to have a GUI to write the code to the disk. Disks would be used to transfer data between turtles, that data already being stored in meta and displayed via the formspec.

The formspec will not be as complex though, as things will mostly be text-based. The GUI would not need to change to change the basic code, commands, or the language. It would simply grab new data and update the fields based on metadata.
hajo wrote:Using 1-letter commands (mostly) to minimize typing for the user.
BTW, one of the config-slots could be for a disk with a language-definition,
e.g. with lines like "move forward = F", "turn right = R", etc.
1-letter commands could minimize typing, but it would mean the user wouldn't really learn much. The purpose of this is to teach kids how to right structured step-by-step code, and having to type more kinda comes with that. Using 1-letter commands would mean the kids wouldn't be learning an actual language, meaning what they learned would only be useful for turtles, and nothing else. Also, it would create a huge amount of extra regex work to be able to parse this code and turn it into Lua.
hajo wrote:So, a formspec as well a disks ?
Yes. Disks to transfer info, and possibly store it in the first place. There still has to be a formspec for editing the data which would eventually be stored in meta.

More on the formspec.

When you first make a turtle, you right click on it and configure it (name, etc...). Then the default formspec is shown. The default formspec will be expanded to instead contain a text-based editor, and buttons to show the settings, inventory, and upgrades formspecs. Upgrades will be available to access the visual editor, access a basic step-by-step command form (the one used now), connect wirelessly with digicompute computers, and other cool stuff.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

User avatar
BirgitLachner
Member
Posts: 393
Joined: Thu May 05, 2016 10:18
In-game: Bibs

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by BirgitLachner » Post

Wow ... so much happend since last time ... I'm still very busy at school. Finally the tests of my son are finished but I still need to correct tests.

First of all ... I'll answer to endev15.
endev15 wrote:
  • allow naming turtles
  • function to show / set turtle formspec more uniformly
  • make turtles move player
Nice!
endev15 wrote: How do you feel about removing the need for using the remote controller to access the turtle at all times, and allow the player to access the turtle at any time without a remote? The remote could then be used for literal remote access.
Good idea ...
Well, may be you use the remote control to connect to your turtle (only one?) and then a picture is shown via HUD with the control buttons and the letter/symbols to control the turtle? This can be may be reachable from the normal formspec of the remote control ... for example with a minimize-button ... and a letter to press to come back to the normal remote formspec. Leave the formspec with the exit button and the picture of the small remote is not shown.

endev15 wrote: I had considered "locking" the turtle so that only the player who placed it could access it, but I think this should be an upgrade rather than default.
Yes ... good idea. I only used the singleplayermode, so I thought, that was already done. Would be interesting for multiplayerworlds where a teacher is together with some pupils.

endev15 wrote:If you'd like there to be something in between the player using a turtle after making it, taming could be easily implemented.
Not at the moment ... only the other things are done.
endev15 wrote:I had considered this originally, but it doesn't really make sense because the player will have just crafted and placed the turtle. Still, if you'd rather taming, what should they "eat?" I was originally thinking apples, but that just doesn't make sense.
Funny idea ... something like the fuel for for tech-like turtle. But only for animal-like turtle.
endev15 wrote:Great idea, if BirgitLacher is OK with it, once the inventory is implemented, turtles will require fuel of some type to run, and not need any taming at all. Just fuel. Note that a turtle would be able to collect more fuel and refuel itself.
If you do the code for the tech turtle for that I think I would be able to adapt it to animal turtle. The taming will be a feature for version 5 ... or 6.
endev15 wrote:If you take a look at the "editor" branch of TurtleMiner, you'll see what I was planning for the code editor.
Well, I think that's much to high for me. I'll have a look at it but ...
endev15 wrote:Disks would be used to transfer data between turtles, that data already being stored in meta and displayed via the formspec.
Yes ... that is one think, I like from ComputerCraft.
Last edited by BirgitLachner on Fri Nov 04, 2016 16:53, edited 1 time in total.

User avatar
BirgitLachner
Member
Posts: 393
Joined: Thu May 05, 2016 10:18
In-game: Bibs

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by BirgitLachner » Post

Hallo Hajo
kurz auf deutsch ... toll, dass du Interesse an dem Mod zeigst und dich schon im Code umgeschaut hast. Bist du auf Facebook auch dabei? Oder wie bist du hierher gekommen? Ich denke, dass im deutschsprachigen Bereich das Interesse an ein solches Mod groß sein könnte. Und wenn der Mirek (infchem) noch dazu kommt, wird das sicher gut.

Now I switch to english ...
hajo wrote: Ok, I tried that.
It looks like all those different types of turtles currently have the same abilities,
i.e. they all can dig, and have no inventory yet.
Yes ... I already wanted to do that and it should not be too difficult. Because the string that is needed to define the buttons in the formspec can be easily put together with some if-
hajo wrote: They don't look very different, so it would be nice if you could paint and/or
name them, so that it showed "turtle Hugo owned by singleplayer" when looked at.
Name is already implemented. The colour is another idea from ComputerCraft. I would like to do that, too ... but may be later.

hajo wrote: Stacking one on top of another looks strange, because it doesn't actually land.

It would be nice if you could ride turtles, like the boat.
Two turtles above each other can not be changed. But there is the idea of the collision box and then the player stands directly on the turtle (more exactly the collision box)
Riding on the turtle doesn't make sense to me at the moment. The turtle is tool (tech or animal) that is controlable and programmable.
hajo wrote: I just notice there is ComputercraftEdu - do you want something close to that,
or would you prefer to have a more or less different design/concept for your turtles ?
[/quote]
Yes ... it should be something like that. Not absolutely the same but with the same ideas for learning programming with the turtle. One reason for a difference are the different possibilities that offer Minecraft and Minetest for modders. And that I'm be a bit more childish like the original programmer and endev15 :-)

So may be ... the mod will offer to learners and teachers the possibility to use it in different ways. The features and the code will be mostly the same and thus it will not be hard to have different turtles.

If you like to join the project on github just give me your name.

User avatar
BirgitLachner
Member
Posts: 393
Joined: Thu May 05, 2016 10:18
In-game: Bibs

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by BirgitLachner » Post

@endev15

If the turtle is one block higher than my feet it does not move me away but I'm inside of the turtle.

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by octacian » Post

BirgitLachner wrote:@endev15

If the turtle is one block higher than my feet it does not move me away but I'm inside of the turtle.
OK, thx for letting me know. When I get a chance, I'll make it check for entities above, as well as not move if there is a entity in front that would be pushed into another block as a result of moving.

I'll leave the complicated stuff like taming until the editor is done, I guess. It would simply require defining tameable = { true, "default:apple"} (for example) when calling turtleminer.register_turtle (note: this after I implement the feature).

Locking will be the "Security" upgrade. About remote controls:

Basically, a simple remote control will be bound to a single turtle, and will unbind if the turtle is destroyed. An advanced controller could bind to multiple turtles and present a menu to select which one to control. When rightclicking with the controller in hand, the normal formspec would be shown. With the player control upgrade, the turtle could be controlled using W, A, S, D, Space, and Shift. (space = up, shift = down.) The Camera upgrade would allow the player to see what the turtle would be seeing.

FYI, all of the above is simple to do.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

User avatar
BirgitLachner
Member
Posts: 393
Joined: Thu May 05, 2016 10:18
In-game: Bibs

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by BirgitLachner » Post

FYI, all of the above is simple to do.
Okay ... that's good, because that is above my basic knowledge and would take me a lot of time to find a solution for that.

I would like to add you name to the Readme file because you did more in the code than me. I was just the starter and may be I'm the promoter.

hajo
Member
Posts: 606
Joined: Thu Oct 13, 2016 10:45
Location: DE
Contact:

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by hajo » Post

endev15 wrote:You still have to have a GUI to write the code to the disk.
Books from the default game already can be written to, and copied.
Technically, they already have a gui, save to metadata, etc.
More on the formspec.
When you first make a turtle, you right click on it and configure it (name, etc...).
Then the default formspec is shown. The default formspec will be expanded to
instead contain a text-based editor, and buttons to show the settings,
inventory, and upgrades formspecs.
I meant, the turtle-mod could just use "standard parts" like the books as "disks".
There is no real need to duplicate all that, except for flavor.
hajo wrote:Do you have a link to that branch ?
It's right here.
Ok, I installed that mod, but got a crash when running a program.

Placed a turtle, wrote a program like "forward", clicked "RUN", and got a crash:

Code: Select all

2016-11-06 16:09:39: ACTION[Server]: singleplayer places node turtleminer:digging_turtle at (120,2,18)
2016-11-06 16:09:39: ACTION[Server]: facedir: 3
2016-11-06 16:10:04: ERROR[Main]: ServerError: Lua: Runtime error from mod 'turtleminer' in callback on_playerReceiveFields(): E:\temp\minetest-0.4.14\bin\..\mods\turtleminer/env.lua:127: bad argument #1 to 'setfenv' (number expected, got nil)
2016-11-06 16:10:04: ERROR[Main]: stack traceback:
2016-11-06 16:10:04: ERROR[Main]:       [C]: in function 'setfenv'
2016-11-06 16:10:04: ERROR[Main]:       E:\temp\minetest-0.4.14\bin\..\mods\turtleminer/env.lua:127: in function 'run'
2016-11-06 16:10:04: ERROR[Main]:       E:\temp\minetest-0.4.14\bin\..\mods\turtleminer/env.lua:137: in function 'run_string'
2016-11-06 16:10:04: ERROR[Main]:       E:\temp\minetest-0.4.14\bin\..\mods\turtleminer/t_api.lua:79: in function 'p_editor'
2016-11-06 16:10:04: ERROR[Main]:       E:\temp\minetest-0.4.14\bin\..\mods\turtleminer/t_api.lua:97: in function <E:\temp\minetest-0.4.14\bin\..\mods\turtleminer/t_api.lua:94>
2016-11-06 16:10:04: ERROR[Main]:       E:\temp\minetest-0.4.14\bin\..\builtin\game\register.lua:369: in function <E:\temp\minetest-0.4.14\bin\..\builtin\game\register.lua:349>
I guess, there should be some syntax-check before running...
Last edited by hajo on Sun Nov 06, 2016 16:39, edited 1 time in total.

User avatar
octacian
Member
Posts: 597
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian
Location: Canada

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by octacian » Post

hajo wrote:
endev15 wrote:You still have to have a GUI to write the code to the disk.
Books from the default game already can be written to, and copied.
Technically, they already have a gui, save to metadata, etc.
We're going to use a custom GUI though, because it allows us to customize it for specifically what we'd like. The book interface does not supply a debug panel, and having to create different books for each would be a waste of resources.
hajo wrote:Ok, I installed that mod, but got a crash when running a program.

Placed a turtle, wrote a program like "forward / right / forward", clicked "RUN", and crash:

Code: Select all

2016-11-06 16:09:39: ACTION[Server]: singleplayer places node turtleminer:digging_turtle at (120,2,18)
2016-11-06 16:09:39: ACTION[Server]: facedir: 3
2016-11-06 16:10:04: ERROR[Main]: ServerError: Lua: Runtime error from mod 'turtleminer' in callback on_playerReceiveFields(): E:\temp\minetest-0.4.14\bin\..\mods\turtleminer/env.lua:127: bad argument #1 to 'setfenv' (number expected, got nil)
2016-11-06 16:10:04: ERROR[Main]: stack traceback:
2016-11-06 16:10:04: ERROR[Main]:       [C]: in function 'setfenv'
2016-11-06 16:10:04: ERROR[Main]:       E:\temp\minetest-0.4.14\bin\..\mods\turtleminer/env.lua:127: in function 'run'
2016-11-06 16:10:04: ERROR[Main]:       E:\temp\minetest-0.4.14\bin\..\mods\turtleminer/env.lua:137: in function 'run_string'
2016-11-06 16:10:04: ERROR[Main]:       E:\temp\minetest-0.4.14\bin\..\mods\turtleminer/t_api.lua:79: in function 'p_editor'
2016-11-06 16:10:04: ERROR[Main]:       E:\temp\minetest-0.4.14\bin\..\mods\turtleminer/t_api.lua:97: in function <E:\temp\minetest-0.4.14\bin\..\mods\turtleminer/t_api.lua:94>
2016-11-06 16:10:04: ERROR[Main]:       E:\temp\minetest-0.4.14\bin\..\builtin\game\register.lua:369: in function <E:\temp\minetest-0.4.14\bin\..\builtin\game\register.lua:349>
I guess, there should be some syntax-check first...
Note, the latest commit said it was WIP. And the syntax is move("forward"), etc... That branch is not really ready for use, because when you use improper syntax, the game crashes.
MicroExpansion, Working Computers, All Projects - Check out my YouTube channel! (octacian)
I'm currently inactive in the Minetest community! So if I don't respond, that's why.

hajo
Member
Posts: 606
Joined: Thu Oct 13, 2016 10:45
Location: DE
Contact:

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by hajo » Post

endev15 wrote:
hajo wrote:Ok, I installed that mod, but got a crash when running a program. ..
I guess, there should be some syntax-check first...
the syntax is move("forward"), etc...
Well, with 1-letter-commands, there wouldn't be much room for errors :)

BTW, how about an in-game "Programming guide", i.e. a book-with-text,
like those crafting-guides provided to new players in some mods ?

JulienPavageau
New member
Posts: 9
Joined: Sun Nov 06, 2016 16:15
GitHub: JulienPavageau

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by JulienPavageau » Post

I'me french and I don't know if you speak my language.
I hope you understand my poor english.
I love your project. I hope we can use in the futur a blockly language to program the turtle.
I have never program a mod for mintetest or over game and i don't know lua but i have tried (and succes ;-) to make a record/play/stop buttom to make a sequence of few instructions and to simulate a repeat loop. I thinks it s could be a first step for initiat children with code. You can see my script on Github (it's my first time and i hope i use it correctly) and i make a first vidéo :
https://www.youtube.com/watch?v=3kbbj4HP7lE

If you're ok, i want to make a tweet with this vidéo and probably make an "article in a web magazine" (i don't know the real traduction) on : http://revue.sesamath.net/

Thanks for your great idea.

@JulienPavageau
French Math Teacher

User avatar
BirgitLachner
Member
Posts: 393
Joined: Thu May 05, 2016 10:18
In-game: Bibs

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by BirgitLachner » Post

C'est cool .. je parle bien francais, mais je crois que c'est mieux de parler anglais.

Well, what you've done is really great for your first trial. May be that's one idea to expand the abilities of the turtle. Something like a notebook to have the commands in mind. That's a good idea towards the use of loops.
Damn ... I would like to change the code for the turtles that the different turtles have different formspecs but I have too much to do at school now.

BTW ... What is the ant(?) button for? Looks a bit chaotic?

We'll wait for endev16 ...

User avatar
BirgitLachner
Member
Posts: 393
Joined: Thu May 05, 2016 10:18
In-game: Bibs

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by BirgitLachner » Post

hajo wrote: BTW, how about an in-game "Programming guide", i.e. a book-with-text,
like those crafting-guides provided to new players in some mods ?
What are your idea for that? The text can be collected in the github wiki.

User avatar
BirgitLachner
Member
Posts: 393
Joined: Thu May 05, 2016 10:18
In-game: Bibs

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by BirgitLachner » Post

JulienPavageau wrote: If you're ok, i want to make a tweet with this vidéo and probably make an "article in a web magazine" (i don't know the real traduction) on : http://revue.sesamath.net/
I would say yes ...

JulienPavageau
New member
Posts: 9
Joined: Sun Nov 06, 2016 16:15
GitHub: JulienPavageau

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by JulienPavageau » Post

BirgitLachner wrote:C'est cool .. je parle bien francais, mais je crois que c'est mieux de parler anglais.
Ok, mais dans ce cas je me permets de donner quelques liens en français ci-dessous.
BirgitLachner wrote: BTW ... What is the ant(?) button for? Looks a bit chaotic?
It's for fun and also to show how recording the play button can be used to simulate a repeat loop with 2^n iterations.
It's a Langton's Ant, you can see in this french article why i do this and why i may add a textarea for see and change the script (and why i choose a language with only one letter for command) :
http://revue.sesamath.net/spip.php?article897

hajo
Member
Posts: 606
Joined: Thu Oct 13, 2016 10:45
Location: DE
Contact:

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by hajo » Post

BirgitLachner wrote:
hajo wrote: BTW, how about an in-game "Programming guide", i.e. a book-with-text,
like those crafting-guides provided to new players in some mods ?
What are your idea for that? The text can be collected in the github wiki.
PG-Book1:
* Short introduction about the turtles,
* short descriptions about the different types of turtles,
* how to get a turtle and remote,
* short example program (*),
* "more details in Book2" + link to forum/github/webpage with docu
PG-Book2:
* Command-Reference

That is, a "minimal starter-text" with everything a smart kid
needs to know to start using the turtles - without leaving the game.

(*) For example, dig stairs downward
1-Simple: just dig + forward (this would be enough for Book1)
2-with checks: stop when anything unexpected comes up
3-with report/alert: tell what turtle found (cave/water/lava/stone too hard to dig...)
4-also collect minerals while digging steps (+report "inventory full")
5-counting: place a torch every 10 steps (+report "out of torches" / variables?)
6-after error, go upstairs (until out of steps upward)
7-dito, plus move a few spaces away from top-of-stairs (dont block entrance)
8-dito: go upstairs, plus return to base (+remember start-position)
9-unload inventory to chest / re-stock torches / craft torches
10-back to work (go downstairs without digging+placing torches, continue digging)
11-teamwork: turtle#1 just digs, turtle #2 places torches
...
I guess the problems/programs 2-11+ would fill a few days worth of lessons.

BTW:
Are the turtles using tools ?
Can they see without light ? Detect the light-level ? Time-of-day ?
Detect events ? (Players joining/leaving, Chat)
How high can they climb/fly ?
Can they crawl thru a 1x1 tunnel ?
Can they pass thru a door ? Open/close a door ?
Send/receive signals to/from other turtles ?
Store data ? What type (bits=inventory-slots, integer, float, string, ...)? How much ?
Last edited by hajo on Mon Nov 07, 2016 13:18, edited 4 times in total.

hajo
Member
Posts: 606
Joined: Thu Oct 13, 2016 10:45
Location: DE
Contact:

Re: [Mod] TurtleMiner ... programmable turtles in Minetest

by hajo » Post

BirgitLachner wrote:What is the ant(?) button for? Looks a bit chaotic?
It looks chaotic at first, but after about 10000 steps,
the Langton's ant starts to make a regular pattern ("highway").

See RosettaCode for some examples.
Last edited by hajo on Fri Nov 25, 2016 14:25, edited 1 time in total.

Post Reply

Who is online

Users browsing this forum: No registered users and 39 guests