How do block coding platforms work?

i love snap and have always been fascinated with block coding
so much so that i want to code my own block coding program
but i have no clue how to make it work
please tell me how i could code this

Most people start off my copying and then modifying an existing codebase

The main block languages are Snap!, Scratch and Blockly

Current Scratch 3 is itself a fork of Blockly

Scratch 3 is available to modify using JavaScript, Scratch 1.4 is available to modify using Smalltalk

Example - a young friend of mine came up with Edublocks

Note This forum is here to discuss Snap! so major deviations from that are discouraged :slight_smile:

thats cool and all but i kinda want to code it from scratch because i want to add a ton of special stuff so how could i do that

You download VS code - decide what language your going to use and start learning it :slight_smile:


Much, much, much easier to stand on the shoulders of giants :slight_smile:

Well, first you need to choose the programming language to make it in. Then figure out your rendering system. This would usually be done in a canvas (like snap), that way you control every single thing the gets rendered. After that, you need to know how to draw the blocks, deal with storing the block scripts in the project, and being able to run it. I personally would look at griffpatch's scratch in scratch project to give you an idea of how it works, then create a prototype in your chose programming language.

It is very complicated, since you have to manage running the scripts in the right order. Also, there's not really any right place to start, as something like this can come in many forms, and it also takes a very long time to create it. For example, jens spent a very long time creating morphic.js before he started working on snap. And even then, it probably took many months, before it was in a ready state.

If you want more techincal information, such as how to do something in the chosen programming language, ask on some other programming website, like stack overflow.

thanks for the info that will really help

block coding isnt that great.
(i hate making guis just because they are good-looking or fancy grrrr.guis are only okay for improving the efficiency.for example,something that would use a 2d grid should probably have gui)
what makes snap great is metaprogramming

You liked Snap! before we had metaprogramming! :~P

But you're not really the audience anyway. Block programming is for beginners, nonverbal learners, or (ironically) grownups who are computerphobic project managers and need to express some human algorithm.

Yeah, block coding may not be great, but the main purpose of block coding isn't for, well, coding. At least for people who are looking to code software and stuff. It's for learning code. It's just that some people use block coding to make amazing projects (which is probably why you seem under the mindset that block coding is EXACTLY like normal text-based code, which it isn't).

The main (and original intended) audience for block coding is for learners, little children (who apply to this "learners" group), and people who coding. It's just that people over time became better at block coding and made cool projects (like Griffpatch on Scratch). That doesn't mean that block coding is as good as normal text-based coding.

Oh, it is as good as text, just for different purposes.

For example, the people who complain about programming in blocks generally say that they can type faster than they can drag and drop. Taking that at face value, maybe text is better for writing code. But I claim that block code is easier to read; it has spelled-out names instead of abbreviations, it doesn't have superfluous declarations; block structure (in the text language sense!) is visually apparent.

This discussion reminds me of my (dearly beloved) father (RIP). He always bought cars with a manual gearbox: like many of his generation in Europe, he believed automatic shifting wasn’t for “real men”, only for “incompetent drivers, like elderly people”. (He didn't need a cell phone either, because “people can call me when I’m at home”)

Even now, most people in my country (and I think Europe in general) take driving lessons in manually-shifted cars, “not because it’s easy but because it’s hard”. Students who took their examination in a car with automatic transmission receive a downgraded drivers license, which doesn't help to overcome the prejudice.

By now, the real issue is today's and tomorrow's cars' self-driving abilties :slight_smile:

manual = text languages; automatic = block languages; self-driving cars = AI