Discuss Scratch
- CST1229
-
Scratcher
1000+ posts
TB3: text-based Scratch 3 (beta)
(#19)just wondering, are there any that have an integrated compiler and project player too? (aside from tosh since it's 2.0)
There are many text-bases languages that compile to Scratch and others have made different design choices, so there a lot of options to choose from if you prefer a different syntax.
Last edited by CST1229 (March 5, 2025 15:50:56)
- Maximouse
-
Scratcher
1000+ posts
TB3: text-based Scratch 3 (beta)
This is excellent!If this is because other IDEs have certain features that you want to use, I'd rather try to add those to TB3. The ability to experiment quickly, which is an important feature of Scratch that I tried to retain in TB3, is lost if there's an additional import step.
I'd really like a way to import, or compile text files though, so I can develop in a separate IDE and then import/compile to TB3.
- Maximouse
-
Scratcher
1000+ posts
TB3: text-based Scratch 3 (beta)
I don't know any. But I don't think it would be very difficult to make an IDE similar to tosh or the Leopard editor for one of the other existing languages.(#19)just wondering, are there any that have an integrated compiler and project player too? (aside from tosh since it's 2.0)
There are many text-bases languages that compile to Scratch and others have made different design choices, so there a lot of options to choose from if you prefer a different syntax.
- KaaBEL_sk
-
Scratcher
100+ posts
TB3: text-based Scratch 3 (beta)
hideI wondered why I couldn't run my project lol.
delete all of [list v]
add (1) to [list v]
if (item (1) of [list]) then // sad it breaks on [item () of [ v]] in bolean input
ask [this works] and wait
- Maximouse
-
Scratcher
1000+ posts
TB3: text-based Scratch 3 (beta)
I'll try to make projects that have this block in a Boolean input import correctly (which doesn't necessarily mean that your project will work – importing is currently unsupported). But I won't make “if item 1 of list then” valid syntax because it doesn't make sense.hideI wondered why I couldn't run my project lol.
delete all of [list v]
add (1) to [list v]
if (item (1) of [list]) then // sad it breaks on [item () of [ v]] in bolean input
ask [this works] and wait
Last edited by Maximouse (March 14, 2025 08:40:11)
- Maximouse
-
Scratcher
1000+ posts
TB3: text-based Scratch 3 (beta)
Update:
- Added a status bar. When support for hardware extensions is added, this is where the status of connected devices will be shown.
- New text-related messages on the loading screen.
- Extension blocks with dropdowns are now compiled correctly.
- Item of list reporters inside Boolean inputs are now replaced with an expression when the project is imported.
- Maximouse
-
Scratcher
1000+ posts
TB3: text-based Scratch 3 (beta)
I'm working on hardware extension support and need help with testing. If you have an external device that's compatible with Scratch, you can try to make a TB3 project that interacts with it using the experimental version: https://mxmou.github.io/scratch-gui/tb3-hardware-extensions/
If you find a bug or have any other suggestions, please post them on GitHub or on this topic.
If you find a bug or have any other suggestions, please post them on GitHub or on this topic.
- leogames2016
-
Scratcher
500+ posts
TB3: text-based Scratch 3 (beta)
I wonder,what would this block look like in TB3?
if <disobeying> then
ground [you]
end
Last edited by leogames2016 (March 21, 2025 16:40:15)
- KaaBEL_sk
-
Scratcher
100+ posts
TB3: text-based Scratch 3 (beta)
I'm working on hardware extension support and need help with testing. If you have an external device that's compatible with Scratch, you can try to make a TB3 project that interacts with it using the experimental version: https://mxmou.github.io/scratch-gui/tb3-hardware-extensions/What hardware extensions and how to test those? The https://mxmou.github.io/scratch-gui/tb3-hardware-extensions/ links to a blank project, is that on purpouse?
If you find a bug or have any other suggestions, please post them on GitHub or on this topic.
- CST1229
-
Scratcher
1000+ posts
TB3: text-based Scratch 3 (beta)
(#30)i assume extensions like ev3, wedo, etc
What hardware extensions and how to test those? The https://mxmou.github.io/scratch-gui/tb3-hardware-extensions/ links to a blank project, is that on purpouse?
- Maximouse
-
Scratcher
1000+ posts
TB3: text-based Scratch 3 (beta)
Indeed. You can use them by writing the name of the extension before the block name, for example:(#30)i assume extensions like ev3, wedo, etc
What hardware extensions and how to test those? The https://mxmou.github.io/scratch-gui/tb3-hardware-extensions/ links to a blank project, is that on purpouse?
microbit: when A button presed
microbit: display text "test"
I wonder,what would this block look like in TB3?https://tosh.blob.codes/help/guide/#syntax
- blob8108
-
Scratcher
1000+ posts
TB3: text-based Scratch 3 (beta)
This is very cool! I'm delighted to see this.
Ever since Scratch 3.0 came out as a “proper” web app (remember Scratch 2.0 was Flash!) I thought tosh would have been better as a Scratch mod, rather than a ground-up reimplementation. (Certainly it would have taken way less time
)
Some thoughts:
- I miss being able to hit cmd+return to trigger the green flag, for even faster feedback when developing :-)
- Is it me or do the autocomplete suggestions take longer to show up than in OG tosh?
- I think the reason I never supported comments, is it was tricky to figure out where to put them when saving/loading from a Scratch project file. Maybe you can find a way of doing that for Scratch 3.0!
- I can't seem to find the hidden vim mode :-)
Lovely stuff though, and I look forward to seeing where you go with it!
Ever since Scratch 3.0 came out as a “proper” web app (remember Scratch 2.0 was Flash!) I thought tosh would have been better as a Scratch mod, rather than a ground-up reimplementation. (Certainly it would have taken way less time
)Some thoughts:
- I miss being able to hit cmd+return to trigger the green flag, for even faster feedback when developing :-)
- Is it me or do the autocomplete suggestions take longer to show up than in OG tosh?
- I think the reason I never supported comments, is it was tricky to figure out where to put them when saving/loading from a Scratch project file. Maybe you can find a way of doing that for Scratch 3.0!
- I can't seem to find the hidden vim mode :-)
Lovely stuff though, and I look forward to seeing where you go with it!
Last edited by blob8108 (May 11, 2025 20:01:15)
- helloworldp
-
Scratcher
5 posts
TB3: text-based Scratch 3 (beta)
So…. any way to use this offline? Like an html file download or something?
- Maximouse
-
Scratcher
1000+ posts
TB3: text-based Scratch 3 (beta)
Any way I could use this offline?I'll probably make a proper offline version at some point, but at the moment, you can go here, click Code → Download ZIP, extract the zip and open tb3/index.html. The sprite library doesn't work when offline.
I miss being able to hit cmd+return to trigger the green flag, for even faster feedback when developing :-)Added!
Is it me or do the autocomplete suggestions take longer to show up than in OG tosh?It does seem like they do. I switched to CodeMirror 6 (tosh uses version 5), so this might actually be CodeMirror's fault – there's a similar delay in their autocomplete example. Of course, it's also possible that I did something wrong.
I think the reason I never supported comments, is it was tricky to figure out where to put them when saving/loading from a Scratch project file. Maybe you can find a way of doing that for Scratch 3.0!My current solution is to simply store the text-based code in the project as an additional JSON property for each sprite – Scratch just ignores it when loading the project. This also preserves the code formatting. Ideally, the comments would turn into Scratch comments when compiled, but I haven't implemented that yet.
I can't seem to find the hidden vim mode :-)I can add that. It involves adding a dependency because CodeMirror 6 no longer includes this by default, but it does seem like it could be a useful feature.
Lovely stuff though, and I look forward to seeing where you go with it!Thank you for your comments and suggestions (and for the making tosh)!
I'll probably continue working on the project this summer. The main thing I still have to finish is importing existing Scratch projects – tosh automatically renames things in imported projects to fix conflicts, but TB3 doesn't do that yet. I also want it to be possible to edit scripts while they're running, like in Scratch – I think this could be done by comparing the compiled scripts with the previous version and only updating the blocks that actually changed.
- helloworldp
-
Scratcher
5 posts
TB3: text-based Scratch 3 (beta)
Oh, Thank you! You have no idea how much this means to me, I love coding so much, I'm trying to learn JavaScript, I'm thinking this could probably ease me into it, or at least get me used to typing more! I've been scouring the internet, looking for a way to package a website into a fully functional HTML file, and I couldn't manage. This is perfect, thank you! God bless your soul, You're a lifesaver, have a great day, man.
Last edited by helloworldp (May 12, 2025 20:29:43)
- helloworldp
-
Scratcher
5 posts
TB3: text-based Scratch 3 (beta)
Big computer guy, if you couldn't tell. I actually uploaded the entirety of the Holy Bible into scratch, it's on my projects page. I programmed a book viewer thing along with it.
- helloworldp
-
Scratcher
5 posts
TB3: text-based Scratch 3 (beta)
I have a suggestion! There are a few hidden blocks in the scratch editor, that don't show up in the menu. You can gain them by modifying an SB3 file you use for your project! You should add them into your text editor! Here, I have uploaded a project containing all of the known hidden blocks.
https://scratch.mit.edu/projects/1174055272/
(Use “See inside” to view the code, and take the blocks.)
https://scratch.mit.edu/projects/1174055272/
(Use “See inside” to view the code, and take the blocks.)
Last edited by helloworldp (May 12, 2025 21:50:46)





