Discuss Scratch

djdolphin
Scratcher
1000+ posts

Gingerline, a backward-compatible Scratch 2.0 mod


gingerline - (n.) a reddish-yellow color, comparable to that of a ripe kumquat


Anyways, I decided to see how many features I could cram in a Scratch mod while still keeping it backward-compatible. Surprisingly many.

New (not really, they're coded into Scratch) blocks include:
(costume name :: looks)
while <> {
} :: control
for each [v v] in (10) {
} :: control
(counter :: control)
clear counter :: control
incr counter :: control
<loud? :: sensing>
There are two new categories, Literals and Obsolete. Literals contains blocks representing literal values, such as:
<true :: operators>
<false :: operators>
(null :: operators)
(Infinity :: operators)
(-Infinity :: operators)
(NaN :: operators) //not really useful
(hex [0xffffff] :: operators) //you can also type hex values into number inputs
Obsolete just contains a bunch of useless but cool obsolete blocks.

More features:
  • More keys in the <key [space v] pressed?> block, including backspace, enter, tab, escape, delete, special (shift, control, f keys, etc.), and basically every other character in the Basic Latin block.
  • Put any reporter or boolean block almost anywhere
  • The ability to type choices in menu inputs
  • Menus, number menus, color inputs, and icons in custom blocks
  • Change the color of watchers (you can even make them transparent!)
  • Duplicate and delete watchers
  • Enables a hidden watcher mode
  • Right-click a block to modify its JSON or view its op
You can use it here! But remember, uploading projects made with mods is against the Scratch terms of use.

Here's the source code too: https://github.com/djdolphin/gingerline

To do:
  1. Rewrite to make easier to update.
  2. Fix weird bug.
  3. Add semi-functional first-class arrays and objects!

Last edited by djdolphin (Feb. 5, 2019 19:22:21)


!
goldfish678
Scratcher
1000+ posts

Gingerline, a backward-compatible Scratch 2.0 mod

The evil kumquat's gotta love this mod.
djdolphin
Scratcher
1000+ posts

Gingerline, a backward-compatible Scratch 2.0 mod

goldfish678 wrote:

The evil kumquat's gotta love this mod.
Yes

!
PullJosh
Scratcher
1000+ posts

Gingerline, a backward-compatible Scratch 2.0 mod

I appreciate the link you left for people like me who don't have time to read the whole post.
djdolphin
Scratcher
1000+ posts

Gingerline, a backward-compatible Scratch 2.0 mod

PullJosh wrote:

I appreciate the link you left for people like me who don't have time to read the whole post.
An evil kumquat left that, not me.

!
PullJosh
Scratcher
1000+ posts

Gingerline, a backward-compatible Scratch 2.0 mod

djdolphin wrote:

PullJosh wrote:

I appreciate the link you left for people like me who don't have time to read the whole post.
An evil kumquat left that, not me.
Oh, my mistake.
Thepuzzlegame
Scratcher
1000+ posts

Gingerline, a backward-compatible Scratch 2.0 mod

Very nice! I especially like the changes you made to the custom block interface

hi!
djdolphin
Scratcher
1000+ posts

Gingerline, a backward-compatible Scratch 2.0 mod

Thepuzzlegame wrote:

Very nice! I especially like the changes you made to the custom block interface
Thanks!

60 SECOND RULE!!!

!
theonlygusti
Scratcher
1000+ posts

Gingerline, a backward-compatible Scratch 2.0 mod

Wow! I love the mod!

ChocolatePi
Scratcher
1000+ posts

Gingerline, a backward-compatible Scratch 2.0 mod

Haahaahaaa. Gingerline would be an adjective! (Nice mod by the way)
djdolphin
Scratcher
1000+ posts

Gingerline, a backward-compatible Scratch 2.0 mod

ChocolatePi wrote:

Haahaahaaa. Gingerline would be an adjective! (Nice mod by the way)
A color can also be used as a noun when referring to the color itself. Like “Blue is a pretty color.”

!
ChocolatePi
Scratcher
1000+ posts

Gingerline, a backward-compatible Scratch 2.0 mod

djdolphin wrote:

ChocolatePi wrote:

Haahaahaaa. Gingerline would be an adjective! (Nice mod by the way)
A color can also be used as a noun when referring to the color itself. Like “Blue is a pretty color.”
I stand corrected, but a color is primarily an adjective.
Back to discussing the mod. So you made it so you can save your gingerline projects as *.sb2? Or does “backwards compatible” mean something else..?
DigiTechs
Scratcher
500+ posts

Gingerline, a backward-compatible Scratch 2.0 mod

NaN is useful! According to the standard, any check between NaN and NaN should return false - therefore “NaN ~= NaN” should return false. It's useful for checking divide-by-zeroes/similar

if obj == math.huge then -- is infinity
	return "null"
elseif obj ~= obj then -- is NaN
	return "null"
end

I do, in fact, have my own site; it's here.
I'm also working on a thing called Fetch. Look at it here!
@thisandagain pls explain. @thisandagain pls explain. @thisandagain pls explain. @thisandagain pls explain. @thisandagain pls explain.
djdolphin
Scratcher
1000+ posts

Gingerline, a backward-compatible Scratch 2.0 mod

DigiTechs wrote:

NaN is useful! According to the standard, any check between NaN and NaN should return false - therefore “NaN ~= NaN” should return false. It's useful for checking divide-by-zeroes/similar

if obj == math.huge then -- is infinity
	return "null"
elseif obj ~= obj then -- is NaN
	return "null"
end
But Scratch converts inputs in the <[] = []> block to strings before checking if they're equal, so <[NaN] = [NaN]> reports true. So that use is out.

[offtopic]I keep accidentally rickrolling myself with that link in the first post.[/offtopic]

!
goldfish678
Scratcher
1000+ posts

Gingerline, a backward-compatible Scratch 2.0 mod

Impressive how you (assumingly) took the code for obsolete blocks and pasted it right into the mod 0.0

[offtopic]When I was trying to go to scratch.cf/swf/gingerline.swf, I made a few mistakes and right in the middle I ended up with scratch.mit.edu/swag.[/offtopic]

Last edited by goldfish678 (Oct. 22, 2014 20:15:05)

DigiTechs
Scratcher
500+ posts

Gingerline, a backward-compatible Scratch 2.0 mod

djdolphin wrote:

DigiTechs wrote:

NaN is useful! According to the standard, any check between NaN and NaN should return false - therefore “NaN ~= NaN” should return false. It's useful for checking divide-by-zeroes/similar

if obj == math.huge then -- is infinity
	return "null"
elseif obj ~= obj then -- is NaN
	return "null"
end
But Scratch converts inputs in the <[] = []> block to strings before checking if they're equal, so <[NaN] = [NaN]> reports true. So that use is out.

[offtopic]I keep accidentally rickrolling myself with that link in the first post.[/offtopic]
WHAT?

That's EVIL!

Why do they do that? Surely it would've been faster to simply check it as-is?

I do, in fact, have my own site; it's here.
I'm also working on a thing called Fetch. Look at it here!
@thisandagain pls explain. @thisandagain pls explain. @thisandagain pls explain. @thisandagain pls explain. @thisandagain pls explain.
djdolphin
Scratcher
1000+ posts

Gingerline, a backward-compatible Scratch 2.0 mod

DigiTechs wrote:

djdolphin wrote:

DigiTechs wrote:

NaN is useful! According to the standard, any check between NaN and NaN should return false - therefore “NaN ~= NaN” should return false. It's useful for checking divide-by-zeroes/similar

if obj == math.huge then -- is infinity
	return "null"
elseif obj ~= obj then -- is NaN
	return "null"
end
But Scratch converts inputs in the <[] = []> block to strings before checking if they're equal, so <[NaN] = [NaN]> reports true. So that use is out.

[offtopic]I keep accidentally rickrolling myself with that link in the first post.[/offtopic]
WHAT?

That's EVIL!

Why do they do that? Surely it would've been faster to simply check it as-is?
Well, the ST wanted it to be case insensitive, so converting to a string is needed for that.

!
DigiTechs
Scratcher
500+ posts

Gingerline, a backward-compatible Scratch 2.0 mod

djdolphin wrote:

DigiTechs wrote:

djdolphin wrote:

DigiTechs wrote:

NaN is useful! According to the standard, any check between NaN and NaN should return false - therefore “NaN ~= NaN” should return false. It's useful for checking divide-by-zeroes/similar

if obj == math.huge then -- is infinity
	return "null"
elseif obj ~= obj then -- is NaN
	return "null"
end
But Scratch converts inputs in the <[] = []> block to strings before checking if they're equal, so <[NaN] = [NaN]> reports true. So that use is out.

[offtopic]I keep accidentally rickrolling myself with that link in the first post.[/offtopic]
WHAT?

That's EVIL!

Why do they do that? Surely it would've been faster to simply check it as-is?
Well, the ST wanted it to be case insensitive, so converting to a string is needed for that.

Well, I'll be modding Scratch to make that work better, then.

I do, in fact, have my own site; it's here.
I'm also working on a thing called Fetch. Look at it here!
@thisandagain pls explain. @thisandagain pls explain. @thisandagain pls explain. @thisandagain pls explain. @thisandagain pls explain.
__init__
Scratcher
1000+ posts

Gingerline, a backward-compatible Scratch 2.0 mod

djdolphin wrote:

Yes, __init__, this is sHack. Gingerline sounds cooler.
Cool xP

thisandagain pls explain
djdolphin
Scratcher
1000+ posts

Gingerline, a backward-compatible Scratch 2.0 mod

Planned blocks for the next version (or sometime):
(undefined :: operators)
(string [] :: operators) //for when you want to put a string somewhere for some reason
(number () :: operators) //for above reason
(array [1], [2], [yay] ▶ :: operators) //block can't be saved with project - storing the value in a variable will work
(object [yolo]:[swag], [swaggity]:[swag] ▶ :: operators)
([int v] of (9) :: operators) //secret thingy from 2.0 alpha
I'll also enable extensions at some point and include the Scratchy Stuff extension library.

Last edited by djdolphin (Oct. 26, 2014 19:11:39)


!

Powered by DjangoBB