Discuss Scratch

ZXMushroom63
Scratcher
15 posts

Scratch++, a new Scratch mod

https://github.com/ZXMushroom63/scratch-gui

Scratch++ is a Scratch mod that adds new blocks which can compile to normal Scratch. I have been working on it for ~2 months now, and I think it is developed enough to announce it!

It adds fencing control blocks, the power operator, network & physics extensions, as well as much more!

Sample project that makes use of the physics extension: https://scratch.mit.edu/projects/941751919/

Scratch++ works by having adding new blocks the usual way, but also having a library of custom block definitions. When the project is compiled, it simply substitutes the new blocks with calls to Scratch custom blocks.

Example:
In Scratch++
when green flag clicked
disable fencing :: motion
change x by (999)
After compiled using File > Compile to Scratch:
when green flag clicked
$rt.disable fencing :: custom
$rt.change x by (999) :: custom

If you have time to try it, you can find the installation instructions on the GitHub page:
https://github.com/ZXMushroom63/scratch-gui

Thanks for reading!

If you want to try out an awesome Scratch mod :: hat :: events
go to [https://github.com/ZXMushroom63/scratch-gui v]
SCRATCH---PIXEL
Scratcher
51 posts

Scratch++, a new Scratch mod

Impressive! Especially the physics extensions and that they compile to normal Scratch
gilbert_given_189
Scratcher
500+ posts

Scratch++, a new Scratch mod

Mind if you change the name? (the word Scratch is trademarked)

Terms of Use wrote:

5.4 The Scratch name, Scratch logo, Scratch Day logo, Scratch Cat, and Gobo are Trademarks owned by the Scratch Team. The MIT name and logo are Trademarks owned by the Massachusetts Institute of Technology. Unless you are licensed by Scratch under a specific licensing program or agreement, you may not use these logos to label, promote, or endorse any product or service. …

Last edited by gilbert_given_189 (Dec. 19, 2023 08:55:01)


If you see a line above this text, it means that below this text is my signature.
This place is just a memory to me, I may return occasionally but I'm busy.
I guess I'm an ATer now.

I think I may have seasoned my posts a bit too much.


Colored Pencil is supposed to color the siggy, but Scratch says it's too big.


There is nothing here…



don don pan pan
dondo pan pan
ZXMushroom63
Scratcher
15 posts

Scratch++, a new Scratch mod

There are other Scratch mods using Scratch in the name. Are you sure the name change is necessary? Besides, in the post and when you open the mod, it clearly states that it is not a mod.

If you want to try out an awesome Scratch mod :: hat :: events
go to [https://github.com/ZXMushroom63/scratch-gui v]
ZXMushroom63
Scratcher
15 posts

Scratch++, a new Scratch mod

SCRATCH---PIXEL wrote:

Impressive! Especially the physics extensions and that they compile to normal Scratch
Thanks!

If you want to try out an awesome Scratch mod :: hat :: events
go to [https://github.com/ZXMushroom63/scratch-gui v]
gilbert_given_189
Scratcher
500+ posts

Scratch++, a new Scratch mod

ZXMushroom63 wrote:

… Besides, in the post and when you open the mod, it clearly states that it is not a mod.

ZXMushroom63 wrote:

Scratch++ is a Scratch mod

Last edited by gilbert_given_189 (Dec. 19, 2023 11:26:14)


If you see a line above this text, it means that below this text is my signature.
This place is just a memory to me, I may return occasionally but I'm busy.
I guess I'm an ATer now.

I think I may have seasoned my posts a bit too much.


Colored Pencil is supposed to color the siggy, but Scratch says it's too big.


There is nothing here…



don don pan pan
dondo pan pan
ZXMushroom63
Scratcher
15 posts

Scratch++, a new Scratch mod

gilbert_given_189 wrote:

ZXMushroom63 wrote:

… Besides, in the post and when you open the mod, it clearly states that it is not a mod.

ZXMushroom63 wrote:

Scratch++ is a Scratch mod


i meant that it is not scratch.
whoops

Last edited by ZXMushroom63 (Dec. 19, 2023 11:41:53)


If you want to try out an awesome Scratch mod :: hat :: events
go to [https://github.com/ZXMushroom63/scratch-gui v]
cookieclickerer33
Scratcher
1000+ posts

Scratch++, a new Scratch mod

this is very very impressive

⠀ ⠀ I beat Mario 64 yay! ⠀⠀ ⠀ ⠀ ⠀ ⠀ I love you ivy & may :3
⠀ ⠀ ⠀ ⠀ ⠀ ⠀⠀ ⠀ ⠀GEOMETRY DASH

⠀ ⠀ ⠀ ⠀ ⠀ ⠀ MecanX Disk 0 : Coming march 27th
cookieclickerer33
Scratcher
1000+ posts

Scratch++, a new Scratch mod

nitpick: you dont have to do something like a “0 or 1” because theres custom block boolean inputs

⠀ ⠀ I beat Mario 64 yay! ⠀⠀ ⠀ ⠀ ⠀ ⠀ I love you ivy & may :3
⠀ ⠀ ⠀ ⠀ ⠀ ⠀⠀ ⠀ ⠀GEOMETRY DASH

⠀ ⠀ ⠀ ⠀ ⠀ ⠀ MecanX Disk 0 : Coming march 27th
cookieclickerer33
Scratcher
1000+ posts

Scratch++, a new Scratch mod

seems that the impulse extension is not functioning very good.
whenever i spawn an object it freaks out with its Y velocity

⠀ ⠀ I beat Mario 64 yay! ⠀⠀ ⠀ ⠀ ⠀ ⠀ I love you ivy & may :3
⠀ ⠀ ⠀ ⠀ ⠀ ⠀⠀ ⠀ ⠀GEOMETRY DASH

⠀ ⠀ ⠀ ⠀ ⠀ ⠀ MecanX Disk 0 : Coming march 27th
ZXMushroom63
Scratcher
15 posts

Scratch++, a new Scratch mod

cookieclickerer33 wrote:

this is very very impressive
Thx!

cookieclickerer33 wrote:

nitpick: you dont have to do something like a “0 or 1” because theres custom block boolean inputs
Yes, ik, but the way Scratch serialises boolean inputs for blocks is extremely obnoxious. I does it out of order, and the compiler relies on inputs being in the right order to convert the inputs from the new block to a custom block call.
For the if operator I had to manually hardcode the boolean input, which looks pretty ugly, so I took the easy option of avoided booleans.

cookieclickerer33 wrote:

seems that the impulse extension is not functioning very good.
whenever i spawn an object it freaks out with its Y velocity
Can you give me more details? Though, you have to remember that there is no default floor and no air resistance, so an object can literally accelerate towards infinity.
If you can, see of this doesn't happen with the gravity set to 0, 0.

If you want to try out an awesome Scratch mod :: hat :: events
go to [https://github.com/ZXMushroom63/scratch-gui v]
cookieclickerer33
Scratcher
1000+ posts

Scratch++, a new Scratch mod

ZXMushroom63 wrote:

cookieclickerer33 wrote:

this is very very impressive
Thx!

cookieclickerer33 wrote:

nitpick: you dont have to do something like a “0 or 1” because theres custom block boolean inputs
Yes, ik, but the way Scratch serialises boolean inputs for blocks is extremely obnoxious. I does it out of order, and the compiler relies on inputs being in the right order to convert the inputs from the new block to a custom block call.
For the if operator I had to manually hardcode the boolean input, which looks pretty ugly, so I took the easy option of avoided booleans.

cookieclickerer33 wrote:

seems that the impulse extension is not functioning very good.
whenever i spawn an object it freaks out with its Y velocity
Can you give me more details? Though, you have to remember that there is no default floor and no air resistance, so an object can literally accelerate towards infinity.
If you can, see of this doesn't happen with the gravity set to 0, 0.
i figured it out

the issue was i wasnt having a sprite follow the physics entitiy

⠀ ⠀ I beat Mario 64 yay! ⠀⠀ ⠀ ⠀ ⠀ ⠀ I love you ivy & may :3
⠀ ⠀ ⠀ ⠀ ⠀ ⠀⠀ ⠀ ⠀GEOMETRY DASH

⠀ ⠀ ⠀ ⠀ ⠀ ⠀ MecanX Disk 0 : Coming march 27th
ZXMushroom63
Scratcher
15 posts

Scratch++, a new Scratch mod

cookieclickerer33 wrote:

i figured it out

the issue was i wasnt having a sprite follow the physics entitiy
lol

If you want to try out an awesome Scratch mod :: hat :: events
go to [https://github.com/ZXMushroom63/scratch-gui v]
ajskateboarder
Scratcher
1000+ posts

Scratch++, a new Scratch mod

I love this approach with compiling blocks, cool mod I think GoboScript does a similar kind of thingy but with text statements

TurboWarp do has a similar strategy for custom reporters

Last edited by ajskateboarder (Jan. 22, 2024 12:13:44)

ZXMushroom63
Scratcher
15 posts

Scratch++, a new Scratch mod

ajskateboarder wrote:

I love this approach with compiling blocks, cool mod I think GoboScript does a similar kind of thingy but with text statements

TurboWarp do a similar strategy for custom reporters

Thanks!

If you want to try out an awesome Scratch mod :: hat :: events
go to [https://github.com/ZXMushroom63/scratch-gui v]
ZXMushroom63
Scratcher
15 posts

Scratch++, a new Scratch mod

bump

If you want to try out an awesome Scratch mod :: hat :: events
go to [https://github.com/ZXMushroom63/scratch-gui v]
cookieclickerer33
Scratcher
1000+ posts

Scratch++, a new Scratch mod

I think I have an idea, what if you made a “launch” c block that would run a script independently of the one it started in by making a new broadcast with the code inside the c block and running the boradcast

⠀ ⠀ I beat Mario 64 yay! ⠀⠀ ⠀ ⠀ ⠀ ⠀ I love you ivy & may :3
⠀ ⠀ ⠀ ⠀ ⠀ ⠀⠀ ⠀ ⠀GEOMETRY DASH

⠀ ⠀ ⠀ ⠀ ⠀ ⠀ MecanX Disk 0 : Coming march 27th
ZXMushroom63
Scratcher
15 posts

Scratch++, a new Scratch mod

when flag clicked
launch {
wait (1) secs
say [2]
} :: control
say [1]

Like this?
And the behaviour would be the sprite says “1”, and then after 1 seconds says “2”?

Might need to use factories to make that work.

If you want to try out an awesome Scratch mod :: hat :: events
go to [https://github.com/ZXMushroom63/scratch-gui v]
ZXMushroom63
Scratcher
15 posts

Scratch++, a new Scratch mod

I've added a prototype implementation of the block, now I just need to make it compile.

Edit 1: Made it compile! Going to push and make a release after some testing.

So far, the conversion looks like this:
when green flag clicked
launch {
wait [1] secs
say [Hello (2)]
} :: control
say [Hello (1)]
Compiles in to:
when green flag clicked
broadcast [randomname v]
say [Hello (1)]

when I receive [randomname v]
wait [1] secs
say [Hello (2)]

Last edited by ZXMushroom63 (Jan. 23, 2024 09:08:08)


If you want to try out an awesome Scratch mod :: hat :: events
go to [https://github.com/ZXMushroom63/scratch-gui v]

Powered by DjangoBB