Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
pjbRPF committed Oct 17, 2024
1 parent 257d37a commit 96973a9
Show file tree
Hide file tree
Showing 13 changed files with 101 additions and 118 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All contributions are assumed to be licensed under the same licence as the sourc

## Issues

If you find a mistake, bug, or other problem, please [open an issue](https://github.com/raspberrypilearning/repo-name/issues) in this repository.
If you find a mistake, bug, or other problem, please [open an issue](https://github.com/raspberrypilearning/grow-a-dragonfly/issues) in this repository.

## Pull requests

Expand Down
4 changes: 2 additions & 2 deletions LICENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Unless otherwise specified, everything in this repository is covered by the foll

[![Creative Commons licence](http://i.creativecommons.org/l/by-sa/4.0/88x31.png)](http://creativecommons.org/licenses/by-sa/4.0/)

***PROJECT NAME*** by the [Raspberry Pi Foundation](http://www.raspberrypi.org) is licensed under a [Creative Commons Attribution 4.0 International licence](http://creativecommons.org/licenses/by-sa/4.0/).
Grow a dragonfly by the [Raspberry Pi Foundation](http://www.raspberrypi.org) is licensed under a [Creative Commons Attribution 4.0 International licence](http://creativecommons.org/licenses/by-sa/4.0/).

Based on a work at https://github.com/raspberrypilearning/project-name.
Based on a work at https://github.com/raspberrypilearning/grow-a-dragonfly.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# explore-project-template
# Grow a dragonfly

![explore-project-template](banner.png)
![A dragonfly catching flies](en/images/banner.png)

Find the project online at [projects.raspberrypi.org/en/projects/explore-project-template](https://projects.raspberrypi.org/en/projects/explore-project-template)
Find the project online at [projects.raspberrypi.org/en/projects/grow-a-dragonfly](https://projects.raspberrypi.org/en/projects/grow-a-dragonfly)

## Resources
For project materials and solutions, see [en/resources](https://github.com/raspberrypilearning/explore-project-template/tree/master/en/resources) and [en/solutions](https://github.com/raspberrypilearning/explore-project-template/tree/master/en/solutions).
For solutions, see [en/solutions](https://github.com/raspberrypilearning/grow-a-dragonfly/tree/master/en/solutions).

## Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md)

## Licence
See [LICENCE.md](LICENCE.md)
See [LICENCE.md](LICENCE.md)
5 changes: 3 additions & 2 deletions en/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ listed: true
copyedit: false
last_tested: '2021-04-27'
steps:
- title: You will make
- title: What you will make
- title: Set the scene
- title: A fly to eat
completion:
Expand All @@ -27,5 +27,6 @@ steps:
passing_score: 3
completion:
- external
- title: Upgrade your project
- title: Challenge
challenge: true
- title: What next?
11 changes: 1 addition & 10 deletions en/step_1.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
## You will make
## What you will make

Make a nature app with a dragonfly that grows bigger as it eats insects.

You will:
+ Use `if`{:class="block3control"} blocks to make decisions based on **conditions** made with `operators`{:class="block3operators"} and `sensing`{:class="block3sensing"} blocks
+ Use `random`{:class="block3operators"} numbers to control the movement of a sprite
+ Use the `Sounds`{:class="block3sound"} editor to edit a sound

<p style="border-left: solid; border-width:10px; border-color: #0faeb0; background-color: aliceblue; padding: 10px;">
We use <span style="color: #0faeb0">**conditions**</span> all the time to make decisions. We could say “if the pencil is blunt, then sharpen it”. `If`{:class="block3control"} blocks and conditions let us write code that does something different depending on whether a condition is true or false.</p>

--- no-print ---
--- task ---

### Play ▶️
<div style="display: flex; flex-wrap: wrap">
<div style="flex-basis: 175px; flex-grow: 1">
Move the mouse (or your finger) around the Stage to eat insects. How do the insects move?
Expand Down
2 changes: 1 addition & 1 deletion en/step_10.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ If you are following the [More scratch](https://projects.raspberrypi.org/en/rasp

--- print-only ---

![The Stage view of completed drum star project.](images/drum-star.png)
![The Stage view of the completed Drum star project.](images/drum-star.png)

--- /print-only ---

Expand Down
26 changes: 15 additions & 11 deletions en/step_2.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,11 @@ You will set the scene. Choose your backdrop and add a dragonfly that follows th

Open the [Grow a dragonfly starter project](https://scratch.mit.edu/projects/535695413/editor){:target="_blank"}. Scratch will open in another browser tab.

[[[working-offline]]]

--- /task ---

<p style="border-left: solid; border-width:10px; border-color: #0faeb0; background-color: aliceblue; padding: 10px;">
<span style="color: #0faeb0">**Dragonflies**</span> can be found all over the world and have been around for over 300 million years!</p>

--- task ---

**Choose:** Click **Choose a Backdrop** and add a backdrop of your choice. We used the **Jurassic** backdrop.
Click **Choose a Backdrop** and add a backdrop of your choice. We used the **Jurassic** backdrop.

![Backdrop icon on the Scratch app interface](images/choose-backdrop-icon.png)

Expand Down Expand Up @@ -66,7 +61,9 @@ The Dragonfly costume is not facing to the right, so the head of the **Dragonfly

--- task ---

Click on the **Costumes** tab and use the **Select** (arrow) tool to select the costume. Use the **Rotate** tool at bottom of the selected costume to turn the **Dragonfly** costume to face the right.
Click on the **Costumes** tab and use the **Select** (arrow) tool to select the costume.

Use the **Rotate** tool at bottom of the selected costume to turn the **Dragonfly** costume to face the right.

![An animated image showing how to rotate the dragonfly costume by dragging the rotation arrows so that the dragonfly faces right.](images/rotated-costume.gif)

Expand All @@ -90,10 +87,14 @@ Add the **Crank** sound to the **Dragonfly** sprite.

![](images/crank-sound-editor.png)

Click the **Play** button so you can hear the sound.

--- /task ---

--- task ---

**Test:** Click the **Play** button so you can hear the sound.

--- /task ---

The **Crank** sound is too long and too slow for dragonfly wings.

--- task ---
Expand All @@ -104,15 +105,18 @@ Click **Copy to New** to make a new sound with just the selected part:

![The end of the crank sound selected in blue with the 'Copy to New' icon highlighted.](images/crank-copy-end.png)

Rename your new sound from **Crank2** to `Wings`.
--- /task ---

--- task ---

Rename your new sound from **Crank2** to `Wings`.
![The rename sound property.](images/crank-wings-sound.png)

--- /task ---

--- task ---

Play the new sound. Click the **Faster** button a few times until you like the result:
**Test:** Play the new sound. Click the **Faster** button a few times until you like the result:

![A faster sound wave with the 'Faster' icon highlighted.](images/wings-faster.png)

Expand Down
15 changes: 3 additions & 12 deletions en/step_3.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ You will add an insect for the dragonfly to eat.
</div>
</div>

<p style="border-left: solid; border-width:10px; border-color: #0faeb0; background-color: aliceblue; padding: 10px;">
Characters that move around on their own in games are sometimes called <span style="color: #0faeb0">**mobs**</span>, short for mobiles. Can you think of a game that has mobs?</p>

There's a fly in the **Frog 2** sprite that you can use.

--- task ---
Expand Down Expand Up @@ -45,7 +42,7 @@ Add a new costume to the sprite using the **Paint** option:

Click on the **Paste** icon to paste the sprite into the new costume. Drag the fly to the **centre** so it lines up with the crosshair.

You can rename your costume `Insect` and delete the other costumes, as you won't need those:
Rename your costume `Insect` and delete the other costumes, as you won't need those:

![The paint editor showing a pasted new Insect costume with the Paste icon highlighted. The costume list shows the other costumes have been deleted.](images/fly-costume.png)

Expand Down Expand Up @@ -83,8 +80,6 @@ You want the **Insect** sprite to `hide`{:class="block3looks"} `if`{:class="bloc

Add an `if`{:class="block3control"} block to the **Insect** sprite's movement script:

![](images/fly-icon.png)

```blocks3
when flag clicked
forever
Expand All @@ -105,8 +100,6 @@ You want the insect to `hide`{:class="block3looks"} `if`{:class="block3control"}

Drag a `touching [Dragonfly v]`{:class="block3sensing"} into the `if`{:class="block3control"} block. Add a `hide`{:class="block3looks"} block inside the `if`{:class="block3control"} block.

![](images/fly-icon.png)

```blocks3
when flag clicked
forever
Expand All @@ -129,9 +122,7 @@ The dragonfly won't get very big if it can only eat one fly!

--- task ---

Add blocks to `go to a random position`{:class="block3motion"} on the Stage, and make your sprite `wait`{:class="block3control"} for one second then `show`{:class="block3looks"}:

![](images/fly-icon.png)
Add blocks to make the hidden insect sprite `go to a random position`{:class="block3motion"} on the Stage, `wait`{:class="block3control"} for one second then `show`{:class="block3looks"}:

```blocks3
when flag clicked
Expand All @@ -154,7 +145,7 @@ end

**Test:** Test that your dragonfly can now eat lots of flies.

Make sure you have added the `show`{:class="block3looks"} block to show at the start.
Make sure you have added the `show`{:class="block3looks"} block at the start.

--- /task ---

Expand Down
27 changes: 15 additions & 12 deletions en/step_4.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ You will make the dragonfly grow when it eats a fly, and stop if it reaches full
</div>
</div>

<p style="border-left: solid; border-width:10px; border-color: #0faeb0; background-color: aliceblue; padding: 10px;">
The biggest living dragonflies can be found in Central America and have a wingspan of 19cm (a bit bigger than your hand). The largest insect ever known was <span style="color: #0faeb0">**Meganeuropsis permiana**</span>, a dragonfly with a wingspan of about 75cm (the size of a big footstep).</p>

The fly knows that it has been eaten, and now the Dragonfly needs to know so that it grows.
The Dragonfly needs to grow when it eats a fly.

When you need to let another sprite know that something has happened, you can use a `broadcast`{:class="block3events"} block as you did in [Broadcasting spells](https://projects.raspberrypi.org/en/projects/broadcasting-spells){:target="_blank"}.

Expand Down Expand Up @@ -58,8 +55,6 @@ change size by [5]

Add the **Chomp** sound to the dragonfly and `start`{:class="block3sound"} it when an insect gets eaten:

![](images/dragonfly-icon.png)

```blocks3
when I receive [food v]
+start sound [Chomp v]
Expand All @@ -79,9 +74,21 @@ When the dragonfly reaches its full size, the game will congratulate you and sto

Add an `if`{:class="block3control"} block.

The dragonfly is full-size when the `size`{:class="block3looks"} `=`{:class="block3operators"} `100%`. First, add an `=`{:class="block3operators"} operator into the hexagon-shaped input:
```blocks3
when I receive [food v]
start sound [Chomp v]
change size by [5]
+if < > then
end
```

![](images/dragonfly-icon.png)
--- /task ---

The dragonfly is full-size when the `size`{:class="block3looks"} `=`{:class="block3operators"} `100%`.

--- task ---

First, add an `=`{:class="block3operators"} operator into the hexagon-shaped input:

```blocks3
when I receive [food v]
Expand All @@ -96,8 +103,6 @@ end

Finish building the condition by adding a built-in `size`{:class="block3looks"} variable and type the value `100`:

![](images/dragonfly-icon.png)

```blocks3
when I receive [food v]
start sound [Chomp v]
Expand All @@ -113,8 +118,6 @@ Add blocks so that `if`{:class="block3control"} the condition is true `then`{:cl

Finally, add a `stop all`{:class="block3control"} block to stop the other dragonfly scripts:

![](images/dragonfly-icon.png)

```blocks3
when I receive [food v]
start sound [Chomp v]
Expand Down
20 changes: 6 additions & 14 deletions en/step_5.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ The dragonfly 'glitches' and changes direction really fast if the mouse-pointer

Select the **Dragonfly** and find the script that starts with `when flag clicked`{:class="block3events"}.

Drag an `if`{:class="block3control"} inside the `forever`{:class="block3control"} block and the blocks inside the `forever`{:class="block3control"} will move inside the `if`{:class="block3control"}.

Check carefully that your code looks like this:
Drag an `if`{:class="block3control"} inside the `forever`{:class="block3control"} block. The blocks inside the `forever`{:class="block3control"} will move inside the `if`{:class="block3control"}.

![](images/dragonfly-icon.png)

Expand All @@ -36,10 +34,6 @@ end

Then drag a `not`{:class="block3operators"} block into the `if`{:class="block3control"} and a `touching (mouse-pointer)`{:class="block3sensing"} inside that.

Check that your code looks like this:

![](images/dragonfly-icon.png)

```blocks3
when flag clicked
set size to [25] %
Expand All @@ -52,24 +46,22 @@ end
end
```

The `not`{:class="block3operators"} block turns a condition into its opposite, just like it would in a sentence.

--- /task ---

--- task ---

**Test:** Check that the glitch is fixed, and the Dragonfly only moves when it is `not`{:class="block3operators"} `touching (mouse-pointer)`{:class="block3sensing"}.

A different condition to try is:
--- /task ---

--- task ---

Try a different condition that makes the dragonfly move when it is far enough from the mouse-pointer:

```blocks3
<(distance to [mouse-pointer v]) > [50]>
```

This makes the dragonfly move when it's far enough from the mouse-pointer.

**Tip:** You can drag blocks anywhere in the Code area and leave them there while you try different things.

--- /task ---

--- save ---
Loading

0 comments on commit 96973a9

Please sign in to comment.