Google Blockly - a visual programming language
code.google.com
Google Blockly - a visual programming language
1–10 of 129 posts
Re: Google Blockly - a visual programming language
#2The UI for this reminds me a lot of Scratch from MIT.
Re: Google Blockly - a visual programming language
#3I can't seem to find the end condition for the Maze demo. There is no 'goal_reached?'
Re: Google Blockly - a visual programming language
#4Can this program be made any shorter? http://www.dodaj.rs/f/1K/vW/2gLz63rl/blockly.png
Re: Google Blockly - a visual programming language
#5I can't seem to find the end condition for the Maze demo. There is no 'goal_reached?'
When I solved it, the program just stopped running.
Re: Google Blockly - a visual programming language
#6Re: Google Blockly - a visual programming language
#7The UI for this reminds me a lot of Scratch from MIT.
Indeed. I wrote a similar framework in Actionscript / Flex a few years ago, actually with a lot of input from the Scratch team. I've been thinking about porting it to JS recently. Glad to see someone beat me to it :)
Edit: Here's my old Actionscript library in case anyone is interested. https://github.com/trun/flashblocks
Re: Google Blockly - a visual programming language
#8Can this program be made any shorter? http://www.dodaj.rs/f/1K/vW/2gLz63rl/blockly.png
An "else" would help; you can add one by hitting the + symbol on the if. With the else, you can get the shortest program that'll solve the maze (transcribing using approximate notation in lieu of a screenshot):
while True:
if wall(AHEAD):
turn(LEFT)
else:
move(FORWARD)
turn(RIGHT)
However, the addition of one more if makes the solution much faster and look more sensible, by not turning to the right and immediately back to the left: while True:
if wall(AHEAD):
turn(LEFT)
else:
move(FORWARD)
if not wall(RIGHT):
turn(RIGHT)Re: Google Blockly - a visual programming language
#9Can this program be made any shorter? http://www.dodaj.rs/f/1K/vW/2gLz63rl/blockly.png
http://i.imgur.com/ct17R.png it takes a while, but gets there.
Re: Google Blockly - a visual programming language
#10The UI for this reminds me a lot of Scratch from MIT.
Agree, here's the link http://scratch.mit.edu.
Screenshot on the home page shows the blocks look very similar indeed.