1st challenge: draw a square. - the black team - the ... · web vieweven default scratch characters...

15
Scratch 2.0 "2018" Welcome back to Scratch coding. This project will be given to you to follow some directions to create, but you and your partner will make enhancements to make it a game worth playing for skill or for fun! There are notes to be taken each day, which will require your team working as a pilot and co-pilot each day. SAVE all Scratch files with NO spaces in the title Our first coding project this year will be a team project that includes a section to record what you have done (accomplished), successes or problems that you have had with this project and overall result. You will set up a new Google document to record your notes. Find your definitions (1-3) What are the following: a stage, a sprite, and what are blocks? http://wiki.scratch.mit.edu/wiki/Stage http://wiki.scratch.mit.edu/wiki/Sprite http://wiki.scratch.mit.edu/wiki/Blocks (1 each) What are the six shapes of blocks AND what do these blocks do? http://wiki.scratch.mit.edu/wiki/Blocks#Block_Shapes (1) What is a script? http://wiki.scratch.mit.edu/wiki/Script

Upload: others

Post on 10-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1st Challenge: Draw a square. - THE BLACK TEAM - The ... · Web viewEven default Scratch characters can be customized - this lesson uses a standard Scratch fish with the color changed

Scratch 2.0 "2018"

  

Welcome back to Scratch coding.  This project will be given to you to follow some directions to create, but you and your partner will make enhancements to make it a game worth playing for skill or for fun! There are notes to be taken each day, which will require your team working as a pilot and co-pilot each day. 

SAVE all Scratch files with NO spaces in the title

Our first coding project this year will be a team project that includes a section to record what you have done (accomplished), successes or problems that you have had with this project and overall result.  You will set up a new Google document to record your notes.

Find your definitions(1-3) What are the following: a stage, a sprite, and what are blocks?

http://wiki.scratch.mit.edu/wiki/Stage

http://wiki.scratch.mit.edu/wiki/Sprite

http://wiki.scratch.mit.edu/wiki/Blocks

(1 each) What are the six shapes of blocks AND what do these blocks do?http://wiki.scratch.mit.edu/wiki/Blocks#Block_Shapes

(1) What is a script?

http://wiki.scratch.mit.edu/wiki/Script

(2) What are the two coordinate positions used in Scratch and what system is it called?http://wiki.scratch.mit.edu/wiki/Coordinate_System

Page 2: 1st Challenge: Draw a square. - THE BLACK TEAM - The ... · Web viewEven default Scratch characters can be customized - this lesson uses a standard Scratch fish with the color changed

(2) What are the two ways to create images in Scratch?

http://wiki.scratch.mit.edu/wiki/Bitmap

http://wiki.scratch.mit.edu/wiki/Vector_Graphics

(1) Explain "broadcasts" and what blocks are used to create them!

http://wiki.scratch.mit.edu/wiki/Broadcast

(1) So, what is a remix in Scratch?

http://wiki.scratch.mit.edu/wiki/Remix

After you answer these questions, you should share these with your partner.  When the project is completed, you will share the work with your teacher!

So let's start Scratching this year!

Scratch Game #1  Lesson 1.1. Choose a background and character.

Click on the stage and backgrounds tab and either import one of the Scratch backgrounds or paint/create your own. In this example Underwater background is used.Delete the Scratch-cat (using the scissors on the top) and either create your own character or import one of the Scratch characters or import a character that was created/designed elsewhere.

Once a sprite/character has been imported, you can change it (modify). Even default Scratch characters can be customized - this lesson uses a standard Scratch fish with the color changed.

2. Move the character with arrow keys. Add the following script to move character each time the keys are pressed. The important new block is the ‘Point’ block. Click on the ‘Always face left/right’ or Do not rotate if the character should not flip around when moving.

Page 3: 1st Challenge: Draw a square. - THE BLACK TEAM - The ... · Web viewEven default Scratch characters can be customized - this lesson uses a standard Scratch fish with the color changed
Page 4: 1st Challenge: Draw a square. - THE BLACK TEAM - The ... · Web viewEven default Scratch characters can be customized - this lesson uses a standard Scratch fish with the color changed

To flip the fish so that he or she doesn't go upside down.

1) Duplicate your fish sprite and then flip it upside down 

2) Code it with a the purple "looks" blocks to switch costumes to the upside down copy on the move to the left.

.screenshot1Scratch.JPG

Lesson 21. Add a new sprite, the food, for the character to catch/eat.

In this example a small yellow circle (a simple gold coin) is created and named ‘food’.

Set the position of character and food, have food disappear when eaten and have character show that it ate the food.

2. Set position of the food using the xy coordinates. Have it disappear or be eaten when touched by the character.

The following script shows how to set the coordinates of the food and have it disappear when the character (red fish) touches it. It uses the Hide/Show in the Looks blocks.

Page 5: 1st Challenge: Draw a square. - THE BLACK TEAM - The ... · Web viewEven default Scratch characters can be customized - this lesson uses a standard Scratch fish with the color changed

It also broadcasts a message ‘eaten’ that the fish will use to change or say something when it eats food.Script for the food is as follows

Script to add to the fish along with the arrow keys movement scripts is

Time out - what is Broadcasting?

https://scratch.mit.edu/projects/680818/

https://www.sophia.org/tutorials/how-to-broadcast-a-message-in-scratch

Page 6: 1st Challenge: Draw a square. - THE BLACK TEAM - The ... · Web viewEven default Scratch characters can be customized - this lesson uses a standard Scratch fish with the color changed

https://www.youtube.com/watch?v=BnYbOCiudyc

https://www.schooltube.com/video/0a330c5f06704174966f/Programming%20in%20Scratch:%20Broadcast%20vs.%20Broadcast%20and%20Wait

https://www.youtube.com/watch?v=9jWcT2A-CaY

Lesson 3In this lesson, expand on the above by explaining the use of random numbers, and the use of broadcast.

Each time the game is played (the green flag is clicked) the food is always in the same place. Instead of picking the x,y coordinates, let the computer pick it randomly, by using random numbers.See the new script for food. In this it also hides and reappears after waiting  second at a different place.

This is for the fish program:  Use the broadcast message "food is eaten" to change the fish, example below shows fish getting bigger, and

Page 7: 1st Challenge: Draw a square. - THE BLACK TEAM - The ... · Web viewEven default Scratch characters can be customized - this lesson uses a standard Scratch fish with the color changed

changing color.In this case you will need to reset the fish to original. See below on changing fish on broadcast and resetting on green flag.

Lesson 4Use scripts similar to that of food to create an enemy, example the shark. After the shark waits and touches the fish, it can broadcast a message to tell that the game is over. The Game Over sprite can then listen for this message and show itself and stop the game. In this example, the Shark also moves slowly around forever in the tank, starting by pointing at a random angle and

Page 8: 1st Challenge: Draw a square. - THE BLACK TEAM - The ... · Web viewEven default Scratch characters can be customized - this lesson uses a standard Scratch fish with the color changed

then bouncing off the edges.

Create a sprite called GameOver and set it to stop the game when the Shark touches the fish, and the broadcast message is received. In this example, the Game is also over if time runs out using the wait as a timer.

Page 9: 1st Challenge: Draw a square. - THE BLACK TEAM - The ... · Web viewEven default Scratch characters can be customized - this lesson uses a standard Scratch fish with the color changed

Lesson 5If there is a definite way to win the game, example catching all the food (this example the count of food is 4), then another sprite called YouWin can be used as follows.

To count the food caught, create a variable called count and use it as follows in the YouWin sprite.

Page 11: 1st Challenge: Draw a square. - THE BLACK TEAM - The ... · Web viewEven default Scratch characters can be customized - this lesson uses a standard Scratch fish with the color changed

Background online removal:http://www.online-image-editor.com/

Keeping scorehttps://www.youtube.com/watch?v=xcSfXI83AVY

OTHER examples from other schools:

https://scratch.mit.edu/studios/122690/https://scratch.mit.edu/studios/301748/RUBRICS for this project are on the bottom of this note!

Scratch Project Two (Geometry) Click the "Create" button near the top left of your browser window to start a new project.

The area in the top left quadrant of the window is called the Stage, and it's where you can see the audio and visual

output when you run a program. The Green Flag   icon at the top right corner of the Stage is used to start your

programs.

The area below the Stage to the bottom left is called the Sprite List and is where the characters and objects in your

project are listed.  Scratch refers to these objects as Sprites.

The central area that divides the interface is called the Palette, and it holds all the code blocks that you can use to

control your Sprites. Notice that there are ten color-coded sections. Clicking on each one shows a new set of code

blocks for programming your Sprites.

Finally, the large area that's the whole right side of window is called the Scripts Area. It's used for building your

programs. Drag code blocks from the Palette into the Scripts Area and stack them in sequence to make your Sprites

do things.

1st Challenge: Draw a square.

For our first task, we'll teach our Sprite to draw a square on the Stage. Add the following code blocks on the left to the

Scripts Area, and then click the Green Flag 

Page 12: 1st Challenge: Draw a square. - THE BLACK TEAM - The ... · Web viewEven default Scratch characters can be customized - this lesson uses a standard Scratch fish with the color changed

 to run your program and see the visual output on the right.

 Did your Sprite draw a square? Guess what -- you are now a programmer! It can be as simple as that. 

First Challenge (+) Advanced: Draw the same square using only ⅓ as many code blocks.

When you're working with students, ask them if they notice a pattern of "Move" and "Turn" blocks. We can teach the

computer a simplified sequence with a "Repeat" loop.

Click on the top-most Move block and drag it away from the rest of the sequence.

Attach the code blocks below after the "Pen Down" block and click the Green Flag 

 to run your program.

This square drawing program now uses a loop. That's something that computers do really well -- they can execute repetitive tasks without getting tired or bored. Let's keep going and teach the Sprite to draw a new shape.

Second Challenge: Draw a triangle.

What are the properties of a triangle?  A triangle has three sides and three angles. We can draw an equilateral

triangle by editing our square program.

Change the "Repeat" loop to repeat three times.

It's OK to leave the "Move" block as is (but it is fun to change the value).

Page 13: 1st Challenge: Draw a square. - THE BLACK TEAM - The ... · Web viewEven default Scratch characters can be customized - this lesson uses a standard Scratch fish with the color changed

Change the "Turn" block's value to 120 and click the Green Flag 

 to run your program.

Notice that the "Turn" value is a measurement of the exterior angle and that all three exterior angles of a triangle will add up to 360 degrees. Let's do another!

Third Challenge: Draw a simple, regular pentagon and use a mathematical "Operator" block

Let's use more computation and take advantage of the mathematical operator blocks in the Palette. To draw another

simple, regular polygon (like a pentagon), write your understanding of the rule of exterior angles as a coded

expression.

Go to the green "Operators" section of the Palette and locate the block for division, represented by the forward slash

symbol ( / ). Insert the whole block into the space provided in the "Turn" block.

We know that the five exterior angles will split equally within the 360-degree turn, so we can fill in the division

operator to read 

.

Edit the "Repeat" loop to repeat five times, once for each angle or side, and run the program.

Page 14: 1st Challenge: Draw a square. - THE BLACK TEAM - The ... · Web viewEven default Scratch characters can be customized - this lesson uses a standard Scratch fish with the color changed

Fourth Challenge: Create one final Geometric Shape (ANY shape).

https://scratch.mit.edu/projects/64454562/

Putting it all together (Fifth and final design):  we need to take one (or more) of your shapes and turn this into a flower design!  

Do NOT copy this one, but here is an example.

https://scratch.mit.edu/projects/98575612/

And there are many more:

https://scratch.mit.edu/projects/46051646/

And

https://scratch.mit.edu/projects/124186776/

Recommendation - that you DO copy the first six code blocks to set the drawing up.  

https://scratch.mit.edu/projects/52607958/#editor

https://scratch.mit.edu/projects/46050832/#editor

Look at this one:

https://scratch.mit.edu/projects/63937002/#editor

Notice that there isn't a sprite showing what the image will become.  This is all accomplished by programming (scripting) into geometric shapes.  TURN this in with your shapes!

Wrapping Up

Page 15: 1st Challenge: Draw a square. - THE BLACK TEAM - The ... · Web viewEven default Scratch characters can be customized - this lesson uses a standard Scratch fish with the color changed

Remember, programming is just giving instructions to a computer.  Teaching you to program gives a new sense of

knowledge over your technology. You are moving from simple consumers of technology into creative makers of

technology. If you can teach your computer to draw, what else can you make it do? Think of programming  as a new

medium to learn with and express ideas.

With this unit you have now explored four core computational thinking concepts: sequences, events, loops, and

operators.Look at these examples for geometric fun!

https://scratch.mit.edu/projects/11641125/

https://scratch.mit.edu/projects/46050832/

https://scratch.mit.edu/projects/1567710/

https://scratch.mit.edu/projects/46052236/

https://scratch.mit.edu/projects/15415171/

REALLY advanced:

https://scratch.mit.edu/projects/24584643/

Scratch Fish Food Rubric Enha...16.3 KB

Notes and Definitions Rubric ...29.0 KB