Discuss Scratch

logabe
Scratcher
71 posts

sb3 - A Scratch runtime for the desktop

Hello! I'm logabe and I'm happy to be able to show off my work on sb3. This thread will be a mix of a devlog, and a way to get feedback and inspiration from the community.

What is sb3?
sb3 is a scratch interpreter/runtime that is designed to run on the desktop.
I started work on this project because using Electron (basically a stripped down version of Chrome) to run Scratch projects seemed like major overkill. It seemed like a massive project way beyond my skill level which I would never complete, so I went into the project expecting to fail - but wanting to make as much happen before that happened. So far, things are going well.

Project status
Nothing much. I've only implemented a select few blocks, but many of the foundation elements (parsing projects, loading files) are there.
Currently working on the sound blocks, but after that I want to tackle the operator blocks as having those will make it feel more like an actual programming language…

How does it work?
sb3 is programmed in Rust, and relies on a technologies that should allow it to run on most platforms (although at the time of writing this I've only tested it on Linux). On load, the .sb3 file is inspected, the project.json is loaded, and the code is parsed into Rust structs for execution. I'm not very good at explaining this, but if you have specific questions please ask!

Can I use sb3?
Not yet
This is still a hobby project which isn't stable or in any way useful for running scratch projects. I want to open-source the code at some point, which will include binary downloads.

I will update this! Just wanted to get the project out there…

Last edited by logabe (June 27, 2024 23:53:23)

logabe
Scratcher
71 posts

sb3 - A Scratch runtime for the desktop

Current Features

  • Sprites will draw a testing image with expected position, rotation & scale (read from project.json)
  • Basic logic
  • Decent script evaluation™ - Will only run code that is connected to a When Flag Clicked block

Implemented Blocks:
say [will print to terminal]

play sound [ v]
play sound [ v] until done
when green flag clicked

wait () secs
forever

end
There are some more which wouldn't be difficult to implement, but I haven't gotten around to that yet.

Last edited by logabe (June 27, 2024 22:18:03)

ninjaMAR
Scratcher
1000+ posts

sb3 - A Scratch runtime for the desktop

Please don't call this sb3. It's confusing to have a file format, and a runtime use the same name.
logabe
Scratcher
71 posts

sb3 - A Scratch runtime for the desktop

ninjaMAR wrote:

Please don't call this sb3. It's confusing to have a file format, and a runtime use the same name.
I know. I was struggling to think of a name and decided to call it sb3 as it was the first thing that popped into my mind. I will happily take suggestions for name ideas, but I'll keep calling it sb3 for now…

Powered by DjangoBB