Discuss Scratch

BionicBoy554
Scratcher
1000+ posts

Flip (Horizontal, Vertical, Diagonal) Block Suggestion

We have costumes.
xX_Unreal_Cool_Xx
Scratcher
100+ posts

Flip (Horizontal, Vertical, Diagonal) Block Suggestion

BionicBoy554 wrote:

We have costumes.
Too many costumes lags the project and makes it load slower.
Conduit7
Scratcher
100+ posts

Flip (Horizontal, Vertical, Diagonal) Block Suggestion

this is a cool idea but you can just do this as an alternative:
setrotationstyleleft-rightpointindirection90facing normalpointindirectiondirection*-1flip horizontalor, for the "flip diagonal"setrotationstyleall aroundpointindirectiondirection*-1
again, it's a cool idea, but the code as an alternative isn't exactly complicated

Last edited by Conduit7 (April 15, 2022 23:30:15)

RubiksRocker
Scratcher
100+ posts

Flip (Horizontal, Vertical, Diagonal) Block Suggestion

Epsilon_3 wrote:

RubiksRocker wrote:

Supporters:
@RubiksRocker
@Kiska-7275
@Dragon_TheAssasin
This is unnecessary. The ST cares more about constructive posts than how much supports a suggestion has.
Removed it
medians
Scratcher
1000+ posts

Flip (Horizontal, Vertical, Diagonal) Block Suggestion

yavuz61035 wrote:

also, block idea?
flipindirection90 this flips horizontalflipindirection0 this flips verticalflipindirection45 this flips diagonal
Maybe like this then?
rdococ
Scratcher
1000+ posts

Flip (Horizontal, Vertical, Diagonal) Block Suggestion

Flipping horizontally looks exactly the same as flipping vertically and turning 180 degrees. You can also mimic diagonal flipping by turning 90 degrees. As well, horizontal and vertical flipping together is the same as a 180 degree turn. You'd have a lot of redundant options, and a lot of sprite states that look the same, which would be very confusing!

Better way to do it might be a single way to flip:
setverticalfliptonormalsetverticalfliptoflippedflipped?

You can mimic left/right flipping this way:
pointindirection-90setverticalfliptoflippedpointindirection90setverticalfliptonormal

You can mimic any kind of flip with just this - here is a diagonal flip:
turn90degreessetverticalfliptonotflipped?

There is an existing rotational style feature you can't really do away with as it's used in many projects, and having it would cause confusion - now there are two different ways to flip your sprite left-to-right! But, it could teach symmetry

Last edited by rdococ (March 25, 2023 17:22:22)

RubiksRocker
Scratcher
100+ posts

Flip (Horizontal, Vertical, Diagonal) Block Suggestion

bump
HAL95131
Scratcher
89 posts

Flip (Horizontal, Vertical, Diagonal) Block Suggestion

What about these?
setfliporigintoedgesetfliporigintocenter

You could insert them between flip blocks. For example, maybe you wanted to flip something upside down from the center and then flip it from the edge.

You could also do certain flip values (would probably mod at -200 or 200 because they probably will achieve the same effect unless I’m not thinking straight:
sethorizontalflipto%setverticalflipto% Negatives flip left and positives flip right.
The default flip value would probably be 100 (“flipped” to the right, what it looks like normally), 0 would render it invisible similarly to the hide block or turn it into a single line, and -100 would flip it entirely to the left.

I feel like this could be used for a good coin effect! However, that’s probably just one of its many uses.

Also, edge flipping basically applies a reflection transformation, and center flipping just returns the mirror image of the sprite (similarly to left-right rotation). I could try to create a few example images later.

Don’t think this would go in Looks because it is similar to the direction property. It probably wouldn’t be implemented into the effects looks block because it has more properties, probably a bit more than the “sub”? properties of the direction property of sprites.

Last edited by HAL95131 (May 24, 2023 15:13:42)

RubiksRocker
Scratcher
100+ posts

Flip (Horizontal, Vertical, Diagonal) Block Suggestion

Bump
not a necropost the last post was under a year ago

Powered by DjangoBB