Google Blockly (better than Scratch) for easy visual mod development

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

Google Blockly (better than Scratch) for easy visual mod development

by Neuromancer » Thu Nov 14, 2013 01:18

A while back, I threw out the idea of using scratch to program mods, that wouldn't have worked out because scratch is a specific purpose language. Then I found blockly. It uses the visual programming of scratch, but lets you output/generate ANY language (in our case it could be lua). But what is also really cool is that it lets you create custom blocks that could be specific to Minetest modding. Thus there could be blocks to define nodes, nodeboxes or any other common aspect of Minetest modding.

Why is this cool? Because it would allow anyone to create Mods for minetest, even kids and non-developers.
Last edited by Neuromancer on Thu Nov 14, 2013 01:24, edited 1 time in total.
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Thu Nov 14, 2013 01:58

I found the link to Google Blocky's website. Look below:
http://code.google.com/p/blockly/?redir=1
 

User avatar
hoodedice
Member
 
Posts: 1372
Joined: Sat Jul 06, 2013 06:33

by hoodedice » Thu Nov 14, 2013 03:07

Inocudom wrote:I found the link to Google Blocky's website. Look below:
http://code.google.com/p/blockly/?redir=1


I checked it out too. It's cool.

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
Please do not attempt to maintain the Linux kernel using Blockly.

-Google.


While it is cool, creating the modding API in Blockly will take a LOT of time. The app comes with Java and Python in-built, which means that someone will have to add lua support. Which is a lot.

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
 Blockly is not an executable that can be double-clicked and played with.
Last edited by hoodedice on Thu Nov 14, 2013 03:52, edited 1 time in total.
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Thu Nov 14, 2013 08:50

I cant see any way to actually make a project or use it.

It is also very unpolished.

Therefore, not better than scratch.
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Thu Nov 14, 2013 17:09

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
Please do not attempt to maintain the Linux kernel using Blockly.

-Google.


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
 Blockly is not an executable that can be double-clicked and played with.


Those words. I sense great hatred in those words.
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Fri Nov 15, 2013 01:07

I agree that it will take a lot of time to implement every aspect of lua, but we could start with just the basics that are used most commonly for Minetest Mods. I think you meant it currently has javascript implemented in it. I'm hopefully going to be using it to implement c#, so maybe I will learn a bit and that can help us do lua.
Last edited by Neuromancer on Fri Nov 15, 2013 01:08, edited 1 time in total.
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Fri Nov 15, 2013 01:13

rubenwardy wrote:I cant see any way to actually make a project or use it.

It is also very unpolished.

Therefore, not better than scratch.

It would be impossible to use scratch to generate luascript. It would just be a fair amount of work to do it in blockly. Blockly isn't better than scratch in general. But it is better for doing things like generating lua for Minetest mods. It is a code generator.

It has been used to do home automation projects see Domoticz.
http://www.openremote.org/display/forums/Blockly+-+Visual+programming+editor

It's all about creating custom blocks:
https://code.google.com/p/blockly/wiki/CustomBlocks
https://code.google.com/p/blockly/wiki/DefiningBlocks
Last edited by Neuromancer on Fri Nov 15, 2013 01:15, edited 1 time in total.
 

User avatar
BrandonReese
Member
 
Posts: 836
Joined: Wed Sep 12, 2012 00:44
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

by BrandonReese » Fri Nov 15, 2013 02:23

Seems harder than just writing code to me...
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Fri Nov 15, 2013 03:26

If there are ways to get Google Blocky to work with Lua, then it could be useful. Of course, the modding api is a very important point to consider.

Would the authors of Google Blocky even allow for it to be used on open source projects?
 

User avatar
hoodedice
Member
 
Posts: 1372
Joined: Sat Jul 06, 2013 06:33

by hoodedice » Fri Nov 15, 2013 14:25

It is, indeed like Brandon said, much more harder to implement than just writing the code.

I'm not a programmer (yet), however, I've downloaded that thing (Plus, used subversion for the first time) and I've checked it out and believe me when I say this: It ain't beautiful nor is it easy to implement any language in it. It's a major PITA (Not the one that says Plugging in the Answers).

For starts, Blockly has no syntax. People just connect blocks and a code is generated. The blocks must add the syntax themselves. Next, even adding the syntax isn't a day's work. There is something called an order of operation or something, which requires a knowledge of Lua in entirety. And then defining this is again, not pretty. Like the devs have themselves told, it isn't an executable that can be double clicked and played with. It's more like playing Minetest with a binary input method XD

A scratch like method for making mods is very possible, however I feel that Blockly, though Open Source isn't the framework we need. As Ruben said, it is VERY unpolished.

@Inocudom: It wasn't hating on it, Blockly is fun. But not so fun to create it. Plus Blockly is open source so of course we can change it to our needs and use it for whatever.

EDIT: Scratch too is open source.

EDIT 2: Rest assured, I'm seeing if there is an easier way to implement this. By easier, I mean a way in which I have to learn a minimum of programming lingos (Since I don't know any) to get the thing we want. So, I'm currently lookig if love2d can do the task (Yes, I'll try to start it from nothing) since love2d is in lua and lua is what we need anyway.
Last edited by hoodedice on Fri Nov 15, 2013 18:01, edited 1 time in total.
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sat Nov 16, 2013 00:09

I did find someone using blockly to generate Lua (ironically for Minecraft)
https://groups.google.com/forum/#!topic/blockly/WD13auzJ5m4

"I've working on a Blockly fork that supports generating Lua code to control ComputerCraft turtles in Minecraft. Testers, contributors, advisors, and evangelists are needed:"

http://blockly-lua.appspot.com/static/apps/code/index.html
https://github.com/espertus/blockly-lua
http://www.computercraft.info/forums2/index.php?/topic/15791-a-sneak-peek-at-blockly-lua/


It looks pretty full featured already. Maybe she'll let us use it...
Last edited by Neuromancer on Sat Nov 16, 2013 00:19, edited 1 time in total.
 

User avatar
Blockly
New member
 
Posts: 6
Joined: Sat Nov 16, 2013 02:26

by Blockly » Sat Nov 16, 2013 02:28

Neuromancer wrote:I did find someone using blockly to generate Lua (ironically for Minecraft)
It looks pretty full featured already. Maybe she'll let us use it...


Let you? I'd be delighted. In any case, it's open source. Go for it, and let me know if you have any questions (or fixes).
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sat Nov 16, 2013 02:45

Blockly wrote:
Neuromancer wrote:I did find someone using blockly to generate Lua (ironically for Minecraft)
It looks pretty full featured already. Maybe she'll let us use it...


Let you? I'd be delighted. In any case, it's open source. Go for it, and let me know if you have any questions (or fixes).

Whoa, you're not just the person who wrote the lua generator for blockly, you're the inventor/primary developer of Blockly?!
 

User avatar
general3214
Member
 
Posts: 118
Joined: Fri Oct 04, 2013 03:15

by general3214 » Sat Nov 16, 2013 03:27

Neuromancer wrote:
Blockly wrote:
Neuromancer wrote:I did find someone using blockly to generate Lua (ironically for Minecraft)
It looks pretty full featured already. Maybe she'll let us use it...


Let you? I'd be delighted. In any case, it's open source. Go for it, and let me know if you have any questions (or fixes).

Whoa, you're not just the person who wrote the lua generator for blockly, you're the inventor/primary developer of Blockly?!

I think you're confused, Neuromancer; if you go to Blockly's profile, you'll see that her (real) name is Ellen Spertus.
March 6, 2014, 8:37 PM PST: I will no longer continue my mods.
Mods | GitHub | MCF
Avatar made by Annahstas
 

User avatar
hoodedice
Member
 
Posts: 1372
Joined: Sat Jul 06, 2013 06:33

by hoodedice » Sat Nov 16, 2013 04:02

Well, that's a nice sequence of plot twists! XD

Hello Ellen and welcome to the minetest forums. It's always nice to see Minecraft people supporting Minetest :)
Last edited by hoodedice on Sat Nov 16, 2013 04:04, edited 1 time in total.
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build
 

User avatar
general3214
Member
 
Posts: 118
Joined: Fri Oct 04, 2013 03:15

by general3214 » Sat Nov 16, 2013 04:09

hoodedice wrote:Well, that's a nice sequence of plot twists! XD

Hello Ellen and welcome to the minetest forums. It's always nice to see Minecraft people supporting Minetest :)

How many Minecrafters have you met so far?

[spoiler]It's weird how discussions can get off topic in Minetest Forums; the staff at Minecraft Forum is strict.[/spoiler]
Last edited by general3214 on Sat Nov 16, 2013 04:11, edited 1 time in total.
March 6, 2014, 8:37 PM PST: I will no longer continue my mods.
Mods | GitHub | MCF
Avatar made by Annahstas
 

User avatar
hoodedice
Member
 
Posts: 1372
Joined: Sat Jul 06, 2013 06:33

by hoodedice » Sat Nov 16, 2013 04:37

Quite a few, but I don't get their names from the top of my head... :/

I don't know JavaScript. As such, though Espertus' code is really nice and sorta complete, and all that needs to be added is the API, I can't. Someone else will have to do this :(
7:42 PM - Bauglio: I think if you go to staples you could steal firmware from a fax machine that would run better than win10 does on any platform
7:42 PM - Bauglio: so fudge the stable build
7:43 PM - Bauglio: get the staple build
 

User avatar
Blockly
New member
 
Posts: 6
Joined: Sat Nov 16, 2013 02:26

by Blockly » Sat Nov 16, 2013 05:47

Neil Fraser (https://neil.fraser.name/) is the inventor of Blockly, although I've been able to work on it and created the Lua fork.

FWIW, I didn't know JavaScript when I started working on Blockly. It's not hard to add new blocks by imitating existing ones, after which you start picking it up. There's also a "support group" (https://groups.google.com/forum/#!forum/blockly), which Neuro Mancer has already joined.
 

User avatar
general3214
Member
 
Posts: 118
Joined: Fri Oct 04, 2013 03:15

by general3214 » Sat Nov 16, 2013 07:07

XD Neil Fraser has goofy smile.
March 6, 2014, 8:37 PM PST: I will no longer continue my mods.
Mods | GitHub | MCF
Avatar made by Annahstas
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Sat Nov 16, 2013 14:01

I am liking this turn of events. In time, the results could be positive.
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sat Nov 16, 2013 14:23

Inocudom wrote:I am liking this turn of events. In time, the results could be positive.

My motivation for adding Blockly to Minetest is fairly small in scope. My kids love Minetest, and I want to teach them how to program. However, if you think about it, Minetest and Blockly are free. While many schools aren't going to shell out money for all kinds of Minecraft licences, I could see them installing Minetest and Blockly on every computer. Suddenly you have millions of kids all over the world writing Minetest Mods. That has got to be good for Minetest. Now these kids grow up. And they already understand all the basics of Minetest modding. What are they going to do? Start writing lua and maybe even c++. That has got to be great for Minetest! And for the world in general, all of these new software developers thanks to Minetest and Blockly. Minetest for making programming fun, Blockly for making programming accessible to kids and beginners.
Last edited by Neuromancer on Sat Nov 16, 2013 14:29, edited 1 time in total.
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sat Nov 16, 2013 14:41

I think a good place to start would be to implement minetest.register_node in Blockly.
minetest.register_node("bushes:BushLeaves"..Num, {
description = "Bush Leaves "..Num,
drawtype = "allfaces_optional",
tiles = {"bushes_leaves_"..Num..".png"},
inventory_image = "bushes_leaves_"..Num..".png",
paramtype = "light",
groups = { -- MM: Should we add leafdecay?
snappy=3,
flammable=2,
attached_node=1
},
sounds = default.node_sound_leaves_defaults(),
})

It would be nice to have dropdowns for all the possible parameter values like drawtype and groups.
 

User avatar
LorenzoVulcan
Member
 
Posts: 437
Joined: Mon Mar 12, 2012 06:46

by LorenzoVulcan » Sat Nov 16, 2013 14:46

Image
Developer of the BlockForge 2# Project!
Official thread: http://minetest.net/forum/viewtopic.php?pid=54290#p54290
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sat Nov 16, 2013 17:03



That's kind of the point. Everyone starts out a noob. Blockly helps you bridge the gap from being a noob to an expert. Otherwise all you will ever have are a few experts and a boatload of people who can't bridge the gap.
 

User avatar
LorenzoVulcan
Member
 
Posts: 437
Joined: Mon Mar 12, 2012 06:46

by LorenzoVulcan » Sat Nov 16, 2013 17:35

Neuromancer wrote:That's kind of the point. Everyone starts out a noob. Blockly helps you bridge the gap from being a noob to an expert. Otherwise all you will ever have are a few experts and a boatload of people who can't bridge the gap.

I think this GUI just breaks out all concept of programming.When you program you must have the scheme of every class in your head,an programming LUA mods for minetest is a nice training to learn this concept.Using Blockly to code mods for minetest will just make every user of this forum a noob.

And the gap can be bridged asking help to expert users or reading tutorial and APIs.
Developer of the BlockForge 2# Project!
Official thread: http://minetest.net/forum/viewtopic.php?pid=54290#p54290
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Sat Nov 16, 2013 18:06



I don't like the work "noob," but would instead find "initiate," "trainee," and "beginner" to be more favorable. Linguistics has great power, the likes of which should not be underestimated. Just like computer language, spoken language doesn't just convey a message, it also programs.
 

User avatar
LorenzoVulcan
Member
 
Posts: 437
Joined: Mon Mar 12, 2012 06:46

by LorenzoVulcan » Sat Nov 16, 2013 18:09

Inocudom wrote:


I don't like the work "noob," but would instead find "initiate," "trainee," and "beginner" to be more favorable. Linguistics has great power, the likes of which should not be underestimated. Just like computer language, spoken language doesn't just convey a message, it also programs.

Yeah but i really meant that this program will turn every user into a noob,a person who can't program well and needs external helps like babysitting IDEs or...whatever is this Blockly.
Developer of the BlockForge 2# Project!
Official thread: http://minetest.net/forum/viewtopic.php?pid=54290#p54290
 

User avatar
Neuromancer
Member
 
Posts: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sat Nov 16, 2013 19:14

LorenzoVulcan wrote:
Inocudom wrote:


I don't like the work "noob," but would instead find "initiate," "trainee," and "beginner" to be more favorable. Linguistics has great power, the likes of which should not be underestimated. Just like computer language, spoken language doesn't just convey a message, it also programs.

Yeah but i really meant that this program will turn every user into a noob,a person who can't program well and needs external helps like babysitting IDEs or...whatever is this Blockly.

I found this site
http://csedweek.org/
and my 6 year old was using it to write simple programs using blockly/scratch when she had never done any programming before. This does have the power to turn every non programmer into a beginning programmer. I don't have a problem with that. My 6 year old could not look up api's and figure out Lua just yet. To my 10 year old, the examples were trivial. But if she had something like the Minetest modding API in Blockly, she would not be easily bored. This is where the jobs are going to be when they graduate. The beginners will help each other figure things out. And eventually they will no longer be beginners. Think of it this way. The more beginners at the base of the pyramid the higher the pyramid can rise.

And heck, I don't know all of the Minetest API. Having a Blockly implementation is like having a set of visual documentation for the API.
 

User avatar
LorenzoVulcan
Member
 
Posts: 437
Joined: Mon Mar 12, 2012 06:46

by LorenzoVulcan » Sat Nov 16, 2013 19:26

Neuromancer wrote:http://csedweek.org/
and my 6 year old was using it to write simple programs using blockly/scratch when she had never done any programming before. This does have the power to turn every non programmer into a beginning programmer. I don't have a problem with that. My 6 year old could not look up api's and figure out Lua just yet. To my 10 year old, the examples were trivial. But if she had something like the Minetest modding API in Blockly, she would not be easily bored. This is where the jobs are going to be when they graduate. The beginners will help each other figure things out. And eventually they will no longer be beginners. Think of it this way. The more beginners at the base of the pyramid the higher the pyramid can rise.

And heck, I don't know all of the Minetest API. Having a Blockly implementation is like having a set of visual documentation for the API.


This is just because a 6 years old kid doesn't have and must not have the ability of learning programmation.I don't think you must know all minetest APIs,but you might at least understand how APIs works and remember when there's an API for a function and there's not.
Developer of the BlockForge 2# Project!
Official thread: http://minetest.net/forum/viewtopic.php?pid=54290#p54290
 

User avatar
Blockly
New member
 
Posts: 6
Joined: Sat Nov 16, 2013 02:26

by Blockly » Sat Nov 16, 2013 19:29

Neuromancer wrote:I found this site
http://csedweek.org/
and my 6 year old was using it to write simple programs using blockly/scratch when she had never done any programming before. This does have the power to turn every non programmer into a beginning programmer. I don't have a problem with that. My 6 year old could not look up api's and figure out Lua just yet. To my 10 year old, the examples were trivial.


Yes, we helped code.org build their tutorials (http://learn.code.org/) using Blockly. I love what they did to the Maze by adding the Angry Birds and Plants vs. Zombies graphics and sound effects.

Did your 10 year old do the 20-hour curriculum at the above link? If she found that trivial, she's a genius. (Even finding the one-hour curriculum trivial at her age is impressive.)

Neuromancer wrote:But if she had something like the Minetest modding API in Blockly, she would not be easily bored. This is where the jobs are going to be when they graduate. The beginners will help each other figure things out. And eventually they will no longer be beginners. Think of it this way. The more beginners at the base of the pyramid the higher the pyramid can rise.

Our goal with Blockly is to expose as many children as possible to the joy of programming, letting them put off details like syntax until later when and if they're sufficiently motivated. My reason for creating Blockly Lua is to leverage kids' interest in Minecraft and other games to get them to try programming.

FWIW, regular Blockly lets you see the JavaScript and Python code corresponding to the blocks, to ease the eventual transition to text-based programming languages.
 

Next

Return to Minetest-Related

Who is online

Users browsing this forum: No registered users and 18 guests

cron