jmoenig / Snap

a visual programming language inspired by Scratch
http://snap.berkeley.edu
GNU Affero General Public License v3.0
1.49k stars 743 forks source link

"point in direction -90" behaves differently depending on sprite's rotation settings #570

Open doffen opened 10 years ago

doffen commented 10 years ago

It is very confusing for beginners to deal with an instruction that doesn't always do the same thing, and depends on an external setting. If you say "point in direction -90" with "can rotate" enabled for your sprite, it rotates the sprite to face left (turning it upside down). If you say "point in direction -90" with "only face left-right" enabled, it flips the sprite to face left rather than rotating it, and leaves it rightside up. It would be much cleaner to have two different instructions: "flip to direction xx" and "rotate to direction xx", though I appreciate that this may introduce legacy compatibility issues.

It would also help if this variation in behaviors were more clearly documented in the online help and in the manual, instead of making every user figure it out for themselves :)

jmoenig commented 9 years ago

Hmm... this is one of the designs Snap inherits (a.k.a. copies) from Scratch

brianharvey commented 9 years ago

Imo this design is correct, although we could consider two slight improvements (below). The "right thing" to do is a property of the costume, not a decision to be made separately on each turn. If sprites' directions were always a multiple of 90, then the flip/rotate model would make sense, but there's no way to make sense of flipping to 15 degrees heading. The question really is whether the costume makes sense at funny orientations -- so, yes for a basketball, yes for a fish, no for a person unless the person is swimming. That's why a once-and-for-all choice makes more sense than choosing on each turn.

The first improvement I suggest is to Eisenbergify the rotation mode, which will happen when we implement SET ATTRIBUTE. Then programmers can make this choice, even on a per-turn basis if desired.

The second one I'm less sure about because it's one of my read-the-user's-mind ideas that try to Do What I Mean: Make left-right the default rotation mode, but make the turtle costume always rotate regardless of rotation mode. These two changes depend on each other to make sense. If you're using the turtle costume it's because you want to see on the stage an indication of the sprite's direction -- it's perverse to have an arrow pointing the wrong way. But for other costumes, kids expect them to be right side up. Scratch makes full rotation the default so that kids get the idea that sprites have directions, but since the turtle is our default costume, we wouldn't lose that.

Catagent21 commented 6 years ago

tell me how to rotate the sprite plz!!!!!!!

DyslexicAwe commented 6 years ago

Catagent21, I guess you are not asking how to use a motion block to rotate a sprite, which is no different than in Scratch, but you want to rotate its costume?

If this is the case, you can do it by clicking on the costume with the right mouse button pressed, which opens a context menu. The "edit" option will open the Snap! paint editor, where you can see two buttons that will flip the costume horizontally or vertically. See an example below.

24 07