Name: Colin Yang
Assignment: Lab #1
This lab had the sprite move around the screen counterclockwise, turning about 90 everytime it reached an edge.
My solution involved the starting off by going to the middle of the screen so that everytime the flag is clicked, the sprite would start in the middle. From there, the sprite would glide to the the bottom left corner, wait a second, and turn 90 degrees counterclockwise. The same procedure was repeated with different coordinates each time, until it eventually ended back at the bottom left corner.
This lab required 6 different sprites, with each of them moving to a certain location on the background.
My solution involved six different sprites that all spawned in the middle when the green flag is clicked. Each of them would then glide to a certain coordinate to form the shape of a hexagon.
This lab asked us to have the sprite draw us three different shapes (a triangle, a square, and a hexagon).
My solution involved one sprite that would hide as soon as the green flag is clicked. It would then glide to a certain point and set the pen down, starting the drawing. I also made use of a variable known as "number" in order to set a universal equation that can be applied to different numbers of sides. For example, after setting the pen down, I set the variable to 3, and had the sprite move to three different points. At each point, it would turn by 360 divided by "number" (in this case it would be 3) so that it would form the shape desired. Once that was finished, the pen would be lifted up and the sprite would glide to a different point to draw a new shape. The same procedure would occur, except with a different number to represent the variable.
1.Go to the scratch home page and click explore and then animations (https://scratch.mit.edu/explore/projects/animations/). Find an animation that you like. Click on “see inside”. What blocks do you recognize? What is unfamiliar?Many of the animations make use of the broadcast and recieve blocks to start a certain reaction once a sprite does something. For example, one of the sprite would say "Here's Spiderman" and broadcast the message "spiderman". The other sprite would then appear after getting the message and start on an animation. The creator, however, does make use of the change color block to change the color of the sprite after about 0.1 seconds (giving the affect of a rave feel).
2.How large is the scratch screen?The scratch screen is 480 pixels wide and 360 pixels tall (Although it says 240 on the edge of the screen, because the center is located in the middle, the 240 only represents the distance from the center to the edge).
3.Where is the center of the scratch screen?The center is located at point (0,0), which is on the middle of the scratch screen.
4.What are the units of measurement of the scratch screen?The scratch screen is measured in pixels.
5.How many sprites can you have on the screen? How many stages? Explain why this makes sense.You can have an infinite number of sprites on the screen because the sprites would all overlap others. Each of the sprite would have its own script to follow, making them distinct from other sprites (unless of course two sprites are doing the exact same thing). Although you can have an infinite number of stages, only one stage will appear on the screen at once because it allows only one distinct background to show at once (It is however able to change the stage within a millisecond to make it seem like the setting changed instantly).