goboscript text-based compiler for Scratch -- visual programming language

goboscript is a text-based programming language which compiles to Scratch. It allows you to write Scratch projects in text, and compile it into a .sb3 file - which can be opened in the Scratch editor, TurboWarp or be uploaded to the Scratch website.

goboscript allows you to create advanced Scratch projects with ease, you can use any text editor, use a version control system such as git. You can refactor your code using search and replace. Text code can be copy pasted, which allows you to easily reuse code or share it with others. goboscript syntax is concise and easy to read.

goboscript allows you to integrate external tooling and workflows, such as using a script to generate costumes for a text rendering engine. Or loading in images into lists.

goboscript has a powerful macro system - similar to Rust's macro system. This allows you to write macros to generate code.

goboscript is more than just an 1:1 mapping of Scratch blocks to text, it also has additional features like local variables for procedures (custom blocks).

goboscript also performs optimizations, detects problems and unused code.

goboscript GitHub repo

I've ported the documentation site which is made using material for mkdocs over to my gemini capsule using md2gemini

goboscript Documentation (Gemini mirror)

#language

Posted in: s/programming

☕️ aspizu [Average programmer, bad musician.]

2025-03-16 · 1 year ago · 👍 emilis, LucasMW

5 Comments ↓

👤 emilis · 2025-03-17 at 06:00:

Thank you! I’ve just read it. Was quite interesting.

🚀 LucasMW · 2025-03-20 at 14:40:

Interesting

🚀 LucasMW · 2025-03-20 at 14:43:

Does it work on very old scratch files (like, before 2010) ?

☕️ aspizu [OP...] · 2025-03-23 at 13:07:

@LucasMW The compiler outputs a .sb3 file, not the other way around. It outputs a Scratch 3 project. If you are talking about the decompiler, then no it only works for Scratch 3 projects.

🚀 LucasMW · 2025-03-24 at 12:32:

I see. Thanks for answering!