This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-02-21 21:38:23

greenflash
Scratcher
Registered: 2009-05-27
Posts: 1000+

Change the direction system?

The default direction system is:
       0
-90       90
     180

I find it confusing because going clockwise, it skips from 180 to 90. Are the numbers there -135 or 215? I suppose it doesn't matter, but I personally think that the default system should be more like this:

       0
270       90
     180

Just to make it more clear. Then you could still use negitives to indicate counter-clockwise.

Anyone agree?


http://i48.tinypic.com/2wrkirk.pnghttp://i46.tinypic.com/6r5zk7.pnghttp://i45.tinypic.com/2vtxr1t.png

Offline

 

#2 2010-02-21 21:40:09

Ace-of-Spades
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Change the direction system?

Most people would use x and y movements though.


11110010100011010100011010101000100011011011001010111100101000110101000110101010001000110110110010101111001010001101010001101010100010001101101100101011110010100011010100011010101000100011011011001010
110101010010001010101010101010101010101010100110101010010101010010101001101011010101010010101010101

Offline

 

#3 2010-02-21 21:41:56

greenflash
Scratcher
Registered: 2009-05-27
Posts: 1000+

Re: Change the direction system?

Wait, use x and y for directions? This is for the point in direction () block though.


http://i48.tinypic.com/2wrkirk.pnghttp://i46.tinypic.com/6r5zk7.pnghttp://i45.tinypic.com/2vtxr1t.png

Offline

 

#4 2010-02-21 21:48:20

Ace-of-Spades
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Change the direction system?

I know. You could use point in direction of 'sprite' or 'mouse' for things like that though. If anything, there could be an option to change your directional system to show this, but I don't think they should wipe out this direction system completely.


11110010100011010100011010101000100011011011001010111100101000110101000110101010001000110110110010101111001010001101010001101010100010001101101100101011110010100011010100011010101000100011011011001010
110101010010001010101010101010101010101010100110101010010101010010101001101011010101010010101010101

Offline

 

#5 2010-02-22 08:11:45

scmb1
Scratch Team
Registered: 2009-03-19
Posts: 1000+

Re: Change the direction system?

That would be a great change.


http://i48.tinypic.com/2z5pqad.png

Offline

 

#6 2010-02-22 08:31:11

ThePCKid
Scratcher
Registered: 2009-09-16
Posts: 1000+

Re: Change the direction system?

Sure, as long as -90 still works

Offline

 

#7 2010-02-22 08:39:14

08jackt
Scratcher
Registered: 2007-09-12
Posts: 1000+

Re: Change the direction system?

ThePCKid wrote:

Sure, as long as -90 still works

[removed by Forum Moderator]

Last edited by Paddle2See (2010-02-22 17:28:51)


http://i39.tinypic.com/jgtswi.png

Offline

 

#8 2010-02-22 17:34:11

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: Change the direction system?

You can use the 0 to 360 system for telling a sprite what direction to go...it will work just fine.  But it will continue to report it's direction back in the -180 to 180 range.  I can see where it might be good to switch to a 0 to 360 system...it would line up better with magnetic compasses, for one thing!

The other issue is with which direction is defined as zero and which way is defined as positive.  In Scratch, zero is vertical and positive is clock-wise.  In most geometry classes, zero is defined as to the right horizontally and positive is counter clockwise!  This causes me considerable confusion when I go to apply a canned set of equations, such as the 2D rotation equations.  And I'm sure I'm not the only one.


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#9 2010-02-22 18:02:10

Greenboi
Scratcher
Registered: 2010-01-30
Posts: 1000+

Re: Change the direction system?

08jackt wrote:

ThePCKid wrote:

Sure, as long as -90 still works

[removed by Forum Moderator]

?

Offline

 

#10 2010-02-23 17:44:14

AmoebaMan
Scratcher
Registered: 2009-01-26
Posts: 500+

Re: Change the direction system?

i agree.  the whole system is especially confusing when it comes to determining bounce angles and trigonometry...


http://i942.photobucket.com/albums/ad269/RyanScathe/AmoebaMan.png

Offline

 

#11 2010-02-23 18:51:20

Ace-of-Spades
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Change the direction system?

Paddle2See wrote:

You can use the 0 to 360 system for telling a sprite what direction to go...it will work just fine.  But it will continue to report it's direction back in the -180 to 180 range.  I can see where it might be good to switch to a 0 to 360 system...it would line up better with magnetic compasses, for one thing!

The other issue is with which direction is defined as zero and which way is defined as positive.  In Scratch, zero is vertical and positive is clock-wise.  In most geometry classes, zero is defined as to the right horizontally and positive is counter clockwise!  This causes me considerable confusion when I go to apply a canned set of equations, such as the 2D rotation equations.  And I'm sure I'm not the only one.

Oh yeah there's that too.


11110010100011010100011010101000100011011011001010111100101000110101000110101010001000110110110010101111001010001101010001101010100010001101101100101011110010100011010100011010101000100011011011001010
110101010010001010101010101010101010101010100110101010010101010010101001101011010101010010101010101

Offline

 

#12 2010-02-23 19:21:38

BWOG
Scratcher
Registered: 2008-09-19
Posts: 1000+

Re: Change the direction system?

Greenboi wrote:

08jackt wrote:

ThePCKid wrote:

Sure, as long as -90 still works

[removed by Forum Moderator]

?

It was a facepalm image. Why does it have to be removed?

Offline

 

#13 2010-02-23 19:33:14

Ace-of-Spades
Scratcher
Registered: 2010-01-08
Posts: 1000+

Re: Change the direction system?

It was also something about PC being stupid (not going to repeat it)


11110010100011010100011010101000100011011011001010111100101000110101000110101010001000110110110010101111001010001101010001101010100010001101101100101011110010100011010100011010101000100011011011001010
110101010010001010101010101010101010101010100110101010010101010010101001101011010101010010101010101

Offline

 

#14 2010-02-23 20:06:03

demosthenes
Retired Community Moderator
Registered: 2008-02-19
Posts: 1000+

Re: Change the direction system?

Or it could be like every other direction system ever used and go:
       90
180      0
      270
So sine and cosine would actually make sense.


I've taken a long hiatus, but I still visit sometimes. Give me some time to answer any messages you post on my projects!

Offline

 

#15 2010-02-23 20:20:58

adriangl
Scratcher
Registered: 2007-07-02
Posts: 1000+

Re: Change the direction system?

I think the system is fine...


Scratchin' since 2007

Offline

 

#16 2010-02-24 01:54:00

billyedward
Scratcher
Registered: 2008-01-03
Posts: 500+

Re: Change the direction system?

You can use 270; it just doesn't show on the menu.
Try it: Set a sprite to point in direction 270, and you'll notice that it does what ou aare saying!

To change the menu, navigate in the source code to:
Scratch-Objects > ScratchSpriteMorph > instance > motion ops > directionMenu
and change the function to read:

Code:

directionMenu
    | t1 |
    t1 _ CustomMenu new.
    #(('right' 90) ('left' 270) ('up' 0) ('down' 180) ) do: [:t2 | t1 add: '(' , t2 second printString , ') ' , t2 first localized action: t2 second].
    ^ t1

.
Then just right-click the code, and choose 'accept!'

Last edited by billyedward (2010-02-24 01:55:35)


"I'd love to change the world, but they haven't released the source code yet."
Check out the latest version of Streak --> http://billy.scienceontheweb.net/Streak

Offline

 

#17 2010-02-24 04:24:18

fanofcena
Scratcher
Registered: 2008-07-03
Posts: 1000+

Re: Change the direction system?

demosthenes wrote:

Or it could be like every other direction system ever used and go:
       90
180      0
      270
So sine and cosine would actually make sense.

+1 i too want this  smile  even if its
         90
  180           0
         -90

cause that will save us a block set sine to sine of angle + 90  smile


http://i53.tinypic.com/2vxr2c0.png Click whats above u might make a cute planet happy ^_^

Offline

 

#18 2011-04-02 02:56:29

PiForDessert
New Scratcher
Registered: 2011-04-02
Posts: 3

Re: Change the direction system?

Paddle2See wrote:

You can use the 0 to 360 system for telling a sprite what direction to go...it will work just fine.  But it will continue to report it's direction back in the -180 to 180 range.  I can see where it might be good to switch to a 0 to 360 system...it would line up better with magnetic compasses, for one thing!

The other issue is with which direction is defined as zero and which way is defined as positive.  In Scratch, zero is vertical and positive is clock-wise.  In most geometry classes, zero is defined as to the right horizontally and positive is counter clockwise!  This causes me considerable confusion when I go to apply a canned set of equations, such as the 2D rotation equations.  And I'm sure I'm not the only one.

I would preffer a directional system where 0 - 359 degrees would work also. There should also be an option to choose negative or positive.

This can be use-full for adding Physics to a game like projectile motion. In math and science, the equations are meant for a 0 - 360 degree system.

Offline

 

#19 2011-04-02 10:08:24

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Change the direction system?

demosthenes wrote:

Or it could be like every other direction system ever used and go:
       90
180       0
      270
So sine and cosine would actually make sense.

I personally feel this would be the best, as it matches with the actual mathematical measures. Finding direction using trig is a real pain when they're not reported the way they should be. What would happen to old projects that would get messed up by this though?  hmm


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#20 2011-04-04 08:54:48

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Change the direction system?

Here's a sensible system:
       0
  1        2
       3
and inbetween can be for example:
          0
        0.3
       0.5
      0.9
     1
etc.

Offline

 

#21 2011-04-04 09:05:39

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Change the direction system?

rdococ wrote:

Here's a sensible system:
       0
  1        2
       3
and inbetween can be for example:
          0
        0.3
       0.5
      0.9
     1
etc.

They want it to be trig compatible.

Offline

 

#22 2011-04-04 09:55:38

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Change the direction system?

scimonster wrote:

rdococ wrote:

Here's a sensible system:
       0
  1        2
       3
and inbetween can be for example:
          0
        0.3
       0.5
      0.9
     1
etc.

They want it to be trig compatible.

It will be, won't it?
0 - up
1 - left
2 - right
3 - down
This will look "nicer" for kids, as for some reason they like the numbers: 1, 2, and 3.

Offline

 

#23 2011-04-04 10:01:18

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Change the direction system?

rdococ wrote:

scimonster wrote:

rdococ wrote:

Here's a sensible system:
       0
  1        2
       3
and inbetween can be for example:
          0
        0.3
       0.5
      0.9
     1
etc.

They want it to be trig compatible.

It will be, won't it?
0 - up
1 - left
2 - right
3 - down
This will look "nicer" for kids, as for some reason they like the numbers: 1, 2, and 3.

I don't know, I think it would be hard...

Offline

 

#24 2011-04-05 02:04:40

PiForDessert
New Scratcher
Registered: 2011-04-02
Posts: 3

Re: Change the direction system?

rdococ wrote:

scimonster wrote:

rdococ wrote:

Here's a sensible system:
       0
  1        2
       3
and inbetween can be for example:
          0
        0.3
       0.5
      0.9
     1
etc.

They want it to be trig compatible.

It will be, won't it?
0 - up
1 - left
2 - right
3 - down
This will look "nicer" for kids, as for some reason they like the numbers: 1, 2, and 3.

It won't be. The system used in trig is 0 - 360 degrees. So people want to find the cosine of numbers higher than three. Plus there'll be odd results because the 0, 1, 2, 3 are in the wrong direction.

I want to add physics in my games. Maybe people can choose between wich system is more convienient.

Offline

 

#25 2011-04-06 17:10:07

cls00
Scratcher
Registered: 2008-11-07
Posts: 14

Re: Change the direction system?

demosthenes wrote:

Or it could be like every other direction system ever used and go:
       90
180      0
      270
So sine and cosine would actually make sense.

I agree with this. I mean, Scratch has sine and cosine blocks in it, right?

Offline

 

Board footer