How to go forward # layers!

Heyyyy! First post!!! YEEEEE! :] So um, once upon a time I was looking at this suggestion for a go foward () layers block. It's already closed, and I couldn't find a solution anywhere on the whole entire forum for it that did not involve JavaScript, and I was at a complete loss as to how to make the block. (no no no wait don't go tellin me to put this in Help with Snap now plz just read this thru ok)

And so the whole day after looking at that topic I spent banging my head against my keyboard, pretend-punching the display, and trying again and again and AGAIN to make this block. HOW??? You can only go to the front layer, go to the back layer, and go back n layers, but not forward. It's IMPOSSIBLE! Why does this block not exist as a primitive in normal Snap??? Why hasn't the existing go back () layers primitive been meta-whatever-it-ized with this option? Scratch has it, and there's literally no workaround for it AT ALL IN ACTUAL SNAP!!? WHY??? WHY????? WWWHHHHHYYYYYYYYY!!!?!?!?!?

And then finally, it hit me.





I'm so stupid-

go forth

Why It Works
In case you're stupid still at a loss as to how in the world this is possible

This works because going backward a negative number of layers is technically going forward a positive number of layers. For example, if you move backward -3 layers, you're really going forward +3 layers. This idea works similarly with something like move () steps, where moving, for example, -10 steps causes you to go back 10 steps instead of forward 10 steps.

And so this block simply takes the number of layers to go forward by and inverts it (flips the sign) so that when passed to the go back () layers block, it goes forth () layers instead. Thank you. I hope this was just absolutely so incredibly helpful and has made your life easier or better in some way, shape, or form. *bows*

Hey! Welcome to the forum!

I'm enjoying your style of writing. Right now I'm in the middle of reading a history of the Village Voice, and one of the ways in which they were ahead of their time was in allowing/encouraging their writers to write articles that didn't sound like standard newspaperese, so this fits right in. Keep it up. :~)

But what really gets me thinking in all that is this:

Does that really help? It seems to me that it requires careful precision, quite the opposite of the abandonment to emotion that real-punching the display, or real-punching a hole in the wall, as I have once seen someone do, involves.

Your writing definitely captivated my attention. It was really fun to read. Why don't books do this? Poems are probably the closest we'll get to that. :star_struck:


They do! Lots of modern novels are told in the first-person voice of young narrators.

i can feel the expressions

By the way:

I spent some years volunteering in a fifth grade classroom, and one year they introduced a new math curriculum, so the teachers weren't totally familiar with it. One of the topics is arithmetic on negative numbers, and specifically, there's a lesson on subtraction of negative numbers.

The way this curriculum explains it is precisely analogous to the going-backward situation. They draw a number line, and, starting with nonnegative numbers, they represent subtraction as taking backward steps. Then they represent addition of negative numbers as facing left on the number line before moving forward. So then, clearly, to subtract a negative number you face left and then step backward. Ta da!

I bring it up because the teacher in whose class I was working had a terrible time keeping this straight, modeling the different situations by facing one way or the other and then stepping one way or the other. I think the difficulty comes from the mixing of absolute, Cartesian coordinates (for the sign of the second operand) with self-relative, turtle motion (for the operation to perform).

So, as I'm sure you know, but deny ironically, it's not a question of stupidity. It's a genuine cognitively difficult issue.

Of course it would have been way easier if both teacher and students had had a lot of prior experience with POINT IN DIRECTION versus MOVE with a negative input. This is an example of why computer programming belongs in elementary school! (In Logo, there are commands FORWARD and BACK. I don't understand why Scratch decided to collapse those into one MOVE command; they kept RIGHT and LEFT (TURN ↻ and TURN ↺) as two separate commands, after all. I think if we had FORWARD and BACK as separate tools-for-thinking it'd help even more with visualizing the issue about subtracting a negative number.)

P.S.: I wish Scratch had labelled the turn blocks
untitled script pic (8)
so they'd be pronounceable. I guess they chose not to because technically "right" and "clockwise" aren't exact synonyms, but so what.

It feels like I am them. It's probably agitating.

That's really cool, I didn't know that that was actually, like, a real thing that um, existed. :0 I'm glad you enjoyed it lol, I was sort of concerned for some reason that it would be too simple in comparison to the other things people post about Snap! on the forum but this place seems to be very welcoming so I guess I shouldn't have been worried. :slight_smile:
Okay, so um, no reason, but just casually, is it Snap or Snap! when you talk about it on the forum? I think it sounds better Snap! but just wondering... AND if you happen to answer this, stupid question, is it italicized too?? And why in the world can I nest <small> tags? That's so WEIRD... this is like, microscopically small now?? What??? 8/

I will! :smiley:
I'm strugglin to write text emojis... they turn into actual emojis which isn't really that big of a deal, however I feel like the text ones have a different sort of expression and meaning compared to the unicode ones... can I avoid them turning into actual emojis without it being preformatted??? :?

Well I mean, I wouldn't really want to real-punch my display, as that would cause *expensive* damages... it's more like I go to real-punch it and I stop myself before it's too late to turn back. You are right, it does take more precision and I guess it is somewhat less 'emotionally abandoning'... it doesn't really help, but it at least helps express my rage...? XD
You seem to use big words a lot! I mean, I like big words (who doesn't, please keep using them) but my capacity to read them and actually get the meaning out of them without skimming past them only goes so far... lol

Should I be concerned?

Yay! :D That's nice to hear... and perhaps they should? Some of them already do, as was said, but it would be more captivating... I'm just imagining something like War and Peace not that I've ever read it but written like that... :o

The proper way of writing snap, is Snap! (you have to do Snap<i>!</i> as Snap*!* breaks because the asterisk is next to a letter), but many people here say Snap!, Snap or just simply, snap.

It's Snap!, but you can write it as Snap.

For emoticons, just put &shy; at the end of it. :-)­

I just punch the air ;-)­

Whoah. That's something............... :o ...............................welp, I'm glad I learned it (or at least figured it out eventually), as I might not have been here otherwise-... WOAH I can't imagine a world where I'm not programming things... oh gosh, this is unimaginable... I would have never known how to write html, or style websites, or make games, or learned any of the random stuff I know now such as how to read binary, or created any of the hundreds of random unshared projects I have on Scratch, or made anything across the many platforms and languages I've previously messed around in... it's incomprehensible.... and worst of all I.... I.... would never have joined this forum or tried or known of Snap! ?! AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA-

Yeah, it is kind of sad that programming isn't more prominent in schools as it really is important to be able to understand the sorts of concepts used with it. I think there's still people I know who can't get right from left... you know, I remember once we did this activity in school... one person had a picture of a shape in their hand and had to instruct to the other people how to draw it verbally... however, when I had the shape, the other people (annoying people) just saw through the back of the paper and tried to draw it from that rather than actually listening to me... fortunately, as karma, they did not understand that the image they saw was flipped around from their perspective, which is both sad and funny in a way... XD

I think that for little-ish kids, perhaps they wanted the really generic blocks that people might use more early on to be simpler to understand and more like an image, rather than really wordy and hard to decipher... (like, what's it mean to turn right 15 'degrees'?) however, it would be good anyway if they did offer some clarity on it, as it might make it a little more obvious what they do... but at least it's sort of left up to user preference as to how you want to say it. I say turn right and left, which is probably clearer than clockwise and counterclockwise anyways, less technical at least...

...Hey, I kinda like this forum so far! :)­

Yay! Welcome!

The italic exclamation point comes from the logo: :snap:. (Before you ask, I said :snap: to get that.) I'm always careful to spell it Snap!, but Jens usually just says "Snap" without punctuation. So, I mean, don't worry about it, but Snap! is the official spelling.

See, the original version of Snap! was called BYOB, for Build Your Own Blocks, the primary thing Jens added to Scratch in that mod. ("Mod" because BYOB was a modified version of the actual Scratch 1.4 source code.) That was a fun and distinctive name, although the pun was a pun only in English. But then a few very vocal teachers insisted that they couldn't present something with that name to children. (They said that they had a sense of humor, but they were worried that students' parents would complain.)

So we had a very long and frustrating meeting trying to think up a new name that had some connection with visual programming and was available as a hostname. Eventually we settled on Snap, because, you know, you snap the blocks together to make a script, but it's a pretty generic name. If you do a web search I don't think we're even on the first result page. So I insisted on adding the exclamation point, probably influenced by "Oliver!" (my favorite musical) and "Animaniacs!" (the best ever TV cartoon--the original, not the reboot). Then Nathan Dinsmore (a/k/a nXIII), who was probably 14 by then, took a design class in which he was required to design a logo, so he designed ours. He italicized the exclamation point just because he thought it looked good, balancing the big clump of graphics at the left end, and so we retrofitted it into the official name.

That's why I use ~ for the nose part of the face. :~)

But the official right way is to make them preformatted text by using the </> icon up above where you type. It's the right way because it's a more general solution, whereas mine works only for noses. But I like mine because it's a very subtle protest against the whole idea of emojis, which just don't have the same space for creativity as smileys. I mean, nobody will ever draw a cartoon face with the sheer brilliance of ¯\_(ツ)_/¯.

Yeah I didn't mean to suggest that you should do that! Nor even punch through the wall. And especially not throw your phone into the wall, as my kid did more than once in his volatile teenage years. (He's okay now! Better than okay.) I recommend snapping a pencil in half for those situations. (A regular yellow #2 pencil, I mean, not a fancy mechanical one.)

That's sesquipedalian words. :~) What can I say, I'm an academic.

At one point when I was studying clinical psychology (mainly just for fun; I wasn't seriously considering a career change) I did an internship at a group home for teenagers in trouble, mostly about drugs. There was a lot of anger among those kids, and what's more the idiot adults in charge tried to make them angry on purpose, on the theory that what would certify them as safe to be back in society was showing that they could control their anger without getting arrested or beating anyone up. So as a result, holes in the wall weren't unheard of. In a way, punching the wall was a positive step, since usually what the kid really wanted was to punch one of us. (Or sometimes another kid; they were also pretty good at making each other angry.)

Yeah, that's dyslexia, I think. Actually not the fault of the school.

But they didn't leave out "degrees," did they? ;~P

In Logo, it's just LEFT 15 or RIGHT 15. Easy to read and easy to write.

I think we all say right/left rather than clockwise/counterclockwise, in practice. But that has its own possibility of confusion. Suppose the turtle is facing downward, or south, however you like to think of it. Now I say TURN RIGHT 90 DEGREES. Which way is the turtle now facing? Again we see that the difficulty comes from mixing Cartesian geometry with turtle geometry. In Logo classes we used to see kids draping their bodies over the screen from behind, in this situation. It was super cute. Does that still happen in Scratch class? (In Snap! classes we deal with teenagers, who are much too dignified to do anything involving their bodies.)

Me too. Although technically we are spamming this thread by introducing all these side topics. But there's a sort of unwritten semi-rule that one is allowed to spam one's own thread. :~)

Kids did that? I have a feeling that kids don't do it these days, mainly because they would have to stand up on the tables, and these days, computer labs don't have enough room behind the monitor to even do that. Plus, I'm not sure teachers like students standing on the desks. I never took a scratch class as a kid, so I don't know anything, I'm just making educated guesses.

It was worse back then; we had CRTs, not flat panel displays!

I think maybe they pulled a chair up behind the table and stood on that. You're probably right that they wouldn't be encouraged to stand on tables, especially not the tables with the heavy and expensive computer equipment. But we're talking little kids; they don't weigh that much. :~)

Can we get back to the actual topic?
btw, ik it's super laggy bc when i made the original topic i was doing a griffpatch sprite sorting tutorial and when i did the opposite of the normal sorting using go back (+) it was fine, but when i did it normally with a negative number it was supalag

however i just did 0 - n in a normal block, not neg of n in a custom block

Not sure if this is what you're saying, but NEG isn't a custom block; it's an option in the SQRT menu. Or do you mean that GO FORWARD is a custom block?

I did a book project animation in Snap! that was like that