diff --git a/af-ZA/images/banner.png b/af-ZA/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/af-ZA/images/banner.png differ diff --git a/af-ZA/images/cat-sprite.png b/af-ZA/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/af-ZA/images/cat-sprite.png differ diff --git a/af-ZA/images/cat-walk-through-platform.png b/af-ZA/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/af-ZA/images/cat-walk-through-platform.png differ diff --git a/af-ZA/images/cats-finished.png b/af-ZA/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/af-ZA/images/cats-finished.png differ diff --git a/af-ZA/images/door-sprite.png b/af-ZA/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/af-ZA/images/door-sprite.png differ diff --git a/af-ZA/images/draw-a-line.png b/af-ZA/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/af-ZA/images/draw-a-line.png differ diff --git a/af-ZA/images/falling-cats.png b/af-ZA/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/af-ZA/images/falling-cats.png differ diff --git a/af-ZA/images/flailing-at-edge.png b/af-ZA/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/af-ZA/images/flailing-at-edge.png differ diff --git a/af-ZA/images/flower-random.png b/af-ZA/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/af-ZA/images/flower-random.png differ diff --git a/af-ZA/images/pen-sprite.png b/af-ZA/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/af-ZA/images/pen-sprite.png differ diff --git a/af-ZA/meta.yml b/af-ZA/meta.yml new file mode 100644 index 0000000..ea88a99 --- /dev/null +++ b/af-ZA/meta.yml @@ -0,0 +1,26 @@ +--- +title: CATS! +hero_image: images/banner.png +description: Create a game in which you guide cats to safety and stop them from falling into holes +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Introduction + - + title: Draw lines + - + title: Clone cats + - + title: Make the cats move + - + title: Stick to the lines + - + title: Get to safety + - + title: "Challenge: more obstacles" + challenge: true + - + title: What next? diff --git a/af-ZA/resources/cats-resources.sb3 b/af-ZA/resources/cats-resources.sb3 new file mode 100644 index 0000000..d952bff Binary files /dev/null and b/af-ZA/resources/cats-resources.sb3 differ diff --git a/af-ZA/solutions/cats-solution.sb3 b/af-ZA/solutions/cats-solution.sb3 new file mode 100644 index 0000000..a2dc7c8 Binary files /dev/null and b/af-ZA/solutions/cats-solution.sb3 differ diff --git a/af-ZA/step_1.md b/af-ZA/step_1.md new file mode 100644 index 0000000..75244c0 --- /dev/null +++ b/af-ZA/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +This is the **Scratch 3** version of the project. There is also a [Scratch 2 version of the project](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Introduction + +In this project, you will create a game in which you need to guide cats to safety and not let any of them fall through the gaps! + +### What you will make + +\--- no-print \--- + +Click and drag with the mouse to draw a line with the pencil. Your goal is to stop the cats from falling into holes by creating a safe path to the exit. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Cats finished](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: What you will learn + ++ How to use a `forever`{:class="block3control"} loop to constantly generate moving cats ++ How to use a `repeat until`{:class="block3control"} loop to ensure your cats follow a line + +\--- /collapse \--- + +## \--- collapse \--- + +## title: What you will need + +### Hardware + ++ A computer capable of running Scratch 3 + +### Software + ++ Scratch 3 (either [online](http://rpf.io/scratchon){:target="_blank"} or [offline](http://rpf.io/scratchoff){:target="_blank"}) + +### Downloads + ++ [Offline starter project](http://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Additional notes for educators + +\--- no-print \--- + +If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](http://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/af-ZA/step_2.md b/af-ZA/step_2.md new file mode 100644 index 0000000..bd3358c --- /dev/null +++ b/af-ZA/step_2.md @@ -0,0 +1,140 @@ +## Draw lines + +\--- task \--- + +Open the 'CATS!' Scratch starter project. + +**Online:** open the starter project at [rpf.io/cats-on](http://rpf.io/cats-on){:target="_blank"}. + +If you have a Scratch account you can make a copy by clicking **Remix**. + +**Offline:** open the [starter project](http://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](http://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Add the Pen extension to your project. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Click on the sprite called 'Pen', and add code to set the pen colour to the same blue as the obstacles on the Stage. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +To select a colour, click on the colour square in the `set pen color`{:class="block3extensions"} block to make your mouse cursor turn into a pipette, and then click on the correct colour on the Stage. + +\--- /task \--- + +\--- task \--- + +Add some more code to make the sprite follow the mouse pointer. Test your program to check that the code works. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Add some code to tell the sprite to draw a line on the Stage if the mouse button is pressed down. + +![Pen sprite](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the `mouse is down`{:class="block3sensing"}, put the `pen down`{:class="block3extensions"}, and `else`{:class="block3control"}, lift the `pen up`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Test your code. You should be able to click and drag with the mouse to draw a blue line on the Stage. + +![Draw a line](images/draw-a-line.png) + +\--- /task \--- + +You probably see that a blue dot always appears in the top right-hand corner of the Stage (it's circled in the image above). This is because, when you click the green flag to start the game, you press the mouse down, and so the pen immediately starts drawing. + +\--- task \--- + +To stop this from happening, add a `pen up`{:class="block3extensions"} block at the start of the script, and a `wait one second`{:class="block3control"} block above the `forever`{:class="block3control"} block. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/af-ZA/step_3.md b/af-ZA/step_3.md new file mode 100644 index 0000000..d5f8d46 --- /dev/null +++ b/af-ZA/step_3.md @@ -0,0 +1,73 @@ +## Clone cats + +You want a never-ending stream of cats that the player has to guide along the path to the exit. + +\--- task \--- + +Click on the sprite called 'Cat', and add some code to `hide`{:class="block3looks"} the sprite, and also to `clone`{:class="block3control"} it every three seconds. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +If you run the program now, nothing happens on the Stage. To check that a new Cat sprite clone is created every three seconds, make each clone appear and fall out of the sky. + +\--- task \--- + +Add code to tell the sprite that `when it starts as a clone`{:class="block3control"}, it should `show`{:class="block3looks"} itself and fall until it `touches`{:class="block3sensing"} the blue floor that is drawn on the Stage. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`When the sprite starts as a clone`{:class="block3control"}, `show`{:class="block3looks"} the sprite. `Repeatedly`{:class="block3control"} `Change`{:class="block3motion"} the sprite's `y` coordinate by `-2`, until the sprite `touches`{:class="block3sensing"} the blue Stage. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +When you click the green flag, you should see a new cat fall from the top of the Stage every three seconds. Every cat should land in a big pile of overlapping cats on the blue floor at the bottom. + +![Falling cats](images/falling-cats.png) \ No newline at end of file diff --git a/af-ZA/step_4.md b/af-ZA/step_4.md new file mode 100644 index 0000000..8c10235 --- /dev/null +++ b/af-ZA/step_4.md @@ -0,0 +1,115 @@ +## Make the cats move + +Once a cat reaches the floor, it should step slowly to the right. + +\--- task \--- + +Add code to the `when I start as a clone`{:class="block3control"} section to make the cat sprite `move ten steps`{:class="block3motion"}, and switch between the sprite's two costumes every 0.1 seconds to make the cat look like it's walking. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat sprite should `move 10 steps`{:class="block3motion"}, and `switch costume`{:class="block3looks"} every `0.1 seconds`{:class="block3control"}. This code should repeat `forever`{:class="block3control"}, just like the code to make the cat fall. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats now move along the blue platform at the bottom. + +\--- /task \--- + +If you draw a bridge across the gap so that the cats can get all the way to the right side of the Stage, you can see that they end up getting stuck walking into the right wall. + +![Flailing cats at the edge](images/flailing-at-edge.png) + +\--- task \--- + +Remove the `forever`{:class="block3control"} loop, and instead add a different loop to make the cats only walk until they reach an edge. When a cat reaches the edge of the Stage, it should disappear. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats disappear when they reach the edge of the Stage. + +\--- /task \--- + +You may notice that, if the cats fall into the hole, they don't disappear but instead get stuck at the bottom. This is because they keep trying to fall downwards. + +This is the part of the code that tells the cat to keep falling until it touches blue: + +```blocks3 +repeat until +end +``` + +However, in the hole, the cat can never reach blue, so it is stuck forever. + +\--- task \--- + +Add more blocks to this loop so that it repeats until the cat sprite is touching blue `or`{:class="block3operators"} `touching the edge`{:class="block3sensing"}. This way, the sprite stops trying to fall if it reaches the edge of the Stage. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/af-ZA/step_5.md b/af-ZA/step_5.md new file mode 100644 index 0000000..ff776e8 --- /dev/null +++ b/af-ZA/step_5.md @@ -0,0 +1,65 @@ +## Stick to the lines + +You might notice that, if you draw a low bridge between the two platforms, or a line that slopes upwards, the cats end up walking through the platform rather than on top of it! + +![Cats walking through the platform](images/cat-walk-through-platform.png) + +\--- task \--- + +In the code for the cat sprite, add another loop before the `next costume`{:class="block3looks"} block. This time, the loop should tell the cat to move upwards by `2` until it is not touching blue. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat should `move up 2`{:class="block3motion"} `repeatedly until`{:class="block3control"} it is `not`{:class="block3operators"} `touching blue`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Click the green flag and try drawing a line that slopes upwards. Check that your cat follows this line. + +\--- /task \--- \ No newline at end of file diff --git a/af-ZA/step_6.md b/af-ZA/step_6.md new file mode 100644 index 0000000..deb146e --- /dev/null +++ b/af-ZA/step_6.md @@ -0,0 +1,89 @@ +## Get to safety + +The object of the game is to guide the cats to safety by creating a path so they can reach the door. Create a score variable to keep track of how many cats reach the door. + +\--- task \--- + +Create a variable called `score`{:class="block3variables"}. + +![Cat sprite](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Add code to your cat sprite to add `1` to the `score`{:class="block3variables"} each time a cat reaches the door. Also set `score`{:class="block3variables"} to `0` `when the flag is clicked`{:class="block3events"} at the start of the game. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the cat is `touching the door sprite`{:class="block3sensing"}, then `add 1 to the score`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the new code blocks you need to add to your `when I start as a clone` script: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Add some more code so that, when a cat sprite reaches the door, the cat makes a 'meow' sound and then disappears. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/af-ZA/step_7.md b/af-ZA/step_7.md new file mode 100644 index 0000000..6e609ac --- /dev/null +++ b/af-ZA/step_7.md @@ -0,0 +1,13 @@ +## Challenge: more obstacles + +At the moment, the game is rather easy to win. Can you think of ideas to you make your game harder? + ++ Add more backgrounds with different platform designs. + ++ Move the location of the door depending on which background is displayed. + ++ Add more sprites as moving obstacles. Perhaps you could have roaming dogs or rotating spikes the cats need to avoid? + ++ Only allow the player to use a limited amount of "ink" to draw lines in the game. You can keep track of how much "ink" is used by creating a timer variable that records how long the mouse is held down. + ++ Create a sprite to show the player how much ink is left. \ No newline at end of file diff --git a/af-ZA/step_8.md b/af-ZA/step_8.md new file mode 100644 index 0000000..2295a72 --- /dev/null +++ b/af-ZA/step_8.md @@ -0,0 +1,19 @@ +## What next? + +Try the [Flower generator](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects) project, where you will use custom blocks to create flower patterns. + +\--- no-print \--- + +Press `f` to draw a few flowers, or `r` to draw lots of random flowers, or `p` to draw a flower pattern. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![random flowers](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/ar-SA/images/banner.png b/ar-SA/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/ar-SA/images/banner.png differ diff --git a/ar-SA/images/cat-sprite.png b/ar-SA/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/ar-SA/images/cat-sprite.png differ diff --git a/ar-SA/images/cat-walk-through-platform.png b/ar-SA/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/ar-SA/images/cat-walk-through-platform.png differ diff --git a/ar-SA/images/cats-finished.png b/ar-SA/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/ar-SA/images/cats-finished.png differ diff --git a/ar-SA/images/door-sprite.png b/ar-SA/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/ar-SA/images/door-sprite.png differ diff --git a/ar-SA/images/draw-a-line.png b/ar-SA/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/ar-SA/images/draw-a-line.png differ diff --git a/ar-SA/images/falling-cats.png b/ar-SA/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/ar-SA/images/falling-cats.png differ diff --git a/ar-SA/images/flailing-at-edge.png b/ar-SA/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/ar-SA/images/flailing-at-edge.png differ diff --git a/ar-SA/images/flower-random.png b/ar-SA/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/ar-SA/images/flower-random.png differ diff --git a/ar-SA/images/pen-sprite.png b/ar-SA/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/ar-SA/images/pen-sprite.png differ diff --git a/ar-SA/meta.yml b/ar-SA/meta.yml new file mode 100644 index 0000000..867dc39 --- /dev/null +++ b/ar-SA/meta.yml @@ -0,0 +1,30 @@ +--- +title: قطط! +hero_image: images/banner.png +description: قم بإنشاء لعبة توجه فيها القطط إلى الأمان وتمنعها من السقوط في الحفر +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: المقدمة + - + title: رسم الخطوط + - + title: استنساخ القطط + completion: + - engaged + - + title: تحريك القطط + - + title: الالتزام بالخطوط + - + title: الوصول إلى بر الأمان + completion: + - internal + - + title: 'التحدي: مزيد من العوائق' + challenge: true + - + title: ما التالي؟ diff --git a/ar-SA/resources/cats-resources.sb3 b/ar-SA/resources/cats-resources.sb3 new file mode 100644 index 0000000..4ac2dfa Binary files /dev/null and b/ar-SA/resources/cats-resources.sb3 differ diff --git a/ar-SA/solutions/cats-solution.sb3 b/ar-SA/solutions/cats-solution.sb3 new file mode 100644 index 0000000..7178511 Binary files /dev/null and b/ar-SA/solutions/cats-solution.sb3 differ diff --git a/ar-SA/step_1.md b/ar-SA/step_1.md new file mode 100644 index 0000000..081dac1 --- /dev/null +++ b/ar-SA/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +هذا هو إصدار ** Scratch 3 ** من المشروع. هناك أيضًا [ إصدار Scratch 2 للمشروع](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## المقدمة + +في هذا المشروع، ستقوم بإنشاء لعبة تحتاج فيها إلى توجيه القطط إلى بر الأمان وعدم السماح لأي منها بالوقوع في الحفر! + +### ما الذي ستصنعه + +\--- no-print \--- + +انقر واسحب بالماوس لرسم خط بالقلم الرصاص. هدفك هو منع القطط من السقوط في الحفر عن طريق إنشاء مسار آمن للخروج. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![انتهت القطط](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: ما الذي ستتعلمه + ++ كيفية استخدام حلقة { `كرّر باستمرار`{: class = "block3control"} لتوليد قطط متحركة باستمرار ++ كيفية استخدام حلقة `كرّر حتى`{: class = "block3control"} لضمان أن القطط التي أنشأتها تتبع خطاً + +\--- /collapse \--- + +## \--- collapse \--- + +## title: ما ستحتاج إليه + +### الأجهزة + ++ جهاز كمبيوتر يدعم تشغيل برنامج Scratch 3 + +### البرامج + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### للتحميل + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: ملاحظات إضافية للمعلمين + +\--- no-print \--- + +إذا كنت بحاجة إلى طباعة هذا المشروع، فيُرجى استخدام [النسخة المخصصة للطباعة](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/ar-SA/step_2.md b/ar-SA/step_2.md new file mode 100644 index 0000000..26ca442 --- /dev/null +++ b/ar-SA/step_2.md @@ -0,0 +1,140 @@ +## رسم الخطوط + +\--- task \--- + +افتح مشروع سكراتش المبدئي "القطط!". + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +اذا كنت تملك حساب على منصة سكراتش (Scratch) فيمكنك عمل نسخة بالنقر على **Remix**. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +أضف ملحق القلم لمشروعك. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +انقر على الكائن المسمى 'القلم'، وأضف تعليمة برمجية لتعيين لون القلم إلى نفس اللون الأزرق كالعقبات على المنصة. + +![كائن القلم](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +لتحديد لون، انقر فوق مربع اللون في كتلة `تعيين لون القلم`{: class = "block3extensions"} لتحويل مؤشر الماوس إلى انبوب، ثم انقر فوق اللون الصحيح في المنصة. + +\--- /task \--- + +\--- task \--- + +قم بإضافة المزيد من التعليمات البرمجية لجعل الكائن بتبع مؤشر الماوس. اختبر برنامجك للتحقق من عمل البرنامج. + +![كائن القلم](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +أضف بعض التعليمات البرمجية لجعل الكائنات ترسم خط على المنصة إذا تم الضغط على زر الماوس. + +![كائن القلم](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`إذا`{:class="block3control"} كان `زر الفأرة مضغوط`{:class="block3sensing"}, `أنزل القلم`{:class="block3extensions"}, and `وإلا`{:class="block3control"}, `ارفع القلم`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +هنا التعليمات البرمجية التي ستحتاج اليها: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +و هذا ما يجب أن تبدو عليه التعليمات البرمجية الخاصة بك: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +اختبر مشروعك. يجب أن تكون قادرًا على النقر والسحب بالماوس لرسم خط أزرق على المنصة. + +![ارسم خطاً](images/draw-a-line.png) + +\--- /task \--- + +ربما ستظهر نقطة رزقاء بشكل دائم في الزاوية العلوية اليمنى من المنصة (النقطة المحاطة بدائرة في الصورة). هذا لأنه عندما تنقر على العلم الأخضر لبدء اللعبة، فإنك قمت بالضغط على زر الماوس، وبالتالي يبدأ القلم في الرسم على الفور. + +\--- task \--- + +لمنع حدوث ذلك، أضف كتلة `ارفع القلم`{:class="block3extensions"} في بداية البرنامج، وكتلة `انتظر 1 ثانية`{:class="block3control"} قبل كتلة `كرّر باستمرار`{:class="block3control"}. + +![كائن القلم](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/ar-SA/step_3.md b/ar-SA/step_3.md new file mode 100644 index 0000000..728de7c --- /dev/null +++ b/ar-SA/step_3.md @@ -0,0 +1,73 @@ +## استنساخ القطط + +ستحتاج تدفق لا ينتهي من القطط التي يجب على اللاعب توجيهها على طول المسار إلى المخرج. + +\--- task \--- + +انقر على الكائن المسمى 'Cat'، وأضف بعض التعليمات البرمجية لـ `إخفاء`{:class="block3looks"} الكائن، وأيضاً لـ `نسخها`{:class="block3looks"} كل ثلاث ثوان. + +![كائن القط](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +إذا قمت بتشغيل البرنامج الآن، فلن يحدث شيء على المنصة. للتأكد من إنشاء نسخة من كائن القط كل ثلاث ثوان، اجعل كل كائن يظهر ويسقط من السماء. + +\--- task \--- + +أضف كتلة برمجية لإخبار الكائن أنه `عندما تبدأ نسخة منه`{:class="block3control"}، يجب أن أن `تظهر`{:class="block3looks"} نفسها وتسقط حتى `تلامس`{:class="block3sensing"} الأرضية الزرقاء المرسومة على المنصة. + +![كائن القط](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`عندما يبدأ الكائن كنسخة`{:class="block3control"}, `أظهر`{:class="block3looks"} الكائن. `غير`{:class="block3motion"} الموضع `ص` للكائن `بشكل متكرر`{:class="block3control"} بمقدار `-2` حتى `يلامس`{:class="block3sensing"} الكائن المنصة الرزرقاء. + +\--- /hint \--- + +\--- hint \--- + +هنا التعليمات البرمجية التي ستحتاج اليها: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +و هذا ما يجب أن تبدو عليه التعليمات البرمجية الخاصة بك: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +عندما تنقر على العلم الأخضر، يجب أن ترى قطة جديدة تسقط من أعلى المسرح كل ثلاث ثوانٍ. يجب أن تهبط كل قطة في كومة كبيرة من القطط المتداخلة على الأرضية الزرقاء في الأسفل. + +![القطط المتساقطة](images/falling-cats.png) \ No newline at end of file diff --git a/ar-SA/step_4.md b/ar-SA/step_4.md new file mode 100644 index 0000000..35118ba --- /dev/null +++ b/ar-SA/step_4.md @@ -0,0 +1,115 @@ +## تحريك القطط + +بمجرد أن تصل القطة إلى الأرض، يجب أن تتحرك ببطء إلى اليمين. + +\--- task \--- + +أضف تعليمات برمجية إلى جزء `عندما أبدأ كنسخة`{:class="block3control"} لتجعل كائن القط `يتحرك عشر خطوات`{:class="block3motion"}، وقم بالتبديل بين مظهري الكائن كل 0.1 ثانية لجعل القط يبدو وكأنه يمشي. + +![كائن القط](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +يجب على كائن القط أن `يتحرك 10 خطوات`{:class="block3motion"}، و`يبدل المظهر`{:class="block3looks"} كل `0.1 ثانية`{:class="block3control"}. هذه التعليمات يجب أن يتم تكرارها `باستمرار`{:class="block3control"}، تماماً مثل التعليمات التي تجعل القطط تتساقط. + +\--- /hint \--- + +\--- hint \--- + +هنا التعليمات البرمجية التي ستحتاج اليها: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +و هذا ما يجب أن تبدو عليه التعليمات البرمجية الخاصة بك: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +اضغط على العلم الأخضر وتحقق من أن القطط تتحرك الآن على طول المنصة الزرقاء في الأسفل. + +\--- /task \--- + +إذا قمت برسم جسر عبر الفجوة بحيث تتمكن القطط من الوصول إلى الجانب الأيمن من المنصة، يمكنك أن ترى أنها ستنتهي في النهاية بالسير داخل الجدار الأيمن. + +![القطط المتدفقة على الحافة](images/flailing-at-edge.png) + +\--- task \--- + +احذف حلقة `كرر باستمرار`{:class="block3control"}، وأضف بدلاً منها حلقة تكرار مختلفة تجعل القطط تستمر في المشي حتى تصل إلى أحد الحواف. عندما يصل القط إلى حافة المنصة، يجب أن يختفي. + +![كائن القط](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +اضغط على العلم الأخضر وتحقق من اختفاء القطط عند وصولها إلى حافة المنصة. + +\--- /task \--- + +ستلاحظ أنه إذا سقطت القطط في الحفرة، فإنها لا تختفي بل ستظل عالقة في القاع. وهذا لأنها ستستمر بمحاولة السقوط إلى الأسفل. + +هذا هو الجزء من التعليمات البرمجية الذي يطلب من القط الاستمرار في السقوط حتى تلامس اللون الأزرق: + +```blocks3 +repeat until +end +``` + +مع ذلك، عند السقوط في الحفرة، لن يتمكن القط من بلوغ المنصة الرزقاء، لذلك سيكون عالقاً إلى الأبد. + +\--- task \--- + +أضف المزيد من الكتل البرمجية إلى هذه الحلقة بحيث يتم تكرارها حتى يلامس كائن القط المنصة الزرقاء `أو`{:class="block3operators"} `يلامس الحافة`{:class="block3sensing"}. بهذه الطريقة، سيتوقف القط عن محاولة السقوط عند الوصول إلى حافة المنصة. + +![كائن القط](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/ar-SA/step_5.md b/ar-SA/step_5.md new file mode 100644 index 0000000..5dbb39d --- /dev/null +++ b/ar-SA/step_5.md @@ -0,0 +1,65 @@ +## الالتزام بالخطوط + +قد تلاحظ أنه عند رسم جسر منخفض بين المنصتين، أو خط منحدر نحو الأعلى، ستقوم القطط بالمشي عبر المنصات الزرقاء بدلاً من المشي فوقها! + +![القطط تمشي عبر المنصة](images/cat-walk-through-platform.png) + +\--- task \--- + +في التعليمات البرمجية الخاصة بكائن القط، أضف حلقة تكرار جديدة قبل كتلة `المظهر التالي`{:class="block3looks"}. هذه المرة، يجب أن تقوم هذه الحلقة بجعل القط يتحرك إلى الأعلى بمقدار `2` إلى أن لا يكون ملامساً للون الأزرق. + +![كائن القط](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +يجب على القط أن `يتحرك للأعلى بمقدار 2`{:class="block3motion"} `بشكل متكرر حتى`{:class="block3control"} يصبح `لا`{:class="block3operators"} `ملامساً للأزرق`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +هنا التعليمات البرمجية التي ستحتاج اليها: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +و هذا ما يجب أن تبدو عليه التعليمات البرمجية الخاصة بك: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +انقر على العلم الأخضر وحاول رسم خط ينحدر إلى الأعلى. تحقق من أن القط يتبع هذا الخط. + +\--- /task \--- \ No newline at end of file diff --git a/ar-SA/step_6.md b/ar-SA/step_6.md new file mode 100644 index 0000000..8c4e92c --- /dev/null +++ b/ar-SA/step_6.md @@ -0,0 +1,89 @@ +## الوصول إلى بر الأمان + +الهدف من اللعبة هو توجيه القطط نحو الأمان عن طريق إنشاء مسار حتى يمكنها الوصول إلى الباب. أنشئ متغير نتيجة لتسجيل كم قط استطاع الوصول إلى الباب. + +\--- task \--- + +أنشئ متغيراً يدعى `النتيجة`{:class="block3variables"}. + +![كائن القط](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +أضف تعليمات برمجية لكائن القط لإضافة `1` إلى `النتيجة`{:class="block3variables"} كل مرة يصل قط إلى الباب. أيضاً اجعل `النتيجة`{:class="block3variables"} تساوي `0` عند `النقر على العلم الأخضر`{:class="block3events"} في بداية اللعبة. + +![كائن القط](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`إذا`{:class="block3control"} كان القط `يلامس كائن الباب`{:class="block3sensing"}، عندها `أضف 1 إلى النتيجة`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +فيما يلي كتل التعليمات البرمجية الجديدة التي تحتاج إلى إضافتها إلى جزء `عندما أبدأ كنسخة`: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +و هذا ما يجب أن تبدو عليه التعليمات البرمجية الخاصة بك: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +أضف المزيد من التعليمات البرمجية بحيث عندما يصل كائن القط إلى الباب، يصدر القط صوت مواء 'mewo' ويختفي بعدها. + +![كائن القط](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/ar-SA/step_7.md b/ar-SA/step_7.md new file mode 100644 index 0000000..cecb5fd --- /dev/null +++ b/ar-SA/step_7.md @@ -0,0 +1,13 @@ +## التحدي: عوائق أخرى + +في الوقت الحالي، من السهل جداً الفوز باللعبة. هل بإمكانك إيجاد بعض الأفكار لجعل الفوز باللعبة أصعب؟ + ++ أضف المزيد من الخلفيات مع تصاميم مختلفة للمنصات. + ++ غير موضع الباب اعتماداً على الخلفية التي يتم إظهارها. + ++ أضف المزيد من الكائنات كعوائق متحركة. ربما تستطيع إضافة كلاب متجولة أو مسامير يجب على القطط أن تتجنبها؟ + ++ اسمح للاعب باستخدام كمية محددة من "الحبر" لرسم الخطوط في اللعبة. يمكن أن تقوم بتسجيل كمية "الحبر" التي تم استخدامها عن طريق إنشاء متغير يقوم بتسجيل كم من الوقت تم إبقاء زر الماوس مضغوطاً. + ++ أنشئ كائن ليعرض للاعب كم تبقى لديه من الحبر. \ No newline at end of file diff --git a/ar-SA/step_8.md b/ar-SA/step_8.md new file mode 100644 index 0000000..57ad522 --- /dev/null +++ b/ar-SA/step_8.md @@ -0,0 +1,19 @@ +## ما التالي؟ + +جرب مشروع [مولد الأزهار](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects)، حيث ستقوم باستخدام كتل برمجية خاصة لإنشاء أنماط الزهور. + +\--- no-print \--- + +اضغط حرف `f` لرسم بعض الأزهار، أو حرف `r` لرسم العديد من الأزهار العشوائية، أو حرف `p` لرسم نمط زهرة. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![أزهار عشوائية](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/ca-ES/images/banner.png b/ca-ES/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/ca-ES/images/banner.png differ diff --git a/ca-ES/images/cat-sprite.png b/ca-ES/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/ca-ES/images/cat-sprite.png differ diff --git a/ca-ES/images/cat-walk-through-platform.png b/ca-ES/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/ca-ES/images/cat-walk-through-platform.png differ diff --git a/ca-ES/images/cats-finished.png b/ca-ES/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/ca-ES/images/cats-finished.png differ diff --git a/ca-ES/images/door-sprite.png b/ca-ES/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/ca-ES/images/door-sprite.png differ diff --git a/ca-ES/images/draw-a-line.png b/ca-ES/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/ca-ES/images/draw-a-line.png differ diff --git a/ca-ES/images/falling-cats.png b/ca-ES/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/ca-ES/images/falling-cats.png differ diff --git a/ca-ES/images/flailing-at-edge.png b/ca-ES/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/ca-ES/images/flailing-at-edge.png differ diff --git a/ca-ES/images/flower-random.png b/ca-ES/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/ca-ES/images/flower-random.png differ diff --git a/ca-ES/images/pen-sprite.png b/ca-ES/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/ca-ES/images/pen-sprite.png differ diff --git a/ca-ES/meta.yml b/ca-ES/meta.yml new file mode 100644 index 0000000..7ed0c27 --- /dev/null +++ b/ca-ES/meta.yml @@ -0,0 +1,30 @@ +--- +title: GATS! +hero_image: images/banner.png +description: Crea un joc en el qual has de guiar els gats de forma segura sense que caiguin als forats +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Introducció + - + title: Dibuixa línies + - + title: Clona gats + completion: + - engaged + - + title: Fes moure els gats + - + title: Adhereix-los a les línies + - + title: Fes que vagin segurs + completion: + - internal + - + title: 'Repte: més obstacles' + challenge: true + - + title: I ara què ve? diff --git a/ca-ES/resources/cats-resources.sb3 b/ca-ES/resources/cats-resources.sb3 new file mode 100644 index 0000000..3d6b874 Binary files /dev/null and b/ca-ES/resources/cats-resources.sb3 differ diff --git a/ca-ES/solutions/cats-solution.sb3 b/ca-ES/solutions/cats-solution.sb3 new file mode 100644 index 0000000..66916a4 Binary files /dev/null and b/ca-ES/solutions/cats-solution.sb3 differ diff --git a/ca-ES/step_1.md b/ca-ES/step_1.md new file mode 100644 index 0000000..d90a8bb --- /dev/null +++ b/ca-ES/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +Es tracta de la versió **Scratch 3** del projecte. També hi ha una [versió de Scratch 2 del projecte](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Introducció + +En aquest projecte, crearàs un joc en el qual has guiar els gats de forma segura i no deixar que cap d’ells caigui entre els buits! + +### Què faràs + +\--- no-print \--- + +Fes clic i arrossega amb el ratolí per dibuixar una línia amb el llapis. El teu objectiu és evitar que els gats caiguin en forats creant un camí segur fins a la sortida. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Gats acabats](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: Què aprendràs + ++ Com utilitzar un bucle `per sempre`{:class="block3control"} per generar constantment gats en moviment ++ Com utilitzar un bucle `repeteix fins`{:class="block3control"} per assegurar-te que els teus gats segueixen una línia + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Què necessitaràs + +### Maquinari + ++ Un ordinador capaç d'executar Scratch 3 + +### Programari + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### Descàrregues + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Notes addicionals per a educadors + +\--- no-print \--- + +Si necessites imprimir aquest projecte, si us plau utilitza la [versió per a imprimir](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/ca-ES/step_2.md b/ca-ES/step_2.md new file mode 100644 index 0000000..c44cc60 --- /dev/null +++ b/ca-ES/step_2.md @@ -0,0 +1,140 @@ +## Dibuixa línies + +\--- task \--- + +Obre el projecte inicial "CATS!" d’Scratch. + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +Si tens un compte a Scratch pots fer una còpia fent clic a **Reinventa**. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Afegeix l’extensió Llapis al teu projecte. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Fes clic al personatge anomenat "Llapis", i afegeix codi per configurar el color del llapis al mateix blau que el dels obstacles de l'escenari. + +![Personatge del llapis](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +Per seleccionar un color, fes clic al quadrat de color del bloc `fixa el color del llapis a`{:class="block3extensions"} per fer que el cursor del ratolí es converteixi en una pipeta i, a continuació, fes clic al color correcte de l'escenari. + +\--- /task \--- + +\--- task \--- + +Afegeix més codi per tal que el personatge segueixi el punter del ratolí. Prova el programa per comprovar que el codi funciona. + +![Personatge del llapis](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Afegeix codi per dir-li al personatge que dibuixi una línia a l’Escenari si es manté premut el botó del ratolí. + +![Personatge del llapis](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`Si`{:class="block3control"} el `ratolí clicat`{:class="block3sensing"}, `baixa el llapis`{:class="block3extensions"} i `si no`{:class="block3control"}, `puja el llapis`{:class="block3extensions "}. + +\--- /hint \--- + +\--- hint \--- + +Aquí tens els blocs que necessites: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +Així és com s'hauria de veure el teu codi: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Prova el codi nou. Hauries de fer clic i arrossegar amb el ratolí per dibuixar una línia blava a l'Escenari. + +![Dibuixa una línia](images/draw-a-line.png) + +\--- /task \--- + +Probablement veuràs que sempre apareix un punt blau a la part superior dreta de l'Escenari (està encerclat a la imatge de dalt). Això es deu al fet que, quan fas clic a la bandera verda per iniciar el joc, prems el ratolí cap avall i així el llapis comença a dibuixar immediatament. + +\--- task \--- + +Per evitar que això passi, afegeix un bloc `puja el llapis`:{:class="block3extensions"} al començament del codi i un bloc `espera un segon`{:class="block3control"} per sobre del bloc `per sempre`{:class="block3control"}. + +![Personatge del llapis](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/ca-ES/step_3.md b/ca-ES/step_3.md new file mode 100644 index 0000000..b392a3a --- /dev/null +++ b/ca-ES/step_3.md @@ -0,0 +1,73 @@ +## Clona gats + +Volem un flux de gats que el jugador ha de guiar pel camí fins a la sortida. + +\--- task \--- + +Fes clic al personatge anomenat 'Gat' i afegeix algun codi per `amagar`{:class="block3looks"} i per `clonar`{:class="block3control"} el personatge cada tres segons. + +![Personatge del gat](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +Si executes el programa ara, no passa res a l’Escenari. Per comprovar que es crea un nou clon del personatge Gat cada tres segons, fes que cada clon aparegui i caigui del cel. + +\--- task \--- + +Afegeix codi per dir-li al personatge que `quan s'inicia com a cloni`{:class = "block3control"} s'hauria de `mostrar`{:class="block3looks"} i caure fins que `toqui`{:class=" block3sensing"} el terra blau que està dibuixat a l'Escenari. + +![Personatge del gat](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`Quan el personatge comença com un clon`{:class="block3control"}, `mostra`{:class="block3looks"} el personatge. `Repetidament`{ class="block3control"} `Canviar`{:class="block3motion"} la coordenada `y` del personatge per `-2`, fins que el personatge `toqui`{:class="block3sensing"} el color blau de l'Escenari. + +\--- /hint \--- + +\--- hint \--- + +Aquí tens els blocs que necessites: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +Així és com s'hauria de veure el teu codi: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +Quan facis clic a la bandera verda, hauries de veure caure un gat nou des de la part superior de l'Escenari cada tres segons. Cada gat ha d’aterrar en una gran pila de gats amuntegats al terra blau de la part inferior. + +![Gats que cauen](images/falling-cats.png) \ No newline at end of file diff --git a/ca-ES/step_4.md b/ca-ES/step_4.md new file mode 100644 index 0000000..5ba024f --- /dev/null +++ b/ca-ES/step_4.md @@ -0,0 +1,115 @@ +## Fes moure els gats + +Una vegada que un gat arriba al terra, hauria de passar lentament cap a la dreta. + +\--- task \--- + +Afegeix codi a la secció `quan començo com a clon`{:class="block3control"} per fer que el gat es `mogui deu passos`{:class="block3motion"} i canvia entre els dos vestits del personatge cada 0,1 segons fer que el gat sembli que camini. + +![Personatge del gat](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +El personatge del gat s'hauria de `moure 10 passos`{:class="block3motion"} i `canviar de vestit`{:class="block3looks"} cada `0,1 segons`{:class="block3control"}. Aquest codi s'hauria de repetir `per sempre`{:class="block3control"}, de la mateixa manera que el codi per fer caure el gat. + +\--- /hint \--- + +\--- hint \--- + +Aquí tens els blocs que necessites: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +Així és com s'hauria de veure el teu codi: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Prem la bandera verda i comprova que els gats es mouen per la plataforma blava de la part inferior. + +\--- /task \--- + +Si dibuixes un pont que tapi la bretxa perquè els gats puguin anar fins al costat dret de l’Escenari, pots veure que s’acaben enganxant caminant per la paret dreta. + +![Gats movent-se per la vora](images/flailing-at-edge.png) + +\--- task \--- + +Elimina el bucle `per sempre`{:class="block3control"}, i afegeix en el seu lloc un bucle diferent perquè els gats només caminin fins que arribin a la vora. Quan un gat arriba a la vora de l’Escenari, hauria de desaparèixer. + +![Personatge del gat](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Prem la bandera verda i comprova que els gats desapareixen quan arriben a la vora de l’Escenari. + +\--- /task \--- + +Pots observar que, si els gats cauen al forat, no desapareixen sinó que es queden enganxats a la part inferior. Això és perquè continuen intentant caure cap avall. + +Aquesta és la part del codi que indica que el gat continuï caient fins que toqui el blau: + +```blocks3 +repeat until +end +``` + +Tot i això, al forat, el gat no pot arribar mai al blau, de manera que queda enganxat per sempre. + +\--- task \--- + +Afegeix més blocs a aquest bucle de manera que es repeteixi fins que el personatge del gat toqui el blau `o`{:class="block3operators"} `toqui la vora`{:class="block3sensing"}. D’aquesta manera, el personatge deixa d’intentar caure si arriba a la vora de l’Escenari. + +![Personatge del gat](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/ca-ES/step_5.md b/ca-ES/step_5.md new file mode 100644 index 0000000..e22215b --- /dev/null +++ b/ca-ES/step_5.md @@ -0,0 +1,65 @@ +## Adhereix-los a les línies + +És possible que notis que, si dibuixes un pont baix entre les dues plataformes, o bé una línia inclinada cap amunt, els gats acaben caminant a través de la plataforma en lloc de per sobre! + +![Gats caminant a través de la plataforma](images/cat-walk-through-platform.png) + +\--- task \--- + +En el codi del personatge del gat, afegeix un altre bucle abans del bloc `següent vestit`{:class="block3looks"}. Aquesta vegada, el bucle hauria de dir al gat que es mogui cap amunt per`2` fins que no toqui el blau. + +![Personatge del gat](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +El gat hauria de `pujar 2`{:class="block3motion"} `repetidament fins que`{:class="block3control"} `no`{:class="block3operators"} `toqui el color blau`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Aquí tens els blocs que necessites: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +Així és com s'hauria de veure el teu codi: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Fes clic a la bandera verda i prova de dibuixar una línia inclinada cap amunt. Comprova que el teu gat segueixi aquesta línia. + +\--- /task \--- \ No newline at end of file diff --git a/ca-ES/step_6.md b/ca-ES/step_6.md new file mode 100644 index 0000000..889d7a1 --- /dev/null +++ b/ca-ES/step_6.md @@ -0,0 +1,89 @@ +## Fes que vagin segurs + +L’objectiu del joc és guiar els gats de manera segura creant un camí perquè puguin arribar fins a la porta. Crea una variable de puntuació per fer un seguiment de quants gats arriben fins la porta. + +\--- task \--- + +Crea una variable anomenada `puntuació`{:class="block3variables"}. + +![Personatge del gat](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Afegeix codi al teu personatge de gat per afegir `1` a la `puntuació`{:class="block3variables"} cada vegada que un gat arribi a la porta. També assigna a `puntuació`{:class="block3variables"} el valor `0` `quan es faci clic a la bandera`{:class="block3events"} al començament del joc. + +![Personatge del gat](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`Si`{:class="block3control"} el gat està `tocant a la porta`{:class="block3sensing"}, aleshores `afegir 1 a la puntuació`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Aquests són els nou blocs de codi que necessites afegir al que ja tens `quan començo com a clon`: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +Així és com s'hauria de veure el teu codi: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Afegeix més codi per tal que, quan un personatge de gat arriba a la porta, aquest faci el so 'mèu' i després desaparegui. + +![Personatge del gat](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/ca-ES/step_7.md b/ca-ES/step_7.md new file mode 100644 index 0000000..1a3c60f --- /dev/null +++ b/ca-ES/step_7.md @@ -0,0 +1,13 @@ +## Repte: més obstacles + +De moment, el joc és bastant fàcil de guanyar. Pots pensar en idees que facin el joc més difícil? + ++ Afegeix més fons amb dissenys de plataformes diferents. + ++ Desplaça la ubicació de la porta segons quin fons es mostri. + ++ Afegeix més objectes com obstacles en moviment. Potser podries tenir gossos voltant o punxes rotatives que els gats hagin d'evitar? + ++ Permet al jugador que utilitzi només una quantitat limitada de "tinta" per dibuixar línies en el joc. Pots fer un seguiment de la quantitat de "tinta" que s'utilitza creant una variable temporitzador que enregistri quant de temps es manté el ratolí pressionat. + ++ Crea un personatge que mostri al jugador la quantitat de tinta que queda. \ No newline at end of file diff --git a/ca-ES/step_8.md b/ca-ES/step_8.md new file mode 100644 index 0000000..57e81db --- /dev/null +++ b/ca-ES/step_8.md @@ -0,0 +1,19 @@ +## I ara què ve? + +Prova el projecte [Generador de flors](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects), on empraràs blocs personalitzats per crear dissenys de flors. + +\--- no-print \--- + +Prem `f` per dibuixar unes quantes flors, o `r` per dibuixar moltes flors aleatòries, o `p` per dibuixar un disseny de flors. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![flors aleatòries](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/cs-CZ/images/banner.png b/cs-CZ/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/cs-CZ/images/banner.png differ diff --git a/cs-CZ/images/cat-sprite.png b/cs-CZ/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/cs-CZ/images/cat-sprite.png differ diff --git a/cs-CZ/images/cat-walk-through-platform.png b/cs-CZ/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/cs-CZ/images/cat-walk-through-platform.png differ diff --git a/cs-CZ/images/cats-finished.png b/cs-CZ/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/cs-CZ/images/cats-finished.png differ diff --git a/cs-CZ/images/door-sprite.png b/cs-CZ/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/cs-CZ/images/door-sprite.png differ diff --git a/cs-CZ/images/draw-a-line.png b/cs-CZ/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/cs-CZ/images/draw-a-line.png differ diff --git a/cs-CZ/images/falling-cats.png b/cs-CZ/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/cs-CZ/images/falling-cats.png differ diff --git a/cs-CZ/images/flailing-at-edge.png b/cs-CZ/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/cs-CZ/images/flailing-at-edge.png differ diff --git a/cs-CZ/images/flower-random.png b/cs-CZ/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/cs-CZ/images/flower-random.png differ diff --git a/cs-CZ/images/pen-sprite.png b/cs-CZ/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/cs-CZ/images/pen-sprite.png differ diff --git a/cs-CZ/meta.yml b/cs-CZ/meta.yml new file mode 100644 index 0000000..c1c0ecc --- /dev/null +++ b/cs-CZ/meta.yml @@ -0,0 +1,30 @@ +--- +title: CATS! +hero_image: images/banner.png +description: Create a game in which you guide cats to safety and stop them from falling into holes +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Introduction + - + title: Draw lines + - + title: Clone cats + completion: + - engaged + - + title: Make the cats move + - + title: Stick to the lines + - + title: Get to safety + completion: + - internal + - + title: 'Challenge: more obstacles' + challenge: true + - + title: What next? diff --git a/cs-CZ/resources/cats-resources.sb3 b/cs-CZ/resources/cats-resources.sb3 new file mode 100644 index 0000000..d952bff Binary files /dev/null and b/cs-CZ/resources/cats-resources.sb3 differ diff --git a/cs-CZ/solutions/cats-solution.sb3 b/cs-CZ/solutions/cats-solution.sb3 new file mode 100644 index 0000000..a2dc7c8 Binary files /dev/null and b/cs-CZ/solutions/cats-solution.sb3 differ diff --git a/cs-CZ/step_1.md b/cs-CZ/step_1.md new file mode 100644 index 0000000..838986d --- /dev/null +++ b/cs-CZ/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +This is the **Scratch 3** version of the project. There is also a [Scratch 2 version of the project](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Introduction + +In this project, you will create a game in which you need to guide cats to safety and not let any of them fall through the gaps! + +### What you will make + +\--- no-print \--- + +Click and drag with the mouse to draw a line with the pencil. Your goal is to stop the cats from falling into holes by creating a safe path to the exit. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Cats finished](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: What you will learn + ++ How to use a `forever`{:class="block3control"} loop to constantly generate moving cats ++ How to use a `repeat until`{:class="block3control"} loop to ensure your cats follow a line + +\--- /collapse \--- + +## \--- collapse \--- + +## title: What you will need + +### Hardware + ++ A computer capable of running Scratch 3 + +### Software + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### Downloads + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Additional notes for educators + +\--- no-print \--- + +If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/cs-CZ/step_2.md b/cs-CZ/step_2.md new file mode 100644 index 0000000..264770c --- /dev/null +++ b/cs-CZ/step_2.md @@ -0,0 +1,140 @@ +## Draw lines + +\--- task \--- + +Open the 'CATS!' Scratch starter project. + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +If you have a Scratch account you can make a copy by clicking **Remix**. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Add the Pen extension to your project. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Click on the sprite called 'Pen', and add code to set the pen colour to the same blue as the obstacles on the Stage. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +To select a colour, click on the colour square in the `set pen color`{:class="block3extensions"} block to make your mouse cursor turn into a pipette, and then click on the correct colour on the Stage. + +\--- /task \--- + +\--- task \--- + +Add some more code to make the sprite follow the mouse pointer. Test your program to check that the code works. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Add some code to tell the sprite to draw a line on the Stage if the mouse button is pressed down. + +![Pen sprite](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the `mouse is down`{:class="block3sensing"}, put the `pen down`{:class="block3extensions"}, and `else`{:class="block3control"}, lift the `pen up`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Test your code. You should be able to click and drag with the mouse to draw a blue line on the Stage. + +![Draw a line](images/draw-a-line.png) + +\--- /task \--- + +You probably see that a blue dot always appears in the top right-hand corner of the Stage (it's circled in the image above). This is because, when you click the green flag to start the game, you press the mouse down, and so the pen immediately starts drawing. + +\--- task \--- + +To stop this from happening, add a `pen up`{:class="block3extensions"} block at the start of the script, and a `wait one second`{:class="block3control"} block above the `forever`{:class="block3control"} block. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/cs-CZ/step_3.md b/cs-CZ/step_3.md new file mode 100644 index 0000000..d5f8d46 --- /dev/null +++ b/cs-CZ/step_3.md @@ -0,0 +1,73 @@ +## Clone cats + +You want a never-ending stream of cats that the player has to guide along the path to the exit. + +\--- task \--- + +Click on the sprite called 'Cat', and add some code to `hide`{:class="block3looks"} the sprite, and also to `clone`{:class="block3control"} it every three seconds. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +If you run the program now, nothing happens on the Stage. To check that a new Cat sprite clone is created every three seconds, make each clone appear and fall out of the sky. + +\--- task \--- + +Add code to tell the sprite that `when it starts as a clone`{:class="block3control"}, it should `show`{:class="block3looks"} itself and fall until it `touches`{:class="block3sensing"} the blue floor that is drawn on the Stage. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`When the sprite starts as a clone`{:class="block3control"}, `show`{:class="block3looks"} the sprite. `Repeatedly`{:class="block3control"} `Change`{:class="block3motion"} the sprite's `y` coordinate by `-2`, until the sprite `touches`{:class="block3sensing"} the blue Stage. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +When you click the green flag, you should see a new cat fall from the top of the Stage every three seconds. Every cat should land in a big pile of overlapping cats on the blue floor at the bottom. + +![Falling cats](images/falling-cats.png) \ No newline at end of file diff --git a/cs-CZ/step_4.md b/cs-CZ/step_4.md new file mode 100644 index 0000000..8c10235 --- /dev/null +++ b/cs-CZ/step_4.md @@ -0,0 +1,115 @@ +## Make the cats move + +Once a cat reaches the floor, it should step slowly to the right. + +\--- task \--- + +Add code to the `when I start as a clone`{:class="block3control"} section to make the cat sprite `move ten steps`{:class="block3motion"}, and switch between the sprite's two costumes every 0.1 seconds to make the cat look like it's walking. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat sprite should `move 10 steps`{:class="block3motion"}, and `switch costume`{:class="block3looks"} every `0.1 seconds`{:class="block3control"}. This code should repeat `forever`{:class="block3control"}, just like the code to make the cat fall. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats now move along the blue platform at the bottom. + +\--- /task \--- + +If you draw a bridge across the gap so that the cats can get all the way to the right side of the Stage, you can see that they end up getting stuck walking into the right wall. + +![Flailing cats at the edge](images/flailing-at-edge.png) + +\--- task \--- + +Remove the `forever`{:class="block3control"} loop, and instead add a different loop to make the cats only walk until they reach an edge. When a cat reaches the edge of the Stage, it should disappear. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats disappear when they reach the edge of the Stage. + +\--- /task \--- + +You may notice that, if the cats fall into the hole, they don't disappear but instead get stuck at the bottom. This is because they keep trying to fall downwards. + +This is the part of the code that tells the cat to keep falling until it touches blue: + +```blocks3 +repeat until +end +``` + +However, in the hole, the cat can never reach blue, so it is stuck forever. + +\--- task \--- + +Add more blocks to this loop so that it repeats until the cat sprite is touching blue `or`{:class="block3operators"} `touching the edge`{:class="block3sensing"}. This way, the sprite stops trying to fall if it reaches the edge of the Stage. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/cs-CZ/step_5.md b/cs-CZ/step_5.md new file mode 100644 index 0000000..ff776e8 --- /dev/null +++ b/cs-CZ/step_5.md @@ -0,0 +1,65 @@ +## Stick to the lines + +You might notice that, if you draw a low bridge between the two platforms, or a line that slopes upwards, the cats end up walking through the platform rather than on top of it! + +![Cats walking through the platform](images/cat-walk-through-platform.png) + +\--- task \--- + +In the code for the cat sprite, add another loop before the `next costume`{:class="block3looks"} block. This time, the loop should tell the cat to move upwards by `2` until it is not touching blue. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat should `move up 2`{:class="block3motion"} `repeatedly until`{:class="block3control"} it is `not`{:class="block3operators"} `touching blue`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Click the green flag and try drawing a line that slopes upwards. Check that your cat follows this line. + +\--- /task \--- \ No newline at end of file diff --git a/cs-CZ/step_6.md b/cs-CZ/step_6.md new file mode 100644 index 0000000..deb146e --- /dev/null +++ b/cs-CZ/step_6.md @@ -0,0 +1,89 @@ +## Get to safety + +The object of the game is to guide the cats to safety by creating a path so they can reach the door. Create a score variable to keep track of how many cats reach the door. + +\--- task \--- + +Create a variable called `score`{:class="block3variables"}. + +![Cat sprite](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Add code to your cat sprite to add `1` to the `score`{:class="block3variables"} each time a cat reaches the door. Also set `score`{:class="block3variables"} to `0` `when the flag is clicked`{:class="block3events"} at the start of the game. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the cat is `touching the door sprite`{:class="block3sensing"}, then `add 1 to the score`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the new code blocks you need to add to your `when I start as a clone` script: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Add some more code so that, when a cat sprite reaches the door, the cat makes a 'meow' sound and then disappears. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/cs-CZ/step_7.md b/cs-CZ/step_7.md new file mode 100644 index 0000000..6e609ac --- /dev/null +++ b/cs-CZ/step_7.md @@ -0,0 +1,13 @@ +## Challenge: more obstacles + +At the moment, the game is rather easy to win. Can you think of ideas to you make your game harder? + ++ Add more backgrounds with different platform designs. + ++ Move the location of the door depending on which background is displayed. + ++ Add more sprites as moving obstacles. Perhaps you could have roaming dogs or rotating spikes the cats need to avoid? + ++ Only allow the player to use a limited amount of "ink" to draw lines in the game. You can keep track of how much "ink" is used by creating a timer variable that records how long the mouse is held down. + ++ Create a sprite to show the player how much ink is left. \ No newline at end of file diff --git a/cs-CZ/step_8.md b/cs-CZ/step_8.md new file mode 100644 index 0000000..2295a72 --- /dev/null +++ b/cs-CZ/step_8.md @@ -0,0 +1,19 @@ +## What next? + +Try the [Flower generator](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects) project, where you will use custom blocks to create flower patterns. + +\--- no-print \--- + +Press `f` to draw a few flowers, or `r` to draw lots of random flowers, or `p` to draw a flower pattern. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![random flowers](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/cy-GB/images/banner.png b/cy-GB/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/cy-GB/images/banner.png differ diff --git a/cy-GB/images/cat-sprite.png b/cy-GB/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/cy-GB/images/cat-sprite.png differ diff --git a/cy-GB/images/cat-walk-through-platform.png b/cy-GB/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/cy-GB/images/cat-walk-through-platform.png differ diff --git a/cy-GB/images/cats-finished.png b/cy-GB/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/cy-GB/images/cats-finished.png differ diff --git a/cy-GB/images/door-sprite.png b/cy-GB/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/cy-GB/images/door-sprite.png differ diff --git a/cy-GB/images/draw-a-line.png b/cy-GB/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/cy-GB/images/draw-a-line.png differ diff --git a/cy-GB/images/falling-cats.png b/cy-GB/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/cy-GB/images/falling-cats.png differ diff --git a/cy-GB/images/flailing-at-edge.png b/cy-GB/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/cy-GB/images/flailing-at-edge.png differ diff --git a/cy-GB/images/flower-random.png b/cy-GB/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/cy-GB/images/flower-random.png differ diff --git a/cy-GB/images/pen-sprite.png b/cy-GB/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/cy-GB/images/pen-sprite.png differ diff --git a/cy-GB/meta.yml b/cy-GB/meta.yml new file mode 100644 index 0000000..c1c0ecc --- /dev/null +++ b/cy-GB/meta.yml @@ -0,0 +1,30 @@ +--- +title: CATS! +hero_image: images/banner.png +description: Create a game in which you guide cats to safety and stop them from falling into holes +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Introduction + - + title: Draw lines + - + title: Clone cats + completion: + - engaged + - + title: Make the cats move + - + title: Stick to the lines + - + title: Get to safety + completion: + - internal + - + title: 'Challenge: more obstacles' + challenge: true + - + title: What next? diff --git a/cy-GB/resources/cats-resources.sb3 b/cy-GB/resources/cats-resources.sb3 new file mode 100644 index 0000000..d952bff Binary files /dev/null and b/cy-GB/resources/cats-resources.sb3 differ diff --git a/cy-GB/solutions/cats-solution.sb3 b/cy-GB/solutions/cats-solution.sb3 new file mode 100644 index 0000000..a2dc7c8 Binary files /dev/null and b/cy-GB/solutions/cats-solution.sb3 differ diff --git a/cy-GB/step_1.md b/cy-GB/step_1.md new file mode 100644 index 0000000..838986d --- /dev/null +++ b/cy-GB/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +This is the **Scratch 3** version of the project. There is also a [Scratch 2 version of the project](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Introduction + +In this project, you will create a game in which you need to guide cats to safety and not let any of them fall through the gaps! + +### What you will make + +\--- no-print \--- + +Click and drag with the mouse to draw a line with the pencil. Your goal is to stop the cats from falling into holes by creating a safe path to the exit. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Cats finished](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: What you will learn + ++ How to use a `forever`{:class="block3control"} loop to constantly generate moving cats ++ How to use a `repeat until`{:class="block3control"} loop to ensure your cats follow a line + +\--- /collapse \--- + +## \--- collapse \--- + +## title: What you will need + +### Hardware + ++ A computer capable of running Scratch 3 + +### Software + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### Downloads + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Additional notes for educators + +\--- no-print \--- + +If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/cy-GB/step_2.md b/cy-GB/step_2.md new file mode 100644 index 0000000..264770c --- /dev/null +++ b/cy-GB/step_2.md @@ -0,0 +1,140 @@ +## Draw lines + +\--- task \--- + +Open the 'CATS!' Scratch starter project. + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +If you have a Scratch account you can make a copy by clicking **Remix**. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Add the Pen extension to your project. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Click on the sprite called 'Pen', and add code to set the pen colour to the same blue as the obstacles on the Stage. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +To select a colour, click on the colour square in the `set pen color`{:class="block3extensions"} block to make your mouse cursor turn into a pipette, and then click on the correct colour on the Stage. + +\--- /task \--- + +\--- task \--- + +Add some more code to make the sprite follow the mouse pointer. Test your program to check that the code works. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Add some code to tell the sprite to draw a line on the Stage if the mouse button is pressed down. + +![Pen sprite](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the `mouse is down`{:class="block3sensing"}, put the `pen down`{:class="block3extensions"}, and `else`{:class="block3control"}, lift the `pen up`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Test your code. You should be able to click and drag with the mouse to draw a blue line on the Stage. + +![Draw a line](images/draw-a-line.png) + +\--- /task \--- + +You probably see that a blue dot always appears in the top right-hand corner of the Stage (it's circled in the image above). This is because, when you click the green flag to start the game, you press the mouse down, and so the pen immediately starts drawing. + +\--- task \--- + +To stop this from happening, add a `pen up`{:class="block3extensions"} block at the start of the script, and a `wait one second`{:class="block3control"} block above the `forever`{:class="block3control"} block. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/cy-GB/step_3.md b/cy-GB/step_3.md new file mode 100644 index 0000000..d5f8d46 --- /dev/null +++ b/cy-GB/step_3.md @@ -0,0 +1,73 @@ +## Clone cats + +You want a never-ending stream of cats that the player has to guide along the path to the exit. + +\--- task \--- + +Click on the sprite called 'Cat', and add some code to `hide`{:class="block3looks"} the sprite, and also to `clone`{:class="block3control"} it every three seconds. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +If you run the program now, nothing happens on the Stage. To check that a new Cat sprite clone is created every three seconds, make each clone appear and fall out of the sky. + +\--- task \--- + +Add code to tell the sprite that `when it starts as a clone`{:class="block3control"}, it should `show`{:class="block3looks"} itself and fall until it `touches`{:class="block3sensing"} the blue floor that is drawn on the Stage. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`When the sprite starts as a clone`{:class="block3control"}, `show`{:class="block3looks"} the sprite. `Repeatedly`{:class="block3control"} `Change`{:class="block3motion"} the sprite's `y` coordinate by `-2`, until the sprite `touches`{:class="block3sensing"} the blue Stage. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +When you click the green flag, you should see a new cat fall from the top of the Stage every three seconds. Every cat should land in a big pile of overlapping cats on the blue floor at the bottom. + +![Falling cats](images/falling-cats.png) \ No newline at end of file diff --git a/cy-GB/step_4.md b/cy-GB/step_4.md new file mode 100644 index 0000000..8c10235 --- /dev/null +++ b/cy-GB/step_4.md @@ -0,0 +1,115 @@ +## Make the cats move + +Once a cat reaches the floor, it should step slowly to the right. + +\--- task \--- + +Add code to the `when I start as a clone`{:class="block3control"} section to make the cat sprite `move ten steps`{:class="block3motion"}, and switch between the sprite's two costumes every 0.1 seconds to make the cat look like it's walking. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat sprite should `move 10 steps`{:class="block3motion"}, and `switch costume`{:class="block3looks"} every `0.1 seconds`{:class="block3control"}. This code should repeat `forever`{:class="block3control"}, just like the code to make the cat fall. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats now move along the blue platform at the bottom. + +\--- /task \--- + +If you draw a bridge across the gap so that the cats can get all the way to the right side of the Stage, you can see that they end up getting stuck walking into the right wall. + +![Flailing cats at the edge](images/flailing-at-edge.png) + +\--- task \--- + +Remove the `forever`{:class="block3control"} loop, and instead add a different loop to make the cats only walk until they reach an edge. When a cat reaches the edge of the Stage, it should disappear. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats disappear when they reach the edge of the Stage. + +\--- /task \--- + +You may notice that, if the cats fall into the hole, they don't disappear but instead get stuck at the bottom. This is because they keep trying to fall downwards. + +This is the part of the code that tells the cat to keep falling until it touches blue: + +```blocks3 +repeat until +end +``` + +However, in the hole, the cat can never reach blue, so it is stuck forever. + +\--- task \--- + +Add more blocks to this loop so that it repeats until the cat sprite is touching blue `or`{:class="block3operators"} `touching the edge`{:class="block3sensing"}. This way, the sprite stops trying to fall if it reaches the edge of the Stage. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/cy-GB/step_5.md b/cy-GB/step_5.md new file mode 100644 index 0000000..ff776e8 --- /dev/null +++ b/cy-GB/step_5.md @@ -0,0 +1,65 @@ +## Stick to the lines + +You might notice that, if you draw a low bridge between the two platforms, or a line that slopes upwards, the cats end up walking through the platform rather than on top of it! + +![Cats walking through the platform](images/cat-walk-through-platform.png) + +\--- task \--- + +In the code for the cat sprite, add another loop before the `next costume`{:class="block3looks"} block. This time, the loop should tell the cat to move upwards by `2` until it is not touching blue. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat should `move up 2`{:class="block3motion"} `repeatedly until`{:class="block3control"} it is `not`{:class="block3operators"} `touching blue`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Click the green flag and try drawing a line that slopes upwards. Check that your cat follows this line. + +\--- /task \--- \ No newline at end of file diff --git a/cy-GB/step_6.md b/cy-GB/step_6.md new file mode 100644 index 0000000..deb146e --- /dev/null +++ b/cy-GB/step_6.md @@ -0,0 +1,89 @@ +## Get to safety + +The object of the game is to guide the cats to safety by creating a path so they can reach the door. Create a score variable to keep track of how many cats reach the door. + +\--- task \--- + +Create a variable called `score`{:class="block3variables"}. + +![Cat sprite](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Add code to your cat sprite to add `1` to the `score`{:class="block3variables"} each time a cat reaches the door. Also set `score`{:class="block3variables"} to `0` `when the flag is clicked`{:class="block3events"} at the start of the game. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the cat is `touching the door sprite`{:class="block3sensing"}, then `add 1 to the score`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the new code blocks you need to add to your `when I start as a clone` script: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Add some more code so that, when a cat sprite reaches the door, the cat makes a 'meow' sound and then disappears. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/cy-GB/step_7.md b/cy-GB/step_7.md new file mode 100644 index 0000000..6e609ac --- /dev/null +++ b/cy-GB/step_7.md @@ -0,0 +1,13 @@ +## Challenge: more obstacles + +At the moment, the game is rather easy to win. Can you think of ideas to you make your game harder? + ++ Add more backgrounds with different platform designs. + ++ Move the location of the door depending on which background is displayed. + ++ Add more sprites as moving obstacles. Perhaps you could have roaming dogs or rotating spikes the cats need to avoid? + ++ Only allow the player to use a limited amount of "ink" to draw lines in the game. You can keep track of how much "ink" is used by creating a timer variable that records how long the mouse is held down. + ++ Create a sprite to show the player how much ink is left. \ No newline at end of file diff --git a/cy-GB/step_8.md b/cy-GB/step_8.md new file mode 100644 index 0000000..2295a72 --- /dev/null +++ b/cy-GB/step_8.md @@ -0,0 +1,19 @@ +## What next? + +Try the [Flower generator](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects) project, where you will use custom blocks to create flower patterns. + +\--- no-print \--- + +Press `f` to draw a few flowers, or `r` to draw lots of random flowers, or `p` to draw a flower pattern. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![random flowers](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/da-DK/images/banner.png b/da-DK/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/da-DK/images/banner.png differ diff --git a/da-DK/images/cat-sprite.png b/da-DK/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/da-DK/images/cat-sprite.png differ diff --git a/da-DK/images/cat-walk-through-platform.png b/da-DK/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/da-DK/images/cat-walk-through-platform.png differ diff --git a/da-DK/images/cats-finished.png b/da-DK/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/da-DK/images/cats-finished.png differ diff --git a/da-DK/images/door-sprite.png b/da-DK/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/da-DK/images/door-sprite.png differ diff --git a/da-DK/images/draw-a-line.png b/da-DK/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/da-DK/images/draw-a-line.png differ diff --git a/da-DK/images/falling-cats.png b/da-DK/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/da-DK/images/falling-cats.png differ diff --git a/da-DK/images/flailing-at-edge.png b/da-DK/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/da-DK/images/flailing-at-edge.png differ diff --git a/da-DK/images/flower-random.png b/da-DK/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/da-DK/images/flower-random.png differ diff --git a/da-DK/images/pen-sprite.png b/da-DK/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/da-DK/images/pen-sprite.png differ diff --git a/da-DK/meta.yml b/da-DK/meta.yml new file mode 100644 index 0000000..c1c0ecc --- /dev/null +++ b/da-DK/meta.yml @@ -0,0 +1,30 @@ +--- +title: CATS! +hero_image: images/banner.png +description: Create a game in which you guide cats to safety and stop them from falling into holes +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Introduction + - + title: Draw lines + - + title: Clone cats + completion: + - engaged + - + title: Make the cats move + - + title: Stick to the lines + - + title: Get to safety + completion: + - internal + - + title: 'Challenge: more obstacles' + challenge: true + - + title: What next? diff --git a/da-DK/resources/cats-resources.sb3 b/da-DK/resources/cats-resources.sb3 new file mode 100644 index 0000000..d952bff Binary files /dev/null and b/da-DK/resources/cats-resources.sb3 differ diff --git a/da-DK/solutions/cats-solution.sb3 b/da-DK/solutions/cats-solution.sb3 new file mode 100644 index 0000000..a2dc7c8 Binary files /dev/null and b/da-DK/solutions/cats-solution.sb3 differ diff --git a/da-DK/step_1.md b/da-DK/step_1.md new file mode 100644 index 0000000..838986d --- /dev/null +++ b/da-DK/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +This is the **Scratch 3** version of the project. There is also a [Scratch 2 version of the project](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Introduction + +In this project, you will create a game in which you need to guide cats to safety and not let any of them fall through the gaps! + +### What you will make + +\--- no-print \--- + +Click and drag with the mouse to draw a line with the pencil. Your goal is to stop the cats from falling into holes by creating a safe path to the exit. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Cats finished](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: What you will learn + ++ How to use a `forever`{:class="block3control"} loop to constantly generate moving cats ++ How to use a `repeat until`{:class="block3control"} loop to ensure your cats follow a line + +\--- /collapse \--- + +## \--- collapse \--- + +## title: What you will need + +### Hardware + ++ A computer capable of running Scratch 3 + +### Software + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### Downloads + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Additional notes for educators + +\--- no-print \--- + +If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/da-DK/step_2.md b/da-DK/step_2.md new file mode 100644 index 0000000..264770c --- /dev/null +++ b/da-DK/step_2.md @@ -0,0 +1,140 @@ +## Draw lines + +\--- task \--- + +Open the 'CATS!' Scratch starter project. + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +If you have a Scratch account you can make a copy by clicking **Remix**. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Add the Pen extension to your project. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Click on the sprite called 'Pen', and add code to set the pen colour to the same blue as the obstacles on the Stage. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +To select a colour, click on the colour square in the `set pen color`{:class="block3extensions"} block to make your mouse cursor turn into a pipette, and then click on the correct colour on the Stage. + +\--- /task \--- + +\--- task \--- + +Add some more code to make the sprite follow the mouse pointer. Test your program to check that the code works. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Add some code to tell the sprite to draw a line on the Stage if the mouse button is pressed down. + +![Pen sprite](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the `mouse is down`{:class="block3sensing"}, put the `pen down`{:class="block3extensions"}, and `else`{:class="block3control"}, lift the `pen up`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Test your code. You should be able to click and drag with the mouse to draw a blue line on the Stage. + +![Draw a line](images/draw-a-line.png) + +\--- /task \--- + +You probably see that a blue dot always appears in the top right-hand corner of the Stage (it's circled in the image above). This is because, when you click the green flag to start the game, you press the mouse down, and so the pen immediately starts drawing. + +\--- task \--- + +To stop this from happening, add a `pen up`{:class="block3extensions"} block at the start of the script, and a `wait one second`{:class="block3control"} block above the `forever`{:class="block3control"} block. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/da-DK/step_3.md b/da-DK/step_3.md new file mode 100644 index 0000000..d5f8d46 --- /dev/null +++ b/da-DK/step_3.md @@ -0,0 +1,73 @@ +## Clone cats + +You want a never-ending stream of cats that the player has to guide along the path to the exit. + +\--- task \--- + +Click on the sprite called 'Cat', and add some code to `hide`{:class="block3looks"} the sprite, and also to `clone`{:class="block3control"} it every three seconds. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +If you run the program now, nothing happens on the Stage. To check that a new Cat sprite clone is created every three seconds, make each clone appear and fall out of the sky. + +\--- task \--- + +Add code to tell the sprite that `when it starts as a clone`{:class="block3control"}, it should `show`{:class="block3looks"} itself and fall until it `touches`{:class="block3sensing"} the blue floor that is drawn on the Stage. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`When the sprite starts as a clone`{:class="block3control"}, `show`{:class="block3looks"} the sprite. `Repeatedly`{:class="block3control"} `Change`{:class="block3motion"} the sprite's `y` coordinate by `-2`, until the sprite `touches`{:class="block3sensing"} the blue Stage. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +When you click the green flag, you should see a new cat fall from the top of the Stage every three seconds. Every cat should land in a big pile of overlapping cats on the blue floor at the bottom. + +![Falling cats](images/falling-cats.png) \ No newline at end of file diff --git a/da-DK/step_4.md b/da-DK/step_4.md new file mode 100644 index 0000000..8c10235 --- /dev/null +++ b/da-DK/step_4.md @@ -0,0 +1,115 @@ +## Make the cats move + +Once a cat reaches the floor, it should step slowly to the right. + +\--- task \--- + +Add code to the `when I start as a clone`{:class="block3control"} section to make the cat sprite `move ten steps`{:class="block3motion"}, and switch between the sprite's two costumes every 0.1 seconds to make the cat look like it's walking. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat sprite should `move 10 steps`{:class="block3motion"}, and `switch costume`{:class="block3looks"} every `0.1 seconds`{:class="block3control"}. This code should repeat `forever`{:class="block3control"}, just like the code to make the cat fall. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats now move along the blue platform at the bottom. + +\--- /task \--- + +If you draw a bridge across the gap so that the cats can get all the way to the right side of the Stage, you can see that they end up getting stuck walking into the right wall. + +![Flailing cats at the edge](images/flailing-at-edge.png) + +\--- task \--- + +Remove the `forever`{:class="block3control"} loop, and instead add a different loop to make the cats only walk until they reach an edge. When a cat reaches the edge of the Stage, it should disappear. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats disappear when they reach the edge of the Stage. + +\--- /task \--- + +You may notice that, if the cats fall into the hole, they don't disappear but instead get stuck at the bottom. This is because they keep trying to fall downwards. + +This is the part of the code that tells the cat to keep falling until it touches blue: + +```blocks3 +repeat until +end +``` + +However, in the hole, the cat can never reach blue, so it is stuck forever. + +\--- task \--- + +Add more blocks to this loop so that it repeats until the cat sprite is touching blue `or`{:class="block3operators"} `touching the edge`{:class="block3sensing"}. This way, the sprite stops trying to fall if it reaches the edge of the Stage. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/da-DK/step_5.md b/da-DK/step_5.md new file mode 100644 index 0000000..ff776e8 --- /dev/null +++ b/da-DK/step_5.md @@ -0,0 +1,65 @@ +## Stick to the lines + +You might notice that, if you draw a low bridge between the two platforms, or a line that slopes upwards, the cats end up walking through the platform rather than on top of it! + +![Cats walking through the platform](images/cat-walk-through-platform.png) + +\--- task \--- + +In the code for the cat sprite, add another loop before the `next costume`{:class="block3looks"} block. This time, the loop should tell the cat to move upwards by `2` until it is not touching blue. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat should `move up 2`{:class="block3motion"} `repeatedly until`{:class="block3control"} it is `not`{:class="block3operators"} `touching blue`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Click the green flag and try drawing a line that slopes upwards. Check that your cat follows this line. + +\--- /task \--- \ No newline at end of file diff --git a/da-DK/step_6.md b/da-DK/step_6.md new file mode 100644 index 0000000..deb146e --- /dev/null +++ b/da-DK/step_6.md @@ -0,0 +1,89 @@ +## Get to safety + +The object of the game is to guide the cats to safety by creating a path so they can reach the door. Create a score variable to keep track of how many cats reach the door. + +\--- task \--- + +Create a variable called `score`{:class="block3variables"}. + +![Cat sprite](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Add code to your cat sprite to add `1` to the `score`{:class="block3variables"} each time a cat reaches the door. Also set `score`{:class="block3variables"} to `0` `when the flag is clicked`{:class="block3events"} at the start of the game. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the cat is `touching the door sprite`{:class="block3sensing"}, then `add 1 to the score`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the new code blocks you need to add to your `when I start as a clone` script: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Add some more code so that, when a cat sprite reaches the door, the cat makes a 'meow' sound and then disappears. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/da-DK/step_7.md b/da-DK/step_7.md new file mode 100644 index 0000000..6e609ac --- /dev/null +++ b/da-DK/step_7.md @@ -0,0 +1,13 @@ +## Challenge: more obstacles + +At the moment, the game is rather easy to win. Can you think of ideas to you make your game harder? + ++ Add more backgrounds with different platform designs. + ++ Move the location of the door depending on which background is displayed. + ++ Add more sprites as moving obstacles. Perhaps you could have roaming dogs or rotating spikes the cats need to avoid? + ++ Only allow the player to use a limited amount of "ink" to draw lines in the game. You can keep track of how much "ink" is used by creating a timer variable that records how long the mouse is held down. + ++ Create a sprite to show the player how much ink is left. \ No newline at end of file diff --git a/da-DK/step_8.md b/da-DK/step_8.md new file mode 100644 index 0000000..2295a72 --- /dev/null +++ b/da-DK/step_8.md @@ -0,0 +1,19 @@ +## What next? + +Try the [Flower generator](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects) project, where you will use custom blocks to create flower patterns. + +\--- no-print \--- + +Press `f` to draw a few flowers, or `r` to draw lots of random flowers, or `p` to draw a flower pattern. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![random flowers](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/de-DE/images/banner.png b/de-DE/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/de-DE/images/banner.png differ diff --git a/de-DE/images/cat-sprite.png b/de-DE/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/de-DE/images/cat-sprite.png differ diff --git a/de-DE/images/cat-walk-through-platform.png b/de-DE/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/de-DE/images/cat-walk-through-platform.png differ diff --git a/de-DE/images/cats-finished.png b/de-DE/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/de-DE/images/cats-finished.png differ diff --git a/de-DE/images/door-sprite.png b/de-DE/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/de-DE/images/door-sprite.png differ diff --git a/de-DE/images/draw-a-line.png b/de-DE/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/de-DE/images/draw-a-line.png differ diff --git a/de-DE/images/falling-cats.png b/de-DE/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/de-DE/images/falling-cats.png differ diff --git a/de-DE/images/flailing-at-edge.png b/de-DE/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/de-DE/images/flailing-at-edge.png differ diff --git a/de-DE/images/flower-random.png b/de-DE/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/de-DE/images/flower-random.png differ diff --git a/de-DE/images/pen-sprite.png b/de-DE/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/de-DE/images/pen-sprite.png differ diff --git a/de-DE/meta.yml b/de-DE/meta.yml new file mode 100644 index 0000000..0a62e30 --- /dev/null +++ b/de-DE/meta.yml @@ -0,0 +1,30 @@ +--- +title: KATZEN! +hero_image: images/banner.png +description: Erstelle ein Spiel, in dem du Katzen in Sicherheit bringst und verhinderst, dass sie in Löcher fallen +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Einleitung + - + title: Linien zeichnen + - + title: Katzen klonen + completion: + - engaged + - + title: Lass die Katzen sich bewegen + - + title: Auf der Linie bleiben + - + title: In Sicherheit bringen + completion: + - internal + - + title: 'Herausforderung: Mehr Hindernisse' + challenge: true + - + title: Wie geht es weiter? diff --git a/de-DE/resources/cats-resources.sb3 b/de-DE/resources/cats-resources.sb3 new file mode 100644 index 0000000..fc2ab65 Binary files /dev/null and b/de-DE/resources/cats-resources.sb3 differ diff --git a/de-DE/solutions/cats-solution.sb3 b/de-DE/solutions/cats-solution.sb3 new file mode 100644 index 0000000..dca0f4a Binary files /dev/null and b/de-DE/solutions/cats-solution.sb3 differ diff --git a/de-DE/step_1.md b/de-DE/step_1.md new file mode 100644 index 0000000..303d64a --- /dev/null +++ b/de-DE/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +Dies ist die **Scratch 3** Version des Projekts. Es gibt auch eine [Scratch 2 Version des Projekts](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Einleitung + +In diesem Projekt erstellst du ein Spiel, in dem du Katzen in Sicherheit bringen und keine von ihnen durch die Lücken fallen lassen darfst! + +### Was du machen wirst + +\--- no-print \--- + +Klicke und ziehe mit der Maus, um mit dem Stift eine Linie zu zeichnen. Dein Ziel ist es, die Katzen davon abzuhalten, in Löcher zu fallen, indem du einen sicheren Weg zum Ausgang erschaffst. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Katzen fertig](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: Was du lernen wirst + ++ Wie man eine `wiederhole fortlaufend`{:class="block3control"} Schleife verwendet, um ständig bewegte Katzen zu generieren ++ Wie man eine `wiederhole bis`{:class="block3control"} Schleife verwendet, um sicherzustellen, dass deine Katzen einer Linie folgen + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Was du brauchen wirst + +### Hardware + ++ Ein Computer, auf dem Scratch 3 ausgeführt werden kann + +### Software + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### Downloads + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Zusätzliche Hinweise für Pädagogen + +\--- no-print \--- + +Falls du dieses Projekt ausdrucken musst, verwende bitte die [druckfreundliche Version](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/de-DE/step_2.md b/de-DE/step_2.md new file mode 100644 index 0000000..271f2d7 --- /dev/null +++ b/de-DE/step_2.md @@ -0,0 +1,140 @@ +## Linien zeichnen + +\--- task \--- + +Öffne das "KATZEN!" Scratch Starter Projekt. + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +Wenn du bereits einen Scratch-Account besitzt, kannst du dir durch klicken auf **Remix** eine Kopie anlegen. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Füge die Malstift Erweiterung zu deinem Projekt hinzu. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Klicke auf die Figur mit dem Namen "Stift" und füge einen Code hinzu, um die Stiftfarbe auf das gleiche Blau wie die Hindernisse auf der Bühne einzustellen. + +![Stift Figur](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +Um eine Farbe auszuwählen, klicke auf das Farbquadrat im Block `setze Stiftfarbe auf`{:class="block3extensions"}, damit sich dein Mauszeiger in eine Pipette verwandelt, und klicke dann auf der Bühne auf die richtige Farbe. + +\--- /task \--- + +\--- task \--- + +Füge weiteren Code hinzu, damit die Figur dem Mauszeiger folgt. Teste dein Programm, um zu überprüfen, ob der Code funktioniert. + +![Stift Figur](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Füge einen Code hinzu, um die Figur anzuweisen, eine Linie auf der Bühne zu zeichnen, wenn die Maustaste gedrückt wird. + +![Stift Figur](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`Falls`{:class="block3control"} die `Maustaste gedrückt`{:class="block3sensing"} ist, `schalte Stift ein`{:class="block3extensions"} und `sonst`{:class="block3control"}, `schalte Stift aus`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Hier sind die Codeblöcke, die du brauchst: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +So sollte dein Code aussehen: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Teste deinen Code. Du solltest in der Lage sein, mit der Maus zu klicken und zu ziehen, um eine blaue Linie auf der Bühne zu zeichnen. + +![Zeichne eine Linie](images/draw-a-line.png) + +\--- /task \--- + +Du siehst wahrscheinlich, dass immer ein blauer Punkt in der oberen rechten Ecke der Bühne erscheint (er ist im Bild oben eingekreist). Das liegt daran, dass du beim Klicken auf die grüne Flagge, um das Spiel zu starten, die Maustaste drückst und der Stift sofort mit dem Zeichnen beginnt. + +\--- task \--- + +Um dies zu verhindern, füge am Anfang des Skripts einen `schalte Stift aus`{:class="block3extensions"}-Block und einen `warte 1 Sekunde`{:class="block3control"}-Block über den `wiederhole fortlaufend`{:class="block3control"} block hinzu. + +![Stift Figur](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/de-DE/step_3.md b/de-DE/step_3.md new file mode 100644 index 0000000..d94144d --- /dev/null +++ b/de-DE/step_3.md @@ -0,0 +1,73 @@ +## Katzen klonen + +Du möchtest einen endlosen Strom von Katzen, die der Spieler auf den Weg zum Ausgang führen muss. + +\--- task \--- + +Klicke auf die Figur namens 'Katze' und füge einen Code hinzu, um sie zu `verstecken`{:class="block3looks"} und um sie alle drei Sekunden zu `klonen`{:class="block3control"}. + +![Katzen Figur](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +Wenn du das Programm jetzt ausführst, passiert auf der Bühne nichts. Um zu überprüfen, ob alle drei Sekunden ein neuer Katzen-Figur-Klon erstellt wird, lasse jeden Klon erscheinen und vom Himmel fallen. + +\--- task \--- + +Füge einen Code hinzu, um der Figur mitzuteilen, dass sie `wenn sie als Klon entsteht`{:class="block3control"}, sich selbst `zeigen`{:class="block3looks"} und fallen soll, bis sie den blauen Boden `berührt`{:class="block3sensing"}, der auf der Bühne gezeichnet wird. + +![Katzen Figur](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`Wenn die Figur als Klon entsteht`{:class="block3control"}, `zeige`{:"block3looks"} die Figur. `Ändere`{:class="block3motion"} die `y`-Koordinate der Figur `wiederholt`{:class="block3control"} um `-2`, bis die Figur die blaue Bühne `berührt`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Hier sind die Codeblöcke die du brauchst: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +So sollte dein Code aussehen: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +Wenn du auf die grüne Flagge klickst, sollte alle drei Sekunden eine neue Katze vom oberen Rand der Bühne fallen. Jede Katze sollte in einem großen Haufen überlappender Katzen auf dem blauen Boden unten landen. + +![Fallende Katzen](images/falling-cats.png) \ No newline at end of file diff --git a/de-DE/step_4.md b/de-DE/step_4.md new file mode 100644 index 0000000..973ec72 --- /dev/null +++ b/de-DE/step_4.md @@ -0,0 +1,115 @@ +## Lass die Katzen sich bewegen + +Sobald eine Katze den Boden erreicht, sollte sie langsam nach rechts gehen. + +\--- task \--- + +Füge dem `wenn ich als Klon entstehe`{:class="block3control"}-Teil einen Code hinzu, damit die Katzenfigur `zehn Schritte geht`{:class="block3motion"} und alle 0,1 Sekunden zwischen den beiden Kostümen der Figur wechselt damit die Katze so aussieht, als würde sie laufen. + +![Katzen Figur](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +Die Katzenfigur sollte `10 Schritte gehen`{:class="block3motion"} und alle `0,1 Sekunden`{:class="block3control"} `das Kostüm wechseln`{:class="block3looks"}. Dieser Code sollte `fortlaufend wiederholt`{:class="block3control"} werden, genau wie der Code, der die Katze fallen lässt. + +\--- /hint \--- + +\--- hint \--- + +Hier sind die Codeblöcke die du brauchst: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +So sollte dein Code aussehen: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Drücke die grüne Flagge und überprüfe, ob sich die Katzen jetzt entlang der blauen Plattform am unteren Rand bewegen. + +\--- /task \--- + +Wenn du eine Brücke über die Lücke zeichnest, damit die Katzen bis zur rechten Seite der Bühne gelangen können, wirst du sehen, dass sie beim Laufen in die rechte Wand stecken bleiben. + +![Strampelnde Katzen am Rand](images/flailing-at-edge.png) + +\--- task \--- + +Entferne die `fortlaufend`{:class="block3control"}- Schleife und füge stattdessen eine andere Schleife ein, damit die Katzen nur so lange laufen, bis sie eine Kante erreichen. Wenn eine Katze den Bühnenrand erreicht, sollte sie verschwinden. + +![Katzen Figur](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Drücke die grüne Flagge und überprüfe, ob die Katzen verschwinden, wenn sie den Bühnenrand erreichen. + +\--- /task \--- + +Du hast vielleicht bemerkt, dass die Katzen, wenn sie in das Loch fallen, nicht verschwinden, sondern am Boden stecken bleiben. Dies liegt daran, dass sie immer wieder versuchen, nach unten zu fallen. + +Das ist der Teil des Codes, der der Katze sagt, dass sie weiter fallen soll, bis sie blau berührt: + +```blocks3 +repeat until +end +``` + +In dem Loch kann die Katze jedoch niemals blau erreichen, so sitzt sie für immer fest. + +\--- task \--- + +Füge dieser Schleife weitere Blöcke hinzu, sodass sie wiederholt wird, bis die Katzenfigur etwas blaues berührt `oder`{:class="block3operators"} sie den `Rand berührt`{:class="block3sensing"}. Auf diese Weise versucht die Figur nicht mehr zu fallen, wenn sie den Rand der Bühne erreicht. + +![Katzen Figur](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/de-DE/step_5.md b/de-DE/step_5.md new file mode 100644 index 0000000..3271495 --- /dev/null +++ b/de-DE/step_5.md @@ -0,0 +1,65 @@ +## Auf der Linie bleiben + +Du wirst vielleicht bemerken, dass wenn du eine niedrige Brücke zwischen den beiden Plattformen zeichnest oder eine Linie, die nach oben läuft, die Katzen eher durch die Plattform laufen als auf ihr! + +![Katzen, die durch die Plattform laufen](images/cat-walk-through-platform.png) + +\--- task \--- + +Füge im Code für die Katzenfigur eine weitere Schleife vor dem `nächsten Kostüm`{:class="block3looks"}-Block hinzu. Dieses Mal sollte die Schleife die Katze anweisen, sich um `2` nach oben zu bewegen, bis sie kein blau mehr berührt. + +![Katzen Figur](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +Die Katze sollte sich `wiederholt`{:class="block3control"} `um 2 Schritte nach oben`{:class="block3motion"} bewegen `bis`{:class="block3control"} sie `nicht`{:class="block3operators"} `Blau berührt`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Hier sind die Codeblöcke die du brauchst: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +So sollte dein Code aussehen: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Klicke auf die grüne Fahne und versuche eine Linie zu zeichnen, die nach oben ansteigt. Überprüfe, ob deine Katze dieser Linie folgt. + +\--- /task \--- \ No newline at end of file diff --git a/de-DE/step_6.md b/de-DE/step_6.md new file mode 100644 index 0000000..e579ecd --- /dev/null +++ b/de-DE/step_6.md @@ -0,0 +1,89 @@ +## In Sicherheit bringen + +Ziel des Spiels ist es, die Katzen in Sicherheit zu bringen, indem ein Pfad erstellt wird, über den sie die Tür erreichen können. Erstelle eine Punktevariable, um den Überblick zu behalten, wie viele Katzen die Tür erreichen. + +\--- task \--- + +Erstelle eine neue Variable namens `Punktzahl`{:class='block3variable'}. + +![Katzen Figur](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Füge deiner Katzen-Figur einen Code hinzu, um jedesmal `1` zur `Punktzahl`{:class="block3variables"} hinzuzufügen, wenn eine Katze die Tür erreicht. Setze außerdem die `Punktzahl`{:class="block3variables"} beim Start des Spiels auf `0` `wenn die grüne Flagge angeklickt wird`{:class="block3events"}. + +![Katzen Figur](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`Falls`{:class="block3control"} die Katze `die Tür berührt`{:class="block3sensing"}, dann `füge 1 zur Punktzahl hinzu`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Hier sind die neuen Code-Blöcke, die du zu deinem `wenn ich als Klon entstehe`-Skript, hinzu fügen musst: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +So sollte dein Code aussehen: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Füge noch etwas mehr Code hinzu, sodass eine Katze ein "Miau" Klang spielt und verschwindet, wenn sie die Tür erreicht. + +![Katzen Figur](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/de-DE/step_7.md b/de-DE/step_7.md new file mode 100644 index 0000000..4e0bf8f --- /dev/null +++ b/de-DE/step_7.md @@ -0,0 +1,13 @@ +## Herausforderung: Mehr Hindernisse + +Im Moment ist das Spiel ziemlich einfach zu gewinnen. Kannst du dir Ideen vorstellen, die dein Spiel schwieriger machen? + ++ Füge weitere Hintergründe mit unterschiedlichen Plattformdesigns hinzu. + ++ Verschiebe die Position der Tür, je nachdem welcher Hintergrund angezeigt wird. + ++ Füge mehr Figuren als bewegliche Hindernisse hinzu. Vielleicht kanns du streunende Hunde oder drehende Dornen hinzufügen, die die Katzen umgehen müssen? + ++ Erlaube dem Spieler nur eine begrenzte Menge "Tinte" zu verwenden, um Linien im Spiel zu zeichnen. Du kannst den Überblick behalten, wie viel "Tinte" verwendet wird, indem du eine Timer-Variable erstellest, die aufzeichnet wie lange die Maus gedrückt wird. + ++ Erstelle eine Figur, um dem Spieler zu zeigen, wie viel Tinte noch übrig ist. \ No newline at end of file diff --git a/de-DE/step_8.md b/de-DE/step_8.md new file mode 100644 index 0000000..6a2b20e --- /dev/null +++ b/de-DE/step_8.md @@ -0,0 +1,19 @@ +## Was kommt als nächstes? + +Probiere das [Blumengenerator](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects)-Projekt aus, wo du benutzerdefinierte Blöcke verwenden wirst, um Blumenmuster zu erstellen. + +\--- no-print \--- + +Drücke `f`, um ein paar Blumen zu zeichnen oder `r`, um viele zufällige Blumen zu zeichnen oder `p`, um ein Blumenmuster zu zeichnen. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![zufällige Blumen](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/el-GR/images/banner.png b/el-GR/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/el-GR/images/banner.png differ diff --git a/el-GR/images/cat-sprite.png b/el-GR/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/el-GR/images/cat-sprite.png differ diff --git a/el-GR/images/cat-walk-through-platform.png b/el-GR/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/el-GR/images/cat-walk-through-platform.png differ diff --git a/el-GR/images/cats-finished.png b/el-GR/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/el-GR/images/cats-finished.png differ diff --git a/el-GR/images/door-sprite.png b/el-GR/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/el-GR/images/door-sprite.png differ diff --git a/el-GR/images/draw-a-line.png b/el-GR/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/el-GR/images/draw-a-line.png differ diff --git a/el-GR/images/falling-cats.png b/el-GR/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/el-GR/images/falling-cats.png differ diff --git a/el-GR/images/flailing-at-edge.png b/el-GR/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/el-GR/images/flailing-at-edge.png differ diff --git a/el-GR/images/flower-random.png b/el-GR/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/el-GR/images/flower-random.png differ diff --git a/el-GR/images/pen-sprite.png b/el-GR/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/el-GR/images/pen-sprite.png differ diff --git a/el-GR/meta.yml b/el-GR/meta.yml new file mode 100644 index 0000000..c3f0bf2 --- /dev/null +++ b/el-GR/meta.yml @@ -0,0 +1,30 @@ +--- +title: ΓΑΤΕΣ! +hero_image: images/banner.png +description: Δημιούργησε ένα παιχνίδι στο οποίο καθοδηγείς τις γάτες στην ασφάλεια και μην τις αφήνεις να πέσουν σε τρύπες +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Εισαγωγή + - + title: Ζωγράφισε γραμμές + - + title: Κλωνοποίησε τις γάτες + completion: + - engaged + - + title: Κάνε τις γάτες να κινηθούν + - + title: Ακολούθησε τις γραμμές + - + title: Οδήγησέ τες στην ασφάλεια + completion: + - internal + - + title: 'Πρόκληση: περισσότερα εμπόδια' + challenge: true + - + title: Τι υπάρχει στη συνέχεια; diff --git a/el-GR/resources/cats-resources.sb3 b/el-GR/resources/cats-resources.sb3 new file mode 100644 index 0000000..9c63f32 Binary files /dev/null and b/el-GR/resources/cats-resources.sb3 differ diff --git a/el-GR/solutions/cats-solution.sb3 b/el-GR/solutions/cats-solution.sb3 new file mode 100644 index 0000000..4308021 Binary files /dev/null and b/el-GR/solutions/cats-solution.sb3 differ diff --git a/el-GR/step_1.md b/el-GR/step_1.md new file mode 100644 index 0000000..6f499d6 --- /dev/null +++ b/el-GR/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +Αυτή είναι η έκδοση **Scratch 3** του έργου. Υπάρχει επίσης η [έκδοση Scratch 2 του έργου](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Εισαγωγή + +Σε αυτό το έργο, θα δημιουργήσεις ένα παιχνίδι στο οποίο θα πρέπει να καθοδηγείς τις γάτες στην ασφάλεια και να μην αφήσεις καμία από αυτές να πέσει στις τρύπες! + +### Τι θα φτιάξεις + +\--- no-print \--- + +Κάνε κλικ και σύρε με το ποντίκι για να σχεδιάσεις μια γραμμή με το μολύβι. Ο στόχος σου είναι να μην αφήνεις τις γάτες να πέφτουν σε τρύπες δημιουργώντας μια ασφαλή διαδρομή προς την έξοδο. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Οι γάτες ολοκληρωμένες](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: Τι θα μάθεις + ++ Πώς να χρησιμοποιήσεις ένα βρόχο `για πάντα`{:class="block3control"} για να δημιουργείς συνεχώς κινούμενες γάτες ++ Πώς να χρησιμοποιήσεις ένα βρόχο `επανέλαβε έως`{:class="block3control"} για να διασφαλίσεις ότι οι γάτες σου ακολουθούν μια γραμμή + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Τι θα χρειαστείς + +### Υλικό (Hardware) + ++ Ένας υπολογιστής ικανός να τρέχει το Scratch 3 + +### Λογισμικό + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### Λήψεις + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Πρόσθετες σημειώσεις για εκπαιδευτικούς + +\--- no-print \--- + +Αν χρειαστεί να εκτυπώσεις αυτό το έργο, παρακαλούμε να χρησιμοποιήσεις την [εκτυπώσιμη](https://projects.raspberrypi.org/en/projects/cats/print) έκδοση. \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/el-GR/step_2.md b/el-GR/step_2.md new file mode 100644 index 0000000..68f2558 --- /dev/null +++ b/el-GR/step_2.md @@ -0,0 +1,140 @@ +## Ζωγράφισε γραμμές + +\--- task \--- + +Άνοιξε το έργο Scratch "ΓΑΤΕΣ!". + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +Αν έχεις λογαριασμό Scratch μπορείς να δημιουργήσεις ένα αντίγραφο κάνοντας κλικ στο **Ανάμειξη**. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Πρόσθεσε την επέκταση πένας στο έργο σου. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Κάνε κλικ στο αντικείμενο που ονομάζεται 'Pen' και πρόσθεσε τον κώδικα για να ρυθμίσεις το χρώμα του στυλό στο ίδιο μπλε με τα εμπόδια στη σκηνή. + +![Αντικείμενο στυλό](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +Για να επιλέξεις ένα χρώμα, κάνε κλικ στο τετράγωνο χρώματος στο μπλοκ `επέλεξε χρώμα στυλό`{:class="block3extensions"} για να κάνεις τον δείκτη του ποντικιού σου να μοιάζει με σταγονόμετρο, και στη συνέχεια κάνε κλικ στο σωστό χρώμα στη σκηνή. + +\--- /task \--- + +\--- task \--- + +Πρόσθεσε κάποιο άλλο κωδικό για να κάνεις το αντικείμενο να ακολουθεί τον δείκτη του ποντικιού. Δοκίμασε το πρόγραμμά σου για να ελέγξεις ότι ο κώδικας λειτουργεί. + +![Αντικείμενο στυλό](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Πρόσθεσε κώδικα για να πεις στο αντικείμενο να σχεδιάσει μια γραμμή στη σκηνή αν πατηθεί το κουμπί του ποντικιού. + +![Αντικείμενο στυλό](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`Αν`{:class="block3control"} το `ποντίκι είναι κάτω`{:class="block3sensing"}, τοποθέτησε το `στυλό κάτω`{:class="block3extensions"}, και `αλλιώς`{:class="block3control"}, σήκωσε το `στυλό πάνω`{:class=" block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Εδώ είναι τα μπλοκ κώδικα που χρειάζεσαι: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +Έτσι πρέπει να μοιάζει ο κώδικας: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Δοκίμασε τον κώδικά σου. Θα πρέπει να μπορείτε να κάνεις κλικ και να σύρεις με το ποντίκι για να σχεδιάσεις μια μπλε γραμμή στη σκηνή. + +![Ζωγράφισε μια γραμμή](images/draw-a-line.png) + +\--- /task \--- + +Πιθανότατα να δεις ότι μια μπλε κουκκίδα εμφανίζεται πάντα στην πάνω δεξιά γωνία της σκηνής (είναι κυκλωμένη στην εικόνα παραπάνω). Αυτό συμβαίνει επειδή, όταν κάνεις κλικ στην πράσινη σημαία για να ξεκινήσεις το παιχνίδι, πατάς το ποντίκι κάτω και έτσι το στυλό αρχίζει αμέσως να σχεδιάζει. + +\--- task \--- + +Για να μην αφήσεις να συμβεί αυτό, πρόσθεσε ένα μπλοκ `πένα πάνω`{:class="block3extensions"} κατά την έναρξη του σεναρίου, και ένα μπλοκ `περίμενε ένα δευτερόλεπτο`{:class="block3control"} πάνω από το μπλοκ `για πάντα`{:class="block3control"}. + +![Αντικείμενο στυλό](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/el-GR/step_3.md b/el-GR/step_3.md new file mode 100644 index 0000000..77cb58f --- /dev/null +++ b/el-GR/step_3.md @@ -0,0 +1,73 @@ +## Κλωνοποίησε τις γάτες + +Θέλεις μία ασταμάτητη ροή από γάτες που ο παίκτης πρέπει να καθοδηγήσει κατά μήκος του μονοπατιού προς την έξοδο. + +\--- task \--- + +Κάνε κλικ στο αντικείμενο που ονομάζεται 'γάτα', και πρόσθεσε λίγο κώδικα για `απόκρυψη`{:class="block3looks"} του αντικειμένου, αλλά και για `κλωνοποίηση`{:class="block3control"} κάθε τρία δευτερόλεπτα. + +![Αντικείμενο γάτας](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +Αν εκτελέσεις το πρόγραμμα τώρα, τίποτα δεν συμβαίνει στη σκηνή. Για να ελέγξεις ότι ένας νέος κλώνος αντικειμένου γάτας δημιουργείται κάθε τρία δευτερόλεπτα, κάνε κάθε κλώνο να εμφανίζεται και να πέφτει από τον ουρανό. + +\--- task \--- + +Πρόσθεσε κώδικα για να πεις στο αντικείμενο ότι `όταν αρχίζει ως ένας κλώνος`{:class="block3control"}, θα πρέπει να `εμφανιστεί`{:class="block3looks"} και να πέσει μέχρι να `αγγίξει`{:class="block3sensing"} το μπλε πάτωμα που είναι σχεδιασμένο στη σκηνή. + +![Αντικείμενο γάτας](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`Όταν το αντικείμενο ξεκινάει ως κλώνος`{:class="block3control"}, `εμφάνισε`{:class="block3looks"} το αντικείμενο. `Επανειλημμένα`{:class="block3control"} `Άλλαξε`{:class="block3motion"} την`y` συντεταγμένη του αντικειμένου κατά `-2`, μέχρι το αντικείμενο να `αγγίξει`{:class="block3sensing"} το μπλε δάπεδο. + +\--- /hint \--- + +\--- hint \--- + +Εδώ είναι τα μπλοκ κώδικα που χρειάζεσαι: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +Έτσι πρέπει να μοιάζει ο κώδικας: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +Όταν κάνεις κλικ στην πράσινη σημαία, θα πρέπει να δεις μια νέα γάτα να πέφτει από την κορυφή της σκηνής κάθε τρία δευτερόλεπτα. Κάθε γάτα θα προσγειωθεί σε ένα μεγάλο σωρό από γάτες στο μπλε δάπεδο στο κάτω μέρος. + +![Γάτες που πέφτουν](images/falling-cats.png) \ No newline at end of file diff --git a/el-GR/step_4.md b/el-GR/step_4.md new file mode 100644 index 0000000..08901a9 --- /dev/null +++ b/el-GR/step_4.md @@ -0,0 +1,115 @@ +## Κάνε τις γάτες να κινηθούν + +Μόλις μια γάτα φτάσει στο πάτωμα, θα πρέπει να περπατήσει αργά προς τα δεξιά. + +\--- task \--- + +Πρόσθεσε τον κώδικα στο τμήμα `κατά την εκκίνηση ως κλώνος`{:class="block3control"} για να κάνεις το αντικείμενο της γάτας `να κινηθεί δέκα βήματα`{:class="block3motion"} και να εναλλάσσεις ανάμεσα στις δύο ενδυμασίες του αντικειμένου κάθε 0,1 δευτερόλεπτα ώστε να κάνει τη γάτα να μοιάζει σαν να περπατάει. + +![Αντικείμενο γάτας](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +Το αντικείμενο της γάτας θα πρέπει να `κινείται 10 βήματα`{:class="block3motion"}, και να `αλλάζει ενδυμασία`{:class="block3looks"} κάθε `0,1 δευτερόλεπτα`{:class="block3control"}. Αυτός ο κώδικας θα πρέπει να επαναλαμβάνεται `για πάντα`{:class="block3control"}, ακριβώς όπως και ο κώδικας που κάνει τη γάτα να πέφτει. + +\--- /hint \--- + +\--- hint \--- + +Εδώ είναι τα μπλοκ κώδικα που χρειάζεσαι: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +Έτσι πρέπει να μοιάζει ο κώδικας: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Πάτησε την πράσινη σημαία και έλεγξε ότι οι γάτες κινούνται τώρα κατά μήκος της μπλε πλατφόρμας στο κάτω μέρος. + +\--- /task \--- + +Εάν σχεδιάσεις μια γέφυρα στο κενό, έτσι ώστε οι γάτες να μπορούν να φτάσουν μέχρι τη δεξιά πλευρά της σκηνής, μπορείς να δεις ότι καταλήγουν να κολλήσουν ενώ περπατάνε προς τον δεξί τοίχο. + +![Γάτες που έχουν συγκεντρωθεί στην άκρη](images/flailing-at-edge.png) + +\--- task \--- + +Αφαίρεσε το βρόχο `για πάντα`{:class="block3control"} και πρόσθεσε ένα διαφορετικό βρόχο για να κάνεις τις γάτες να περπατούν μόνο μέχρι να φτάσουν σε μια άκρη. Όταν μια γάτα φτάσει στην άκρη της σκηνής, θα εξαφανιστεί. + +![Αντικείμενο γάτας](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Πάτησε την πράσινη σημαία και έλεγξε ότι οι γάτες εξαφανίζονται όταν φτάσουν στην άκρη της σκηνής. + +\--- /task \--- + +Μπορεί να παρατηρήσεις ότι, αν οι γάτες πέσουν στην τρύπα, δεν εξαφανίζονται αλλά αντίθετα μαζεύονται στο κάτω μέρος. Αυτό συμβαίνει επειδή συνεχίζουν να προσπαθούν να πέσουν προς τα κάτω. + +Αυτό είναι το μέρος του κώδικα που λέει στη γάτα να συνεχίζει να πέφτει μέχρι να αγγίξει μπλε: + +```blocks3 +repeat until +end +``` + +Ωστόσο, στην τρύπα, η γάτα δεν μπορεί ποτέ να φτάσει σε μπλε χρώμα, οπότε κολλάει για πάντα. + +\--- task \--- + +Πρόσθεσε περισσότερα μπλοκ σε αυτόν τον βρόχο, έτσι ώστε να επαναλαμβάνεται έως ότου αγγίξει το μπλε χρώμα `ή`{:class="block3operators"} `να αγγίξει την άκρη`{:class="block3sensing"}. Με αυτόν τον τρόπο, το αντικείμενο σταματά να προσπαθεί να πέσει αν φτάσει στην άκρη της σκηνής. + +![Αντικείμενο γάτας](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/el-GR/step_5.md b/el-GR/step_5.md new file mode 100644 index 0000000..615444c --- /dev/null +++ b/el-GR/step_5.md @@ -0,0 +1,65 @@ +## Ακολούθησε τις γραμμές + +Ίσως παρατηρήσεις ότι, αν σχεδιάσεις μια χαμηλή γέφυρα ανάμεσα στις δύο πλατφόρμες ή μια γραμμή που κλίνει προς τα πάνω, οι γάτες καταλήγουν να βαδίζουν στην πλατφόρμα και όχι πάνω από αυτές! + +![Οι γάτες που περπατούν μέσω της πλατφόρμας](images/cat-walk-through-platform.png) + +\--- task \--- + +Στον κώδικα για το αντικείμενο γάτας, πρόσθεσε άλλον ένα βρόχο πριν από το μπλοκ `επόμενη ενδυμασία`{:class="block3looks"}. Αυτή τη φορά, ο βρόχος θα πει στη γάτα να κινηθεί προς τα πάνω κατά `2` έως ότου δεν αγγίζει το μπλε. + +![Αντικείμενο γάτας](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +Η γάτα θα πρέπει να `κινηθεί προς τα πάνω κατά 2`{:class="block3motion"} `επανειλημμένα μέχρι`{:class="block3control"} να `μην`{:class="block3operators"} `αγγίζει μπλε`{:class="block3sensing "}. + +\--- /hint \--- + +\--- hint \--- + +Εδώ είναι τα μπλοκ κώδικα που χρειάζεσαι: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +Έτσι πρέπει να μοιάζει ο κώδικας: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Κάνε κλικ στην πράσινη σημαία και δοκίμασε να σχεδιάσεις μια γραμμή που να κλίνει προς τα πάνω. Έλεγξε ότι η γάτα σου ακολουθεί αυτή τη γραμμή. + +\--- /task \--- \ No newline at end of file diff --git a/el-GR/step_6.md b/el-GR/step_6.md new file mode 100644 index 0000000..8bc1fda --- /dev/null +++ b/el-GR/step_6.md @@ -0,0 +1,89 @@ +## Οδήγησέ τους στην ασφάλεια + +Το αντικείμενο του παιχνιδιού είναι να καθοδηγήσεις τις γάτες στην ασφάλεια δημιουργώντας ένα μονοπάτι ώστε να φτάσουν στην πόρτα. Δημιούργησε μια μεταβλητή βαθμολογίας για να παρακολουθείς πόσες γάτες φτάνουν στην πόρτα. + +\--- task \--- + +Δημιούργησε μια μεταβλητή με το όνομα `βαθμολογία`{:class="block3variables"}. + +![Αντικείμενο γάτας](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Πρόσθεσε κώδικα στο αντικείμενο της γάτας σου για να προσθέσεις `1` στη `βαθμολογία`{:class="block3variables"} κάθε φορά που μια γάτα φτάνει στην πόρτα. Επίσης, όρισε τη `βαθμολογία`{:class="block3variables"} στην τιμή `0` `όταν πατηθεί η σημαία`{:class="block3events"} στην αρχή του παιχνιδιού. + +![Αντικείμενο γάτας](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`Αν`{:class="block3control"} η γάτα `αγγίξει το αντικείμενο της πόρτας`{:class="block3sensing"}, τότε `πρόσθεσε 1 στη βαθμολογία`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Εδώ είναι τα νέα μπλοκ κώδικα που πρέπει να προσθέσεις στο μέρος του προγράμματος `όταν ξεκινώ ως κλώνος`: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +Έτσι πρέπει να μοιάζει ο κώδικας: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Πρόσθεσε κι άλλο κώδικα έτσι ώστε, όταν ένα αντικείμενο γάτας φτάσει στην πόρτα, η γάτα κάνει έναν ήχο «νιάου» και στη συνέχεια εξαφανίζεται. + +![Αντικείμενο γάτας](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/el-GR/step_7.md b/el-GR/step_7.md new file mode 100644 index 0000000..1464914 --- /dev/null +++ b/el-GR/step_7.md @@ -0,0 +1,13 @@ +## Challenge: περισσότερα εμπόδια + +Προς το παρόν, το παιχνίδι είναι αρκετά εύκολο για να κερδίσει κάποιος. Μπορείς να σκεφτείς ιδέες για να κάνεις το παιχνίδι σου πιο δύσκολο; + ++ Πρόσθεσε περισσότερα φόντα με διαφορετικά σχέδια πλατφόρμας. + ++ Μετακίνησε τη θέση της πόρτας ανάλογα με το φόντο που εμφανίζεται. + ++ Πρόσθεσε περισσότερα αντικείμενα ως κινούμενα εμπόδια. Ίσως θα μπορούσες να έχεις περιπλανώμενους σκύλους ή περιστρεφόμενα καρφιά που οι γάτες πρέπει να αποφύγουν; + ++ Επέτρεψε στον παίκτη να χρησιμοποιεί μόνο μία περιορισμένη ποσότητα "μελανιού" για να ζωγραφίσει γραμμές στο παιχνίδι. Μπορείς να παρακολουθείς πόσο "μελάνι" χρησιμοποιείται με τη δημιουργία μιας μεταβλητής χρονοδιακόπτη που καταγράφει πόσο καιρό κρατείται το ποντίκι κάτω. + ++ Δημιούργησε ένα αντικείμενο για να δείχνεις στον παίκτη πόσο μελάνι έχει απομείνει. \ No newline at end of file diff --git a/el-GR/step_8.md b/el-GR/step_8.md new file mode 100644 index 0000000..d3ed5d1 --- /dev/null +++ b/el-GR/step_8.md @@ -0,0 +1,19 @@ +## Και τώρα; + +Δοκίμασε το έργο [γεννήτρια λουλουδιών](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects), όπου θα χρησιμοποιήσεις προσαρμοσμένα μπλοκ για να δημιουργήσεις μοτίβα λουλουδιών. + +\--- no-print \--- + +Πάτησε `f` για να ζωγραφίσεις μερικά λουλούδια ή `r` για να ζωγραφίσεις πολλά τυχαία λουλούδια ή `p` για να ζωγραφίσεις ένα μοτίβο λουλουδιών. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![τυχαία λουλούδια](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/en-US/images/banner.png b/en-US/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/en-US/images/banner.png differ diff --git a/en-US/images/cat-sprite.png b/en-US/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/en-US/images/cat-sprite.png differ diff --git a/en-US/images/cat-walk-through-platform.png b/en-US/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/en-US/images/cat-walk-through-platform.png differ diff --git a/en-US/images/cats-finished.png b/en-US/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/en-US/images/cats-finished.png differ diff --git a/en-US/images/door-sprite.png b/en-US/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/en-US/images/door-sprite.png differ diff --git a/en-US/images/draw-a-line.png b/en-US/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/en-US/images/draw-a-line.png differ diff --git a/en-US/images/falling-cats.png b/en-US/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/en-US/images/falling-cats.png differ diff --git a/en-US/images/flailing-at-edge.png b/en-US/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/en-US/images/flailing-at-edge.png differ diff --git a/en-US/images/flower-random.png b/en-US/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/en-US/images/flower-random.png differ diff --git a/en-US/images/pen-sprite.png b/en-US/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/en-US/images/pen-sprite.png differ diff --git a/en-US/meta.yml b/en-US/meta.yml new file mode 100644 index 0000000..c1c0ecc --- /dev/null +++ b/en-US/meta.yml @@ -0,0 +1,30 @@ +--- +title: CATS! +hero_image: images/banner.png +description: Create a game in which you guide cats to safety and stop them from falling into holes +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Introduction + - + title: Draw lines + - + title: Clone cats + completion: + - engaged + - + title: Make the cats move + - + title: Stick to the lines + - + title: Get to safety + completion: + - internal + - + title: 'Challenge: more obstacles' + challenge: true + - + title: What next? diff --git a/en-US/resources/cats-resources.sb3 b/en-US/resources/cats-resources.sb3 new file mode 100644 index 0000000..d952bff Binary files /dev/null and b/en-US/resources/cats-resources.sb3 differ diff --git a/en-US/solutions/cats-solution.sb3 b/en-US/solutions/cats-solution.sb3 new file mode 100644 index 0000000..a2dc7c8 Binary files /dev/null and b/en-US/solutions/cats-solution.sb3 differ diff --git a/en-US/step_1.md b/en-US/step_1.md new file mode 100644 index 0000000..838986d --- /dev/null +++ b/en-US/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +This is the **Scratch 3** version of the project. There is also a [Scratch 2 version of the project](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Introduction + +In this project, you will create a game in which you need to guide cats to safety and not let any of them fall through the gaps! + +### What you will make + +\--- no-print \--- + +Click and drag with the mouse to draw a line with the pencil. Your goal is to stop the cats from falling into holes by creating a safe path to the exit. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Cats finished](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: What you will learn + ++ How to use a `forever`{:class="block3control"} loop to constantly generate moving cats ++ How to use a `repeat until`{:class="block3control"} loop to ensure your cats follow a line + +\--- /collapse \--- + +## \--- collapse \--- + +## title: What you will need + +### Hardware + ++ A computer capable of running Scratch 3 + +### Software + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### Downloads + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Additional notes for educators + +\--- no-print \--- + +If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/en-US/step_2.md b/en-US/step_2.md new file mode 100644 index 0000000..264770c --- /dev/null +++ b/en-US/step_2.md @@ -0,0 +1,140 @@ +## Draw lines + +\--- task \--- + +Open the 'CATS!' Scratch starter project. + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +If you have a Scratch account you can make a copy by clicking **Remix**. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Add the Pen extension to your project. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Click on the sprite called 'Pen', and add code to set the pen colour to the same blue as the obstacles on the Stage. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +To select a colour, click on the colour square in the `set pen color`{:class="block3extensions"} block to make your mouse cursor turn into a pipette, and then click on the correct colour on the Stage. + +\--- /task \--- + +\--- task \--- + +Add some more code to make the sprite follow the mouse pointer. Test your program to check that the code works. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Add some code to tell the sprite to draw a line on the Stage if the mouse button is pressed down. + +![Pen sprite](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the `mouse is down`{:class="block3sensing"}, put the `pen down`{:class="block3extensions"}, and `else`{:class="block3control"}, lift the `pen up`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Test your code. You should be able to click and drag with the mouse to draw a blue line on the Stage. + +![Draw a line](images/draw-a-line.png) + +\--- /task \--- + +You probably see that a blue dot always appears in the top right-hand corner of the Stage (it's circled in the image above). This is because, when you click the green flag to start the game, you press the mouse down, and so the pen immediately starts drawing. + +\--- task \--- + +To stop this from happening, add a `pen up`{:class="block3extensions"} block at the start of the script, and a `wait one second`{:class="block3control"} block above the `forever`{:class="block3control"} block. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/en-US/step_3.md b/en-US/step_3.md new file mode 100644 index 0000000..d5f8d46 --- /dev/null +++ b/en-US/step_3.md @@ -0,0 +1,73 @@ +## Clone cats + +You want a never-ending stream of cats that the player has to guide along the path to the exit. + +\--- task \--- + +Click on the sprite called 'Cat', and add some code to `hide`{:class="block3looks"} the sprite, and also to `clone`{:class="block3control"} it every three seconds. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +If you run the program now, nothing happens on the Stage. To check that a new Cat sprite clone is created every three seconds, make each clone appear and fall out of the sky. + +\--- task \--- + +Add code to tell the sprite that `when it starts as a clone`{:class="block3control"}, it should `show`{:class="block3looks"} itself and fall until it `touches`{:class="block3sensing"} the blue floor that is drawn on the Stage. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`When the sprite starts as a clone`{:class="block3control"}, `show`{:class="block3looks"} the sprite. `Repeatedly`{:class="block3control"} `Change`{:class="block3motion"} the sprite's `y` coordinate by `-2`, until the sprite `touches`{:class="block3sensing"} the blue Stage. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +When you click the green flag, you should see a new cat fall from the top of the Stage every three seconds. Every cat should land in a big pile of overlapping cats on the blue floor at the bottom. + +![Falling cats](images/falling-cats.png) \ No newline at end of file diff --git a/en-US/step_4.md b/en-US/step_4.md new file mode 100644 index 0000000..8c10235 --- /dev/null +++ b/en-US/step_4.md @@ -0,0 +1,115 @@ +## Make the cats move + +Once a cat reaches the floor, it should step slowly to the right. + +\--- task \--- + +Add code to the `when I start as a clone`{:class="block3control"} section to make the cat sprite `move ten steps`{:class="block3motion"}, and switch between the sprite's two costumes every 0.1 seconds to make the cat look like it's walking. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat sprite should `move 10 steps`{:class="block3motion"}, and `switch costume`{:class="block3looks"} every `0.1 seconds`{:class="block3control"}. This code should repeat `forever`{:class="block3control"}, just like the code to make the cat fall. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats now move along the blue platform at the bottom. + +\--- /task \--- + +If you draw a bridge across the gap so that the cats can get all the way to the right side of the Stage, you can see that they end up getting stuck walking into the right wall. + +![Flailing cats at the edge](images/flailing-at-edge.png) + +\--- task \--- + +Remove the `forever`{:class="block3control"} loop, and instead add a different loop to make the cats only walk until they reach an edge. When a cat reaches the edge of the Stage, it should disappear. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats disappear when they reach the edge of the Stage. + +\--- /task \--- + +You may notice that, if the cats fall into the hole, they don't disappear but instead get stuck at the bottom. This is because they keep trying to fall downwards. + +This is the part of the code that tells the cat to keep falling until it touches blue: + +```blocks3 +repeat until +end +``` + +However, in the hole, the cat can never reach blue, so it is stuck forever. + +\--- task \--- + +Add more blocks to this loop so that it repeats until the cat sprite is touching blue `or`{:class="block3operators"} `touching the edge`{:class="block3sensing"}. This way, the sprite stops trying to fall if it reaches the edge of the Stage. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/en-US/step_5.md b/en-US/step_5.md new file mode 100644 index 0000000..ff776e8 --- /dev/null +++ b/en-US/step_5.md @@ -0,0 +1,65 @@ +## Stick to the lines + +You might notice that, if you draw a low bridge between the two platforms, or a line that slopes upwards, the cats end up walking through the platform rather than on top of it! + +![Cats walking through the platform](images/cat-walk-through-platform.png) + +\--- task \--- + +In the code for the cat sprite, add another loop before the `next costume`{:class="block3looks"} block. This time, the loop should tell the cat to move upwards by `2` until it is not touching blue. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat should `move up 2`{:class="block3motion"} `repeatedly until`{:class="block3control"} it is `not`{:class="block3operators"} `touching blue`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Click the green flag and try drawing a line that slopes upwards. Check that your cat follows this line. + +\--- /task \--- \ No newline at end of file diff --git a/en-US/step_6.md b/en-US/step_6.md new file mode 100644 index 0000000..deb146e --- /dev/null +++ b/en-US/step_6.md @@ -0,0 +1,89 @@ +## Get to safety + +The object of the game is to guide the cats to safety by creating a path so they can reach the door. Create a score variable to keep track of how many cats reach the door. + +\--- task \--- + +Create a variable called `score`{:class="block3variables"}. + +![Cat sprite](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Add code to your cat sprite to add `1` to the `score`{:class="block3variables"} each time a cat reaches the door. Also set `score`{:class="block3variables"} to `0` `when the flag is clicked`{:class="block3events"} at the start of the game. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the cat is `touching the door sprite`{:class="block3sensing"}, then `add 1 to the score`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the new code blocks you need to add to your `when I start as a clone` script: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Add some more code so that, when a cat sprite reaches the door, the cat makes a 'meow' sound and then disappears. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/en-US/step_7.md b/en-US/step_7.md new file mode 100644 index 0000000..6e609ac --- /dev/null +++ b/en-US/step_7.md @@ -0,0 +1,13 @@ +## Challenge: more obstacles + +At the moment, the game is rather easy to win. Can you think of ideas to you make your game harder? + ++ Add more backgrounds with different platform designs. + ++ Move the location of the door depending on which background is displayed. + ++ Add more sprites as moving obstacles. Perhaps you could have roaming dogs or rotating spikes the cats need to avoid? + ++ Only allow the player to use a limited amount of "ink" to draw lines in the game. You can keep track of how much "ink" is used by creating a timer variable that records how long the mouse is held down. + ++ Create a sprite to show the player how much ink is left. \ No newline at end of file diff --git a/en-US/step_8.md b/en-US/step_8.md new file mode 100644 index 0000000..2295a72 --- /dev/null +++ b/en-US/step_8.md @@ -0,0 +1,19 @@ +## What next? + +Try the [Flower generator](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects) project, where you will use custom blocks to create flower patterns. + +\--- no-print \--- + +Press `f` to draw a few flowers, or `r` to draw lots of random flowers, or `p` to draw a flower pattern. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![random flowers](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/es-ES/images/banner.png b/es-ES/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/es-ES/images/banner.png differ diff --git a/es-ES/images/cat-sprite.png b/es-ES/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/es-ES/images/cat-sprite.png differ diff --git a/es-ES/images/cat-walk-through-platform.png b/es-ES/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/es-ES/images/cat-walk-through-platform.png differ diff --git a/es-ES/images/cats-finished.png b/es-ES/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/es-ES/images/cats-finished.png differ diff --git a/es-ES/images/door-sprite.png b/es-ES/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/es-ES/images/door-sprite.png differ diff --git a/es-ES/images/draw-a-line.png b/es-ES/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/es-ES/images/draw-a-line.png differ diff --git a/es-ES/images/falling-cats.png b/es-ES/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/es-ES/images/falling-cats.png differ diff --git a/es-ES/images/flailing-at-edge.png b/es-ES/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/es-ES/images/flailing-at-edge.png differ diff --git a/es-ES/images/flower-random.png b/es-ES/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/es-ES/images/flower-random.png differ diff --git a/es-ES/images/pen-sprite.png b/es-ES/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/es-ES/images/pen-sprite.png differ diff --git a/es-ES/meta.yml b/es-ES/meta.yml new file mode 100644 index 0000000..6d4e78f --- /dev/null +++ b/es-ES/meta.yml @@ -0,0 +1,30 @@ +--- +title: '¡GATOS!' +hero_image: images/banner.png +description: Crea un juego en el que guíes a los gatos a un lugar seguro y evites que caigan en los agujeros +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Introducción + - + title: Dibuja líneas + - + title: Clona gatos + completion: + - engaged + - + title: Haz que los gatos se muevan + - + title: Pegarse a las líneas + - + title: Llegar a un lugar seguro + completion: + - internal + - + title: 'Desafío: Más obstáculos' + challenge: true + - + title: '¿Qué hacer a continuación?' diff --git a/es-ES/resources/cats-resources.sb3 b/es-ES/resources/cats-resources.sb3 new file mode 100644 index 0000000..3eb2c59 Binary files /dev/null and b/es-ES/resources/cats-resources.sb3 differ diff --git a/es-ES/solutions/cats-solution.sb3 b/es-ES/solutions/cats-solution.sb3 new file mode 100644 index 0000000..cbbf61b Binary files /dev/null and b/es-ES/solutions/cats-solution.sb3 differ diff --git a/es-ES/step_1.md b/es-ES/step_1.md new file mode 100644 index 0000000..1767eac --- /dev/null +++ b/es-ES/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +Esta es una versión de **Scratch 3** del proyecto. También hay una [versión del proyecto en Scratch 2](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Introducción + +En este proyecto, crearás un juego en el que debes guiar a los gatos a un lugar seguro y ¡no dejar que ninguno de ellos caiga al vacío! + +### Lo que harás + +\--- no-print \--- + +Haz clic y arrastra el ratón para dibujar una línea con el lápiz. Tu objetivo es evitar que los gatos caigan en los agujeros creando un camino seguro hacia la salida. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Gatos terminados](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: Lo que vas a aprender + ++ Cómo usar un bucle `por siempre`{: class = "block3control"} para generar constantemente gatos en movimiento ++ Cómo usar un bucle `repetir hasta`{: class = "block3control"} para asegurar que tus gatos sigan una línea + +\--- /collapse \--- + +## \--- collapse \--- + +## título: Lo que vas a necesitar + +### Hardware + ++ Un ordenador capaz de ejecutar Scratch 3 + +### Software + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### Descargas + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## título: Información adicional para educadores + +\--- no-print \--- + +Si necesitas imprimir este proyecto, usa la [versión para imprimir](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/es-ES/step_2.md b/es-ES/step_2.md new file mode 100644 index 0000000..7fc3288 --- /dev/null +++ b/es-ES/step_2.md @@ -0,0 +1,141 @@ +## Dibuja líneas + +\--- task \--- + +Abre el proyecto de inicio de Scratch '¡GATOS!'. + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +Si tienes una cuenta de Scratch puedes hacer una copia haciendo clic en **Reinventar**. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Añade la extensión Lápiz a tu proyecto. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Haz clic en el objeto llamado 'Lápiz' y agrega el código para establecer el color del lápiz en el mismo azul que los obstáculos en el Escenario. + +![Objeto lápiz](images/pen-sprite.png) + +```blocks3 +al presionar la bandera verde +fijar el color del lápiz a [#0000ff] +borrar todo +fijar tamaño del lápiz a (5) +``` + +Para seleccionar un color, haz clic en el cuadrado de color en el bloque `fijar color de lápiz a`{: class = "block3extensions"} para hacer que el cursor del ratón se convierta en una pipeta, y luego haz clic en el color correcto en el Escenario. + +\--- /task \--- + +\--- task \--- + +Agrega un poco más de código para que el objeto siga al puntero del ratón. Prueba tu programa para verificar que el código funcione. + +![Objeto lápiz](images/pen-sprite.png) + +```blocks3 +por siempre +ir a (puntero del ratón v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Agrega algo de código para indicarle al objeto que dibuje una línea en el escenario si se presiona el botón del ratón. + +![Objeto lápiz](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`Si`{:class="block3control"} el `ratón está pulsado`{:class="block3sensing"}, pon el `lápiz abajo`{:class="block3extensions"}, y `sino`{:class="block3control"}, levanta el `lápiz hacia arriba`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Aquí están los bloques de código que necesitas: + +```blocks3 + + +bajar lápiz + +subir lápiz + +si <> entonces +si no +end +``` + +\--- /hint \--- + +\--- hint \--- + +Así es como debería verse tu código: + +```blocks3 +al presionar bandera verde +fijar color de lápiz a [#0000ff] +borrar todo +fijar tamaño de lápiz a (5) +por siempre +ir a (puntero del ratón v) +si entonces +bajar lápiz +si no +subir lápiz +end +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Prueba tu código. Deberías poder hacer clic y arrastrar con el ratón para dibujar una línea azul en el escenario. + +![Dibuja una línea](images/draw-a-line.png) + +\--- /task \--- + +Probablemente veas que siempre aparece un punto azul en la esquina superior derecha del Escenario (está encerrado en un círculo en la imagen de arriba). Esto se debe a que, cuando haces clic en la bandera verde para iniciar el juego, presionas el ratón y el bolígrafo comienza a dibujar inmediatamente. + +\--- task \--- + +Para evitar que esto suceda, agrega un bloque `subir lápiz`{: class = "block3extensions"} al comienzo del script, y un bloque `esperar (1) segundos`{: class = "block3control"} sobre el bloque `por siempre`{ : clase = "block3control"}. + +![Objeto lápiz](images/pen-sprite.png) + +```blocks3 +al presionar bandera verde ++ subir lápiz +fijar color de lápiz a [#0000ff] +borrar todo +fijar tamaño de lápiz a (5) ++ esperar (1) segundos +por siempre +ir a (puntero del ratón v) +si entonces +bajar lápiz +si no +subir lápiz +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/es-ES/step_3.md b/es-ES/step_3.md new file mode 100644 index 0000000..c64babd --- /dev/null +++ b/es-ES/step_3.md @@ -0,0 +1,73 @@ +## Clona gatos + +Tu quieres un flujo interminable de gatos que el jugador deba guiar a lo largo del camino hacia la salida. + +\--- task \--- + +Haz clic en el objeto llamado 'Gato' y agrega un código para `esconder`{:class="block3looks"} el objeto, y también para `clonar`{:class="block3control"} cada tres segundos. + +![Objeto Gato](images/cat-sprite.png) + +```blocks3 +al presionar bandera verde +esconder +por siempre + crear clon de (mí mismo v) + esperar (3) segundos +end +``` + +\--- /task \--- + +Si ejecutas el programa ahora, no sucede nada en el Escenario. Para verificar que se crea un nuevo clon del objeto Gato cada tres segundos, haz que cada clon aparezca y caiga del cielo. + +\--- task \--- + +Añade código para decirle al objeto que `cuando se inicie como un clon`{:class = "block3control"}, debe `mostrarse`{:class ="block3looks"} a sí mismo y caer hasta que `toque`{:class =" block3sensing "} el suelo azul que está dibujado en el Escenario. + +![Objeto Gato](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`Cuando el objeto Gato comience como un clon`{:class="block3control"}, `muestra`{:class="block3looks"} el objeto. `Repetidamente`{:class="block3control"} `Cambia`{:class="block3motion"} la coordenada `y` del objeto a `-2`, hasta que el objeto `toque`{:class="block3sensing"} el Escenario azul. + +\--- /hint \--- + +\--- hint \--- + +Aquí están los bloques de código que necesitas: + +```blocks3 +repetir hasta que <> +end + +mostrar + + + +cambia y a (-2) + +al comenzar como clon +``` + +\--- /hint \--- + +\--- hint \--- + +Así es como debería verse tu código: + +```blocks3 +al comenzar como clon +mostrar +repetir hasta que +sumar a y (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +Cuando hagas clic en la bandera verde, deberías ver un nuevo gato caer desde la parte superior del escenario cada tres segundos. Cada gato debe aterrizar en una gran pila de gatos superpuestos en el suelo azul de la parte inferior. + +![Gatos que caen](images/falling-cats.png) \ No newline at end of file diff --git a/es-ES/step_4.md b/es-ES/step_4.md new file mode 100644 index 0000000..f469e24 --- /dev/null +++ b/es-ES/step_4.md @@ -0,0 +1,115 @@ +## Haz que los gatos se muevan + +Una vez que un gato llega al suelo, debe avanzar lentamente hacia la derecha. + +\--- task \--- + +Agrega código a la sección `al comenzar como clon`{:class="block3control"} para hacer que el objeto Gato se `mueva diez pasos`{:class="block3motion"}, y cambie entre los dos disfraces del objeto cada 0.1 segundos para que parezca que el gato que está caminando. + +![Objeto Gato](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +El objeto Gato debe `moverse 10 pasos`{:class="block3motion"}, y `cambiar el disfraz `{:class="block3looks"} cada `0.1 segundos`{:class="block3control"}. Este código debe repetirse `por siempre`{:class="block3control"}, al igual que el código que hace que el gato caiga. + +\--- /hint \--- + +\--- hint \--- + +Aquí están los bloques de código que necesitas: + +```blocks3 +mover (10) pasos + +esperar (0.1) segundos + +siguiente disfraz + +por siempre +end +``` + +\--- /hint \--- + +\--- hint \--- + +Así es como debería verse tu código: + +```blocks3 +al comenzar como clon +mostrar ++ por siempre +mover (10) pasos +repetir hasta que +cambiar y a (-2) +end +siguiente disfraz +esperar (0.1) segundos +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Presiona la bandera verde y verifica que los gatos ahora se muevan a lo largo de la plataforma azul en la parte inferior. + +\--- /task \--- + +Si dibujas un puente a través del hueco para que los gatos puedan llegar hasta el lado derecho del Escenario, puedes ver que terminan clavados caminando a través de la pared derecha. + +![Gatos agitándose en el borde](images/flailing-at-edge.png) + +\--- task \--- + +Elimina el bucle `por siempre`{:class="block3control"} y, en su lugar, añade un bucle diferente para que los gatos sólo caminen hasta que lleguen al borde. Cuando un gato llega al borde del Escenario, debe desaparecer. + +![Objeto Gato](images/cat-sprite.png) + +```blocks3 +al comenzar como clon +mostrar ++ repetir hasta que +mover (10) pasos +repetir hasta que +cambiar y a (-2) +end +siguiente disfraz +esperar (0.1) segundos +end ++ eliminar este clon +``` + +\--- /task \--- + +\--- task \--- + +Presiona la bandera verde y verifica que los gatos desaparezcan cuando lleguen al borde del escenario. + +\--- /task \--- + +Date cuenta de que, si los gatos caen en el agujero, no desaparecen, sino que se quedan clavados en la parte inferior. Esto se debe a que siguen tratando de caerse. + +Esta es la parte del código que le dice al gato que siga cayendo hasta que toque el color azul: + +```blocks3 +repetir hasta que +end +``` + +Sin embargo, en el agujero, el gato nunca puede alcanzar el azul, por lo que está atrapado para siempre. + +\--- task \--- + +Agrega más bloques a este bucle para que se repita hasta que el objeto Gato toque el color azul `o`{:class="block3operators"} `toque el borde`{:class="block3sensing"}. De esta manera, el objeto deja de intentar caerse si llega al borde del Escenario. + +![Objeto Gato](images/cat-sprite.png) + +```blocks3 +repetir hasta que < o > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/es-ES/step_5.md b/es-ES/step_5.md new file mode 100644 index 0000000..4c307ab --- /dev/null +++ b/es-ES/step_5.md @@ -0,0 +1,65 @@ +## Pegarse a las líneas + +Te habrás dado cuenta que, si dibujas un puente más bajo entre las dos plataformas, o una línea que se inclina hacia arriba, ¡los gatos terminan caminando a través de la plataforma en lugar de por encima! + +![Gatos caminando por la plataforma](images/cat-walk-through-platform.png) + +\--- task \--- + +En el código para el objeto "Gato", añade otro bucle antes del bloque `siguiente disfraz`{:class="block3looks"}. Esta vez, el bucle debería indicarle al gato que se mueva hacia arriba por `2` hasta que no esté tocando el color azul. + +![Objeto Gato](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +El gato debería `moverse 2 hacia arriba`{:class="block3motion"} `repetir hasta que`{:class="block3control"} `no`{:class="block3operators"} `toque el color azul`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Aquí están los bloques de código que necesitas: + +```blocks3 + + +cambiar y a (2) + +repetir hasta que <> +end + +no <> +``` + +\--- /hint \--- + +\--- hint \--- + +Así es como debería verse tu código: + +```blocks3 +al comenzar como clon +mostrar +repetir hasta que +mover (10) pasos +repetir hasta que +cambiar y a (-2) +end +repetir hasta que > +cambiar y a (2) +end +siguiente disfraz +esperar (0.1) segundos +end +eliminar este clon +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Haz click en la bandera verde e intenta dibujar una línea que se incline hacia arriba. Comprueba que tu gato sigue esta línea. + +\--- /task \--- \ No newline at end of file diff --git a/es-ES/step_6.md b/es-ES/step_6.md new file mode 100644 index 0000000..6992437 --- /dev/null +++ b/es-ES/step_6.md @@ -0,0 +1,88 @@ +## Llegar a un lugar seguro + +El objetivo del juego es guiar a los gatos a un lugar seguro creando un camino para que puedan llegar a la puerta. Crea una variable de puntuación para registrar cuántos gatos llegan a la puerta. + +\--- task \--- + +Crea una nueva variable llamada `puntuación`{:class="block3variables"}. + +![Objeto Gato](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Añade código a tu objeto Gato para añadir `1` a la `puntuación`{:class="block3variables"} cada vez que un gato llegue a la puerta. También establece `puntuación`{:class="block3variables"} a `0`` cuando se haga click en la bandera`{:class="block3events"} al inicio de la partida. + +![Objeto Gato](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`Si`{:class="block3control"} el gato está `tocando el objeto Puerta`{:class="block3sensing"}, entonces `suma 1 a la puntuación`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Aquí están los nuevos bloques de código que necesitas agregar a tu programa de `al comenzar como clon`: + +```blocks3 +sumar a [puntuación v] (1) + +si <> entonces +end + + + +dar a [puntuación v] el valor (0) +``` + +\--- /hint \--- + +\--- hint \--- + +Así es como debería verse tu código: + +```blocks3 +al comenzar como clon +mostrar +repetir hasta que +mover (10) pasos +repetir hasta que +cambiar y a (-2) +end +repetir hasta que > +cambiar y a (2) +end +siguiente disfraz +esperar (0.1) segundos ++ si entonces +cambiar [puntuación v] por (1) +end +end +eliminar este clon + +al presionar bandera verde ++ dar a [puntuación v] el valor (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Añade un poco más de código para que, cuando el objeto Gato llegue a la puerta, haga un sonido 'meow', es decir, maulle, y luego desaparezca. + +![Objeto Gato](images/cat-sprite.png) + +```blocks3 +iniciar sonido (meow v) +eliminar este clon +``` + +\--- /task \--- \ No newline at end of file diff --git a/es-ES/step_7.md b/es-ES/step_7.md new file mode 100644 index 0000000..79539c9 --- /dev/null +++ b/es-ES/step_7.md @@ -0,0 +1,13 @@ +## Desafío: Más obstáculos + +De momento, el juego es demasiado fácil de ganar. ¿Puedes pensar en ideas para hacerlo más difícil? + ++ Agrega más fondos con diferentes diseños de plataformas. + ++ Mueve la ubicación de la puerta, dependiendo del fondo que se muestre. + ++ Agrega más objetos tales como obstáculos móviles. ¿Quizás podrías tener perros merodeando o púas giratorias que los gatos deben evitar? + ++ Sólo permite que el jugador use una cantidad limitada de "tinta" para dibujar líneas en el juego. Puedes hacer un seguimiento de la cantidad de "tinta" utilizada creando una variable temporizador, que registre cuánto tiempo se mantiene presionado el ratón. + ++ Crea un objeto para mostrarle al jugador cuánta tinta le queda. \ No newline at end of file diff --git a/es-ES/step_8.md b/es-ES/step_8.md new file mode 100644 index 0000000..fde596c --- /dev/null +++ b/es-ES/step_8.md @@ -0,0 +1,19 @@ +## ¿Qué hacer a continuación? + +Prueba el proyecto [generador de flores](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects), donde usarás bloques personalizados para crear tus propios patrones de flores. + +\--- no-print \--- + +Presiona `f` para dibujar algunas flores, o `r` para dibujar un montón de flores aleatorias, o `p` para dibujar un patrón de flores. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![flores aleatorias](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/es-LA/images/banner.png b/es-LA/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/es-LA/images/banner.png differ diff --git a/es-LA/images/cat-sprite.png b/es-LA/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/es-LA/images/cat-sprite.png differ diff --git a/es-LA/images/cat-walk-through-platform.png b/es-LA/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/es-LA/images/cat-walk-through-platform.png differ diff --git a/es-LA/images/cats-finished.png b/es-LA/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/es-LA/images/cats-finished.png differ diff --git a/es-LA/images/door-sprite.png b/es-LA/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/es-LA/images/door-sprite.png differ diff --git a/es-LA/images/draw-a-line.png b/es-LA/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/es-LA/images/draw-a-line.png differ diff --git a/es-LA/images/falling-cats.png b/es-LA/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/es-LA/images/falling-cats.png differ diff --git a/es-LA/images/flailing-at-edge.png b/es-LA/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/es-LA/images/flailing-at-edge.png differ diff --git a/es-LA/images/flower-random.png b/es-LA/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/es-LA/images/flower-random.png differ diff --git a/es-LA/images/pen-sprite.png b/es-LA/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/es-LA/images/pen-sprite.png differ diff --git a/es-LA/meta.yml b/es-LA/meta.yml new file mode 100644 index 0000000..744efe7 --- /dev/null +++ b/es-LA/meta.yml @@ -0,0 +1,30 @@ +--- +title: '¡GATOS!' +hero_image: images/banner.png +description: Crea un juego en el que guíes a los gatos a un lugar seguro y evites que caigan en los agujeros +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Introducción + - + title: Dibuja líneas + - + title: Clona gatos + completion: + - engaged + - + title: Haz que los gatos se muevan + - + title: Pegarse a las líneas + - + title: Llegar a un lugar seguro + completion: + - internal + - + title: 'Desafío: Más obstáculos' + challenge: true + - + title: '¿Qué sigue?' diff --git a/es-LA/resources/cats-resources.sb3 b/es-LA/resources/cats-resources.sb3 new file mode 100644 index 0000000..57404a6 Binary files /dev/null and b/es-LA/resources/cats-resources.sb3 differ diff --git a/es-LA/solutions/cats-solution.sb3 b/es-LA/solutions/cats-solution.sb3 new file mode 100644 index 0000000..a6af070 Binary files /dev/null and b/es-LA/solutions/cats-solution.sb3 differ diff --git a/es-LA/step_1.md b/es-LA/step_1.md new file mode 100644 index 0000000..14f293b --- /dev/null +++ b/es-LA/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +Esta es la versión **Scratch 3** del proyecto. También hay una [versión del proyecto en Scratch 2](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Introducción + +En este proyecto, crearás un juego en el que debes guiar a los gatos a un lugar seguro y ¡no dejar que ninguno de ellos caiga al vacío! + +### Lo que harás + +\--- no-print \--- + +Haz clic y arrastra el ratón para dibujar una línea con el lápiz. Tu objetivo es evitar que los gatos caigan en los agujeros creando un camino seguro hacia la salida. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Gatos terminados](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: Lo que vas a aprender + ++ Cómo usar un bucle `por siempre`{: class = "block3control"} para generar constantemente gatos en movimiento ++ Cómo usar un bucle `repetir hasta`{: class = "block3control"} para asegurar que tus gatos sigan una línea + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Lo que vas a necesitar + +### Equipo + ++ Una computadora capaz de correr Scratch 3 + +### Programa + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### Descargas + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## título: Notas adicionales para educadores + +\--- no-print \--- + +Si necesitas imprimir este proyecto, usa la [versión para imprimir](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/es-LA/step_2.md b/es-LA/step_2.md new file mode 100644 index 0000000..32dc21c --- /dev/null +++ b/es-LA/step_2.md @@ -0,0 +1,140 @@ +## Dibuja líneas + +\--- task \--- + +Abre el proyecto de inicio de Scratch '¡GATOS!'. + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +Si tienes una cuenta de Scratch, puedes hacer una copia haciendo clic en ** Remix **. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Añade la extensión Lápiz a tu proyecto. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Haz clic en el objeto llamado 'Lápiz' y agrega el código para establecer el color del lápiz en el mismo azul que los obstáculos en el Escenario. + +![Objeto lápiz](images/pen-sprite.png) + +```blocks3 +al presionar la bandera +fijar el color del lápiz a [#0000ff] +borrar todo +fijar tamaño del lápiz a (5) +``` + +Para seleccionar un color, haz clic en el cuadro de color del bloque `fijar color del lápiz`{:class="block3extensions"} para hacer que el cursor del ratón se convierta en una pipeta, y luego haz clic en el color correcto en el escenario. + +\--- /task \--- + +\--- task \--- + +Añade un poco más de código para hacer que el objeto siga el puntero del ratón. Prueba tu programa para verificar que el código funcione. + +![Objeto lápiz](images/pen-sprite.png) + +```blocks3 +por siempre +ir a (puntero del ratón v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Agrega algo de código para indicarle al objeto que dibuje una línea en el escenario si se presiona el botón del ratón. + +![Objeto lápiz](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`Si`{:class="block3control"} el `ratón está pulsado`{:class="block3sensing"}, pon el `lápiz abajo`{:class="block3extensions"}, y `si no`{:class="block3control"}, levanta el `lápiz`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Aquí están los bloques de código que necesitas: + +```blocks3 + + +bajar lápiz + +subir lápiz + +si <> entonces +si no +end +``` + +\--- /hint \--- + +\--- hint \--- + +Así es como debería verse tu código: + +```blocks3 +al presionar bandera +fijar color de lápiz a [#0000ff] +borrar todo +fijar tamaño de lápiz a (5) +por siempre +ir a (puntero del ratón v) +si entonces +bajar lápiz +si no +subir lápiz +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Prueba tu código. Deberías poder hacer clic y arrastrar con el ratón para dibujar una línea azul en el escenario. + +![Dibuja una línea](images/draw-a-line.png) + +\--- /task \--- + +Probablemente veas que siempre aparece un punto azul en la esquina superior derecha del Escenario (está encerrado en un círculo en la imagen de arriba). Esto se debe a que, cuando haces clic en la bandera verde para iniciar el juego, presionas el ratón y el bolígrafo comienza a dibujar inmediatamente. + +\--- task \--- + +Para evitar que esto suceda, agrega un bloque `subir lápiz`{:class = "block3extensions"} al comienzo del script, y un bloque `esperar un segundo`{: class = "block3control"} sobre el bloque `por siempre`{: clase = "block3control"}. + +![Objeto lápiz](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/es-LA/step_3.md b/es-LA/step_3.md new file mode 100644 index 0000000..2381a19 --- /dev/null +++ b/es-LA/step_3.md @@ -0,0 +1,73 @@ +## Clona gatos + +Tu quieres un flujo interminable de gatos que el jugador deba guiar a lo largo del camino hacia la salida. + +\--- task \--- + +Haz clic en el objeto llamado 'Gato' y agrega un código para `esconder`{:class="block3looks"} el objeto, y también para `clonar`{:class="block3control"} cada tres segundos. + +![Objeto Gato](images/cat-sprite.png) + +```blocks3 +al presionar bandera +esconder +por siempre +crear clon de (mí mismo v) +esperar (3) segundos +end +``` + +\--- /task \--- + +Si ejecutas el programa ahora, no sucede nada en el Escenario. Para verificar que se crea un nuevo clon del objeto Gato cada tres segundos, haz que cada clon aparezca y caiga del cielo. + +\--- task \--- + +Añade código para decirle al objeto que `cuando se inicie como un clon`{:class = "block3control"}, debe `mostrarse`{:class ="block3looks"} a sí mismo y caer hasta que `toque`{:class =" block3sensing "} el suelo azul que está dibujado en el Escenario. + +![Objeto Gato](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`Cuando el objeto Gato comience como un clon`{:class="block3control"}, `muestra`{:class="block3looks"} el objeto. `Repetidamente`{:class="block3control"} `Cambia`{:class="block3motion"} la coordenada `y` del objeto a `-2`, hasta que el objeto `toque`{:class="block3sensing"} el Escenario azul. + +\--- /hint \--- + +\--- hint \--- + +Aquí están los bloques de código que necesitas: + +```blocks3 +repetir hasta que <> +end + +mostrar + + + +cambia y a (-2) + +al comenzar como clon +``` + +\--- /hint \--- + +\--- hint \--- + +Así es como debería verse tu código: + +```blocks3 +al comenzar como clon +mostrar +repetir hasta que +sumar a y (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +Cuando hagas clic en la bandera verde, deberías ver un nuevo gato caer desde la parte superior del escenario cada tres segundos. Cada gato debe aterrizar en una gran pila de gatos superpuestos en el suelo azul de la parte inferior. + +![Gatos que caen](images/falling-cats.png) \ No newline at end of file diff --git a/es-LA/step_4.md b/es-LA/step_4.md new file mode 100644 index 0000000..3059a75 --- /dev/null +++ b/es-LA/step_4.md @@ -0,0 +1,115 @@ +## Haz que los gatos se muevan + +Una vez que un gato llega al suelo, debe avanzar lentamente hacia la derecha. + +\--- task \--- + +Agrega código a la sección `al comenzar como clon`{:class="block3control"} para hacer que el objeto Gato se `mueva diez pasos`{:class="block3motion"}, y cambie entre los dos disfraces del objeto cada 0.1 segundos para que parezca que el gato que está caminando. + +![Objeto Gato](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +El objeto Gato debe `moverse 10 pasos`{:class="block3motion"}, y `cambiar el disfraz `{:class="block3looks"} cada `0.1 segundos`{:class="block3control"}. Este código debe repetirse `por siempre`{:class="block3control"}, al igual que el código que hace que el gato caiga. + +\--- /hint \--- + +\--- hint \--- + +Aquí están los bloques de código que necesitas: + +```blocks3 +mover (10) pasos + +esperar (0.1) segundos + +siguiente disfraz + +por siempre +end +``` + +\--- /hint \--- + +\--- hint \--- + +Así es como debería verse tu código: + +```blocks3 +al comenzar como clon +mostrar ++ por siempre + mover (10) pasos + repetir hasta que + cambiar y a (-2) + end + siguiente disfraz + esperar (0.1) segundos +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Presiona la bandera verde y verifica que los gatos ahora se muevan a lo largo de la plataforma azul en la parte inferior. + +\--- /task \--- + +Si dibujas un puente a través del hueco para que los gatos puedan llegar hasta el lado derecho del Escenario, puedes ver que terminan clavados caminando a través de la pared derecha. + +![Gatos agitándose en el borde](images/flailing-at-edge.png) + +\--- task \--- + +Elimina el bucle `por siempre`{:class="block3control"} y, en su lugar, añade un bucle diferente para que los gatos sólo caminen hasta que lleguen al borde. Cuando un gato llega al borde del Escenario, debe desaparecer. + +![Objeto Gato](images/cat-sprite.png) + +```blocks3 +al comenzar como clon +mostrar ++ repetir hasta que +mover (10) pasos +repetir hasta que +cambiar y a (-2) +end +siguiente disfraz +esperar (0.1) segundos +end ++ eliminar este clon +``` + +\--- /task \--- + +\--- task \--- + +Presiona la bandera verde y verifica que los gatos desaparezcan cuando lleguen al borde del escenario. + +\--- /task \--- + +Date cuenta de que si los gatos caen en el agujero, no desaparecen, sino que se atascan en la parte inferior. Esto se debe a que siguen tratando de caerse. + +Esta es la parte del código que le dice al gato que siga cayendo hasta que toque el color azul: + +```blocks3 +repetir hasta que +end +``` + +Sin embargo, en el agujero, el gato nunca puede alcanzar el azul, por lo que está atascado para siempre. + +\--- task \--- + +Agrega más bloques a este bucle para que se repita hasta que el objeto Gato toque el color azul `o`{:class="block3operators"} `toque el borde`{:class="block3sensing"}. De esta manera, el objeto deja de intentar caerse si llega al borde del Escenario. + +![Objeto Gato](images/cat-sprite.png) + +```blocks3 +repetir hasta que < o > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/es-LA/step_5.md b/es-LA/step_5.md new file mode 100644 index 0000000..1facf7e --- /dev/null +++ b/es-LA/step_5.md @@ -0,0 +1,65 @@ +## Pegarse a las líneas + +Te habrás dado cuenta que, si dibujas un puente más bajo entre las dos plataformas, o una línea que se inclina hacia arriba, ¡los gatos terminan caminando a través de la plataforma en lugar de por encima! + +![Gatos caminando por la plataforma](images/cat-walk-through-platform.png) + +\--- task \--- + +En el código para el objeto "Gato", añade otro bucle antes del bloque `siguiente disfraz`{:class="block3looks"}. Esta vez, el bucle debería indicarle al gato que se mueva hacia arriba por `2` hasta que no esté tocando el color azul. + +![Objeto Gato](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +El gato debería `moverse 2 hacia arriba`{:class="block3motion"} `repetir hasta que`{:class="block3control"} `no`{:class="block3operators"} `toque el color azul`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Aquí están los bloques de código que necesitas: + +```blocks3 + + +cambiar y a (2) + +repetir hasta que <> +end + +no <> +``` + +\--- /hint \--- + +\--- hint \--- + +Así es como debería verse tu código: + +```blocks3 +al comenzar como clon +mostrar +repetir hasta que +mover (10) pasos +repetir hasta que +cambiar y a (-2) +end +repetir hasta que > +cambiar y a (2) +end +siguiente disfraz +esperar (0.1) segundos +end +eliminar este clon +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Haz clic en la bandera verde e intenta dibujar una línea que se incline hacia arriba. Comprueba que tu gato sigue esta línea. + +\--- /task \--- \ No newline at end of file diff --git a/es-LA/step_6.md b/es-LA/step_6.md new file mode 100644 index 0000000..ee274d5 --- /dev/null +++ b/es-LA/step_6.md @@ -0,0 +1,88 @@ +## Llegar a un lugar seguro + +El objetivo del juego es guiar a los gatos a un lugar seguro creando un camino para que puedan llegar a la puerta. Crea una variable de puntuación para registrar cuántos gatos llegan a la puerta. + +\--- task \--- + +Crea una nueva variable llamada `puntuación`{:class="block3variables"}. + +![Objeto Gato](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Añade código a tu objeto Gato para agregar `1` a la `puntuación`{:class="block3variables"} cada vez que un gato llegue a la puerta. También establece `puntuación`{:class="block3variables"} a `0`` cuando se haga clic en la bandera`{:class="block3events"} al inicio de la partida. + +![Objeto Gato](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`Si`{:class="block3control"} el gato está `tocando el objeto Puerta`{:class="block3sensing"}, entonces `suma 1 a la puntuación`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Aquí están los nuevos bloques de código que necesitas agregar a tu programa de `al comenzar como clon`: + +```blocks3 +sumar a [puntuación v] (1) + +si <> entonces +end + + + +dar a [puntuación v] el valor (0) +``` + +\--- /hint \--- + +\--- hint \--- + +Así es como debería verse tu código: + +```blocks3 +al comenzar como clon +mostrar +repetir hasta que +mover (10) pasos +repetir hasta que +cambiar y a (-2) +end +repetir hasta que > +cambiar y a (2) +end +siguiente disfraz +esperar (0.1) segundos ++ si entonces +cambiar [puntuación v] por (1) +end +end +eliminar este clon + +al presionar bandera ++ dar a [puntuación v] el valor (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Añade un poco más de código para que, cuando el objeto Gato llegue a la puerta, haga un sonido 'meow', es decir, maulle, y luego desaparezca. + +![Objeto Gato](images/cat-sprite.png) + +```blocks3 +iniciar sonido (meow v) +eliminar este clon +``` + +\--- /task \--- \ No newline at end of file diff --git a/es-LA/step_7.md b/es-LA/step_7.md new file mode 100644 index 0000000..db5c61f --- /dev/null +++ b/es-LA/step_7.md @@ -0,0 +1,13 @@ +## Desafío: Más obstáculos + +De momento, el juego es demasiado fácil de ganar. ¿Puedes pensar en ideas para hacerlo más difícil? + ++ Agrega más fondos con diferentes diseños de plataformas. + ++ Mueve la ubicación de la puerta, dependiendo del fondo que se muestre. + ++ Agrega más objetos tales como obstáculos móviles. ¿Quizás podrías tener perros merodeando o púas giratorias que los gatos deben evitar? + ++ Solo permite que el jugador use una cantidad limitada de "tinta" para dibujar líneas en el juego. Puedes hacer seguimiento a la cantidad de "tinta" utilizada creando una variable temporizador, que registre cuánto tiempo se mantiene presionado el ratón. + ++ Crea un objeto para mostrarle al jugador cuánta tinta le queda. \ No newline at end of file diff --git a/es-LA/step_8.md b/es-LA/step_8.md new file mode 100644 index 0000000..cbe2f9c --- /dev/null +++ b/es-LA/step_8.md @@ -0,0 +1,19 @@ +## ¿Qué sigue? + +Prueba el proyecto [generador de flores](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects), donde usarás bloques personalizados para crear tus propios patrones de flores. + +\--- no-print \--- + +Presiona `f` para dibujar algunas flores, o `r` para dibujar un montón de flores aleatorias, o `p` para dibujar un patrón de flores. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![flores aleatorias](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/fi-FI/images/banner.png b/fi-FI/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/fi-FI/images/banner.png differ diff --git a/fi-FI/images/cat-sprite.png b/fi-FI/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/fi-FI/images/cat-sprite.png differ diff --git a/fi-FI/images/cat-walk-through-platform.png b/fi-FI/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/fi-FI/images/cat-walk-through-platform.png differ diff --git a/fi-FI/images/cats-finished.png b/fi-FI/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/fi-FI/images/cats-finished.png differ diff --git a/fi-FI/images/door-sprite.png b/fi-FI/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/fi-FI/images/door-sprite.png differ diff --git a/fi-FI/images/draw-a-line.png b/fi-FI/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/fi-FI/images/draw-a-line.png differ diff --git a/fi-FI/images/falling-cats.png b/fi-FI/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/fi-FI/images/falling-cats.png differ diff --git a/fi-FI/images/flailing-at-edge.png b/fi-FI/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/fi-FI/images/flailing-at-edge.png differ diff --git a/fi-FI/images/flower-random.png b/fi-FI/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/fi-FI/images/flower-random.png differ diff --git a/fi-FI/images/pen-sprite.png b/fi-FI/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/fi-FI/images/pen-sprite.png differ diff --git a/fi-FI/meta.yml b/fi-FI/meta.yml new file mode 100644 index 0000000..ea88a99 --- /dev/null +++ b/fi-FI/meta.yml @@ -0,0 +1,26 @@ +--- +title: CATS! +hero_image: images/banner.png +description: Create a game in which you guide cats to safety and stop them from falling into holes +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Introduction + - + title: Draw lines + - + title: Clone cats + - + title: Make the cats move + - + title: Stick to the lines + - + title: Get to safety + - + title: "Challenge: more obstacles" + challenge: true + - + title: What next? diff --git a/fi-FI/resources/cats-resources.sb3 b/fi-FI/resources/cats-resources.sb3 new file mode 100644 index 0000000..d952bff Binary files /dev/null and b/fi-FI/resources/cats-resources.sb3 differ diff --git a/fi-FI/solutions/cats-solution.sb3 b/fi-FI/solutions/cats-solution.sb3 new file mode 100644 index 0000000..a2dc7c8 Binary files /dev/null and b/fi-FI/solutions/cats-solution.sb3 differ diff --git a/fi-FI/step_1.md b/fi-FI/step_1.md new file mode 100644 index 0000000..75244c0 --- /dev/null +++ b/fi-FI/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +This is the **Scratch 3** version of the project. There is also a [Scratch 2 version of the project](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Introduction + +In this project, you will create a game in which you need to guide cats to safety and not let any of them fall through the gaps! + +### What you will make + +\--- no-print \--- + +Click and drag with the mouse to draw a line with the pencil. Your goal is to stop the cats from falling into holes by creating a safe path to the exit. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Cats finished](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: What you will learn + ++ How to use a `forever`{:class="block3control"} loop to constantly generate moving cats ++ How to use a `repeat until`{:class="block3control"} loop to ensure your cats follow a line + +\--- /collapse \--- + +## \--- collapse \--- + +## title: What you will need + +### Hardware + ++ A computer capable of running Scratch 3 + +### Software + ++ Scratch 3 (either [online](http://rpf.io/scratchon){:target="_blank"} or [offline](http://rpf.io/scratchoff){:target="_blank"}) + +### Downloads + ++ [Offline starter project](http://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Additional notes for educators + +\--- no-print \--- + +If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](http://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/fi-FI/step_2.md b/fi-FI/step_2.md new file mode 100644 index 0000000..bd3358c --- /dev/null +++ b/fi-FI/step_2.md @@ -0,0 +1,140 @@ +## Draw lines + +\--- task \--- + +Open the 'CATS!' Scratch starter project. + +**Online:** open the starter project at [rpf.io/cats-on](http://rpf.io/cats-on){:target="_blank"}. + +If you have a Scratch account you can make a copy by clicking **Remix**. + +**Offline:** open the [starter project](http://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](http://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Add the Pen extension to your project. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Click on the sprite called 'Pen', and add code to set the pen colour to the same blue as the obstacles on the Stage. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +To select a colour, click on the colour square in the `set pen color`{:class="block3extensions"} block to make your mouse cursor turn into a pipette, and then click on the correct colour on the Stage. + +\--- /task \--- + +\--- task \--- + +Add some more code to make the sprite follow the mouse pointer. Test your program to check that the code works. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Add some code to tell the sprite to draw a line on the Stage if the mouse button is pressed down. + +![Pen sprite](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the `mouse is down`{:class="block3sensing"}, put the `pen down`{:class="block3extensions"}, and `else`{:class="block3control"}, lift the `pen up`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Test your code. You should be able to click and drag with the mouse to draw a blue line on the Stage. + +![Draw a line](images/draw-a-line.png) + +\--- /task \--- + +You probably see that a blue dot always appears in the top right-hand corner of the Stage (it's circled in the image above). This is because, when you click the green flag to start the game, you press the mouse down, and so the pen immediately starts drawing. + +\--- task \--- + +To stop this from happening, add a `pen up`{:class="block3extensions"} block at the start of the script, and a `wait one second`{:class="block3control"} block above the `forever`{:class="block3control"} block. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/fi-FI/step_3.md b/fi-FI/step_3.md new file mode 100644 index 0000000..d5f8d46 --- /dev/null +++ b/fi-FI/step_3.md @@ -0,0 +1,73 @@ +## Clone cats + +You want a never-ending stream of cats that the player has to guide along the path to the exit. + +\--- task \--- + +Click on the sprite called 'Cat', and add some code to `hide`{:class="block3looks"} the sprite, and also to `clone`{:class="block3control"} it every three seconds. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +If you run the program now, nothing happens on the Stage. To check that a new Cat sprite clone is created every three seconds, make each clone appear and fall out of the sky. + +\--- task \--- + +Add code to tell the sprite that `when it starts as a clone`{:class="block3control"}, it should `show`{:class="block3looks"} itself and fall until it `touches`{:class="block3sensing"} the blue floor that is drawn on the Stage. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`When the sprite starts as a clone`{:class="block3control"}, `show`{:class="block3looks"} the sprite. `Repeatedly`{:class="block3control"} `Change`{:class="block3motion"} the sprite's `y` coordinate by `-2`, until the sprite `touches`{:class="block3sensing"} the blue Stage. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +When you click the green flag, you should see a new cat fall from the top of the Stage every three seconds. Every cat should land in a big pile of overlapping cats on the blue floor at the bottom. + +![Falling cats](images/falling-cats.png) \ No newline at end of file diff --git a/fi-FI/step_4.md b/fi-FI/step_4.md new file mode 100644 index 0000000..8c10235 --- /dev/null +++ b/fi-FI/step_4.md @@ -0,0 +1,115 @@ +## Make the cats move + +Once a cat reaches the floor, it should step slowly to the right. + +\--- task \--- + +Add code to the `when I start as a clone`{:class="block3control"} section to make the cat sprite `move ten steps`{:class="block3motion"}, and switch between the sprite's two costumes every 0.1 seconds to make the cat look like it's walking. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat sprite should `move 10 steps`{:class="block3motion"}, and `switch costume`{:class="block3looks"} every `0.1 seconds`{:class="block3control"}. This code should repeat `forever`{:class="block3control"}, just like the code to make the cat fall. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats now move along the blue platform at the bottom. + +\--- /task \--- + +If you draw a bridge across the gap so that the cats can get all the way to the right side of the Stage, you can see that they end up getting stuck walking into the right wall. + +![Flailing cats at the edge](images/flailing-at-edge.png) + +\--- task \--- + +Remove the `forever`{:class="block3control"} loop, and instead add a different loop to make the cats only walk until they reach an edge. When a cat reaches the edge of the Stage, it should disappear. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats disappear when they reach the edge of the Stage. + +\--- /task \--- + +You may notice that, if the cats fall into the hole, they don't disappear but instead get stuck at the bottom. This is because they keep trying to fall downwards. + +This is the part of the code that tells the cat to keep falling until it touches blue: + +```blocks3 +repeat until +end +``` + +However, in the hole, the cat can never reach blue, so it is stuck forever. + +\--- task \--- + +Add more blocks to this loop so that it repeats until the cat sprite is touching blue `or`{:class="block3operators"} `touching the edge`{:class="block3sensing"}. This way, the sprite stops trying to fall if it reaches the edge of the Stage. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/fi-FI/step_5.md b/fi-FI/step_5.md new file mode 100644 index 0000000..ff776e8 --- /dev/null +++ b/fi-FI/step_5.md @@ -0,0 +1,65 @@ +## Stick to the lines + +You might notice that, if you draw a low bridge between the two platforms, or a line that slopes upwards, the cats end up walking through the platform rather than on top of it! + +![Cats walking through the platform](images/cat-walk-through-platform.png) + +\--- task \--- + +In the code for the cat sprite, add another loop before the `next costume`{:class="block3looks"} block. This time, the loop should tell the cat to move upwards by `2` until it is not touching blue. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat should `move up 2`{:class="block3motion"} `repeatedly until`{:class="block3control"} it is `not`{:class="block3operators"} `touching blue`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Click the green flag and try drawing a line that slopes upwards. Check that your cat follows this line. + +\--- /task \--- \ No newline at end of file diff --git a/fi-FI/step_6.md b/fi-FI/step_6.md new file mode 100644 index 0000000..deb146e --- /dev/null +++ b/fi-FI/step_6.md @@ -0,0 +1,89 @@ +## Get to safety + +The object of the game is to guide the cats to safety by creating a path so they can reach the door. Create a score variable to keep track of how many cats reach the door. + +\--- task \--- + +Create a variable called `score`{:class="block3variables"}. + +![Cat sprite](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Add code to your cat sprite to add `1` to the `score`{:class="block3variables"} each time a cat reaches the door. Also set `score`{:class="block3variables"} to `0` `when the flag is clicked`{:class="block3events"} at the start of the game. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the cat is `touching the door sprite`{:class="block3sensing"}, then `add 1 to the score`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the new code blocks you need to add to your `when I start as a clone` script: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Add some more code so that, when a cat sprite reaches the door, the cat makes a 'meow' sound and then disappears. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/fi-FI/step_7.md b/fi-FI/step_7.md new file mode 100644 index 0000000..6e609ac --- /dev/null +++ b/fi-FI/step_7.md @@ -0,0 +1,13 @@ +## Challenge: more obstacles + +At the moment, the game is rather easy to win. Can you think of ideas to you make your game harder? + ++ Add more backgrounds with different platform designs. + ++ Move the location of the door depending on which background is displayed. + ++ Add more sprites as moving obstacles. Perhaps you could have roaming dogs or rotating spikes the cats need to avoid? + ++ Only allow the player to use a limited amount of "ink" to draw lines in the game. You can keep track of how much "ink" is used by creating a timer variable that records how long the mouse is held down. + ++ Create a sprite to show the player how much ink is left. \ No newline at end of file diff --git a/fi-FI/step_8.md b/fi-FI/step_8.md new file mode 100644 index 0000000..2295a72 --- /dev/null +++ b/fi-FI/step_8.md @@ -0,0 +1,19 @@ +## What next? + +Try the [Flower generator](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects) project, where you will use custom blocks to create flower patterns. + +\--- no-print \--- + +Press `f` to draw a few flowers, or `r` to draw lots of random flowers, or `p` to draw a flower pattern. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![random flowers](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/fr-FR/images/banner.png b/fr-FR/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/fr-FR/images/banner.png differ diff --git a/fr-FR/images/cat-sprite.png b/fr-FR/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/fr-FR/images/cat-sprite.png differ diff --git a/fr-FR/images/cat-walk-through-platform.png b/fr-FR/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/fr-FR/images/cat-walk-through-platform.png differ diff --git a/fr-FR/images/cats-finished.png b/fr-FR/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/fr-FR/images/cats-finished.png differ diff --git a/fr-FR/images/door-sprite.png b/fr-FR/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/fr-FR/images/door-sprite.png differ diff --git a/fr-FR/images/draw-a-line.png b/fr-FR/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/fr-FR/images/draw-a-line.png differ diff --git a/fr-FR/images/falling-cats.png b/fr-FR/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/fr-FR/images/falling-cats.png differ diff --git a/fr-FR/images/flailing-at-edge.png b/fr-FR/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/fr-FR/images/flailing-at-edge.png differ diff --git a/fr-FR/images/flower-random.png b/fr-FR/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/fr-FR/images/flower-random.png differ diff --git a/fr-FR/images/pen-sprite.png b/fr-FR/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/fr-FR/images/pen-sprite.png differ diff --git a/fr-FR/meta.yml b/fr-FR/meta.yml new file mode 100644 index 0000000..1458411 --- /dev/null +++ b/fr-FR/meta.yml @@ -0,0 +1,30 @@ +--- +title: CHATS ! +hero_image: images/banner.png +description: Crée un jeu dans lequel tu guides les chats en sécurité et les empêches de tomber dans des trous +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Introduction + - + title: Tracer des lignes + - + title: Cloner les chats + completion: + - engaged + - + title: Faire bouger les chats + - + title: Respecter les lignes + - + title: Mettons-nous à l'abri + completion: + - internal + - + title: 'Défi : plus d''obstacles' + challenge: true + - + title: Et ensuite ? diff --git a/fr-FR/resources/cats-resources.sb3 b/fr-FR/resources/cats-resources.sb3 new file mode 100644 index 0000000..ab9aeb8 Binary files /dev/null and b/fr-FR/resources/cats-resources.sb3 differ diff --git a/fr-FR/solutions/cats-solution.sb3 b/fr-FR/solutions/cats-solution.sb3 new file mode 100644 index 0000000..a727870 Binary files /dev/null and b/fr-FR/solutions/cats-solution.sb3 differ diff --git a/fr-FR/step_1.md b/fr-FR/step_1.md new file mode 100644 index 0000000..bd53a80 --- /dev/null +++ b/fr-FR/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +Ceci est la version **Scratch 3** du projet. Il existe également une version [Scratch 2 du projet](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Introduction + +Dans ce projet, tu vas créer un jeu dans lequel tu dois guider les chats en sécurité et ne laisser aucun d'entre eux tomber dans le vide ! + +### Ce que tu feras + +\--- no-print \--- + +Clique et glisse la souris pour tracer une ligne avec le crayon. Ton but est d'empêcher les chats de tomber dans des trous en créant un chemin sécurisé vers la sortie. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Chats terminés](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: Ce que tu vas apprendre + ++ Comment utiliser une boucle `répéter indéfiniment`{:class="block3control"} pour générer constamment des chats en mouvement ++ Comment utiliser une boucle `répéter jusqu'à ce que`{:class="block3control"} pour t'assurer que tes chats suivent une ligne + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Ce qu'il te faut + +### Matériel informatique + ++ Un ordinateur capable d'exécuter Scratch 3 + +### Logiciel + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### Téléchargements + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Informations supplémentaires pour les éducateurs + +\--- no-print \--- + +Si vous avez besoin d'imprimer ce projet, merci d'utiliser la [version imprimable](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/fr-FR/step_2.md b/fr-FR/step_2.md new file mode 100644 index 0000000..c3f7388 --- /dev/null +++ b/fr-FR/step_2.md @@ -0,0 +1,140 @@ +## Tracer des lignes + +\--- task \--- + +Ouvre le projet de démarrage Scratch « CHATS ! ». + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +Si tu as un compte Scratch, tu peux en créer une copie en cliquant sur **Remix**. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Ajoute l'extension Stylo à ton projet. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Clique sur le sprite appelé « Crayon » et ajoute du code pour définir la couleur du crayon sur le même bleu que les obstacles sur la scène. + +![Sprite Crayon](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +Pour sélectionner une couleur, clique sur le carré de couleur dans le bloc `mettre la couleur du stylo à`{:class="block3extensions"} pour que le curseur de ta souris se transforme en pipette, puis clique sur la bonne couleur sur la scène. + +\--- /task \--- + +\--- task \--- + +Ajoute un peu plus de code pour que le sprite suive le pointeur de la souris. Teste ton programme pour vérifier que le code fonctionne. + +![Sprite Crayon](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Ajoute du code pour dire au sprite de tracer une ligne sur la scène si le bouton de la souris est enfoncé. + +![Sprite Crayon](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`si`{:class="block3control"} `souris pressée ?`{:class="block3sensing"}, `crayon en position d'écriture`{:class="block3extensions"}, et `sinon`{:class=" block3control"}, `relever le crayon`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Voici les blocs dont tu as besoin : + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +Voici à quoi ton code devrait ressembler : + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Teste ton code. Tu devrais pouvoir cliquer et faire glisser la souris pour tracer une ligne bleue sur la scène. + +![Tracer une ligne](images/draw-a-line.png) + +\--- /task \--- + +Tu vois probablement qu'un point bleu apparaît toujours dans le coin supérieur droit de la scène (il est entouré dans l'image ci-dessus). C'est parce que lorsque tu cliques sur le drapeau vert pour démarrer le jeu, tu appuies sur la souris, et donc le stylo commence immédiatement à dessiner. + +\--- task \--- + +Pour éviter que cela ne se produise, ajoute un bloc `relever le crayon`{:class="block3extensions"} au début du script et un bloc `attendre une seconde`{:class="block3control"} au-dessus du bloc `répéter indéfiniment`{:class="block3control"}. + +![Sprite Crayon](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/fr-FR/step_3.md b/fr-FR/step_3.md new file mode 100644 index 0000000..e0d85d0 --- /dev/null +++ b/fr-FR/step_3.md @@ -0,0 +1,73 @@ +## Cloner les chats + +Tu veux un flot incessant de chats que le joueur doit guider le long du chemin vers la sortie. + +\--- task \--- + +Clique sur le sprite appelé « Chat », et ajoute du code pour `cacher`{:class="block3looks"} le sprite, et aussi le `cloner`{:class="block3control"} toutes les trois secondes. + +![Sprite Chat](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +Si tu exécutes le programme maintenant, rien ne se passe sur la scène. Pour vérifier qu'un nouveau clone de sprite Chat est créé toutes les trois secondes, fais en sorte que chaque clone apparaisse et tombe du ciel. + +\--- task \--- + +Ajoute du code pour indiquer au sprite que `lorsqu'il commence comme un clone`{:class="block3control"}, il doit se `montrer`{:class="block3looks"} et tomber jusqu'à ce qu'il `touche`{:class="block3sensing"} le sol bleu dessiné sur la scène. + +![Sprite Chat](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`quand je commence comme un clone`{:class="block3control"}, `montrer`{:class="block3looks"} le sprite. `de manière répétée`{:class="block3control"} `Ajouter`{:class="block3motion"} `-2` à la coordonnée `y` du sprite, jusqu'à ce que le sprite `touche`{:class="block3sensing"} la scène bleue. + +\--- /hint \--- + +\--- hint \--- + +Voici les blocs dont tu as besoin : + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +Voici à quoi ton code devrait ressembler : + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +Lorsque tu cliques sur le drapeau vert, tu devrais voir un nouveau chat tomber du haut de la scène toutes les trois secondes. Chaque chat devrait atterrir dans un gros tas de chats qui se chevauchent sur le sol bleu en bas. + +![Chats qui tombent](images/falling-cats.png) \ No newline at end of file diff --git a/fr-FR/step_4.md b/fr-FR/step_4.md new file mode 100644 index 0000000..976ad9b --- /dev/null +++ b/fr-FR/step_4.md @@ -0,0 +1,115 @@ +## Faire bouger les chats + +Une fois qu'un chat atteint le sol, il devrait avancer lentement vers la droite. + +\--- task \--- + +Ajoute du code à la section `quand je commence comme un clone`{:class="block3control"} pour que le sprite chat se `déplace de dix pas`{:class="block3motion"}, et change entre les deux costumes du sprite toutes les 0,1 secondes pour que le chat ait l'air de marcher. + +![Sprite Chat](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +Le sprite chat doit se `déplacer de 10 pas`{:class="block3motion"}, et `changer de costume`{:class="block3looks"} toutes les `0,1 secondes`{:class="block3control"}. Ce code devrait répéter le bloc `répéter indéfiniment`{:class="block3control"}, tout comme le code pour faire tomber le chat. + +\--- /hint \--- + +\--- hint \--- + +Voici les blocs dont tu as besoin : + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +Voici à quoi ton code devrait ressembler : + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Appuie sur le drapeau vert et vérifie que les chats se déplacent maintenant le long de la plate-forme bleue en bas. + +\--- /task \--- + +Si tu traces un pont à travers le vide pour que les chats puissent se rendre jusqu'au côté droit de la scène, tu peux voir qu'ils finissent par se coincer en marchant dans le mur de droite. + +![Chats agités au bord](images/flailing-at-edge.png) + +\--- task \--- + +Supprime la boucle `répéter indéfiniment`{:class="block3control"} et ajoute une boucle différente pour que les chats ne marchent que jusqu'à ce qu'ils atteignent un bord. Lorsqu'un chat atteint le bord de la scène, il devrait disparaître. + +![Sprite Chat](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Appuie sur le drapeau vert et vérifie que les chats disparaissent lorsqu'ils atteignent le bord de la scène. + +\--- /task \--- + +Tu remarques peut-être que si les chats tombent dans le trou, ils ne disparaissent pas mais restent coincés au fond. C'est parce qu'ils continuent d'essayer de tomber vers le bas. + +C'est la partie du code qui dit au chat de continuer à tomber jusqu'à ce qu'il touche le bleu : + +```blocks3 +repeat until +end +``` + +Cependant, dans le trou, le chat ne peut jamais atteindre le bleu, il est donc coincé pour toujours. + +\--- task \--- + +Ajoute plus de blocs à cette boucle afin qu'elle se répète jusqu'à ce que le sprite Chat touche le bleu `ou`{:class="block3operators"} `touche le bord`{:class="block3sensing"}. De cette façon, le sprite cesse d'essayer de tomber s'il atteint le bord de la scène. + +![Sprite Chat](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/fr-FR/step_5.md b/fr-FR/step_5.md new file mode 100644 index 0000000..a77acd6 --- /dev/null +++ b/fr-FR/step_5.md @@ -0,0 +1,65 @@ +## Respecter les lignes + +Tu pourras remarquer que, si tu traces un pont plus bas entre les deux plateformes, ou une ligne qui est inclinée vers le haut, les chats finissent par se promener à travers la plate-forme plutôt que par dessus ! + +![Chats qui traversent la plate-forme](images/cat-walk-through-platform.png) + +\--- task \--- + +Dans le code du sprite chat, ajoute une autre boucle avant le bloc `costume suivant`{:class="block3looks"}. Cette fois, la boucle devrait dire au chat de se déplacer vers le haut par `2` jusqu'à ce qu'il ne touche pas le bleu. + +![Sprite Chat](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +Le chat devrait `monter de 2`{:class="block3motion"} `de manière répétée jusqu'à ce qu'il`{:class="block3control"} `ne`` touche pas le bleu` {:class="block3operators"}{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Voici les blocs dont tu as besoin : + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +Voici à quoi ton code devrait ressembler : + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Clique sur le drapeau vert et essaie de dessiner une ligne qui est inclinée vers le haut. Vérifie que ton chat suit cette ligne. + +\--- /task \--- \ No newline at end of file diff --git a/fr-FR/step_6.md b/fr-FR/step_6.md new file mode 100644 index 0000000..96f0691 --- /dev/null +++ b/fr-FR/step_6.md @@ -0,0 +1,89 @@ +## Mettons-nous à l'abri + +Le but du jeu est de guider les chats en sécurité en créant un chemin pour qu'ils puissent atteindre la porte. Crée une variable score pour garder une trace du nombre de chats qui atteignent la porte. + +\--- task \--- + +Crée une nouvelle variable appelée `score`{:class="block3variables"}. + +![Sprite Chat](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Ajoute du code à ton sprite chat pour ajouter `1` au `score`{:class="block3variables"} à chaque fois qu'un chat atteint la porte. Mets également `score`{:class="block3variables"} à `0` `quand le drapeau est cliqué`{:class="block3events"} au début du jeu. + +![Sprite Chat](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`Si`{:class="block3control"} le chat `touche le sprite porte`{:class="block3sensing"}, alors `ajouter 1 au score`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Voici les nouveaux blocs de code que tu dois ajouter à ton script `quand je commence comme un clone` : + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +Voici à quoi ton code devrait ressembler : + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Ajoute plus de code pour que, lorsqu'un sprite chat atteint la porte, le chat fasse un son « miaou » et ensuite disparaisse. + +![Sprite Chat](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/fr-FR/step_7.md b/fr-FR/step_7.md new file mode 100644 index 0000000..a5b95cd --- /dev/null +++ b/fr-FR/step_7.md @@ -0,0 +1,13 @@ +## Défi : plus d'obstacles + +Pour le moment, le jeu est assez facile à gagner. Peux-tu trouver des idées pour rendre ton jeu plus difficile ? + ++ Ajoute plus d'arrière-plans avec différentes conceptions de plateforme. + ++ Déplace l'emplacement de la porte en fonction de l'arrière-plan affiché. + ++ Ajoute plus de sprites comme obstacles mobiles. Peut-être pourrais-tu avoir des chiens qui se baladent ou des piques rotatifs que les chats doivent éviter ? + ++ Permettre uniquement au joueur d'utiliser un nombre limité d' « encre » pour dessiner des lignes dans le jeu. Tu peux garder une trace de la quantité d' « encre » utilisée en créant une variable de minuterie qui enregistre la durée pendant laquelle la souris est maintenue enfoncée. + ++ Créer un sprite pour montrer au joueur la quantité d'encre restante. \ No newline at end of file diff --git a/fr-FR/step_8.md b/fr-FR/step_8.md new file mode 100644 index 0000000..7aae375 --- /dev/null +++ b/fr-FR/step_8.md @@ -0,0 +1,19 @@ +## Et ensuite ? + +Essaie le projet [Générateur de fleurs](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects), où tu utiliseras des blocs personnalisés pour créer des motifs de fleur. + +\--- no-print \--- + +Appuyer sur `f` pour dessiner quelques fleurs, ou `r` pour dessiner beaucoup de fleurs au hasard, ou `p` pour dessiner un motif de fleurs. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![fleurs aléatoires](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/he-IL/images/banner.png b/he-IL/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/he-IL/images/banner.png differ diff --git a/he-IL/images/cat-sprite.png b/he-IL/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/he-IL/images/cat-sprite.png differ diff --git a/he-IL/images/cat-walk-through-platform.png b/he-IL/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/he-IL/images/cat-walk-through-platform.png differ diff --git a/he-IL/images/cats-finished.png b/he-IL/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/he-IL/images/cats-finished.png differ diff --git a/he-IL/images/door-sprite.png b/he-IL/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/he-IL/images/door-sprite.png differ diff --git a/he-IL/images/draw-a-line.png b/he-IL/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/he-IL/images/draw-a-line.png differ diff --git a/he-IL/images/falling-cats.png b/he-IL/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/he-IL/images/falling-cats.png differ diff --git a/he-IL/images/flailing-at-edge.png b/he-IL/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/he-IL/images/flailing-at-edge.png differ diff --git a/he-IL/images/flower-random.png b/he-IL/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/he-IL/images/flower-random.png differ diff --git a/he-IL/images/pen-sprite.png b/he-IL/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/he-IL/images/pen-sprite.png differ diff --git a/he-IL/meta.yml b/he-IL/meta.yml new file mode 100644 index 0000000..c1c0ecc --- /dev/null +++ b/he-IL/meta.yml @@ -0,0 +1,30 @@ +--- +title: CATS! +hero_image: images/banner.png +description: Create a game in which you guide cats to safety and stop them from falling into holes +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Introduction + - + title: Draw lines + - + title: Clone cats + completion: + - engaged + - + title: Make the cats move + - + title: Stick to the lines + - + title: Get to safety + completion: + - internal + - + title: 'Challenge: more obstacles' + challenge: true + - + title: What next? diff --git a/he-IL/resources/cats-resources.sb3 b/he-IL/resources/cats-resources.sb3 new file mode 100644 index 0000000..d952bff Binary files /dev/null and b/he-IL/resources/cats-resources.sb3 differ diff --git a/he-IL/solutions/cats-solution.sb3 b/he-IL/solutions/cats-solution.sb3 new file mode 100644 index 0000000..a2dc7c8 Binary files /dev/null and b/he-IL/solutions/cats-solution.sb3 differ diff --git a/he-IL/step_1.md b/he-IL/step_1.md new file mode 100644 index 0000000..838986d --- /dev/null +++ b/he-IL/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +This is the **Scratch 3** version of the project. There is also a [Scratch 2 version of the project](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Introduction + +In this project, you will create a game in which you need to guide cats to safety and not let any of them fall through the gaps! + +### What you will make + +\--- no-print \--- + +Click and drag with the mouse to draw a line with the pencil. Your goal is to stop the cats from falling into holes by creating a safe path to the exit. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Cats finished](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: What you will learn + ++ How to use a `forever`{:class="block3control"} loop to constantly generate moving cats ++ How to use a `repeat until`{:class="block3control"} loop to ensure your cats follow a line + +\--- /collapse \--- + +## \--- collapse \--- + +## title: What you will need + +### Hardware + ++ A computer capable of running Scratch 3 + +### Software + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### Downloads + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Additional notes for educators + +\--- no-print \--- + +If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/he-IL/step_2.md b/he-IL/step_2.md new file mode 100644 index 0000000..264770c --- /dev/null +++ b/he-IL/step_2.md @@ -0,0 +1,140 @@ +## Draw lines + +\--- task \--- + +Open the 'CATS!' Scratch starter project. + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +If you have a Scratch account you can make a copy by clicking **Remix**. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Add the Pen extension to your project. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Click on the sprite called 'Pen', and add code to set the pen colour to the same blue as the obstacles on the Stage. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +To select a colour, click on the colour square in the `set pen color`{:class="block3extensions"} block to make your mouse cursor turn into a pipette, and then click on the correct colour on the Stage. + +\--- /task \--- + +\--- task \--- + +Add some more code to make the sprite follow the mouse pointer. Test your program to check that the code works. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Add some code to tell the sprite to draw a line on the Stage if the mouse button is pressed down. + +![Pen sprite](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the `mouse is down`{:class="block3sensing"}, put the `pen down`{:class="block3extensions"}, and `else`{:class="block3control"}, lift the `pen up`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Test your code. You should be able to click and drag with the mouse to draw a blue line on the Stage. + +![Draw a line](images/draw-a-line.png) + +\--- /task \--- + +You probably see that a blue dot always appears in the top right-hand corner of the Stage (it's circled in the image above). This is because, when you click the green flag to start the game, you press the mouse down, and so the pen immediately starts drawing. + +\--- task \--- + +To stop this from happening, add a `pen up`{:class="block3extensions"} block at the start of the script, and a `wait one second`{:class="block3control"} block above the `forever`{:class="block3control"} block. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/he-IL/step_3.md b/he-IL/step_3.md new file mode 100644 index 0000000..d5f8d46 --- /dev/null +++ b/he-IL/step_3.md @@ -0,0 +1,73 @@ +## Clone cats + +You want a never-ending stream of cats that the player has to guide along the path to the exit. + +\--- task \--- + +Click on the sprite called 'Cat', and add some code to `hide`{:class="block3looks"} the sprite, and also to `clone`{:class="block3control"} it every three seconds. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +If you run the program now, nothing happens on the Stage. To check that a new Cat sprite clone is created every three seconds, make each clone appear and fall out of the sky. + +\--- task \--- + +Add code to tell the sprite that `when it starts as a clone`{:class="block3control"}, it should `show`{:class="block3looks"} itself and fall until it `touches`{:class="block3sensing"} the blue floor that is drawn on the Stage. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`When the sprite starts as a clone`{:class="block3control"}, `show`{:class="block3looks"} the sprite. `Repeatedly`{:class="block3control"} `Change`{:class="block3motion"} the sprite's `y` coordinate by `-2`, until the sprite `touches`{:class="block3sensing"} the blue Stage. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +When you click the green flag, you should see a new cat fall from the top of the Stage every three seconds. Every cat should land in a big pile of overlapping cats on the blue floor at the bottom. + +![Falling cats](images/falling-cats.png) \ No newline at end of file diff --git a/he-IL/step_4.md b/he-IL/step_4.md new file mode 100644 index 0000000..8c10235 --- /dev/null +++ b/he-IL/step_4.md @@ -0,0 +1,115 @@ +## Make the cats move + +Once a cat reaches the floor, it should step slowly to the right. + +\--- task \--- + +Add code to the `when I start as a clone`{:class="block3control"} section to make the cat sprite `move ten steps`{:class="block3motion"}, and switch between the sprite's two costumes every 0.1 seconds to make the cat look like it's walking. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat sprite should `move 10 steps`{:class="block3motion"}, and `switch costume`{:class="block3looks"} every `0.1 seconds`{:class="block3control"}. This code should repeat `forever`{:class="block3control"}, just like the code to make the cat fall. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats now move along the blue platform at the bottom. + +\--- /task \--- + +If you draw a bridge across the gap so that the cats can get all the way to the right side of the Stage, you can see that they end up getting stuck walking into the right wall. + +![Flailing cats at the edge](images/flailing-at-edge.png) + +\--- task \--- + +Remove the `forever`{:class="block3control"} loop, and instead add a different loop to make the cats only walk until they reach an edge. When a cat reaches the edge of the Stage, it should disappear. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats disappear when they reach the edge of the Stage. + +\--- /task \--- + +You may notice that, if the cats fall into the hole, they don't disappear but instead get stuck at the bottom. This is because they keep trying to fall downwards. + +This is the part of the code that tells the cat to keep falling until it touches blue: + +```blocks3 +repeat until +end +``` + +However, in the hole, the cat can never reach blue, so it is stuck forever. + +\--- task \--- + +Add more blocks to this loop so that it repeats until the cat sprite is touching blue `or`{:class="block3operators"} `touching the edge`{:class="block3sensing"}. This way, the sprite stops trying to fall if it reaches the edge of the Stage. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/he-IL/step_5.md b/he-IL/step_5.md new file mode 100644 index 0000000..ff776e8 --- /dev/null +++ b/he-IL/step_5.md @@ -0,0 +1,65 @@ +## Stick to the lines + +You might notice that, if you draw a low bridge between the two platforms, or a line that slopes upwards, the cats end up walking through the platform rather than on top of it! + +![Cats walking through the platform](images/cat-walk-through-platform.png) + +\--- task \--- + +In the code for the cat sprite, add another loop before the `next costume`{:class="block3looks"} block. This time, the loop should tell the cat to move upwards by `2` until it is not touching blue. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat should `move up 2`{:class="block3motion"} `repeatedly until`{:class="block3control"} it is `not`{:class="block3operators"} `touching blue`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Click the green flag and try drawing a line that slopes upwards. Check that your cat follows this line. + +\--- /task \--- \ No newline at end of file diff --git a/he-IL/step_6.md b/he-IL/step_6.md new file mode 100644 index 0000000..deb146e --- /dev/null +++ b/he-IL/step_6.md @@ -0,0 +1,89 @@ +## Get to safety + +The object of the game is to guide the cats to safety by creating a path so they can reach the door. Create a score variable to keep track of how many cats reach the door. + +\--- task \--- + +Create a variable called `score`{:class="block3variables"}. + +![Cat sprite](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Add code to your cat sprite to add `1` to the `score`{:class="block3variables"} each time a cat reaches the door. Also set `score`{:class="block3variables"} to `0` `when the flag is clicked`{:class="block3events"} at the start of the game. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the cat is `touching the door sprite`{:class="block3sensing"}, then `add 1 to the score`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the new code blocks you need to add to your `when I start as a clone` script: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Add some more code so that, when a cat sprite reaches the door, the cat makes a 'meow' sound and then disappears. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/he-IL/step_7.md b/he-IL/step_7.md new file mode 100644 index 0000000..6e609ac --- /dev/null +++ b/he-IL/step_7.md @@ -0,0 +1,13 @@ +## Challenge: more obstacles + +At the moment, the game is rather easy to win. Can you think of ideas to you make your game harder? + ++ Add more backgrounds with different platform designs. + ++ Move the location of the door depending on which background is displayed. + ++ Add more sprites as moving obstacles. Perhaps you could have roaming dogs or rotating spikes the cats need to avoid? + ++ Only allow the player to use a limited amount of "ink" to draw lines in the game. You can keep track of how much "ink" is used by creating a timer variable that records how long the mouse is held down. + ++ Create a sprite to show the player how much ink is left. \ No newline at end of file diff --git a/he-IL/step_8.md b/he-IL/step_8.md new file mode 100644 index 0000000..2295a72 --- /dev/null +++ b/he-IL/step_8.md @@ -0,0 +1,19 @@ +## What next? + +Try the [Flower generator](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects) project, where you will use custom blocks to create flower patterns. + +\--- no-print \--- + +Press `f` to draw a few flowers, or `r` to draw lots of random flowers, or `p` to draw a flower pattern. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![random flowers](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/hi-IN/images/banner.png b/hi-IN/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/hi-IN/images/banner.png differ diff --git a/hi-IN/images/cat-sprite.png b/hi-IN/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/hi-IN/images/cat-sprite.png differ diff --git a/hi-IN/images/cat-walk-through-platform.png b/hi-IN/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/hi-IN/images/cat-walk-through-platform.png differ diff --git a/hi-IN/images/cats-finished.png b/hi-IN/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/hi-IN/images/cats-finished.png differ diff --git a/hi-IN/images/door-sprite.png b/hi-IN/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/hi-IN/images/door-sprite.png differ diff --git a/hi-IN/images/draw-a-line.png b/hi-IN/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/hi-IN/images/draw-a-line.png differ diff --git a/hi-IN/images/falling-cats.png b/hi-IN/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/hi-IN/images/falling-cats.png differ diff --git a/hi-IN/images/flailing-at-edge.png b/hi-IN/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/hi-IN/images/flailing-at-edge.png differ diff --git a/hi-IN/images/flower-random.png b/hi-IN/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/hi-IN/images/flower-random.png differ diff --git a/hi-IN/images/pen-sprite.png b/hi-IN/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/hi-IN/images/pen-sprite.png differ diff --git a/hi-IN/meta.yml b/hi-IN/meta.yml new file mode 100644 index 0000000..8959165 --- /dev/null +++ b/hi-IN/meta.yml @@ -0,0 +1,30 @@ +--- +title: बिल्लियाँ! +hero_image: images/banner.png +description: एक गेम बनाएँ जिसमें आप बिल्लियों को सुरक्षा की ओर मार्गदर्शन करते हैं और उन्हें छेदों में गिरने से रोकते हैं +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: परिचय + - + title: रेखाएँ खींचें + - + title: बिल्लियों को क्लोन करना + completion: + - engaged + - + title: बिल्लियों को चलाएँ + - + title: रेखाओं से जुड़े रहें + - + title: सुरक्षित रहें + completion: + - internal + - + title: 'चुनौती: अधिक बाधाएँ!' + challenge: true + - + title: आगे क्या? diff --git a/hi-IN/resources/cats-resources.sb3 b/hi-IN/resources/cats-resources.sb3 new file mode 100644 index 0000000..1f57576 Binary files /dev/null and b/hi-IN/resources/cats-resources.sb3 differ diff --git a/hi-IN/solutions/cats-solution.sb3 b/hi-IN/solutions/cats-solution.sb3 new file mode 100644 index 0000000..53503ad Binary files /dev/null and b/hi-IN/solutions/cats-solution.sb3 differ diff --git a/hi-IN/step_1.md b/hi-IN/step_1.md new file mode 100644 index 0000000..fb92fdf --- /dev/null +++ b/hi-IN/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +यह इस प्रोजेक्ट का **Scratch 3** संस्करण है। [इस प्रोजेक्ट का Scratch 2 संस्करण](https://projects.raspberrypi.org/en/projects/cats-scratch2) भी है। + +\--- /no-print \--- + +## परिचय + +इस प्रोजेक्ट में, आप एक गेम बनाएँगे जिसमें आपको बिल्लियों को सुरक्षा की ओर मार्गदर्शन करने की जरुरत होगी और उनमें से किसी को भी खाली जगहों में गिरने नहीं देना होगा! + +### आप क्या बनाओगे + +\--- no-print \--- + +पेंसिल के साथ एक रेखा खींचने के लिए माउस से क्लिक करें और खींचें। आपका लक्ष्य बिल्लियों को बाहर निकलने के लिए एक सुरक्षित मार्ग बनाकर उन्हें छेदों में गिरने से रोकना है। + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Cats finished](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## शीर्षक: आप क्या सीखेंगे + ++ चलती बिल्लियों को लगातार उत्पन्न करने के लिए `forever`{:class="block3control"} लूप का उपयोग कैसे करें ++ `repeat until`{:class="block3control"} लूप का उपयोग कैसे करके आप यह सुनिश्चित कर सके कि आपकी बिल्लियाँ एक लाइन में चलती रहे + +\--- /collapse \--- + +## \--- collapse \--- + +## title: आपको किन चीज़ों की आवश्यकता होगी + +### हार्डवेयर + ++ Scratch 3 चलाने में सक्षम एक कंप्यूटर + +### सॉफ्टवेयर + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### डाउनलोड + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: शिक्षकों के लिए अतिरिक्त टिप्पणियाँ + +\--- no-print \--- + +यदि आप इस प्रोजेक्ट को प्रिंट करने की जरुरत है, तो कृपया [प्रिंटर अनुकूल संस्करण](https://projects.raspberrypi.org/en/projects/cats/print) का उपयोग करें। \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/hi-IN/step_2.md b/hi-IN/step_2.md new file mode 100644 index 0000000..97b6ce1 --- /dev/null +++ b/hi-IN/step_2.md @@ -0,0 +1,140 @@ +## रेखाएँ खींचें + +\--- task \--- + +'CATS!' Scratch स्टार्टर प्रोजेक्ट खोलें। + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +अगर आपके पास एक Scratch अकाउंट है तो आप एक कॉपी **Remix** क्लिक कर के भी बना सकते है। + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +अपने परियोजना में पेन एक्सटेंशन जोड़ें। + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +'पेन' नामक sprite पर क्लिक करें, और स्टेज पर मौजूद बाधाओं के समान पेन का रंग नीला सेट करने के लिए कोड जोड़ें। + +![पेन स्प्राइट](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +किसी रंग को चुनने के लिए, `set pen color`{:class="block3extensions"} ब्लॉक में रंग वर्ग पर क्लिक करके आपके माउस कर्सर को पिपेट (नलिका) में बदलें, और फिर स्टेज पर सही रंग पर क्लिक करें। + +\--- /task \--- + +\--- task \--- + +स्प्राइट द्वारा माउस पॉइंटर का अनुसरण करने के लिए कुछ और कोड जोड़ें। कोड काम करता है यह जाँचने के लिए अपने प्रोग्राम का परीक्षण करें। + +![पेन स्प्राइट](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +यदि माउस बटन नीचे दबाया जाता है तो स्टेज पर एक रेखा खींचने के लिए स्प्राइट को बताने के लिए कुछ कोड जोड़ें। + +![पेन स्प्राइट](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the `mouse is down`{:class="block3sensing"}, `pen down`{:class="block3extensions"} रखें, और `else`{:class="block3control"}, `pen up`{:class="block3extensions"} रखें। + +\--- /hint \--- + +\--- hint \--- + +यहाँ मौजूद कोड ब्लॉक की आपको जरुरत पड़ेगी: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +आपका कोड ऐसा दिखना चाहिए: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +अपने कोड का परीक्षण करें। आप माउस से क्लिक और ड्रैग (drag) करके स्टेज पर नीली रेखा खींच पाएँगे। + +![एक रेखा खींचें](images/draw-a-line.png) + +\--- /task \--- + +आप शायद यह देखेंगे कि स्टेज के ऊपरी दाएँ कोने में एक नीली बिंदू हमेशा दिखाई देती है (ऊपर की छवि में इस पर घेरा डाला गया है)। ऐसा इसलिए है क्योंकि जब आप गेम शुरू करने के लिए हरे झंडे पर क्लिक करते हैं, तो आप माउस को नीचे दबाते हैं, और इसलिए पेन तुरंत बनाना शुरू कर देता है। + +\--- task \--- + +ऐसा होने से रोकने के लिए, स्क्रिप्ट के आरंभ में एक `pen up`{:class="block3extensions"} ब्लॉक जोड़ें, और `forever` {:class="block3control"} ब्लॉक के ऊपर एक `wait one second`{:class="block3control"} ब्लॉक को जोड़ें। + +![पेन स्प्राइट](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/hi-IN/step_3.md b/hi-IN/step_3.md new file mode 100644 index 0000000..92774d7 --- /dev/null +++ b/hi-IN/step_3.md @@ -0,0 +1,73 @@ +## बिल्लियाँ को क्लोन (clone) करना + +आप बिल्लियों की एक कभी न खत्म होने वाली धारा चाहते हैं। खिलाड़ी को बिल्लियों को बाहर निकालने के लिए मार्गदर्शन देना होगा। + +\--- task \--- + +'Cat' नामक स्प्राइट पर क्लिक करें, और कुछ कोड जोड़े, जिससे वो `hide`{:class="block3looks"} जाए और हर तीन सेकंड में वो `clone`{:class="block3control"} होता रहें। + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +यदि आप अब प्रोग्राम चलाते हैं, तो स्टेज पर कुछ भी नहीं होगा। यह जाँचने के लिए कि हर तीन सेकंड में एक नया Cat स्प्राइट का क्लोन बनता है, प्रत्येक क्लोन को आसमान से प्रकट होता हुआ और गिरता हुआ दिखाएँ। + +\--- task \--- + +स्प्राइट में कोड जोड़ें जिससे उसे पता चले कि `when it starts as a clone`{:class="block3control"} के रूप में शुरू होता है, तो यह खुद से `show`{:class="block3looks"} देना चाहिए और तब तक गिरना चाहिए जब तक कि यह स्टेज पर खींची गई नीली मंजिल को `touches`{:class="block3sensing"} हैं। + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`When the sprite starts as a clone`{:class="block3control"}, `show`{:class="block3looks"} वह स्प्राइट | `Repeatedly`{:class="block3control"} `Change`{:class="block3motion"} करें स्प्राइट के `y` निर्देशांक (coordinates) `-2` से जब तक स्प्राइट नीली मंजिल को `touches`{:class="block3sensing"} न लें | + +\--- /hint \--- + +\--- hint \--- + +आपको इन कोड ब्लॉक्स की ज़रुरत पड़ेगी: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +आपका कोड कुछ ऐसा दिखना चाहिए: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +जब आप हरे झंडे पर क्लिक करते हैं, तो आपको हर तीन सेकंड में स्टेज के ऊपर से एक नई बिल्ली गिरती हुई दिखाई देनी चाहिए। प्रत्येक बिल्ली को नीचे की नीली मंजिल पर एक के ऊपर एक गिरे हुए बिल्लियों के बड़े ढेर में उतरना चाहिए। + +![Falling cats](images/falling-cats.png) \ No newline at end of file diff --git a/hi-IN/step_4.md b/hi-IN/step_4.md new file mode 100644 index 0000000..23b788b --- /dev/null +++ b/hi-IN/step_4.md @@ -0,0 +1,115 @@ +## बिल्लियों को चलाएँ + +एक बार जब बिल्ली फर्श पर पहुँच जाती है, तो उसे धीरे-धीरे दाईं ओर जाना चाहिए। + +\--- task \--- + +`when I start as a clone`{:class="block3control"}खाने में कोड जोड़े जिससे cat स्प्राइट`move ten steps`{:class="block3motion"}, और स्प्राइट के दोनों कॉस्ट्यूम (costumes) को हर 0.1 सेकंड में बदले जिससे यह लगे की बिल्ली चल रही हैं। + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +बिल्ली स्प्राइट (cat sprite) को चलाने के लिए `move 10 steps`{:class="block3motion"}, और हर `0.1 seconds`{:class="block3control"} पर कॉस्ट्यूम/पोशाक (costume) बदलने के लिए `switch costume`{:class="block3looks"} का उपयोग करें। इस कोड को भी `forever`{:class="block3control"} दोहराना चाहिए, बिल्ली को गिराने वाले कोड की तरह। + +\--- /hint \--- + +\--- hint \--- + +आपको इन कोड ब्लॉक की ज़रुरत पड़ेगी: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +आपका कोड कुछ ऐसा दिखना चाहिए: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +हरे झंडे को दबाएँ और जाँचें कि बिल्लियाँ अब नीचे नीले मंच के साथ चलती हैं। + +\--- /task \--- + +यदि आप खाली जगह पर पुल बनाते हैं ताकि बिल्लियाँ स्टेज के दाईं ओर पूरे रास्ते पर चल सकें, तो आप देख सकते हैं कि वे अंत में दाहिनी दीवार में जाकर अटक जाती हैं। + +![Flailing cats at the edge](images/flailing-at-edge.png) + +\--- task \--- + +`forever`{:class="block3control"} लूप (loop) को निकालें, और इसके बजाय एक अलग लूप जोड़ें जिससे बिल्लियां केवल तब तक चले जब तक वे किसी किनारे पर नहीं पहुँच जातीं। जब कोई बिल्ली स्टेज के किनारे पर पहुँच जाती है, तो उसे गायब हो जाना चाहिए। + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +हरे झंडे को दबाएं और जांचें कि जब वे स्टेज के किनारे तक पहुंचते हैं तो बिल्लियां गायब हो जाती हैं। + +\--- /task \--- + +आप देख सकते हैं कि, यदि बिल्लियाँ छेद में गिरती हैं, तो वे गायब नहीं होती हैं, बल्कि नीचे तल में अटक जाती हैं। ऐसा इसलिए है क्योंकि वे नीचे की तरफ गिरने की कोशिश करती रहती हैं। + +यह उस कोड का हिस्सा है जो बिल्ली को बताता है कि वह तब तक गिरती रहे जब तक कि वह नीले रंग को नहीं छू लेती: + +```blocks3 +repeat until +end +``` + +हालांकि, छेद में, बिल्ली कभी भी नीले रंग तक नहीं पहुँच सकती, इसलिए यह हमेशा के लिए अटक जाती है। + +\--- task \--- + +इस लूप में अधिक ब्लॉक जोड़ें, ताकि यह तब तक दोहराता रहे जब तक कि बिल्ली स्प्राइट नीले रंग को न छू ले, `or`{:class="block3operators"} `touching the edge`{:class="block3sensing"} का उपयोग करें। इस तरह, स्प्राइट अगर स्टेज के किनारे तक पहुँच जाता है तो वह गिरने की कोशिश करना बंद कर देता है। + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/hi-IN/step_5.md b/hi-IN/step_5.md new file mode 100644 index 0000000..e282d4c --- /dev/null +++ b/hi-IN/step_5.md @@ -0,0 +1,65 @@ +## रेखाओं से जुड़े रहें + +आप देख सकते हैं कि, यदि आप दो प्लेटफार्मों के बीच एक नीचा पुल बनाते हैं, या ऊपर की ओर ढलान वाली एक रेखा खींचते हैं, तो बिल्लियाँ प्लेटफार्म के ऊपर चलने के बजाय उसमें से निकल कर जाती हैं! + +![Cats walking through the platform](images/cat-walk-through-platform.png) + +\--- task \--- + +बिल्ली स्प्राइट के कोड में, `next costume`{:class="block3looks"} ब्लॉक से पहले एक और लूप जोड़ें। इस बार लूप को बिल्ली को यह बताना चाहिए कि जब तक वह नीले रंग को न छू ले, तब तक उसे `2` से ऊपर की ओर जाना चाहिए। + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +बिल्ली को बार-बार ऊपर जाना चाहिए `move up 2`{:class="block3motion"} `repeatedly until`{:class="block3control"} जब तक वह नीले रंग को न छू ले `not`{:class="block3operators"} `touching blue`{:class="block3sensing"} का उपयोग करें | + +\--- /hint \--- + +\--- hint \--- + +आपको इन कोड ब्लॉक्स की ज़रुरत पड़ेगी: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +आपका कोड ऐसा दिखना चाहिए: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +हरे झंडे पर क्लिक करें और एक रेखा खींचने की कोशिश करें जिसकी ढलान ऊपर की ओर हो। जाँच करें कि आपकी बिल्ली इस रेखा का अनुसरण (follow) करती है। + +\--- /task \--- \ No newline at end of file diff --git a/hi-IN/step_6.md b/hi-IN/step_6.md new file mode 100644 index 0000000..5c4a4f6 --- /dev/null +++ b/hi-IN/step_6.md @@ -0,0 +1,89 @@ +## सुरक्षित रहें + +गेम का उद्देश्य एक रास्ता बनाकर बिल्लियों को सुरक्षित मार्गदर्शन करना है ताकि वे दरवाजे तक पहुँच सकें। दरवाजे तक कितनी बिल्लियाँ पहुँचती हैं, इस पर नज़र रखने के लिए एक स्कोर वेरिएबल (score variable) बनाएँ। + +\--- task \--- + +`score`{:class="block3variables"} नामक एक वेरिएबल (variable) बनाएं | + +![Cat sprite](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +हर बार जब कोई बिल्ली दरवाजे तक पहुँचती है तो `score`{:class="block3variables"} में `1` जोड़ने के लिए अपने बिल्ली स्प्राइट में कोड जोड़ें। साथ ही गेम के आरंभ में `when the flag is clicked`{:class="block3events"} में `score`{:class="block3variables"} को `0` सेट करें। + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +यदि बिल्ली दरवाजा स्प्राइट को छूती है तो उपयोग करें `If`{:class="block3control"} the cat is `touching the door sprite`{:class="block3sensing"}, फिर जोड़ें `add 1 to the score`{:class="block3variables"}। + +\--- /hint \--- + +\--- hint \--- + +यहाँ नए कोड ब्लॉक दिए गए हैं जिन्हें आपको अपनी `when I start as a clone` स्क्रिप्ट में जोड़ने की आवश्यकता होगी: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +आपका कोड ऐसा दिखना चाहिए: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +कुछ और कोड जोड़ें ताकि जब बिल्ली स्प्राइट दरवाजे तक पहुँच जाए, तो बिल्ली 'म्याऊँ' ('meow') की आवाज करे और फिर गायब होजाए। + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/hi-IN/step_7.md b/hi-IN/step_7.md new file mode 100644 index 0000000..dfb1406 --- /dev/null +++ b/hi-IN/step_7.md @@ -0,0 +1,13 @@ +## चुनौती: अधिक बाधाएँ + +फिलहाल, गेम जीतना बहुत आसान है। क्या आप अपने गेम को कठिन बनाने के लिए कुछ और सोच सकते हैं? + ++ विभिन्न प्लेटफ़ॉर्म डिज़ाइनों (platform designs) के साथ अधिक पृष्ठभूमियाँ (backgrounds) जोड़ें। + ++ कौन सी पृष्ठभूमि प्रदर्शित होती है, उसके आधार पर दरवाजे के स्थान को बदलें। + ++ चलती बाधाओं के रूप में और स्प्राइट जोड़ें। शायद आप आवारे कुत्ते या घूमने वाली नोकीला छड़ी जोड़ सकते हैं, जिनसे बिल्लियों को बचने की ज़रूरत है? + ++ गेम में लाइनें खींचने के लिए केवल खिलाड़ी को सीमित मात्रा में "स्याही (ink)" का उपयोग करने की अनुमति दें। आप एक टाइमर वेरिएबल (timer variable) बनाकर इसका ट्रैक (track) रख सकते हैं कि कितनी "ink" का उपयोग किया गया है जो यह रिकॉर्ड रखता है कि माउस को कितनी देर तक दबाए रखा गया है। + ++ खिलाड़ी को यह दिखाने के लिए एक स्प्राइट बनाएँ कि कितनी स्याही बची है। \ No newline at end of file diff --git a/hi-IN/step_8.md b/hi-IN/step_8.md new file mode 100644 index 0000000..dcf57d1 --- /dev/null +++ b/hi-IN/step_8.md @@ -0,0 +1,19 @@ +## आगे क्या? + +[Flower generator](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects) (फूल जनरेटर) प्रोजेक्ट बनाने का प्रयास करें, जिसमें आप फूलों के पैटर्न बनाने के लिए कस्टम ब्लॉकों का उपयोग करेंगे। + +\--- no-print \--- + +थोड़े से फूल बनाने के लिए `f` दबाएँ, या बहुत से अनोखी फूल बनाने के लिए `r`दबाएँ, या फूलों का कोई भी पैटर्न बनाने के लिए `p` दबाएँ। + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![random flowers](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/hr-HR/images/banner.png b/hr-HR/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/hr-HR/images/banner.png differ diff --git a/hr-HR/images/cat-sprite.png b/hr-HR/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/hr-HR/images/cat-sprite.png differ diff --git a/hr-HR/images/cat-walk-through-platform.png b/hr-HR/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/hr-HR/images/cat-walk-through-platform.png differ diff --git a/hr-HR/images/cats-finished.png b/hr-HR/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/hr-HR/images/cats-finished.png differ diff --git a/hr-HR/images/door-sprite.png b/hr-HR/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/hr-HR/images/door-sprite.png differ diff --git a/hr-HR/images/draw-a-line.png b/hr-HR/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/hr-HR/images/draw-a-line.png differ diff --git a/hr-HR/images/falling-cats.png b/hr-HR/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/hr-HR/images/falling-cats.png differ diff --git a/hr-HR/images/flailing-at-edge.png b/hr-HR/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/hr-HR/images/flailing-at-edge.png differ diff --git a/hr-HR/images/flower-random.png b/hr-HR/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/hr-HR/images/flower-random.png differ diff --git a/hr-HR/images/pen-sprite.png b/hr-HR/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/hr-HR/images/pen-sprite.png differ diff --git a/hr-HR/meta.yml b/hr-HR/meta.yml new file mode 100644 index 0000000..c1c0ecc --- /dev/null +++ b/hr-HR/meta.yml @@ -0,0 +1,30 @@ +--- +title: CATS! +hero_image: images/banner.png +description: Create a game in which you guide cats to safety and stop them from falling into holes +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Introduction + - + title: Draw lines + - + title: Clone cats + completion: + - engaged + - + title: Make the cats move + - + title: Stick to the lines + - + title: Get to safety + completion: + - internal + - + title: 'Challenge: more obstacles' + challenge: true + - + title: What next? diff --git a/hr-HR/resources/cats-resources.sb3 b/hr-HR/resources/cats-resources.sb3 new file mode 100644 index 0000000..d952bff Binary files /dev/null and b/hr-HR/resources/cats-resources.sb3 differ diff --git a/hr-HR/solutions/cats-solution.sb3 b/hr-HR/solutions/cats-solution.sb3 new file mode 100644 index 0000000..a2dc7c8 Binary files /dev/null and b/hr-HR/solutions/cats-solution.sb3 differ diff --git a/hr-HR/step_1.md b/hr-HR/step_1.md new file mode 100644 index 0000000..838986d --- /dev/null +++ b/hr-HR/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +This is the **Scratch 3** version of the project. There is also a [Scratch 2 version of the project](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Introduction + +In this project, you will create a game in which you need to guide cats to safety and not let any of them fall through the gaps! + +### What you will make + +\--- no-print \--- + +Click and drag with the mouse to draw a line with the pencil. Your goal is to stop the cats from falling into holes by creating a safe path to the exit. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Cats finished](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: What you will learn + ++ How to use a `forever`{:class="block3control"} loop to constantly generate moving cats ++ How to use a `repeat until`{:class="block3control"} loop to ensure your cats follow a line + +\--- /collapse \--- + +## \--- collapse \--- + +## title: What you will need + +### Hardware + ++ A computer capable of running Scratch 3 + +### Software + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### Downloads + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Additional notes for educators + +\--- no-print \--- + +If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/hr-HR/step_2.md b/hr-HR/step_2.md new file mode 100644 index 0000000..264770c --- /dev/null +++ b/hr-HR/step_2.md @@ -0,0 +1,140 @@ +## Draw lines + +\--- task \--- + +Open the 'CATS!' Scratch starter project. + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +If you have a Scratch account you can make a copy by clicking **Remix**. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Add the Pen extension to your project. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Click on the sprite called 'Pen', and add code to set the pen colour to the same blue as the obstacles on the Stage. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +To select a colour, click on the colour square in the `set pen color`{:class="block3extensions"} block to make your mouse cursor turn into a pipette, and then click on the correct colour on the Stage. + +\--- /task \--- + +\--- task \--- + +Add some more code to make the sprite follow the mouse pointer. Test your program to check that the code works. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Add some code to tell the sprite to draw a line on the Stage if the mouse button is pressed down. + +![Pen sprite](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the `mouse is down`{:class="block3sensing"}, put the `pen down`{:class="block3extensions"}, and `else`{:class="block3control"}, lift the `pen up`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Test your code. You should be able to click and drag with the mouse to draw a blue line on the Stage. + +![Draw a line](images/draw-a-line.png) + +\--- /task \--- + +You probably see that a blue dot always appears in the top right-hand corner of the Stage (it's circled in the image above). This is because, when you click the green flag to start the game, you press the mouse down, and so the pen immediately starts drawing. + +\--- task \--- + +To stop this from happening, add a `pen up`{:class="block3extensions"} block at the start of the script, and a `wait one second`{:class="block3control"} block above the `forever`{:class="block3control"} block. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/hr-HR/step_3.md b/hr-HR/step_3.md new file mode 100644 index 0000000..d5f8d46 --- /dev/null +++ b/hr-HR/step_3.md @@ -0,0 +1,73 @@ +## Clone cats + +You want a never-ending stream of cats that the player has to guide along the path to the exit. + +\--- task \--- + +Click on the sprite called 'Cat', and add some code to `hide`{:class="block3looks"} the sprite, and also to `clone`{:class="block3control"} it every three seconds. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +If you run the program now, nothing happens on the Stage. To check that a new Cat sprite clone is created every three seconds, make each clone appear and fall out of the sky. + +\--- task \--- + +Add code to tell the sprite that `when it starts as a clone`{:class="block3control"}, it should `show`{:class="block3looks"} itself and fall until it `touches`{:class="block3sensing"} the blue floor that is drawn on the Stage. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`When the sprite starts as a clone`{:class="block3control"}, `show`{:class="block3looks"} the sprite. `Repeatedly`{:class="block3control"} `Change`{:class="block3motion"} the sprite's `y` coordinate by `-2`, until the sprite `touches`{:class="block3sensing"} the blue Stage. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +When you click the green flag, you should see a new cat fall from the top of the Stage every three seconds. Every cat should land in a big pile of overlapping cats on the blue floor at the bottom. + +![Falling cats](images/falling-cats.png) \ No newline at end of file diff --git a/hr-HR/step_4.md b/hr-HR/step_4.md new file mode 100644 index 0000000..8c10235 --- /dev/null +++ b/hr-HR/step_4.md @@ -0,0 +1,115 @@ +## Make the cats move + +Once a cat reaches the floor, it should step slowly to the right. + +\--- task \--- + +Add code to the `when I start as a clone`{:class="block3control"} section to make the cat sprite `move ten steps`{:class="block3motion"}, and switch between the sprite's two costumes every 0.1 seconds to make the cat look like it's walking. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat sprite should `move 10 steps`{:class="block3motion"}, and `switch costume`{:class="block3looks"} every `0.1 seconds`{:class="block3control"}. This code should repeat `forever`{:class="block3control"}, just like the code to make the cat fall. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats now move along the blue platform at the bottom. + +\--- /task \--- + +If you draw a bridge across the gap so that the cats can get all the way to the right side of the Stage, you can see that they end up getting stuck walking into the right wall. + +![Flailing cats at the edge](images/flailing-at-edge.png) + +\--- task \--- + +Remove the `forever`{:class="block3control"} loop, and instead add a different loop to make the cats only walk until they reach an edge. When a cat reaches the edge of the Stage, it should disappear. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats disappear when they reach the edge of the Stage. + +\--- /task \--- + +You may notice that, if the cats fall into the hole, they don't disappear but instead get stuck at the bottom. This is because they keep trying to fall downwards. + +This is the part of the code that tells the cat to keep falling until it touches blue: + +```blocks3 +repeat until +end +``` + +However, in the hole, the cat can never reach blue, so it is stuck forever. + +\--- task \--- + +Add more blocks to this loop so that it repeats until the cat sprite is touching blue `or`{:class="block3operators"} `touching the edge`{:class="block3sensing"}. This way, the sprite stops trying to fall if it reaches the edge of the Stage. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/hr-HR/step_5.md b/hr-HR/step_5.md new file mode 100644 index 0000000..ff776e8 --- /dev/null +++ b/hr-HR/step_5.md @@ -0,0 +1,65 @@ +## Stick to the lines + +You might notice that, if you draw a low bridge between the two platforms, or a line that slopes upwards, the cats end up walking through the platform rather than on top of it! + +![Cats walking through the platform](images/cat-walk-through-platform.png) + +\--- task \--- + +In the code for the cat sprite, add another loop before the `next costume`{:class="block3looks"} block. This time, the loop should tell the cat to move upwards by `2` until it is not touching blue. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat should `move up 2`{:class="block3motion"} `repeatedly until`{:class="block3control"} it is `not`{:class="block3operators"} `touching blue`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Click the green flag and try drawing a line that slopes upwards. Check that your cat follows this line. + +\--- /task \--- \ No newline at end of file diff --git a/hr-HR/step_6.md b/hr-HR/step_6.md new file mode 100644 index 0000000..deb146e --- /dev/null +++ b/hr-HR/step_6.md @@ -0,0 +1,89 @@ +## Get to safety + +The object of the game is to guide the cats to safety by creating a path so they can reach the door. Create a score variable to keep track of how many cats reach the door. + +\--- task \--- + +Create a variable called `score`{:class="block3variables"}. + +![Cat sprite](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Add code to your cat sprite to add `1` to the `score`{:class="block3variables"} each time a cat reaches the door. Also set `score`{:class="block3variables"} to `0` `when the flag is clicked`{:class="block3events"} at the start of the game. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the cat is `touching the door sprite`{:class="block3sensing"}, then `add 1 to the score`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the new code blocks you need to add to your `when I start as a clone` script: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Add some more code so that, when a cat sprite reaches the door, the cat makes a 'meow' sound and then disappears. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/hr-HR/step_7.md b/hr-HR/step_7.md new file mode 100644 index 0000000..6e609ac --- /dev/null +++ b/hr-HR/step_7.md @@ -0,0 +1,13 @@ +## Challenge: more obstacles + +At the moment, the game is rather easy to win. Can you think of ideas to you make your game harder? + ++ Add more backgrounds with different platform designs. + ++ Move the location of the door depending on which background is displayed. + ++ Add more sprites as moving obstacles. Perhaps you could have roaming dogs or rotating spikes the cats need to avoid? + ++ Only allow the player to use a limited amount of "ink" to draw lines in the game. You can keep track of how much "ink" is used by creating a timer variable that records how long the mouse is held down. + ++ Create a sprite to show the player how much ink is left. \ No newline at end of file diff --git a/hr-HR/step_8.md b/hr-HR/step_8.md new file mode 100644 index 0000000..2295a72 --- /dev/null +++ b/hr-HR/step_8.md @@ -0,0 +1,19 @@ +## What next? + +Try the [Flower generator](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects) project, where you will use custom blocks to create flower patterns. + +\--- no-print \--- + +Press `f` to draw a few flowers, or `r` to draw lots of random flowers, or `p` to draw a flower pattern. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![random flowers](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/hu-HU/images/banner.png b/hu-HU/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/hu-HU/images/banner.png differ diff --git a/hu-HU/images/cat-sprite.png b/hu-HU/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/hu-HU/images/cat-sprite.png differ diff --git a/hu-HU/images/cat-walk-through-platform.png b/hu-HU/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/hu-HU/images/cat-walk-through-platform.png differ diff --git a/hu-HU/images/cats-finished.png b/hu-HU/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/hu-HU/images/cats-finished.png differ diff --git a/hu-HU/images/door-sprite.png b/hu-HU/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/hu-HU/images/door-sprite.png differ diff --git a/hu-HU/images/draw-a-line.png b/hu-HU/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/hu-HU/images/draw-a-line.png differ diff --git a/hu-HU/images/falling-cats.png b/hu-HU/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/hu-HU/images/falling-cats.png differ diff --git a/hu-HU/images/flailing-at-edge.png b/hu-HU/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/hu-HU/images/flailing-at-edge.png differ diff --git a/hu-HU/images/flower-random.png b/hu-HU/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/hu-HU/images/flower-random.png differ diff --git a/hu-HU/images/pen-sprite.png b/hu-HU/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/hu-HU/images/pen-sprite.png differ diff --git a/hu-HU/meta.yml b/hu-HU/meta.yml new file mode 100644 index 0000000..ea88a99 --- /dev/null +++ b/hu-HU/meta.yml @@ -0,0 +1,26 @@ +--- +title: CATS! +hero_image: images/banner.png +description: Create a game in which you guide cats to safety and stop them from falling into holes +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Introduction + - + title: Draw lines + - + title: Clone cats + - + title: Make the cats move + - + title: Stick to the lines + - + title: Get to safety + - + title: "Challenge: more obstacles" + challenge: true + - + title: What next? diff --git a/hu-HU/resources/cats-resources.sb3 b/hu-HU/resources/cats-resources.sb3 new file mode 100644 index 0000000..d952bff Binary files /dev/null and b/hu-HU/resources/cats-resources.sb3 differ diff --git a/hu-HU/solutions/cats-solution.sb3 b/hu-HU/solutions/cats-solution.sb3 new file mode 100644 index 0000000..a2dc7c8 Binary files /dev/null and b/hu-HU/solutions/cats-solution.sb3 differ diff --git a/hu-HU/step_1.md b/hu-HU/step_1.md new file mode 100644 index 0000000..75244c0 --- /dev/null +++ b/hu-HU/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +This is the **Scratch 3** version of the project. There is also a [Scratch 2 version of the project](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Introduction + +In this project, you will create a game in which you need to guide cats to safety and not let any of them fall through the gaps! + +### What you will make + +\--- no-print \--- + +Click and drag with the mouse to draw a line with the pencil. Your goal is to stop the cats from falling into holes by creating a safe path to the exit. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Cats finished](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: What you will learn + ++ How to use a `forever`{:class="block3control"} loop to constantly generate moving cats ++ How to use a `repeat until`{:class="block3control"} loop to ensure your cats follow a line + +\--- /collapse \--- + +## \--- collapse \--- + +## title: What you will need + +### Hardware + ++ A computer capable of running Scratch 3 + +### Software + ++ Scratch 3 (either [online](http://rpf.io/scratchon){:target="_blank"} or [offline](http://rpf.io/scratchoff){:target="_blank"}) + +### Downloads + ++ [Offline starter project](http://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Additional notes for educators + +\--- no-print \--- + +If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](http://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/hu-HU/step_2.md b/hu-HU/step_2.md new file mode 100644 index 0000000..bd3358c --- /dev/null +++ b/hu-HU/step_2.md @@ -0,0 +1,140 @@ +## Draw lines + +\--- task \--- + +Open the 'CATS!' Scratch starter project. + +**Online:** open the starter project at [rpf.io/cats-on](http://rpf.io/cats-on){:target="_blank"}. + +If you have a Scratch account you can make a copy by clicking **Remix**. + +**Offline:** open the [starter project](http://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](http://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Add the Pen extension to your project. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Click on the sprite called 'Pen', and add code to set the pen colour to the same blue as the obstacles on the Stage. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +To select a colour, click on the colour square in the `set pen color`{:class="block3extensions"} block to make your mouse cursor turn into a pipette, and then click on the correct colour on the Stage. + +\--- /task \--- + +\--- task \--- + +Add some more code to make the sprite follow the mouse pointer. Test your program to check that the code works. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Add some code to tell the sprite to draw a line on the Stage if the mouse button is pressed down. + +![Pen sprite](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the `mouse is down`{:class="block3sensing"}, put the `pen down`{:class="block3extensions"}, and `else`{:class="block3control"}, lift the `pen up`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Test your code. You should be able to click and drag with the mouse to draw a blue line on the Stage. + +![Draw a line](images/draw-a-line.png) + +\--- /task \--- + +You probably see that a blue dot always appears in the top right-hand corner of the Stage (it's circled in the image above). This is because, when you click the green flag to start the game, you press the mouse down, and so the pen immediately starts drawing. + +\--- task \--- + +To stop this from happening, add a `pen up`{:class="block3extensions"} block at the start of the script, and a `wait one second`{:class="block3control"} block above the `forever`{:class="block3control"} block. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/hu-HU/step_3.md b/hu-HU/step_3.md new file mode 100644 index 0000000..d5f8d46 --- /dev/null +++ b/hu-HU/step_3.md @@ -0,0 +1,73 @@ +## Clone cats + +You want a never-ending stream of cats that the player has to guide along the path to the exit. + +\--- task \--- + +Click on the sprite called 'Cat', and add some code to `hide`{:class="block3looks"} the sprite, and also to `clone`{:class="block3control"} it every three seconds. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +If you run the program now, nothing happens on the Stage. To check that a new Cat sprite clone is created every three seconds, make each clone appear and fall out of the sky. + +\--- task \--- + +Add code to tell the sprite that `when it starts as a clone`{:class="block3control"}, it should `show`{:class="block3looks"} itself and fall until it `touches`{:class="block3sensing"} the blue floor that is drawn on the Stage. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`When the sprite starts as a clone`{:class="block3control"}, `show`{:class="block3looks"} the sprite. `Repeatedly`{:class="block3control"} `Change`{:class="block3motion"} the sprite's `y` coordinate by `-2`, until the sprite `touches`{:class="block3sensing"} the blue Stage. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +When you click the green flag, you should see a new cat fall from the top of the Stage every three seconds. Every cat should land in a big pile of overlapping cats on the blue floor at the bottom. + +![Falling cats](images/falling-cats.png) \ No newline at end of file diff --git a/hu-HU/step_4.md b/hu-HU/step_4.md new file mode 100644 index 0000000..8c10235 --- /dev/null +++ b/hu-HU/step_4.md @@ -0,0 +1,115 @@ +## Make the cats move + +Once a cat reaches the floor, it should step slowly to the right. + +\--- task \--- + +Add code to the `when I start as a clone`{:class="block3control"} section to make the cat sprite `move ten steps`{:class="block3motion"}, and switch between the sprite's two costumes every 0.1 seconds to make the cat look like it's walking. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat sprite should `move 10 steps`{:class="block3motion"}, and `switch costume`{:class="block3looks"} every `0.1 seconds`{:class="block3control"}. This code should repeat `forever`{:class="block3control"}, just like the code to make the cat fall. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats now move along the blue platform at the bottom. + +\--- /task \--- + +If you draw a bridge across the gap so that the cats can get all the way to the right side of the Stage, you can see that they end up getting stuck walking into the right wall. + +![Flailing cats at the edge](images/flailing-at-edge.png) + +\--- task \--- + +Remove the `forever`{:class="block3control"} loop, and instead add a different loop to make the cats only walk until they reach an edge. When a cat reaches the edge of the Stage, it should disappear. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats disappear when they reach the edge of the Stage. + +\--- /task \--- + +You may notice that, if the cats fall into the hole, they don't disappear but instead get stuck at the bottom. This is because they keep trying to fall downwards. + +This is the part of the code that tells the cat to keep falling until it touches blue: + +```blocks3 +repeat until +end +``` + +However, in the hole, the cat can never reach blue, so it is stuck forever. + +\--- task \--- + +Add more blocks to this loop so that it repeats until the cat sprite is touching blue `or`{:class="block3operators"} `touching the edge`{:class="block3sensing"}. This way, the sprite stops trying to fall if it reaches the edge of the Stage. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/hu-HU/step_5.md b/hu-HU/step_5.md new file mode 100644 index 0000000..ff776e8 --- /dev/null +++ b/hu-HU/step_5.md @@ -0,0 +1,65 @@ +## Stick to the lines + +You might notice that, if you draw a low bridge between the two platforms, or a line that slopes upwards, the cats end up walking through the platform rather than on top of it! + +![Cats walking through the platform](images/cat-walk-through-platform.png) + +\--- task \--- + +In the code for the cat sprite, add another loop before the `next costume`{:class="block3looks"} block. This time, the loop should tell the cat to move upwards by `2` until it is not touching blue. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat should `move up 2`{:class="block3motion"} `repeatedly until`{:class="block3control"} it is `not`{:class="block3operators"} `touching blue`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Click the green flag and try drawing a line that slopes upwards. Check that your cat follows this line. + +\--- /task \--- \ No newline at end of file diff --git a/hu-HU/step_6.md b/hu-HU/step_6.md new file mode 100644 index 0000000..deb146e --- /dev/null +++ b/hu-HU/step_6.md @@ -0,0 +1,89 @@ +## Get to safety + +The object of the game is to guide the cats to safety by creating a path so they can reach the door. Create a score variable to keep track of how many cats reach the door. + +\--- task \--- + +Create a variable called `score`{:class="block3variables"}. + +![Cat sprite](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Add code to your cat sprite to add `1` to the `score`{:class="block3variables"} each time a cat reaches the door. Also set `score`{:class="block3variables"} to `0` `when the flag is clicked`{:class="block3events"} at the start of the game. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the cat is `touching the door sprite`{:class="block3sensing"}, then `add 1 to the score`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the new code blocks you need to add to your `when I start as a clone` script: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Add some more code so that, when a cat sprite reaches the door, the cat makes a 'meow' sound and then disappears. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/hu-HU/step_7.md b/hu-HU/step_7.md new file mode 100644 index 0000000..6e609ac --- /dev/null +++ b/hu-HU/step_7.md @@ -0,0 +1,13 @@ +## Challenge: more obstacles + +At the moment, the game is rather easy to win. Can you think of ideas to you make your game harder? + ++ Add more backgrounds with different platform designs. + ++ Move the location of the door depending on which background is displayed. + ++ Add more sprites as moving obstacles. Perhaps you could have roaming dogs or rotating spikes the cats need to avoid? + ++ Only allow the player to use a limited amount of "ink" to draw lines in the game. You can keep track of how much "ink" is used by creating a timer variable that records how long the mouse is held down. + ++ Create a sprite to show the player how much ink is left. \ No newline at end of file diff --git a/hu-HU/step_8.md b/hu-HU/step_8.md new file mode 100644 index 0000000..2295a72 --- /dev/null +++ b/hu-HU/step_8.md @@ -0,0 +1,19 @@ +## What next? + +Try the [Flower generator](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects) project, where you will use custom blocks to create flower patterns. + +\--- no-print \--- + +Press `f` to draw a few flowers, or `r` to draw lots of random flowers, or `p` to draw a flower pattern. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![random flowers](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/it-IT/images/banner.png b/it-IT/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/it-IT/images/banner.png differ diff --git a/it-IT/images/cat-sprite.png b/it-IT/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/it-IT/images/cat-sprite.png differ diff --git a/it-IT/images/cat-walk-through-platform.png b/it-IT/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/it-IT/images/cat-walk-through-platform.png differ diff --git a/it-IT/images/cats-finished.png b/it-IT/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/it-IT/images/cats-finished.png differ diff --git a/it-IT/images/door-sprite.png b/it-IT/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/it-IT/images/door-sprite.png differ diff --git a/it-IT/images/draw-a-line.png b/it-IT/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/it-IT/images/draw-a-line.png differ diff --git a/it-IT/images/falling-cats.png b/it-IT/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/it-IT/images/falling-cats.png differ diff --git a/it-IT/images/flailing-at-edge.png b/it-IT/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/it-IT/images/flailing-at-edge.png differ diff --git a/it-IT/images/flower-random.png b/it-IT/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/it-IT/images/flower-random.png differ diff --git a/it-IT/images/pen-sprite.png b/it-IT/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/it-IT/images/pen-sprite.png differ diff --git a/it-IT/meta.yml b/it-IT/meta.yml new file mode 100644 index 0000000..21baadc --- /dev/null +++ b/it-IT/meta.yml @@ -0,0 +1,30 @@ +--- +title: GATTI! +hero_image: images/banner.png +description: Crea un gioco in cui porti i gatti in salvo e impedisci loro di cadere nelle buche +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Introduzione + - + title: Traccia delle linee + - + title: Clona i gatti + completion: + - engaged + - + title: Fai muovere i gatti + - + title: Aderisci alle linee + - + title: Mettiti in salvo + completion: + - internal + - + title: 'Sfida: Altri ostacoli' + challenge: true + - + title: E poi? diff --git a/it-IT/resources/cats-resources.sb3 b/it-IT/resources/cats-resources.sb3 new file mode 100644 index 0000000..9d21028 Binary files /dev/null and b/it-IT/resources/cats-resources.sb3 differ diff --git a/it-IT/solutions/cats-solution.sb3 b/it-IT/solutions/cats-solution.sb3 new file mode 100644 index 0000000..b10bf6f Binary files /dev/null and b/it-IT/solutions/cats-solution.sb3 differ diff --git a/it-IT/step_1.md b/it-IT/step_1.md new file mode 100644 index 0000000..5a0c193 --- /dev/null +++ b/it-IT/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +Questa è la versione **Scratch 3** del progetto. Esiste anche una versione [Scratch 2 del progetto](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Introduzione + +In questo progetto, creerai un gioco in cui dovrai portare in salvo i gatti e non dovrai farli cadere nelle buche! + +### Cosa farai + +\--- no-print \--- + +Clicca e trascina con il mouse per tracciare una linea con la matita. Il tuo obiettivo è quello di impedire ai gatti di cadere nelle buche creando un percorso sicuro verso l'uscita. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Gatti finiti](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: Cosa imparerai + ++ Come utilizzare un ciclo `per sempre`{:class="block3control"} per generare costantemente gatti in movimento ++ Come utilizzare un ciclo `ripeti fino a quando`{:class="block3control"} per assicurarti che i tuoi gatti seguano una linea + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Di cosa avrai bisogno + +### Hardware + ++ Un computer in grado di eseguire Scratch 3 + +### Software + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### Download + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Informazioni aggiuntive per gli educatori + +\--- no-print \--- + +Se intendete stampare questo progetto, cliccate su [Versione stampabile](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/it-IT/step_2.md b/it-IT/step_2.md new file mode 100644 index 0000000..cdd24b0 --- /dev/null +++ b/it-IT/step_2.md @@ -0,0 +1,140 @@ +## Traccia delle linee + +\--- task \--- + +Apri il progetto Scratch per principianti "GATTI!". + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +Se hai un account Scratch puoi fare una copia facendo clic su **Remix**. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Aggiungi l'estensione Penna al tuo progetto. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Fai clic sullo sprite chiamato "Penna" e aggiungi il codice per impostare il colore della penna sullo stesso blu degli ostacoli sulla stage. + +![Sprite penna](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +Per selezionare un colore, fai clic sul riquadro dei colori nel blocco `porta colore penna a`{:class="block3extensions"} per trasformare il cursore del mouse in una pipetta, quindi fai clic sul colore corretto sullo Stage. + +\--- /task \--- + +\--- task \--- + +Aggiungi altro codice per fare in modo che lo sprite segua il puntatore del mouse. Prova il tuo programma per verificare che il codice funzioni. + +![Sprite penna](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Aggiungi del codice per dire allo sprite di tracciare una linea sullo Stage se il pulsante del mouse è premuto. + +![Sprite penna](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`Se`{:class="block3control"} il `mouse è premuto`{:class="block3sensing"}, `aziona la penna`{:class="block3extensions"} e `altrimenti`{:class="block3control"}, `solleva la penna`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Ecco i blocchi di codice che ti servono: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +Ecco come dovrebbe apparire il tuo codice: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Prova il tuo codice. Dovresti essere in grado di fare clic e trascinare il mouse per disegnare una linea blu sullo Stage. + +![Traccia una linea](images/draw-a-line.png) + +\--- /task \--- + +Probabilmente vedrai che un punto blu appare sempre nell'angolo in alto a destra dello Stage (è cerchiato nell'immagine sopra). Questo perché, quando si fa clic sulla bandiera verde per iniziare il gioco, si preme il mouse e quindi la penna inizia immediatamente a disegnare. + +\--- task \--- + +Per evitare che ciò accada, aggiungi un blocco `penna su`{:class="block3extensions"} all'inizio dello script e un blocco `attendi un secondo`{:class="block3control"} sopra il blocco `per sempre`{:class="block3control"}. + +![Sprite penna](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/it-IT/step_3.md b/it-IT/step_3.md new file mode 100644 index 0000000..7d52a07 --- /dev/null +++ b/it-IT/step_3.md @@ -0,0 +1,73 @@ +## Clona i gatti + +Vuoi un flusso infinito di gatti che il giocatore deve guidare lungo il percorso verso l'uscita. + +\--- task \--- + +Fai clic sullo sprite chiamato 'Gatto' e aggiungi del codice per `nascondere`{:class="block3looks"} lo sprite, e anche per `clonare`{:class="block3control"} lo sprite ogni tre secondi. + +![Sprite gatto](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +Se esegui il programma ora, non accade nulla sullo Stage. Per verificare che ogni tre secondi venga creato un nuovo clone dello sprite del Gatto, fai apparire e cadere tutti i cloni dal cielo. + +\--- task \--- + +Aggiungi del codice per dire allo sprite che `quando viene clonato`{:class="block3control"}, dovrebbe `mostrare`{:class="block3looks"} lo sprite e cadere finché non `tocca`{:class=block3sensing"} il pavimento blu disegnato sullo Stage. + +![Sprite gatto](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`Quando lo sprite inizia come clone`{:class="block3control"}, `mostra`{:class="block3looks"} lo sprite. `Ripetutamente`{:class="block3control"} `Cambia`{:class="block3motion"} la coordinata `y` dello sprite a `-2`, fino a quando lo sprite `tocca`{:class="block3sensing"} lo Stage di colore blu. + +\--- /hint \--- + +\--- hint \--- + +Ecco i blocchi di codice che ti servono: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +Ecco come dovrebbe apparire il tuo codice: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +Quando fai clic sulla bandiera verde, dovresti vedere un nuovo gatto cadere dalla parte alta dello Stage ogni tre secondi. Ogni gatto dovrebbe atterrare in un grande mucchio di gatti posti uno sopra l'altro sul pavimento blu nella parte inferiore. + +![Gatti che cadono](images/falling-cats.png) \ No newline at end of file diff --git a/it-IT/step_4.md b/it-IT/step_4.md new file mode 100644 index 0000000..4a99368 --- /dev/null +++ b/it-IT/step_4.md @@ -0,0 +1,115 @@ +## Fai muovere i gatti + +Una volta che un gatto raggiunge il pavimento, dovrebbe spostarsi lentamente verso destra. + +\--- task \--- + +Aggiungi del codice alla sezione `quando vengo clonato`{:class="block3control"} per far `muovere dieci passi`{:class="block3motion"} allo sprite del gatto e per far cambiare tra i due costumi dello sprite ogni 0.1 secondi per far sembrare che il gatto stia camminando. + +![Sprite gatto](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +Lo sprite del gatto dovrebbe `muovere 10 passi`{:class="block3motion"} e `cambiare costume`{:class="block3looks"} ogni `0.1 secondi`{:class="block3control"}. Questo codice si dovrebbe ripetere `per sempre`{:class="block3control"}, proprio come il codice per far cadere il gatto. + +\--- /hint \--- + +\--- hint \--- + +Ecco i blocchi di codice che ti servono: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +Ecco come dovrebbe apparire il tuo codice: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Premi la bandiera verde e controlla che i gatti si muovano ora lungo la piattaforma blu in basso. + +\--- /task \--- + +Se disegni un ponte attraverso lo spazio in modo che i gatti possano arrivare fino alla parte destra dello Stage, puoi vedere che finiscono per rimanere bloccati mentre camminano nella parete destra. + +![Gatti che si agitano sul bordo](images/flailing-at-edge.png) + +\--- task \--- + +Rimuovi il ciclo `per sempre`{:class="block3control"} e aggiungi invece un ciclo diverso per far camminare i gatti solo fino a raggiungere un bordo. Quando un gatto raggiunge il bordo dello Stage, dovrebbe scomparire. + +![Sprite gatto](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Premi la bandiera verde e verifica che i gatti scompaiano quando raggiungono il bordo dello Stage. + +\--- /task \--- + +Potresti notare che, se i gatti cadono nel buco, non scompaiono ma rimangono bloccati sul fondo. Questo perché continuano a cercare di cadere verso il basso. + +Questa è la parte del codice che dice al gatto di continuare a cadere fino a quando non tocca il blu: + +```blocks3 +repeat until +end +``` + +Comunque, nella buca, il gatto non può mai raggiungere il blu, quindi è bloccato per sempre. + +\--- task \--- + +Aggiungi più blocchi a questo ciclo in modo che si ripeta fino a quando lo sprite del gatto non tocca il blu `o`{:class="block3operators"} `tocca il bordo`{:class="block3sensing"}. In questo modo, lo sprite smette di provare a cadere se raggiunge il bordo dello Stage. + +![Sprite gatto](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/it-IT/step_5.md b/it-IT/step_5.md new file mode 100644 index 0000000..f349e71 --- /dev/null +++ b/it-IT/step_5.md @@ -0,0 +1,65 @@ +## Aderisci alle linee + +Potresti notare che, se disegni un ponte basso tra le due piattaforme, o una linea che va verso l'alto, i gatti finiscono per camminare attraverso la piattaforma anziché su di essa! + +![Gatti che camminano attraverso la piattaforma](images/cat-walk-through-platform.png) + +\--- task \--- + +Nel codice per lo sprite del gatto, aggiungi un altro ciclo prima del blocco `passa la costume seguente`{:class="block3looks"}. Stavolta, il ciclo dovrebbe dire al gatto di muoversi verso l'alto di `2`fino a quando non tocca il blu. + +![Sprite gatto](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +Il gatto dovrebbe `spostarsi verso l'alto di 2`{:class="block3motion"} `ripetutamente fino a che`{:class="block3control"} `non`{:class="block3operators"} `tocca il blu`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Ecco i blocchi di codice che ti servono: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +Ecco come dovrebbe apparire il tuo codice: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Fai clic sulla bandiera verde e prova a tracciare una linea che si inclina verso l'alto. Controlla che il tuo gatto segua questa linea. + +\--- /task \--- \ No newline at end of file diff --git a/it-IT/step_6.md b/it-IT/step_6.md new file mode 100644 index 0000000..393d2f3 --- /dev/null +++ b/it-IT/step_6.md @@ -0,0 +1,89 @@ +## Mettiti in salvo + +Lo scopo del gioco è quello di portare i gatti al sicuro creando un percorso in modo che possano raggiungere la porta. Crea una variabile di punteggio per tenere traccia della quantità di gatti che raggiungono la porta. + +\--- task \--- + +Crea una variabile denominata `punteggio`{:class="block3variables"}. + +![Sprite gatto](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Aggiungi il codice al tuo sprite del gatto per aggiungere `1` al `punteggio`{:class="block3variables"} ogni volta che un gatto raggiunge la porta. Inoltre imposta il `punteggio`{:class="block3variables"} a `0``quando si clicca sulla bandiera`{:class="block3events"} all'inizio del gioco. + +![Sprite gatto](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`Se`{:class="block3control"} il gatto `tocca lo sprite della porta`{:class="block3sensing"}, `aggiungi 1 al punteggio`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Ecco i nuovi blocchi di codice che devi aggiungere al tuo script `quando vengo clonato`: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +Ecco come dovrebbe apparire il tuo codice: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Aggiungi altro codice affinché, quando uno sprite del gatto raggiunge la porta, il gatto fa il verso "miao" e poi scompare. + +![Sprite gatto](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/it-IT/step_7.md b/it-IT/step_7.md new file mode 100644 index 0000000..5cc0966 --- /dev/null +++ b/it-IT/step_7.md @@ -0,0 +1,13 @@ +## Sfida: Ancora più ostacoli + +Al momento, la partita è piuttosto facile da vincere. Riesci a pensare a delle idee per rendere il tuo gioco più difficile? + ++ Aggiungere più sfondi con diversi disegni della piattaforma. + ++ Spostare la posizione della porta a seconda dello sfondo visualizzato. + ++ Aggiungere più sprite come ostacoli in movimento. Forse potresti avere dei cani che vagano o punte rotanti che i gatti devono cercare di evitare? + ++ Permettere al giocatore di usare solo una quantità limitata di "inchiostro" per disegnare linee nel gioco. Puoi tenere traccia di quanto "inchiostro" viene usato creando una variabile timer che registra per quanto tempo viene premuto il mouse. + ++ Creare uno sprite per mostrare al giocatore quanto inchiostro rimane. \ No newline at end of file diff --git a/it-IT/step_8.md b/it-IT/step_8.md new file mode 100644 index 0000000..c4a5fa4 --- /dev/null +++ b/it-IT/step_8.md @@ -0,0 +1,19 @@ +## E poi? + +Prova il progetto [Generatore di fiori](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects) dove userai blocchi personalizzati per creare disegni di fiori. + +\--- no-print \--- + +Premi `f` per disegnare alcuni fiori, oppure `r` per disegnare un sacco di fiori in maniera casuale, o `p` per disegnare un motivo con fiori. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![fiori in modo casuale](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/ja-JP/images/banner.png b/ja-JP/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/ja-JP/images/banner.png differ diff --git a/ja-JP/images/cat-sprite.png b/ja-JP/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/ja-JP/images/cat-sprite.png differ diff --git a/ja-JP/images/cat-walk-through-platform.png b/ja-JP/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/ja-JP/images/cat-walk-through-platform.png differ diff --git a/ja-JP/images/cats-finished.png b/ja-JP/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/ja-JP/images/cats-finished.png differ diff --git a/ja-JP/images/door-sprite.png b/ja-JP/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/ja-JP/images/door-sprite.png differ diff --git a/ja-JP/images/draw-a-line.png b/ja-JP/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/ja-JP/images/draw-a-line.png differ diff --git a/ja-JP/images/falling-cats.png b/ja-JP/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/ja-JP/images/falling-cats.png differ diff --git a/ja-JP/images/flailing-at-edge.png b/ja-JP/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/ja-JP/images/flailing-at-edge.png differ diff --git a/ja-JP/images/flower-random.png b/ja-JP/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/ja-JP/images/flower-random.png differ diff --git a/ja-JP/images/pen-sprite.png b/ja-JP/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/ja-JP/images/pen-sprite.png differ diff --git a/ja-JP/meta.yml b/ja-JP/meta.yml new file mode 100644 index 0000000..1c78c1a --- /dev/null +++ b/ja-JP/meta.yml @@ -0,0 +1,30 @@ +--- +title: ネコ! +hero_image: images/banner.png +description: ネコを安全な場所へみちびき、あなに落ちないようにするゲームを作る +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: はじめに + - + title: 線をかく + - + title: ネコのクローンを作る + completion: + - engaged + - + title: ネコを動かす + - + title: 線にそわせる + - + title: 安全な場所へ + completion: + - internal + - + title: 'チャレンジ: しょうがいぶつをふやす' + challenge: true + - + title: 次は何をしましょうか? diff --git a/ja-JP/resources/cats-resources.sb3 b/ja-JP/resources/cats-resources.sb3 new file mode 100644 index 0000000..924cebc Binary files /dev/null and b/ja-JP/resources/cats-resources.sb3 differ diff --git a/ja-JP/solutions/cats-solution.sb3 b/ja-JP/solutions/cats-solution.sb3 new file mode 100644 index 0000000..9ec380a Binary files /dev/null and b/ja-JP/solutions/cats-solution.sb3 differ diff --git a/ja-JP/step_1.md b/ja-JP/step_1.md new file mode 100644 index 0000000..51cdc91 --- /dev/null +++ b/ja-JP/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +これはプロジェクトの**Scratch 3**バージョンです。 [Scratch 2バージョンのプロジェクト](https://projects.raspberrypi.org/en/projects/cats-scratch2)もあります。 + +\--- /no-print \--- + +## はじめに + +このプロジェクトでは、ネコを安全な場所へみちびき、あなにネコを落とさないようにするゲームを作ります。 + +### 作るもの + +\--- no-print \--- + +ペンで線を引くには、マウスでクリックしてドラッグします。 このゲームのもくてきは、出口への安全な道を作ってネコがあなに落ちるのをふせぐことです。 + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![ネコ!(かんせい)](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: 学ぶこと + ++ ネコをずっと動かすために、`ずっと`{:class="block3control"}ループを使う ++ ネコがきちんと線をたどるように、 `まで繰り返す`{:class="block3control"} (くりかえす) ループを使う + +\--- /collapse \--- + +## \--- collapse \--- + +## title: 必要 (ひつよう) なもの + +### ハードウェア + ++ Scratch 3を実行できるコンピュータ + +### ソフトウェア + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### ダウンロード + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: 教育者向けの追加メモ + +\--- no-print \--- + +このプロジェクトを印刷する必要がある場合は、 [印刷用バージョン](https://projects.raspberrypi.org/en/projects/cats/print)を使用してください。 \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/ja-JP/step_2.md b/ja-JP/step_2.md new file mode 100644 index 0000000..13db314 --- /dev/null +++ b/ja-JP/step_2.md @@ -0,0 +1,140 @@ +## 線をかく + +\--- task \--- + +「ネコ!」という基本 (きほん) の Scratch プロジェクトを開きます。 + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +Scratch アカウントを持っている場合、 **リミックス**をクリックしてプロジェクトをコピーできます。 + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +プロジェクトにペン拡張機能 (かくちょうきのう) を追加 (ついか) します。 + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +「ペン」というスプライトをクリックし、ペンの色をステージにあるしょうがいぶつと同じ青色にするコードを追加します。 + +![ペンスプライト](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +色を選択 (せんたく) するには、 `ペンの色を〜にする`{:class = "block3extensions"}ブロックの色の四角をクリックし、マウスカーソルをピペットにかえ、ステージで正しい色をクリックします。 + +\--- /task \--- + +\--- task \--- + +スプライトをマウスポインターについていかせるために、さらにコードを追加します。 プログラムをテストして、コードがうまく動くかどうかをたしかめます。 + +![ペンスプライト](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +スプライトに、マウスボタンが押された (おされた) ときにステージ上に線をかくようにめいれいするコードを追加します。 + +![ペンスプライト](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`もし`{:class="block3control"}`マウスが押された`{:class="block3sensing"}なら、 `ペンを下ろし`{:class="block3extensions"}、`でなければ`{:class="block3control"}`ペンを上げます`{:class="block3extensions"}。 + +\--- /hint \--- + +\--- hint \--- + +必要なコードブロックは次のとおりです。 + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +コードは次のようになります。 + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +コードをテストしましょう。 マウスでクリックしてドラッグすると、ステージに青い線をかくことができるはずです。 + +![線をかく](images/draw-a-line.png) + +\--- /task \--- + +ステージの右上にいつも青い点が出てくると思います (上の画像 ((がぞう)) では丸でかこまれています)。 これは、緑の旗 (はた) をクリックしてゲームを始めるときにマウスボタンをおすので、すぐにペンがかき始めるからです。 + +\--- task \--- + +これをふせぐには、スクリプトの先頭に `ペンを上げる`{:class="block3extensions"}ブロックを追加し、 `ずっと`{:class="block3control"}ブロックの上に`1秒待つ`{:class="block3control"}ブロックを追加します。 + +![ペンスプライト](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/ja-JP/step_3.md b/ja-JP/step_3.md new file mode 100644 index 0000000..b24990c --- /dev/null +++ b/ja-JP/step_3.md @@ -0,0 +1,73 @@ +## ネコのクローンを作る + +このゲームには、プレイヤーが出口までの道にそってみちびく、つぎつぎと出てくるネコが必要です。 + +\--- task \--- + +「ネコ」というスプライトをクリックします。`隠す`{:class="block3looks"} (かくす) ブロックをスプライトに追加し、さらに3秒ごとにスプライトの`クローンを作ります`{:class="block3looks"}。 + +![ネコのスプライト](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +ここでプログラムを実行しても、ステージでは何も起こりません。 3秒ごとに新しいネコのスプライトのクローンが作られているのをたしかめるには、クローンをそれぞれ表示 (ひょうじ) して空から落ちるようにします。 + +\--- task \--- + +スプライトが`クローンされたとき`{:class="block3control"}、 `表示します`{:class="block3looks"}。スプライトがステージにかかれた青いゆかに`触れる`{:class="block3sensing"} (ふれる) まで落ちるようにコードを追加します。 + +![ネコのスプライト](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +スプライトが`クローンされたとき`{:class="block3control"}、 `表示します`{:class="block3looks"}。 ステージの青い部分に`触れる`{:class="block3sensing"}まで、スプライトの`y`座標 (ざひょう) を`-2`ずつ`繰り返し`{:class="block3control"} (くりかえし) `変え`{:class="block3motion"} (かえ) ます。 + +\--- /hint \--- + +\--- hint \--- + +必要なコードブロックは次のとおりです。 + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +コードは次のようになります。 + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +緑の旗をクリックすると、3秒ごとに新しいネコがステージの上部から落ちてきます。 ネコはすべて、青いゆかにある大きなネコの山にちゃくりくするはずです。 + +![落ちるネコ](images/falling-cats.png) \ No newline at end of file diff --git a/ja-JP/step_4.md b/ja-JP/step_4.md new file mode 100644 index 0000000..30ded32 --- /dev/null +++ b/ja-JP/step_4.md @@ -0,0 +1,115 @@ +## ネコを動かす + +ネコがゆかに着くと、ゆっくりと右に歩きます。 + +\--- task \--- + +`クローンされたとき`{:class="block3control"}のセクションに、ネコのスプライトを`10歩動かし`{:class="block3motion"}、0.1秒ごとに2つのコスチュームを切りかえるようにコードを追加します。 + +![ネコのスプライト](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +ネコは`10歩動き`{:class="block3motion"}、`0.1秒`{:class="block3control"}ごとに`コスチュームを切りかえます`{:class="block3looks"}。 このコードは、ネコを落とすコードと同じように、 `ずっと`{:class="block3control"}繰り返す必要があります。 + +\--- /hint \--- + +\--- hint \--- + +必要なコードブロックは次のとおりです。 + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +コードは次のようになります。 + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +緑の旗を押して、ネコが青いゆかにそって動くことをたしかめます。 + +\--- /task \--- + +ネコがステージの右がわにたどり着けるようにあなの上に橋をかくと、ネコは右のかべで行きづまってしまいます。 + +![はしで行きづまっているネコ](images/flailing-at-edge.png) + +\--- task \--- + +`ずっと`{:class="block3control"}ループを削除 (さくじょ) し、代わりにちがうループを入れて、ネコが端 (はし) に着くまで歩くようにします。 ネコがステージの端に着くと、ネコは消えます。 + +![ネコのスプライト](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +緑の旗を押して、ネコがステージの端に着いたときに消えることをたしかめます。 + +\--- /task \--- + +ネコがあなに落ちた場合、消えるのではなくあなのそこで動けなくなることに気づいたと思います。 これは、ネコが下に落ちつづけようとしているためです。 + +このコードが、ネコに青に触れるまで落ちつづけるようにめいれいしています。 + +```blocks3 +repeat until +end +``` + +しかし、あなの中ではネコは青に触れることはないので、行きづまったままです。 + +\--- task \--- + +このループにさらにブロックを追加して、ネコのスプライトが青に触れるか、`または`{:class="block3operators"}`端に触れる`{:class="block3sensing"}まで繰り返すようにします。 こうすることで、スプライトがステージの端に着くと、スプライトは落ちるのをやめます。 + +![ネコのスプライト](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/ja-JP/step_5.md b/ja-JP/step_5.md new file mode 100644 index 0000000..97e8f80 --- /dev/null +++ b/ja-JP/step_5.md @@ -0,0 +1,65 @@ +## 線にそわせる + +2つの足場の間に低い橋または上向きの線をかくと、足場の上ではなく中を歩いてしまうことに気づいたと思います。 + +![足場の中を歩くネコ](images/cat-walk-through-platform.png) + +\--- task \--- + +ネコのスプライトのコードの`次のコスチュームにする`{:class="block3looks"}ブロックの前に別のループを追加します。 今度は、ループでネコが青色に触れなくなるまで`2`ずつ上がるようにしなければなりません。 + +![ネコのスプライト](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`青色に触れた`{:class="block3sensing"}じょうたい`ではなく`{:class="block3operators"}なるまで、ネコは`2つ上に動く`{:class="block3motion"}のを`繰り返す`{:class="block3control}必要があります。 + +\--- /hint \--- + +\--- hint \--- + +必要なコードブロックは次のとおりです。 + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +コードは次のようになります。 + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +緑の旗をクリックして、上向きの線をかいてみましょう。 ネコがこの線にそっていくことをたしかめましょう。 + +\--- /task \--- \ No newline at end of file diff --git a/ja-JP/step_6.md b/ja-JP/step_6.md new file mode 100644 index 0000000..3d2c6f3 --- /dev/null +++ b/ja-JP/step_6.md @@ -0,0 +1,89 @@ +## 安全な場所へ + +ゲームの目的は、ネコがドアに着けるように道を作って安全な場所へみちびくことです。 ドアに着いたネコの数をきろくするスコア変数 (へんすう) を作りましょう。 + +\--- task \--- + +`スコア`{:class="block3variables"}という名前の変数を作りましょう。 + +![ネコのスプライト](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +ネコのスプライトに、ネコがドアに着くたびに`スコア`{:class="block3variables"}に`1`を足すコードを追加します。 また、ゲームを始めるときに`旗がクリックされたとき`{:class="block3events"}、`スコア`{:class="block3variables"}を`0`にするようにします。 + +![ネコのスプライト](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`もし`{:class="block3control"}ネコが`ドアのスプライトに触れている` {:class="block3sensing"}なら、`スコアに1を足します` {:class="block3variables"}。 + +\--- /hint \--- + +\--- hint \--- + +`クローンされたとき`スクリプトに追加する新しいコードブロックです。 + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +コードは次のようになります。 + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +ネコのスプライトがドアに着いたときに「ニャー」という音を出して消えるように、さらにコードを追加します。 + +![ネコのスプライト](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/ja-JP/step_7.md b/ja-JP/step_7.md new file mode 100644 index 0000000..e19777b --- /dev/null +++ b/ja-JP/step_7.md @@ -0,0 +1,13 @@ +## チャレンジ: しょうがいぶつをふやす + +今のところ、このゲームはかんたんです。 ゲームをむずかしくするアイデアはありますか? + ++ ちがうデザインの足場を背景 (はいけい) に追加する。 + ++ 表示される背景におうじて、ドアの場所をかえる。 + ++ 動くしょうがいぶつとしてスプライトを追加する。 たとえば、ネコがさけなければいけない、うろつく犬や回転するトゲなどです。 + ++ プレイヤーがゲームの中で線をかくために使える「インク」のりょうがかぎられている。 マウスが押されている時間をきろくするタイマー変数を作ることで、使用された「インク」のりょうをきろくできます。 + ++ プレイヤーにのこっているインクのりょうを知らせるスプライトを作る。 \ No newline at end of file diff --git a/ja-JP/step_8.md b/ja-JP/step_8.md new file mode 100644 index 0000000..b5b9b6e --- /dev/null +++ b/ja-JP/step_8.md @@ -0,0 +1,19 @@ +## 次は何をしましょうか? + +[花](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects)プロジェクトをやってみましょう。花のもようを作るためにカスタムブロックを使います。 + +\--- no-print \--- + +`f`をおすといくつか花をかき、`r`をおすとランダムにたくさんの花をかき、`p`をおすと花のもようをかきます。 + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![ランダムな花](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/ko-KR/images/banner.png b/ko-KR/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/ko-KR/images/banner.png differ diff --git a/ko-KR/images/cat-sprite.png b/ko-KR/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/ko-KR/images/cat-sprite.png differ diff --git a/ko-KR/images/cat-walk-through-platform.png b/ko-KR/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/ko-KR/images/cat-walk-through-platform.png differ diff --git a/ko-KR/images/cats-finished.png b/ko-KR/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/ko-KR/images/cats-finished.png differ diff --git a/ko-KR/images/door-sprite.png b/ko-KR/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/ko-KR/images/door-sprite.png differ diff --git a/ko-KR/images/draw-a-line.png b/ko-KR/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/ko-KR/images/draw-a-line.png differ diff --git a/ko-KR/images/falling-cats.png b/ko-KR/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/ko-KR/images/falling-cats.png differ diff --git a/ko-KR/images/flailing-at-edge.png b/ko-KR/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/ko-KR/images/flailing-at-edge.png differ diff --git a/ko-KR/images/flower-random.png b/ko-KR/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/ko-KR/images/flower-random.png differ diff --git a/ko-KR/images/pen-sprite.png b/ko-KR/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/ko-KR/images/pen-sprite.png differ diff --git a/ko-KR/meta.yml b/ko-KR/meta.yml new file mode 100644 index 0000000..5bfd163 --- /dev/null +++ b/ko-KR/meta.yml @@ -0,0 +1,30 @@ +--- +title: 고양이들! +hero_image: images/banner.png +description: 고양이가 구멍에 빠지지 않도록 안전한 길로 안내하는 게임을 만드십시오. +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: 소개 + - + title: 선 그리기 + - + title: 고양이 복제하기 + completion: + - engaged + - + title: 고양이가 움직이도록 만들기 + - + title: 선 따라가기 + - + title: 안전 확보 + completion: + - internal + - + title: '도전 과제: 더 많은 장애물' + challenge: true + - + title: 더 나아가기 diff --git a/ko-KR/resources/cats-resources.sb3 b/ko-KR/resources/cats-resources.sb3 new file mode 100644 index 0000000..1942e6f Binary files /dev/null and b/ko-KR/resources/cats-resources.sb3 differ diff --git a/ko-KR/solutions/cats-solution.sb3 b/ko-KR/solutions/cats-solution.sb3 new file mode 100644 index 0000000..940c25c Binary files /dev/null and b/ko-KR/solutions/cats-solution.sb3 differ diff --git a/ko-KR/step_1.md b/ko-KR/step_1.md new file mode 100644 index 0000000..02c145d --- /dev/null +++ b/ko-KR/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +이 프로젝트의 **스크래치 3** 버전입니다. [프로젝트의 스크래치 2 버전](https://projects.raspberrypi.org/en/projects/cats-scratch2)도 있습니다. + +\--- /no-print \--- + +## 소개 + +이 프로젝트에서는 고양이를 안전한 곳으로 안내하고 틈새로 떨어지지 않도록 하는 게임을 만들 것입니다! + +### 당신이 만들 작품은 + +\--- no-print \--- + +마우스로 클릭하고 드래그하여 연필로 선을 그립니다. 출구로 가는 고양이가 구멍에 빠지지 않는 안전한 길을 만드는 것이 당신의 목표입니다. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![완성된 '고양이'](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: 배우게 될 것 + ++ 움직이는 고양이를 계속 만들어내기 위해 `무한 반복하기`{:class="block3control"} 루프를 사용하는 방법 ++ 고양이가 줄을 따라가게 하기 위해 `( )번 반복하기`{:class="block3control"} 루프를 사용하는 방법 + +\--- /collapse \--- + +## \--- collapse \--- + +## title: 준비물 + +### 하드웨어 + ++ 스크래치 3를 실행할 수 있는 컴퓨터 + +### 소프트웨어 + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### 다운로드 + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: 교육자를 위한 추가 정보 + +\--- no-print \--- + +이 프로젝트를 인쇄하려면, [프린트용 버전](https://projects.raspberrypi.org/en/projects/cats/print)을 사용하십시오. \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/ko-KR/step_2.md b/ko-KR/step_2.md new file mode 100644 index 0000000..a9a7d10 --- /dev/null +++ b/ko-KR/step_2.md @@ -0,0 +1,140 @@ +## 선 그리기 + +\--- task \--- + +스크래치 스타터 프로젝트 '고양이들!'를 여십시오. + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +스크래치 계정이 있는 경우 **Remix**을 클릭하여 사본을 만들 수 있습니다. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +프로젝트에 펜 확장 프로그램을 추가합니다. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +'펜'이라는 스프라이트를 클릭하고 코드를 추가하여 펜 색상을 스테이지의 장애물과 같은 파란색으로 설정합니다. + +![펜 스프라이트](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +색상을 선택하려면 `펜 색깔을 ~로 정하기`{: class = "block3extensions"} 블록에서 색깔 사각형을 클릭하여 마우스 커서를 스포이트로 만든 다음 스테이지에서 적절한 색상을 클릭하십시오. + +\--- /task \--- + +\--- task \--- + +스프라이트가 마우스 포인터를 따라가도록 코드를 더 추가하십시오. 코드가 잘 작동하는지 확인하기 위해 프로그램을 테스트해 보십시오. + +![펜 스프라이트](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +마우스 버튼을 눌렀을 때 스프라이트가 스테이지에 선을 그리도록 하는 코드를 추가하십시오. + +![펜 스프라이트](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`만약`{:class="block3control"} `마우스를 클릭했는가`{:class="block3sensing"}라면 `펜 내리기`{:class="block3extensions"}, `아니면`{:class="block3control"}, `펜 올리기`{:class="block3extensions"} 를 수행합니다. + +\--- /hint \--- + +\--- hint \--- + +필요할 코드 블록은 다음과 같습니다. + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +코드는 다음과 같이 설계되어야 합니다: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +코드를 테스트 해 보십시오. 마우스로 드래그하여 스테이지에 파란색 선을 그릴 수 있어야합니다. + +![선 그리기](images/draw-a-line.png) + +\--- /task \--- + +스테이지의 오른쪽 상단에 파란색 점이 항상 나타나는 것을 볼 수 있습니다 (위 이미지에서 동그라미 쳐져 있습니다). 녹색 깃발을 클릭하여 게임을 시작할 때 마우스를 누르면 펜이 바로 그리기 시작하기 때문입니다. + +\--- task \--- + +이 문제를 해결하기 위해서는 `펜 올리기`{:class="block3extensions"} 블록과 `1초 기다리기`{:class="block3control"} 블록을 `무한 반복하기`{:class="block3control"} 블록 위의 스크립트 시작 부분에 추가합니다. + +![펜 스프라이트](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/ko-KR/step_3.md b/ko-KR/step_3.md new file mode 100644 index 0000000..5912060 --- /dev/null +++ b/ko-KR/step_3.md @@ -0,0 +1,73 @@ +## 고양이 복제하기 + +당신은 출구로 안내해야 하는 끝없는 고양이들의 흐름을 원합니다. + +\--- task \--- + +'고양이'이라는 스프라이트를 클릭하고 스프라이트를 `숨기기`{:class="block3looks"}하고 스프라이트를 `복제하기`{:class="block3control"} 위해 코드를 추가합니다. + +![고양이 스프라이트](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +지금 프로그램을 실행하면 스테이지에서 아무 일도 일어나지 않습니다. 3 초마다 새로운 고양이 스프라이트 복사본이 생성되는지 확인하려면 각 고양이의 클론이 나타나고 하늘에서 떨어지도록 하십시오. + +\--- task \--- + +스프라이트가 `복제되었을 때`{:class="block3control"} 자기 자신을 `보이기`{:class="block3looks"} 하고, 파란색 바닥에 `~에 닿았는가`{:class="block3sensing"}까지 떨어지도록 코드를 추가합니다. + +![고양이 스프라이트](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`복제되었을 때`{:class="block3control"} 스프라이트를 `보이기`{:class="block3looks"} 하십시오. 스프라이트의 `y` 좌표를 `-2` `만큼 바꾸기 `{:class="block3motion"} 를 스프라이트가 파란색 스테이지에`~에 닿았는가`{:class="block3sensing"}`까지 반복하기`{:class="block3control"} 하세요. + +\--- /hint \--- + +\--- hint \--- + +필요한 코드 블록은 다음과 같습니다. + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +다음과 같은 코드를 추가해야 합니다: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +초록색 깃발을 클릭하면 3 초마다 새 고양이가 스테이지 상단에서 떨어집니다. 모든 고양이는 바닥에있는 파란색 바닥에 겹치는 고양이의 큰 더미에 착륙해야합니다. + +![떨어지는 고양이](images/falling-cats.png) \ No newline at end of file diff --git a/ko-KR/step_4.md b/ko-KR/step_4.md new file mode 100644 index 0000000..e351ce7 --- /dev/null +++ b/ko-KR/step_4.md @@ -0,0 +1,115 @@ +## 고양이가 움직이도록 만들기 + +고양이가 바닥에 닿으면 천천히 오른쪽으로 움직여야 합니다. + +\--- task \--- + +코드의 `복제되었을때`{:class="block3control"} 부분에 고양이 스프라이트가 0.1초 마다 `10만큼 움직이기`{:class="block3motion"}와 다음 모양으로 바꾸기를 하여 걸어가는 것처럼 보이도록 코드를 추가합니다. + +![고양이 스프라이트](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +고양이 스프라이트는 `0.1초`{:class="block3control"} 마다 `10만큼 움직이기`{:class="block3motion"}하고 `다음 모양으로 바꾸기`{:class="block3looks"}를 해야 합니다. 이 코드는 고양이를 떨어트리는 코드와 마찬가지로 `무한 반복하기`{: class = "block3control"} 해야 합니다. + +\--- /hint \--- + +\--- hint \--- + +필요한 코드 블록은 다음과 같습니다. + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +다음과 같은 코드를 추가해야 합니다: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +녹색 깃발을 누르고 고양이가 바닥의 파란색 플랫폼을 따라 움직이는지 확인하십시오. + +\--- /task \--- + +고양이가 스테이지의 오른쪽까지 갈 수 있도록 간격 사이에 다리를 그리면 고양이가 오른쪽 벽에서 더이상 걷지 못하는 것을 볼 수 있습니다. + +![가장자리에 버벅이는 고양이](images/flailing-at-edge.png) + +\--- task \--- + +`무한 반복하기`{: class = "block3control"} 루프를 제거하고 대신 다른 루프를 추가하여 고양이가 가장자리에 도달할 때까지만 걸어가도록 합니다. 고양이가 스테이지 가장자리에 도달하면 사라져야 합니다. + +![고양이 스프라이트](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +녹색 깃발을 누르고 고양이가 스테이지 가장자리에 닿으면 사라지는지 확인하십시오. + +\--- /task \--- + +고양이가 구멍에 빠지면 사라지지 않고 대신 바닥에 붙어있는 것을 알 수 있습니다. 이는 고양이가 계속 아래로 떨어지려고 하기 때문입니다. + +이것은 고양이가 파란색에 닿을 때까지 계속 떨어지도록 지시하는 코드의 일부입니다. + +```blocks3 +repeat until +end +``` + +그러나 구멍에서 고양이는 결코 파란색에 도달 할 수 없으므로 영원히 붙어 있습니다. + +\--- task \--- + +고양이 스프라이트가 파란색 `또는`{: class = "block3operators"} `벽에 닿았는가`{: class = "block3sensing"}까지 반복되도록 이 루프에 블록을 더 추가하십시오. 이렇게 하면 스프라이트가 벽에 도달하면 떨어지려고 하지 않습니다. + +![고양이 스프라이트](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/ko-KR/step_5.md b/ko-KR/step_5.md new file mode 100644 index 0000000..6321828 --- /dev/null +++ b/ko-KR/step_5.md @@ -0,0 +1,65 @@ +## 선 따라가기 + +두 플랫폼 사이에 낮은 다리나 위로 경사져 있는 선을 그리면 고양이들은 선 위에 올라가기 보다는 플랫폼을 통과해 걷게 된다는 것을 볼 수도 있을 것입니다! + +![플랫폼을 통과해 걷는 고양이](images/cat-walk-through-platform.png) + +\--- task \--- + +고양이 스프라이트의 코드에 `다음 모양으로 바꾸기`{:class="block3looks"} 블록 앞에 루프를 하나 추가합니다. 이번에는 루프가 고양이에게 파란색에 닿지 않을 때까지 `2`만큼 위쪽으로 이동하라고 지시해야 합니다. + +![고양이 스프라이트](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +고양이 스프라이트는 `파란색에 닿았는가`{:class="block3sensing"} `가 아니다`{:class="block3operators"} 일때까지 `y 좌표를 2만큼 바꾸기`{:class="block3motion"}를 `반복합니다`{:class="block3control"}. + +\--- /hint \--- + +\--- hint \--- + +필요한 코드 블록은 다음과 같습니다. + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +다음과 같은 코드를 추가해야 합니다: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +초록색 깃발을 클릭하고 위쪽으로 기울어진 선을 그려보십시오. 고양이가 이 선을 따라가는지 확인하십시오. + +\--- /task \--- \ No newline at end of file diff --git a/ko-KR/step_6.md b/ko-KR/step_6.md new file mode 100644 index 0000000..4e6ad60 --- /dev/null +++ b/ko-KR/step_6.md @@ -0,0 +1,89 @@ +## 안전 확보 + +이 게임의 목표는 고양이가 문에 도달 할 수 있도록 경로를 만들어 고양이를 안전하게 안내하는 것입니다. 문에 도달하는 고양이 수를 세는 점수 변수를 만듭니다. + +\--- task \--- + +먼저, `점수`{:class="block3variables"}라는 이름의 변수를 추가 해 보세요. + +![고양이 스프라이트](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +고양이가 문에 닿을 때마다 `1`을 `점수`{:class="block3variables"}에 더하는 코드를 고양이 스프라이트에 추가합니다. 또 `점수`{:class="block3variables"}를 `깃발을 클릭했을 때`{:class="block3events"} `0`으로 바꾸게 합니다. + +![고양이 스프라이트](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`만약`{:class="block3control"} 고양이가 `문에 닿았는가?`{:class="block3sensing"}라면 `점수에 1을 더한다`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +이것은 `복제되었을 때` 스크립트에 추가할 코드 블럭들 입니다. + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +다음과 같은 코드를 추가해야 합니다: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +고양이 스프라이트가 문에 도달하면 고양이가 'meow'소리를 내고 사라지도록 코드를 더 추가하십시오. + +![고양이 스프라이트](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/ko-KR/step_7.md b/ko-KR/step_7.md new file mode 100644 index 0000000..29e71b0 --- /dev/null +++ b/ko-KR/step_7.md @@ -0,0 +1,13 @@ +## 도전 과제: 더 많은 장애물 + +현재 게임은 이기기 쉽습니다. 게임을 더 어렵게 만들 아이디어들을 생각해 봅시다. + ++ 다른 모양의 플랫폼을 가진 더 많은 배경을 만들기. + ++ 표시되는 배경에 따라 문의 위치를 이동시키기. + ++ 움직이는 장애물인 더 많은 스프라이트를 추가하기. 당신은 고양이가 피해야 할 이동하는 개나 회전하는 가시를 추가할 수도 있습니다. + ++ 플레이어가 제한된 양의 "잉크"를 사용하여 게임에서 선을 그리도록 하기. 마우스를 누르고있는 시간을 기록하는 타이머 변수를 만들어 "잉크"가 얼마나 사용되는지 추적 할 수 있습니다. + ++ 남은 잉크 량을 플레이어에게 표시하는 스프라이트를 만듭니다. \ No newline at end of file diff --git a/ko-KR/step_8.md b/ko-KR/step_8.md new file mode 100644 index 0000000..5caefdb --- /dev/null +++ b/ko-KR/step_8.md @@ -0,0 +1,19 @@ +## 다음 프로젝트는? + +꽃무늬를 직접 만들수 있는[Flower generator](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects) 프로젝트를 해 보세요. + +\--- no-print \--- + +`f`를 눌러 꽃 몇개를 그리거나, `r`을 눌러 수많은 임의의 꽃을 그리거나, `p`를 눌러 꽃 패턴을 그려보세요. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![임의의 꽃](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/nl-NL/images/banner.png b/nl-NL/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/nl-NL/images/banner.png differ diff --git a/nl-NL/images/cat-sprite.png b/nl-NL/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/nl-NL/images/cat-sprite.png differ diff --git a/nl-NL/images/cat-walk-through-platform.png b/nl-NL/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/nl-NL/images/cat-walk-through-platform.png differ diff --git a/nl-NL/images/cats-finished.png b/nl-NL/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/nl-NL/images/cats-finished.png differ diff --git a/nl-NL/images/door-sprite.png b/nl-NL/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/nl-NL/images/door-sprite.png differ diff --git a/nl-NL/images/draw-a-line.png b/nl-NL/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/nl-NL/images/draw-a-line.png differ diff --git a/nl-NL/images/falling-cats.png b/nl-NL/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/nl-NL/images/falling-cats.png differ diff --git a/nl-NL/images/flailing-at-edge.png b/nl-NL/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/nl-NL/images/flailing-at-edge.png differ diff --git a/nl-NL/images/flower-random.png b/nl-NL/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/nl-NL/images/flower-random.png differ diff --git a/nl-NL/images/pen-sprite.png b/nl-NL/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/nl-NL/images/pen-sprite.png differ diff --git a/nl-NL/meta.yml b/nl-NL/meta.yml new file mode 100644 index 0000000..381d82e --- /dev/null +++ b/nl-NL/meta.yml @@ -0,0 +1,30 @@ +--- +title: KATTEN! +hero_image: images/banner.png +description: Maak een spel waarin je katten in veiligheid brengt en voorkomt dat ze in gaten vallen +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Inleiding + - + title: Teken lijnen + - + title: Kloon katten + completion: + - engaged + - + title: Laat de katten bewegen + - + title: Blijf bij de lijnen + - + title: Kom in veiligheid + completion: + - internal + - + title: 'Uitdaging: meer obstakels' + challenge: true + - + title: Wat kun je verder nog doen? diff --git a/nl-NL/resources/cats-resources.sb3 b/nl-NL/resources/cats-resources.sb3 new file mode 100644 index 0000000..f795a99 Binary files /dev/null and b/nl-NL/resources/cats-resources.sb3 differ diff --git a/nl-NL/solutions/cats-solution.sb3 b/nl-NL/solutions/cats-solution.sb3 new file mode 100644 index 0000000..98cdaf3 Binary files /dev/null and b/nl-NL/solutions/cats-solution.sb3 differ diff --git a/nl-NL/step_1.md b/nl-NL/step_1.md new file mode 100644 index 0000000..8d90fc1 --- /dev/null +++ b/nl-NL/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +Dit is de **Scratch 3** versie van het project. Er is ook een [Scratch 2 versie van dit project](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Inleiding + +In dit project maak je een spel waarin je katten in veiligheid moet brengen en hen niet door de gaten laat vallen! + +### Wat ga je maken + +\--- no-print \--- + +Klik en sleep met de muis om een lijn met het potlood te tekenen. Je doel is te voorkomen dat de katten in gaten vallen door een veilig pad naar de uitgang te maken. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Katten voltooid](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: Wat ga je leren + ++ Hoe een `herhaal`{:class="block3control"} lus te gebruiken om constant bewegende katten te genereren ++ Hoe een `herhaal tot`{:class="block3control"} lus te gebruiken om ervoor te zorgen dat de katten een lijn volgen + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Wat heb je nodig + +### Hardware + ++ Een computer die Scratch 3 kan uitvoeren + +### Software + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### Downloads + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Aanvullende informatie voor docenten + +\--- no-print \--- + +Als je dit project wilt afdrukken, gebruik dan de [printvriendelijke versie](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/nl-NL/step_2.md b/nl-NL/step_2.md new file mode 100644 index 0000000..0ca9ce6 --- /dev/null +++ b/nl-NL/step_2.md @@ -0,0 +1,140 @@ +## Teken lijnen + +\--- task \--- + +Open het 'CATS!' Scratch startproject. + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +Als je een Scratch account hebt, kun je een kopie maken door op **Remix** te klikken. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Voeg de Pen uitbreiding toe aan je project. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Klik op de sprite genaamd 'Pen' en voeg code toe om de penkleur in te stellen op hetzelfde blauw als de obstakels in het speelveld. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +wanneer op de groene vlag wordt geklikt +maak penkleur [# 0000ff] +wis alles +maak pendikte (5) +``` + +Om een kleur te selecteren, klik je op het kleurenvierkant in het blok `maak penkleur`{:class="block3extensions"} om je muiscursor in een pipet te veranderen en vervolgens klik je op de juiste kleur in het speelveld. + +\--- /task \--- + +\--- task \--- + +Voeg nog wat code toe om de sprite de muisaanwijzer te laten volgen. Test je programma om te controleren of de code werkt. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +herhaal +ga naar (muisaanwijzer v) +einde +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Voeg wat code toe om de sprite te vertellen een lijn in het speelveld te tekenen als de muisknop ingedrukt wordt. + +![Pen sprite](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`Als`{:class="block3control"} de `muis ingedrukt is`{:class="block3sensing"}, zet de `pen neer`{:class="block3extensions"} en `anders`{:class="block3control"}, til de `pen op`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Dit zijn de codeblokken die je nodig hebt: + +```blocks3 + + +pen neer + +pen op + +als <> dan +anders +eindigen +``` + +\--- /hint \--- + +\--- hint \--- + +Dit is hoe je code eruit zou moeten zien: + +```blocks3 +als op de groene vlag wordt geklikt +maak penkleur [# 0000ff] +wis alles +maak pendikte (5) +herhaal +ga naar (muisaanwijzer v) ++ als dan +pen neer +anders +pen op +einde +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Test je code. Je zou moeten kunnen klikken en slepen met de muis om een blauwe lijn in het speelveld te tekenen. + +![Teken een lijn](images/draw-a-line.png) + +\--- /task \--- + +Je ziet waarschijnlijk dat er altijd een blauwe stip in de rechterbovenhoek van het speelveld verschijnt (deze is omcirkeld in de bovenstaande afbeelding). Dit komt omdat, wanneer je op de groene vlag klikt om het spel te starten, je de muis indrukt en de pen onmiddellijk begint te tekenen. + +\--- task \--- + +Om dit te voorkomen, voeg je een `pen op`{:class="block3extensions"} blok toe aan het begin van het script en een `wacht een seconde`{:class="block3control"} blok boven het `herhaal`{:class="block3control"} blok. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +wanneer op groene vlag wordt geklikt ++ pen op +maak penkleur [# 0000ff] +wis alles +maak pendikte (5) ++ wacht (1) sec. +herhaal +ga naar (muisaanwijzer v) +als dan +pen neer +anders +pen op +einde +``` + +\--- /task \--- \ No newline at end of file diff --git a/nl-NL/step_3.md b/nl-NL/step_3.md new file mode 100644 index 0000000..07025d2 --- /dev/null +++ b/nl-NL/step_3.md @@ -0,0 +1,73 @@ +## Kloon katten + +Je wilt een eindeloze stroom katten die de speler langs het pad naar de uitgang moet leiden. + +\--- task \--- + +Klik op de sprite genaamd 'Kat' en voeg wat code toe om de sprite te laten `verdwijnen`{class:="block3looks"}, en ook om er elke drie seconden een `kloon`{:class="block3control"} van te maken. + +![Kat sprite](images/cat-sprite.png) + +```blocks3 +wanneer op groene vlag wordt geklikt +verdwijn +herhaal + maak een kloon van (mijzelf v) + wacht (3) sec. +einde +``` + +\--- /task \--- + +Als je het programma nu uitvoert, gebeurt er niets in het speelveld. Om te controleren of er om de drie seconden een nieuwe Kat sprite kloon wordt gemaakt, laat je elke kloon verschijnen en uit de lucht vallen. + +\--- task \--- + +Voeg code toe om de sprite te vertellen dat `wanneer ik als kloon start`{:class="block3control"}, hij moet `verschijnen`{:class="block3looks"} en vallen totdat hij de blauwe vloer `raakt`{:class="block3sensing"} die in het speelveld is getekend. + +![Kat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`Wanneer ik als kloon start`{:class="block3control"}, `verschijnt`{:class="block3looks"} de sprite. `Herhaal`{:class="block3control"} `Verander`{:class="block3motion"} de `y` coördinaat van de sprite met `-2`, totdat de sprite de blauwe vloer `raakt`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Dit zijn de codeblokken die je nodig hebt: + +```blocks3 +herhaal tot <> +einde + +verschijn + + + +verander y met (-2) + +wanneer ik als kloon start +``` + +\--- /hint \--- + +\--- hint \--- + +Dit is hoe je code eruit zou moeten zien: + +```blocks3 +wanneer ik als kloon start +verschijn +herhaal tot +verander y met (-2) +einde +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +Als je op de groene vlag klikt, zou je elke drie seconden een nieuwe kat van de bovenkant van het speelveld moeten zien vallen. Elke kat moet in een grote stapel overlappende katten op de blauwe bodem onderaan landen. + +![Vallende katten](images/falling-cats.png) \ No newline at end of file diff --git a/nl-NL/step_4.md b/nl-NL/step_4.md new file mode 100644 index 0000000..2c7a260 --- /dev/null +++ b/nl-NL/step_4.md @@ -0,0 +1,115 @@ +## Laat de katten bewegen + +Zodra een kat de vloer bereikt, moet hij langzaam naar rechts stappen. + +\--- task \--- + +Voeg code toe aan de `wanneer ik als kloon start`{:class="block3control"} sectie om de kat sprite `tien stappen te laten nemen`{:class="block3motion"}, en schakel elke 0,1 seconden tussen de twee uiterlijken van de sprite om de kat eruit te laten zien alsof hij loopt. + +![Kat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +De sprite van de kat moet `neem 10 stappen`{:class="block3motion"} en `volgend uiterlijk`{:class="block3looks"} elke `0.1 seconden`{:class="block3control"}. Deze code moet altijd `herhalen`{:class="block3control"}, net als de code om de kat te laten vallen. + +\--- /hint \--- + +\--- hint \--- + +Dit zijn de codeblokken die je nodig hebt: + +```blocks3 +neem (10) stappen + +wacht (0.1) sec. + +volgend uiterlijk + +herhaal +einde +``` + +\--- /hint \--- + +\--- hint \--- + +Dit is hoe je code eruit zou moeten zien: + +```blocks3 +wanneer ik als kloon start +verschijn ++ herhaal + neem (10) stappen + herhaal tot + verander y met (-2) + einde + volgend uiterlijk + wacht (0.1) sec. +einde +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Druk op de groene vlag en controleer of de katten nu langs het blauwe platform onderaan bewegen. + +\--- /task \--- + +Als je een brug over de opening tekent, zodat de katten helemaal naar de rechterkant van het speelveld kunnen komen, kun je zien dat ze vast komen te zitten in de rechtermuur. + +![Zwervende katten aan de rand](images/flailing-at-edge.png) + +\--- task \--- + +Verwijder de `herhaal`{:class="block3control"} lus en voeg in plaats daarvan een andere lus toe om de katten alleen te laten lopen totdat ze een rand bereiken. Wanneer een kat de rand van het speelveld bereikt, moet hij verdwijnen. + +![Kat sprite](images/cat-sprite.png) + +```blocks3 +wanneer ik als kloon start +verschijn ++ herhaal tot + neem (10) stappen + herhaal tot + verander y met (-2) + einde + volgend uiterlijk + wacht (0.1) sec. +einde ++ verwijder deze kloon +``` + +\--- /task \--- + +\--- task \--- + +Druk op de groene vlag en controleer dat de katten verdwijnen wanneer ze de rand van het speelveld bereiken. + +\--- /task \--- + +Je merkt misschien dat, als de katten in het gat vallen, ze niet verdwijnen maar in plaats daarvan vast komen te zitten aan de onderkant. Dit komt omdat ze blijven proberen naar beneden te vallen. + +Dit is het deel van de code dat de kat vertelt dat hij moet blijven vallen totdat hij blauw raakt: + +```blocks3 +herhaal tot +einde +``` + +In het gat kan de kat echter nooit blauw bereiken, dus zit hij voor altijd vast. + +\--- task \--- + +Voeg meer blokken toe aan deze lus zodat deze wordt herhaald totdat de kat sprite blauw raakt `of`{:class="block3operators"} `de rand raakt`{:class="block3sensing"}. Op deze manier stopt de sprite met vallen als het de rand van het speelveld bereikt. + +![Kat sprite](images/cat-sprite.png) + +```blocks3 +herhaal tot < of > +einde +``` + +\--- /task \--- \ No newline at end of file diff --git a/nl-NL/step_5.md b/nl-NL/step_5.md new file mode 100644 index 0000000..2d6920b --- /dev/null +++ b/nl-NL/step_5.md @@ -0,0 +1,65 @@ +## Blijf bij de lijnen + +Het valt je misschien op dat, als je een lage brug tussen de twee platforms trekt, of een lijn die omhoog loopt, de katten uiteindelijk door het platform lopen in plaats van er bovenop! + +![Katten lopen door het platform](images/cat-walk-through-platform.png) + +\--- task \--- + +Voeg in de code voor de kat sprite nog een lus toe vóór het `volgend uiterlijk`{:class="block3looks"} blok. Deze keer moet de lus de kat vertellen om met `2` omhoog te gaan totdat deze blauw niet raakt. + +![Kat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +De kat moet `2 stappen omhoog`{:class="block3motion"} `totdat`{:class="block3control"} hij `niet`{:class="block3operators"} `blauw raakt`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Dit zijn de codeblokken die je nodig hebt: + +```blocks3 + + +verander y met (2) + +herhaal tot <> +einde + +niet <> +``` + +\--- /hint \--- + +\--- hint \--- + +Dit is hoe je code eruit zou moeten zien: + +```blocks3 +wanneer ik als kloon start +verschijn +herhaal tot + neem (10) stappen + herhaal tot + verander y met (-2) + einde + herhaal tot > + verander y met (2) + einde + volgend uiterlijk + wacht (0.1) sec. +einde +verwijder deze kloon +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Klik op de groene vlag en probeer een lijn te tekenen die omhoog loopt. Controleer dat de kat deze lijn volgt. + +\--- /task \--- \ No newline at end of file diff --git a/nl-NL/step_6.md b/nl-NL/step_6.md new file mode 100644 index 0000000..42cd460 --- /dev/null +++ b/nl-NL/step_6.md @@ -0,0 +1,89 @@ +## In veiligheid komen + +Het doel van het spel is om de katten in veiligheid te brengen door een pad te maken zodat ze de deur kunnen bereiken. Maak een score variabele om bij te houden hoeveel katten de deur bereiken. + +\--- task \--- + +Maak een variabele met de naam `score`{:class="block3variables"}. + +![Kat sprite](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Voeg code toe aan de kat sprite om `1` toe te voegen aan de `score`{:class="block3variables"} elke keer dat een kat de deur bereikt. Stel de `score`{:class="block3variables"} in op `0` `wanneer op de vlag wordt geklikt`{:class="block3events"} aan het begin van het spel. + +![Kat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`Als`{:class="block3control"} de kat `de deur sprite raakt`{:class="block3sensing"}, verander dan de `score met 1`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Hier zijn de nieuwe codeblokken die je aan het `wanneer ik als kloon start` script toe moet voegen: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +Dit is hoe je code eruit zou moeten zien: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Voeg nog wat code toe zodat, wanneer een kat sprite de deur bereikt, de kat een 'miauw' geluid maakt en dan verdwijnt. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +start geluid (meow v) +verwijder deze kloon +``` + +\--- /task \--- \ No newline at end of file diff --git a/nl-NL/step_7.md b/nl-NL/step_7.md new file mode 100644 index 0000000..e07cb6d --- /dev/null +++ b/nl-NL/step_7.md @@ -0,0 +1,13 @@ +## Uitdaging: meer obstakels + +Op dit moment is het spel vrij eenvoudig om te winnen. Kun jij ideeën bedenken om je spel moeilijker te maken? + ++ Voeg meer achtergronden toe met verschillende platformontwerpen. + ++ Verplaats de plek van de deur afhankelijk van welke achtergrond wordt weergegeven. + ++ Voeg meer sprites toe als bewegende obstakels. Misschien heb je zwervende honden of draaiende stekels die de katten moeten vermijden? + ++ Laat de speler slechts een beperkte hoeveelheid "inkt" gebruiken om lijnen in het spel te tekenen. Je kunt bijhouden hoeveel "inkt" wordt gebruikt door een klok variabele te maken die registreert hoe lang de muis wordt ingedrukt. + ++ Maak een sprite om de speler te laten zien hoeveel inkt er nog over is. \ No newline at end of file diff --git a/nl-NL/step_8.md b/nl-NL/step_8.md new file mode 100644 index 0000000..e80c300 --- /dev/null +++ b/nl-NL/step_8.md @@ -0,0 +1,19 @@ +## Wat kun je verder nog doen? + +Probeer het project [Bloem generator](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects), waar je aangepaste blokken gebruikt om bloempatronen te maken. + +\--- no-print \--- + +Druk op `f` om een paar bloemen te tekenen, of `r` om veel willekeurige bloemen te tekenen, of `p` om een bloemenpatroon te tekenen. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![willekeurige bloemen](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/no-NO/images/banner.png b/no-NO/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/no-NO/images/banner.png differ diff --git a/no-NO/images/cat-sprite.png b/no-NO/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/no-NO/images/cat-sprite.png differ diff --git a/no-NO/images/cat-walk-through-platform.png b/no-NO/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/no-NO/images/cat-walk-through-platform.png differ diff --git a/no-NO/images/cats-finished.png b/no-NO/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/no-NO/images/cats-finished.png differ diff --git a/no-NO/images/door-sprite.png b/no-NO/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/no-NO/images/door-sprite.png differ diff --git a/no-NO/images/draw-a-line.png b/no-NO/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/no-NO/images/draw-a-line.png differ diff --git a/no-NO/images/falling-cats.png b/no-NO/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/no-NO/images/falling-cats.png differ diff --git a/no-NO/images/flailing-at-edge.png b/no-NO/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/no-NO/images/flailing-at-edge.png differ diff --git a/no-NO/images/flower-random.png b/no-NO/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/no-NO/images/flower-random.png differ diff --git a/no-NO/images/pen-sprite.png b/no-NO/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/no-NO/images/pen-sprite.png differ diff --git a/no-NO/meta.yml b/no-NO/meta.yml new file mode 100644 index 0000000..ea88a99 --- /dev/null +++ b/no-NO/meta.yml @@ -0,0 +1,26 @@ +--- +title: CATS! +hero_image: images/banner.png +description: Create a game in which you guide cats to safety and stop them from falling into holes +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Introduction + - + title: Draw lines + - + title: Clone cats + - + title: Make the cats move + - + title: Stick to the lines + - + title: Get to safety + - + title: "Challenge: more obstacles" + challenge: true + - + title: What next? diff --git a/no-NO/resources/cats-resources.sb3 b/no-NO/resources/cats-resources.sb3 new file mode 100644 index 0000000..d952bff Binary files /dev/null and b/no-NO/resources/cats-resources.sb3 differ diff --git a/no-NO/solutions/cats-solution.sb3 b/no-NO/solutions/cats-solution.sb3 new file mode 100644 index 0000000..a2dc7c8 Binary files /dev/null and b/no-NO/solutions/cats-solution.sb3 differ diff --git a/no-NO/step_1.md b/no-NO/step_1.md new file mode 100644 index 0000000..75244c0 --- /dev/null +++ b/no-NO/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +This is the **Scratch 3** version of the project. There is also a [Scratch 2 version of the project](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Introduction + +In this project, you will create a game in which you need to guide cats to safety and not let any of them fall through the gaps! + +### What you will make + +\--- no-print \--- + +Click and drag with the mouse to draw a line with the pencil. Your goal is to stop the cats from falling into holes by creating a safe path to the exit. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Cats finished](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: What you will learn + ++ How to use a `forever`{:class="block3control"} loop to constantly generate moving cats ++ How to use a `repeat until`{:class="block3control"} loop to ensure your cats follow a line + +\--- /collapse \--- + +## \--- collapse \--- + +## title: What you will need + +### Hardware + ++ A computer capable of running Scratch 3 + +### Software + ++ Scratch 3 (either [online](http://rpf.io/scratchon){:target="_blank"} or [offline](http://rpf.io/scratchoff){:target="_blank"}) + +### Downloads + ++ [Offline starter project](http://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Additional notes for educators + +\--- no-print \--- + +If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](http://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/no-NO/step_2.md b/no-NO/step_2.md new file mode 100644 index 0000000..bd3358c --- /dev/null +++ b/no-NO/step_2.md @@ -0,0 +1,140 @@ +## Draw lines + +\--- task \--- + +Open the 'CATS!' Scratch starter project. + +**Online:** open the starter project at [rpf.io/cats-on](http://rpf.io/cats-on){:target="_blank"}. + +If you have a Scratch account you can make a copy by clicking **Remix**. + +**Offline:** open the [starter project](http://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](http://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Add the Pen extension to your project. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Click on the sprite called 'Pen', and add code to set the pen colour to the same blue as the obstacles on the Stage. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +To select a colour, click on the colour square in the `set pen color`{:class="block3extensions"} block to make your mouse cursor turn into a pipette, and then click on the correct colour on the Stage. + +\--- /task \--- + +\--- task \--- + +Add some more code to make the sprite follow the mouse pointer. Test your program to check that the code works. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Add some code to tell the sprite to draw a line on the Stage if the mouse button is pressed down. + +![Pen sprite](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the `mouse is down`{:class="block3sensing"}, put the `pen down`{:class="block3extensions"}, and `else`{:class="block3control"}, lift the `pen up`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Test your code. You should be able to click and drag with the mouse to draw a blue line on the Stage. + +![Draw a line](images/draw-a-line.png) + +\--- /task \--- + +You probably see that a blue dot always appears in the top right-hand corner of the Stage (it's circled in the image above). This is because, when you click the green flag to start the game, you press the mouse down, and so the pen immediately starts drawing. + +\--- task \--- + +To stop this from happening, add a `pen up`{:class="block3extensions"} block at the start of the script, and a `wait one second`{:class="block3control"} block above the `forever`{:class="block3control"} block. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/no-NO/step_3.md b/no-NO/step_3.md new file mode 100644 index 0000000..d5f8d46 --- /dev/null +++ b/no-NO/step_3.md @@ -0,0 +1,73 @@ +## Clone cats + +You want a never-ending stream of cats that the player has to guide along the path to the exit. + +\--- task \--- + +Click on the sprite called 'Cat', and add some code to `hide`{:class="block3looks"} the sprite, and also to `clone`{:class="block3control"} it every three seconds. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +If you run the program now, nothing happens on the Stage. To check that a new Cat sprite clone is created every three seconds, make each clone appear and fall out of the sky. + +\--- task \--- + +Add code to tell the sprite that `when it starts as a clone`{:class="block3control"}, it should `show`{:class="block3looks"} itself and fall until it `touches`{:class="block3sensing"} the blue floor that is drawn on the Stage. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`When the sprite starts as a clone`{:class="block3control"}, `show`{:class="block3looks"} the sprite. `Repeatedly`{:class="block3control"} `Change`{:class="block3motion"} the sprite's `y` coordinate by `-2`, until the sprite `touches`{:class="block3sensing"} the blue Stage. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +When you click the green flag, you should see a new cat fall from the top of the Stage every three seconds. Every cat should land in a big pile of overlapping cats on the blue floor at the bottom. + +![Falling cats](images/falling-cats.png) \ No newline at end of file diff --git a/no-NO/step_4.md b/no-NO/step_4.md new file mode 100644 index 0000000..8c10235 --- /dev/null +++ b/no-NO/step_4.md @@ -0,0 +1,115 @@ +## Make the cats move + +Once a cat reaches the floor, it should step slowly to the right. + +\--- task \--- + +Add code to the `when I start as a clone`{:class="block3control"} section to make the cat sprite `move ten steps`{:class="block3motion"}, and switch between the sprite's two costumes every 0.1 seconds to make the cat look like it's walking. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat sprite should `move 10 steps`{:class="block3motion"}, and `switch costume`{:class="block3looks"} every `0.1 seconds`{:class="block3control"}. This code should repeat `forever`{:class="block3control"}, just like the code to make the cat fall. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats now move along the blue platform at the bottom. + +\--- /task \--- + +If you draw a bridge across the gap so that the cats can get all the way to the right side of the Stage, you can see that they end up getting stuck walking into the right wall. + +![Flailing cats at the edge](images/flailing-at-edge.png) + +\--- task \--- + +Remove the `forever`{:class="block3control"} loop, and instead add a different loop to make the cats only walk until they reach an edge. When a cat reaches the edge of the Stage, it should disappear. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats disappear when they reach the edge of the Stage. + +\--- /task \--- + +You may notice that, if the cats fall into the hole, they don't disappear but instead get stuck at the bottom. This is because they keep trying to fall downwards. + +This is the part of the code that tells the cat to keep falling until it touches blue: + +```blocks3 +repeat until +end +``` + +However, in the hole, the cat can never reach blue, so it is stuck forever. + +\--- task \--- + +Add more blocks to this loop so that it repeats until the cat sprite is touching blue `or`{:class="block3operators"} `touching the edge`{:class="block3sensing"}. This way, the sprite stops trying to fall if it reaches the edge of the Stage. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/no-NO/step_5.md b/no-NO/step_5.md new file mode 100644 index 0000000..ff776e8 --- /dev/null +++ b/no-NO/step_5.md @@ -0,0 +1,65 @@ +## Stick to the lines + +You might notice that, if you draw a low bridge between the two platforms, or a line that slopes upwards, the cats end up walking through the platform rather than on top of it! + +![Cats walking through the platform](images/cat-walk-through-platform.png) + +\--- task \--- + +In the code for the cat sprite, add another loop before the `next costume`{:class="block3looks"} block. This time, the loop should tell the cat to move upwards by `2` until it is not touching blue. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat should `move up 2`{:class="block3motion"} `repeatedly until`{:class="block3control"} it is `not`{:class="block3operators"} `touching blue`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Click the green flag and try drawing a line that slopes upwards. Check that your cat follows this line. + +\--- /task \--- \ No newline at end of file diff --git a/no-NO/step_6.md b/no-NO/step_6.md new file mode 100644 index 0000000..deb146e --- /dev/null +++ b/no-NO/step_6.md @@ -0,0 +1,89 @@ +## Get to safety + +The object of the game is to guide the cats to safety by creating a path so they can reach the door. Create a score variable to keep track of how many cats reach the door. + +\--- task \--- + +Create a variable called `score`{:class="block3variables"}. + +![Cat sprite](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Add code to your cat sprite to add `1` to the `score`{:class="block3variables"} each time a cat reaches the door. Also set `score`{:class="block3variables"} to `0` `when the flag is clicked`{:class="block3events"} at the start of the game. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the cat is `touching the door sprite`{:class="block3sensing"}, then `add 1 to the score`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the new code blocks you need to add to your `when I start as a clone` script: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Add some more code so that, when a cat sprite reaches the door, the cat makes a 'meow' sound and then disappears. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/no-NO/step_7.md b/no-NO/step_7.md new file mode 100644 index 0000000..6e609ac --- /dev/null +++ b/no-NO/step_7.md @@ -0,0 +1,13 @@ +## Challenge: more obstacles + +At the moment, the game is rather easy to win. Can you think of ideas to you make your game harder? + ++ Add more backgrounds with different platform designs. + ++ Move the location of the door depending on which background is displayed. + ++ Add more sprites as moving obstacles. Perhaps you could have roaming dogs or rotating spikes the cats need to avoid? + ++ Only allow the player to use a limited amount of "ink" to draw lines in the game. You can keep track of how much "ink" is used by creating a timer variable that records how long the mouse is held down. + ++ Create a sprite to show the player how much ink is left. \ No newline at end of file diff --git a/no-NO/step_8.md b/no-NO/step_8.md new file mode 100644 index 0000000..2295a72 --- /dev/null +++ b/no-NO/step_8.md @@ -0,0 +1,19 @@ +## What next? + +Try the [Flower generator](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects) project, where you will use custom blocks to create flower patterns. + +\--- no-print \--- + +Press `f` to draw a few flowers, or `r` to draw lots of random flowers, or `p` to draw a flower pattern. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![random flowers](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/pl-PL/images/banner.png b/pl-PL/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/pl-PL/images/banner.png differ diff --git a/pl-PL/images/cat-sprite.png b/pl-PL/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/pl-PL/images/cat-sprite.png differ diff --git a/pl-PL/images/cat-walk-through-platform.png b/pl-PL/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/pl-PL/images/cat-walk-through-platform.png differ diff --git a/pl-PL/images/cats-finished.png b/pl-PL/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/pl-PL/images/cats-finished.png differ diff --git a/pl-PL/images/door-sprite.png b/pl-PL/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/pl-PL/images/door-sprite.png differ diff --git a/pl-PL/images/draw-a-line.png b/pl-PL/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/pl-PL/images/draw-a-line.png differ diff --git a/pl-PL/images/falling-cats.png b/pl-PL/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/pl-PL/images/falling-cats.png differ diff --git a/pl-PL/images/flailing-at-edge.png b/pl-PL/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/pl-PL/images/flailing-at-edge.png differ diff --git a/pl-PL/images/flower-random.png b/pl-PL/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/pl-PL/images/flower-random.png differ diff --git a/pl-PL/images/pen-sprite.png b/pl-PL/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/pl-PL/images/pen-sprite.png differ diff --git a/pl-PL/meta.yml b/pl-PL/meta.yml new file mode 100644 index 0000000..2f26239 --- /dev/null +++ b/pl-PL/meta.yml @@ -0,0 +1,30 @@ +--- +title: KOTY! +hero_image: images/banner.png +description: Stwórz grę, w której poprowadzisz koty w bezpieczne miejsce i powstrzymasz je przed wpadnięciem do dziury +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Wprowadzenie + - + title: Narysuj linie + - + title: Klonowanie kotów + completion: + - engaged + - + title: Spraw, aby koty poruszały się + - + title: Trzymaj się linii + - + title: Dostań się w bezpieczne miejsce + completion: + - internal + - + title: 'Wyzwanie: więcej przeszkód' + challenge: true + - + title: Co dalej? diff --git a/pl-PL/resources/cats-resources.sb3 b/pl-PL/resources/cats-resources.sb3 new file mode 100644 index 0000000..1c07b1e Binary files /dev/null and b/pl-PL/resources/cats-resources.sb3 differ diff --git a/pl-PL/solutions/cats-solution.sb3 b/pl-PL/solutions/cats-solution.sb3 new file mode 100644 index 0000000..078b92a Binary files /dev/null and b/pl-PL/solutions/cats-solution.sb3 differ diff --git a/pl-PL/step_1.md b/pl-PL/step_1.md new file mode 100644 index 0000000..af4b9e9 --- /dev/null +++ b/pl-PL/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +To jest wersja projektu korzystająca z **Scratch 3**. Istnieje również [wersja tego projektu dla Scratch 2](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Wprowadzenie + +W tym projekcie stworzysz grę, w której musisz poprowadzić koty w bezpieczne miejsca i nie pozwolić, aby któryś z nich wpadł w szczelinę! + +### Co będziesz robić + +\--- no-print \--- + +Kliknij i przeciągnij myszą, aby narysować linię ołówkiem. Twoim celem jest uratowanie kotów przed wpadnięciem do dziur poprzez stworzenie bezpiecznej ścieżki do wyjścia. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Ukończone koty](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: Czego się nauczysz + ++ Jak używać pętli `zawsze`{:class="block3control"}, aby stale generować poruszające się koty ++ Jak używać pętli `powtarzaj aż`{:class="block3control"}, aby twoje koty podążały za linią + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Czego będziesz potrzebować + +### Sprzęt + ++ Komputer, na którym można uruchomić Scratch 3 + +### Oprogramowanie + ++ Scratch 3 ([wersję internetową](https://rpf.io/scratchon){:target="_blank"} lub [wersję do pobrania na komputer](https://rpf.io/scratchoff){:target="_blank"}) + +### Pliki do pobrania + ++ [Projekt startowy do pobrania](https://rpf.io/p/pl-PL/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Dodatkowe informacje dla nauczycieli + +\--- no-print \--- + +Jeśli chcesz wydrukować ten projekt, użyj [wersji do wydruku](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +Możesz znaleźć [ukończoną wersję projektu tutaj](https://rpf.io/p/pl-PL/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/pl-PL/step_2.md b/pl-PL/step_2.md new file mode 100644 index 0000000..2367f9d --- /dev/null +++ b/pl-PL/step_2.md @@ -0,0 +1,140 @@ +## Narysuj linie + +\--- task \--- + +Otwórz startowy projekt Scratch "KOTY!". + +**Online:** otwórz projekt początkowy Scratch na stronie [scratch.mit.edu/projects/382683951](https://scratch.mit.edu/projects/382683951){:target="_blank"}. + +Jeśli posiadasz konto Scratch, możesz utworzyć kopie poprzez kliknięcie **Remix**. + +**Offline:** otwórz [projekt startowy](https://rpf.io/p/pl-PL/cats-go) w edytorze offline. Jeśli musisz pobrać i zainstalować edytor Scratcha, znajdziesz go na stronie [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Dodaj rozszerzenie pisaka do swojego projektu. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Kliknij na duszka o nazwie 'ołówek' i dodaj kod, aby ustawić kolor pisaka na ten sam niebieski co przeszkody na scenie. + +![Duszek ołówka](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +Aby wybrać kolor, kliknij kwadrat koloru w bloku `ustaw kolor pisaka`{: class = "block3extensions"}, aby kursor myszy zmienił się w pipetę, a następnie kliknij odpowiedni kolor na stole montażowym. + +\--- /task \--- + +\--- task \--- + +Dodaj trochę kodu, aby duszek podążał za wskaźnikiem myszy. Przetestuj swój program, aby sprawdzić, czy kod działa. + +![Duszek ołówka](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Dodaj kod, aby powiedzieć duszkowi, aby narysował linię na scenie, jeśli przycisk myszy jest wciśnięty. + +![Duszek ołówka](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`Jeśli`{:class="block3control"} `kliknięto myszką?`{:class="block3sensing"}, to`przyłóż pisak`{:class="block3extensions"}, `w przeciwnym razie`{:class="block3control"}, `podnieś pisak`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Oto potrzebne bloki kodu: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +Tak powinien wyglądać Twój kod: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Przetestuj swój kod. Powinieneś być w stanie kliknąć i przeciągnąć myszką, aby narysować niebieską linię na scenie. + +![Narysuj linię](images/draw-a-line.png) + +\--- /task \--- + +Prawdopodobnie widzisz, że niebieska kropka zawsze pojawia się w prawym górnym rogu sceny (jest zakreślona na obrazku powyżej). Dzieje się tak, ponieważ gdy klikniesz zieloną flagę, aby rozpocząć grę, naciskasz myszkę w dół, a więc długopis natychmiast zaczyna rysować. + +\--- task \--- + +Aby temu zapobiec zdarzeniom, dodać bloczek `podnieś pisak`{:class="block3extensions"} bloku na początku skryptu i bloczek `czekaj 1 sekund`{:class="block3control"} powyżej bloczka `zawsze`{:class="block3control"}. + +![Duszek ołówka](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/pl-PL/step_3.md b/pl-PL/step_3.md new file mode 100644 index 0000000..7c6921f --- /dev/null +++ b/pl-PL/step_3.md @@ -0,0 +1,73 @@ +## Klonowanie kotów + +Chcesz niekończący się strumień kotów, które gracz musi prowadzić wzdłuż ścieżki do wyjścia. + +\--- task \--- + +Kliknij duszka o nazwie „Duszek1” i dodaj kod `ukryj`{:class="block3looks"} do duszka, a także do `utwórz klona z siebie`{:class="block3control"} co trzy sekundy. + +![Duszek1 - duszek kota](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +Jeśli teraz uruchamiasz program, nic się nie stanie na scenie. Aby sprawdzić, czy nowy klon Duszka1 jest tworzony co trzy sekundy, spraw, aby każdy klon pojawiał się i spadał z nieba. + +\--- task \--- + +Dodaj kod, aby poinformować duszka, że `gdy zaczyna się jako klon`{:class="block3control"}, powinien się `pokazać`{:class="block3looks"} i spadać, aż będzie `dotykać`{:class=" block3sensing"} niebieską podłogę narysowaną na scenie. + +![Duszek1 - duszek kota](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`Kiedy duszek zaczyna jako klon`{:class="block3control"}, `pokazują`{:class="block3looks"} duszka. `Powtarzaj`{:class="block3control"} `Zmień`{:class="block3motion"} Współrzędną `y` duszka o `-2`, aż duszek będzie `dotykać`{:class="block3sensing"} niebieskiej sceny. + +\--- /hint \--- + +\--- hint \--- + +Oto potrzebne bloki kodu: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +Tak powinien wyglądać Twój kod: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +Kiedy klikniesz zieloną flagę, co trzy sekundy powinien wypaść nowy kot ze szczytu sceny. Każdy kot powinien wylądować na dużym stosie nachodzących na siebie kotów na niebieskiej podłodze u dołu. + +![Spadające koty](images/falling-cats.png) \ No newline at end of file diff --git a/pl-PL/step_4.md b/pl-PL/step_4.md new file mode 100644 index 0000000..0bbdfce --- /dev/null +++ b/pl-PL/step_4.md @@ -0,0 +1,115 @@ +## Spraw, aby koty poruszały się + +Gdy kot dotrze do podłogi, powinien powoli posuwać się w prawo. + +\--- task \--- + +Dodaj następujący kod do sekcji `gdy zaczynam jako klon`{:class="block3control"} duszka kota aby `przesuń o 10 kroków`{:class="block3motion"}, i przełączaj dwoma kostiumami duszka co 0,1 sekundy żeby kot wyglądał, jakby szedł. + +![Duszek kota](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +Duszek kota powinien się `przesunąć o10 kroków`{:class="block3motion"} i następnie zmienić kostium `następny kostium`{:class="block3looks"}co `0,1 sekundy`{:class="block3control"}. Ten kod powinien powtarzać się `zawsze`{:class="block3control"}, podobnie jak kod powodujący upadek kota. + +\--- /hint \--- + +\--- hint \--- + +Oto potrzebne bloki kodu: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +Tak powinien wyglądać Twój kod: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Naciśnij zieloną flagę i sprawdź, czy koty poruszają się teraz wzdłuż niebieskiej platformy na dole. + +\--- /task \--- + +Jeśli narysujesz most nad dziurą, aby koty mogły dotrzeć do końca prawej strony sceny, zobaczysz, że w końcu utknęły w prawej ścianie. + +![Spadające koty na krawędzi](images/flailing-at-edge.png) + +\--- task \--- + +Usuń pętlę `zawsze`{:class="block3control"} i zamiast niej dodaj inną pętlę, aby koty chodziły tylko do krawędzi. Kiedy kot dotrze do krawędzi sceny, powinien zniknąć. + +![Duszek kota](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Naciśnij zieloną flagę i sprawdź, czy koty znikają, gdy dotrą do krawędzi sceny. + +\--- /task \--- + +Możesz zauważyć, że jeśli koty wpadną do dziury, nie znikną, ale utkną na dole. To dlatego, że wciąż próbują spadać w dół. + +To jest część kodu, która mówi kotowi, aby spadał, dopóki nie dotknie niebieskiego: + +```blocks3 +repeat until +end +``` + +Jednak w dziurze kot nigdy nie osiągnie niebieskiego, więc utknie na zawsze. + +\--- task \--- + +Dodaj więcej bloków do tej pętli, aby powtarzała się, aż duszek kota dotknie niebieskiego `lub`{:class="block3operators"} `dotknie krawędzi`{:class="block3sensing"}. W ten sposób duszek przestaje próbować spadać, jeśli dojdzie do krawędzi sceny. + +![Duszek kota](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/pl-PL/step_5.md b/pl-PL/step_5.md new file mode 100644 index 0000000..728ca7b --- /dev/null +++ b/pl-PL/step_5.md @@ -0,0 +1,65 @@ +## Trzymaj się linii + +Możesz zauważyć, że jeśli narysujesz nisko zawieszony most między dwiema platformami lub stromą linię w górę, koty ostatecznie przechodzą przez platformę, zamiast po niej! + +![Koty przechodzą przez platformę](images/cat-walk-through-platform.png) + +\--- task \--- + +W kodzie duszka kota dodaj kolejną pętlę przed blokiem `następny kostium`{:class="block3looks"}. Tym razem pętla powinna poinformować kota o przesunięciu się w górę o `2` dopóki nie dotknie niebieskiego. + +![Duszek kota](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +Kot powinien `przesuwać się w górę o 2`{:class="block3motion"} i `powtarzać aż`{:class="block3control"} `nie`{:class="block3operators"} `dotyka niebieskiego`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Oto potrzebne bloki kodu: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +Tak powinien wyglądać Twój kod: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Kliknij zieloną flagę i spróbuj rysować linię nachylenia w górę. Sprawdź, czy twój kot podąża za tą linią. + +\--- /task \--- \ No newline at end of file diff --git a/pl-PL/step_6.md b/pl-PL/step_6.md new file mode 100644 index 0000000..e49158e --- /dev/null +++ b/pl-PL/step_6.md @@ -0,0 +1,89 @@ +## Dostań się w bezpieczne miejsce + +Celem gry jest poprowadzenie kotów w bezpieczne miejsce, tworząc ścieżkę umożliwiającą im dotarcie do drzwi. Utwórz zmienną wyniku, aby śledzić ile kotów dociera do drzwi. + +\--- task \--- + +Utwórz nową zmienną o nazwie `wynik`{:class="block3variables"}. + +![Duszek kota](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Dodaj kod do duszka kota, aby dodać `1` do `wyniku`{:class="block3variables"} za każdym razem, gdy kot dociera do drzwi. Ustawia również `wynik`{:class="block3variables"} na `0` `po kliknięciu flagi`{:class="block3events"} na początku gry. + +![Duszek kota](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} kot ma `dotykając duszka drzwi`{:class="block3sensing"}, to `zmień wynik o 1`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Oto nowe bloki kodu, które musisz dodać do swojego skryptu `kiedy zaczynam jako klon`: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +Tak powinien wyglądać Twój kod: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Dodaj jeszcze kilka bloków kody, aby duszek kota dotrze do drzwi, zamiauczał- wydał dźwięk "meow" i następnie znikł. + +![Duszek kota](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/pl-PL/step_7.md b/pl-PL/step_7.md new file mode 100644 index 0000000..6449419 --- /dev/null +++ b/pl-PL/step_7.md @@ -0,0 +1,13 @@ +## Wyzwanie: więcej przeszkód + +W tej chwili, jest dość łatwo wygrać w tej grze. Czy potrafisz pomyśleć o pomysłach, aby sprawić, że twoja gra stanie się trudniejsza? + ++ Dodaj więcej obrazów tła z różnymi kształtami platform. + ++ Zmień położenie drzwi, w zależności które tło jest wyświetlane. + ++ Dodaj więcej duszków jako przesuwające przeszkody. Być może możesz mieć wędrujące psy lub obracające się kolce, których koty muszą unikać? + ++ Pozwól graczowi na używanie ograniczonej ilości "atramentu" do rysowania linii w grze. Możesz śledzić ile "atramentu" jest używanych, tworząc zmienną licznika czasu, która zapisuje jak długo przycisk myszy jest przytrzymywany. + ++ Stwórz duszka, aby pokazać graczowi ile tuszu pozostało. \ No newline at end of file diff --git a/pl-PL/step_8.md b/pl-PL/step_8.md new file mode 100644 index 0000000..512bd84 --- /dev/null +++ b/pl-PL/step_8.md @@ -0,0 +1,19 @@ +## Co dalej? + +Wypróbuj projekt [generator kwiatów](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects), w którym będziesz używać własnych bloków do tworzenia kwiecistych wzorów. + +\--- no-print \--- + +Naciśnij `f` aby narysować kilka kwiatów, lub `r` aby narysować wiele losowych kwiatów, lub `p` aby narysować kwiecisty wzór. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![losowe kwiaty](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/pt-BR/images/banner.png b/pt-BR/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/pt-BR/images/banner.png differ diff --git a/pt-BR/images/cat-sprite.png b/pt-BR/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/pt-BR/images/cat-sprite.png differ diff --git a/pt-BR/images/cat-walk-through-platform.png b/pt-BR/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/pt-BR/images/cat-walk-through-platform.png differ diff --git a/pt-BR/images/cats-finished.png b/pt-BR/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/pt-BR/images/cats-finished.png differ diff --git a/pt-BR/images/door-sprite.png b/pt-BR/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/pt-BR/images/door-sprite.png differ diff --git a/pt-BR/images/draw-a-line.png b/pt-BR/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/pt-BR/images/draw-a-line.png differ diff --git a/pt-BR/images/falling-cats.png b/pt-BR/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/pt-BR/images/falling-cats.png differ diff --git a/pt-BR/images/flailing-at-edge.png b/pt-BR/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/pt-BR/images/flailing-at-edge.png differ diff --git a/pt-BR/images/flower-random.png b/pt-BR/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/pt-BR/images/flower-random.png differ diff --git a/pt-BR/images/pen-sprite.png b/pt-BR/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/pt-BR/images/pen-sprite.png differ diff --git a/pt-BR/meta.yml b/pt-BR/meta.yml new file mode 100644 index 0000000..76097bc --- /dev/null +++ b/pt-BR/meta.yml @@ -0,0 +1,30 @@ +--- +title: GATOS! +hero_image: images/banner.png +description: Crie um jogo em que você guia os gatos para o abrigo e impeça que eles caiam em buracos +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Introdução + - + title: Desenhar linhas + - + title: Clonar gatos + completion: + - engaged + - + title: Faça os gatos se moverem + - + title: Fiquem nas linhas + - + title: Vá para o abrigo + completion: + - internal + - + title: 'Desafio: Mais obstáculos' + challenge: true + - + title: E agora? diff --git a/pt-BR/resources/cats-resources.sb3 b/pt-BR/resources/cats-resources.sb3 new file mode 100644 index 0000000..a6a0231 Binary files /dev/null and b/pt-BR/resources/cats-resources.sb3 differ diff --git a/pt-BR/solutions/cats-solution.sb3 b/pt-BR/solutions/cats-solution.sb3 new file mode 100644 index 0000000..d23dfc3 Binary files /dev/null and b/pt-BR/solutions/cats-solution.sb3 differ diff --git a/pt-BR/step_1.md b/pt-BR/step_1.md new file mode 100644 index 0000000..6ab3dca --- /dev/null +++ b/pt-BR/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +Esta é a versão **Scratch 3** do projeto. Há também uma [versão Scratch 2 do projeto](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Introdução + +Neste projeto, você vai criar um jogo no qual precisará guiar os gatos para a segurança e não deixar que nenhum deles caia nas brechas! + +### O que você vai fazer + +\--- no-print \--- + +Clique e arraste com o mouse para desenhar uma linha com o lápis. Seu objetivo é impedir que os gatos caiam em buracos criando um caminho seguro até a saída. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Gatos terminados](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: O que você vai aprender + ++ Como usar um laço `sempre`{:class="block3control"} para gerar constantemente gatos em movimento ++ Como usar um laço `repita até que`{:class="block3control"} para garantir que seus gatos sigam uma linha + +\--- /collapse \--- + +## \--- collapse \--- + +## title: O que você vai precisar + +### Hardware + ++ Um computador capaz de executar o Scratch 3 + +### Software + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### Downloads + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Notas adicionais para educadores + +\--- no-print \--- + +Se você precisar imprimir este projeto, por favor use a [versão para impressão](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/pt-BR/step_2.md b/pt-BR/step_2.md new file mode 100644 index 0000000..45b0809 --- /dev/null +++ b/pt-BR/step_2.md @@ -0,0 +1,140 @@ +## Desenhar linhas + +\--- task \--- + +Abra o projeto inicial Scratch 'GATOS!'. + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +Se você tiver uma conta Scratch, você pode fazer uma cópia clicando em **Remix**. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Adicione a extensão Caneta ao seu projeto. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Clique no ator chamado 'Caneta' e adicione um código para definir a cor da caneta para o mesmo azul dos obstáculos no palco. + +![ator Caneta](images/pen-sprite.png) + +```blocks3 +quando bandeira verde for clicado +mude a cor da caneta para [#0000ff] +apague tudo +adicione (5) ao tamanho da caneta +``` + +Para selecionar uma cor, clique no quadrado de cores no bloco `mude a cor da caneta para`{:class="block3extensions"} para transformar o cursor do mouse em uma pipeta e clique na cor correta no palco. + +\--- /task \--- + +\--- task \--- + +Adicione um pouco mais de código para fazer o ator seguir o ponteiro do mouse. Teste seu programa para verificar se o código funciona. + +![ator Caneta](images/pen-sprite.png) + +```blocks3 +sempre +vá para (ponteiro do mouse v) +fim +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Adicione algum código para dizer ao ator para desenhar uma linha no palco se o botão do mouse for pressionado. + +![ator Caneta](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`Se`{:class="block3control"} o `mouse está pressionado`{:class="block3sensing"}, `use a caneta`{:class="block3extensions"}, e `senão`{:class="block3control"}, `levante a caneta`{:class="block3extensions "}. + +\--- /hint \--- + +\--- hint \--- + +Aqui estão os blocos de código que você precisa: + +```blocks3 + + +use a caneta + +levante a caneta + +se <> então +senão +fim +``` + +\--- /hint \--- + +\--- hint \--- + +É assim que seu código deve parecer: + +```blocks3 +quando bandeira verde for clicado +mude a cor da caneta para [#0000ff] +apague tudo +adicione (5) ao tamanho da caneta +sempre +vá para (ponteiro do mouse v) ++ se então +use a caneta +senão +levante a caneta +fim +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Teste seu código. Você poderá clicar e arrastar com o mouse para desenhar uma linha azul no palco. + +![Desenhe uma linha](images/draw-a-line.png) + +\--- /task \--- + +Você provavelmente vê que um ponto azul sempre aparece no canto superior direito do palco (está circulado na imagem acima). Isso ocorre porque, quando você clica na bandeira verde para iniciar o jogo, pressiona o mouse e a caneta começa a desenhar imediatamente. + +\--- task \--- + +Para impedir que isso aconteça, adicione um bloco `levante a caneta` {:class="block3extensions"} no início do script e um bloco `espere um segundo`{:class="block3control"} acima do bloco `sempre`{:class="block3control"}. + +![ator Caneta](images/pen-sprite.png) + +```blocks3 +quando bandeira verde for clicado ++ levante a caneta +mude a cor da caneta para [#0000ff] +apague tudo +adicione (5) ao tamanho da caneta ++ espere(1) seg +sempre +vá para (ponteiro do mouse v) +se então +use a caneta +senão +levante a caneta +fim +``` + +\--- /task \--- \ No newline at end of file diff --git a/pt-BR/step_3.md b/pt-BR/step_3.md new file mode 100644 index 0000000..f78ba69 --- /dev/null +++ b/pt-BR/step_3.md @@ -0,0 +1,73 @@ +## Clonar gatos + +Você quer um fluxo interminável de gatos que o jogador precisa guiar ao longo do caminho até a saída. + +\--- task \--- + +Clique no ator chamado 'Gato' e adicione algum código para que se `esconda`{:class="block3looks"} o ator, e também para `crie clone de ()`{:class="block3control"} a cada três segundos. + +![ator Gato](images/cat-sprite.png) + +```blocks3 +quando bandeira verde for clicado +esconda +sempre + crie clone de (este ator v) + espere (3) seg +fim +``` + +\--- /task \--- + +Se você executar o programa agora, nada acontece no palco. Para verificar se um novo clone do ator Gato é criado a cada três segundos, faça com que cada clone apareça e caia do céu. + +\--- task \--- + +Adicione código para dizer ao ator que `quando eu começar como um clone`{:class="block3control"}, ele se `mostre`{:class="block3looks"} e caia até que ele `toque`{:class="block3sensing"} o chão azul desenhado no palco. + +![ator Gato](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`quando eu começar como um clone`{:class="block3control"}, `mostre`{:class="block3looks"} o ator. `Repetidamente`{:class="block3control"} `Adicione`{:class="block3motion"} a coordenada `y` do ator por `-2`, até o ator `tocar`{:class="block3sensing"} no palco azul. + +\--- /hint \--- + +\--- hint \--- + +Aqui estão os blocos de código que você precisa: + +```blocks3 +repita até que <> +fim + +mostre + + + +adicione (-2) a y + +quando eu começar como um clone +``` + +\--- /hint \--- + +\--- hint \--- + +É assim que seu código deve parecer: + +```blocks3 +quando eu começar como um clone +mostre +repita até que +adicione (-2) a y +fim +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +Ao clicar na bandeira verde, você verá um novo gato cair do topo do palco a cada três segundos. Todo gato deve pousar em uma grande pilha de gatos sobrepostos no chão azul na parte inferior. + +![Gatos caindo](images/falling-cats.png) \ No newline at end of file diff --git a/pt-BR/step_4.md b/pt-BR/step_4.md new file mode 100644 index 0000000..45fd77d --- /dev/null +++ b/pt-BR/step_4.md @@ -0,0 +1,115 @@ +## Faça os gatos se moverem + +Uma vez que o gato chega ao chão, deve avançar lentamente para a direita. + +\--- task \--- + +Adicione código à seção `quando eu começar como um clone`{:class="block3control"} para fazer com que o ator Gato se `mova 10 passos`{:class="block3motion"}, e alterne entre as duas fantasias do ator a cada 0,1 segundos para fazer o gato parecer andar. + +![ator Gato](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +O ator Gato deve `mover 10 passos`{:class="block3motion"} e `mude para a fantasia ()`{:class="block3looks"} a cada `0.1 segundos`{:class="block3control"}. Este código deve repetir `sempre`{:class="block3control"}, assim como o código para fazer o gato cair. + +\--- /hint \--- + +\--- hint \--- + +Aqui estão os blocos de código que você precisa: + +```blocks3 +mova (10) passos + +espere(0.1) seg + +próxima fantasia + +sempre +fim +``` + +\--- /hint \--- + +\--- hint \--- + +É assim que seu código deve parecer: + +```blocks3 +quando eu começar como um clone +mostre ++ sempre + mova (10) passos + repita até que + adicione (-2) a y + fim + próxima fantasia + espere(0.1) seg. +fim +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Pressione a bandeira verde e verifique se os gatos agora se movem ao longo da plataforma azul na parte inferior. + +\--- /task \--- + +Se você desenhar uma ponte através da abertura para que os gatos possam chegar até o lado direito do Palco, poderá ver que eles acabam ficando presos andando para a parede direita. + +![Gatos agitados na borda](images/flailing-at-edge.png) + +\--- task \--- + +Remova o laço `sempre`{:class="block3control"} e adicione um laço diferente para fazer com que os gatos andem apenas até atingirem uma borda. Quando um gato chega na borda do palco, ele deve desaparecer. + +![ator Gato](images/cat-sprite.png) + +```blocks3 +quando eu começar como um clone +mostre ++ repita até que + mova(10) passos + repita até que + adicione (-2) a y + fim + próxima fantasia + espere (0.1) seg +fim ++ apague este clone +``` + +\--- /task \--- + +\--- task \--- + +Pressione a bandeira verde e verifique se os gatos desaparecem quando chegam na borda do palco. + +\--- /task \--- + +Você pode perceber que, se os gatos caem no buraco, eles não desaparecem, mas ficam presos no fundo. Isso acontece porque eles continuam tentando cair mais fundo. + +Esta é a parte do código que diz ao gato para continuar caindo até tocar no azul: + +```blocks3 +repita até que +fim +``` + +Entretanto, no buraco, o gato nunca pode chegar no azul, por isso fica preso para sempre. + +\--- task \--- + +Adicione mais blocos a esse loop para que ele repita até o ator Gato tocar no azul `ou`{:class="block3operators"} `tocando em borda`{:class="block3sensing"}. Dessa forma, o ator para de tentar cair se atingir a borda do Palco. + +![ator Gato](images/cat-sprite.png) + +```blocks3 +repita até que < ou > +fim +``` + +\--- /task \--- \ No newline at end of file diff --git a/pt-BR/step_5.md b/pt-BR/step_5.md new file mode 100644 index 0000000..8699c1f --- /dev/null +++ b/pt-BR/step_5.md @@ -0,0 +1,65 @@ +## Fiquem nas linhas + +Você pode ter notado que, se você desenhar uma ponte baixa entre as duas plataformas, ou uma linha que inclina para cima, os gatos acabam por caminhar através da plataforma e não por cima dela! + +![Gatos andando através da plataforma](images/cat-walk-through-platform.png) + +\--- task \--- + +No código do ator Gato, adicione outro laço antes do bloco `próxima fantasia` {:class="block3looks"}. Desta vez, o laço deve dizer ao gato para subir `2` até não tocar na cor azul. + +![ator Gato](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +O gato deve `subir 2`{:class="block3motion"} de maneira `repetida até que`{:class="block3control"} esteja `não`{:class="block3operators"} `tocando na cor azul`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Aqui estão os blocos de código que você precisa: + +```blocks3 + + +adicione (2) a y + +repita até que <> +fim + +não <> +``` + +\--- /hint \--- + +\--- hint \--- + +É assim que seu código deve parecer: + +```blocks3 +quando eu começar como um clone +mostre +repita até que + mova(10) passos + repita até que + adicione (-2) a y + fim + repita até que > + adicione (2) a y + fim + próxima fantasia + espere (0.1) seg +fim +apague este clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Clique na bandeira verde e tente desenhar uma linha inclinada para cima. Verifique se o gato segue a linha. + +\--- /task \--- \ No newline at end of file diff --git a/pt-BR/step_6.md b/pt-BR/step_6.md new file mode 100644 index 0000000..b554c07 --- /dev/null +++ b/pt-BR/step_6.md @@ -0,0 +1,88 @@ +## Vá para o abrigo + +O objetivo do jogo é guiar os gatos para o abrigo em segurança, criando um caminho para que eles possam chegar na porta. Crie uma variável de pontuação para registrar quantos gatos chegam na porta. + +\--- task \--- + +Crie uma nova variável chamada `pontuação`{:class="block3variables"}. + +![ator Gato](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Adicione código ao ator Gato para adicionar `1` à `pontuação`{:class="block3variables"} cada vez que um gato chega na porta. Defina também `pontos`{:class="block3variables"} como `0` `quando bandeira verde for clicado` {: class = "block3events"} no início do jogo. + +![ator Gato](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`Se`{:class="block3control"} o gato está `tocando em Porta`{:class="block3sensing"}, então, `adiciona 1 a pontuação`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Estes são os novos blocos de código que você precisa adicionar ao seu script `quando eu começar como um clone`: + +```blocks3 +adicione (1) a [pontuação v] +se <> então +fim + + + +mude [pontuação v] para (0) +``` + +\--- /hint \--- + +\--- hint \--- + +É assim que seu código deve parecer: + +```blocks3 +quando eu começar comp um clone +mostre +repita até que + mova(10) passos + repita até que + adicione (-2) a y + fim + repita até que > + adicione (2) a y + fim + próxima fantasia + espere (0.1) seg ++ se então + adicione (1) a [pontuação v] + fim +fim +apague este clone + +quando bandeira verde for clicado + ++ mude [pontuação v] para (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Adicione um pouco mais de código para que, quando o gato chegar na porta, o gato faça o som 'miau' e depois então desapareça. + +![ator Gato](images/cat-sprite.png) + +```blocks3 +toque o som (miau v) +apague este clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/pt-BR/step_7.md b/pt-BR/step_7.md new file mode 100644 index 0000000..262c571 --- /dev/null +++ b/pt-BR/step_7.md @@ -0,0 +1,13 @@ +## Desafio: Mais obstáculos + +No momento, este jogo é muito fácil de vencer. Você consegue pensar em ideias para fazer o jogo ficar mais difícil? + ++ Adicione mais fundos com plataformas de desenhos diferentes. + ++ Mude a localização da porta dependendo do fundo que é apresentado. + ++ Adicione mais atores como obstáculos em movimento. Talvez possa ter cachorros caminhando ou rodas com espinhos que os gatos devem evitar? + ++ Limite a quantidade de "tinta" que o jogador tem para desenhar linhas no jogo. Você pode controlar a quantidade de "tinta" que é utilizada através de uma variável que registre por quanto tempo o botão do mouse foi pressionado. + ++ Crie um ator que mostre ao jogador quanto de "tinta" ainda tem. \ No newline at end of file diff --git a/pt-BR/step_8.md b/pt-BR/step_8.md new file mode 100644 index 0000000..7bfb23e --- /dev/null +++ b/pt-BR/step_8.md @@ -0,0 +1,19 @@ +## E agora? + +Experimente o projeto [Lousa Mágica](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects) onde você vai usar blocos customizados para criar padrões de flores. + +\--- no-print \--- + +Pressione `f` para desenhar algumas flores, `r` para desenhar muitas flores de forma aleatória ou `p` para desenhar um padrão em forma de flor. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![flores aleatórias](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/pt-PT/images/banner.png b/pt-PT/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/pt-PT/images/banner.png differ diff --git a/pt-PT/images/cat-sprite.png b/pt-PT/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/pt-PT/images/cat-sprite.png differ diff --git a/pt-PT/images/cat-walk-through-platform.png b/pt-PT/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/pt-PT/images/cat-walk-through-platform.png differ diff --git a/pt-PT/images/cats-finished.png b/pt-PT/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/pt-PT/images/cats-finished.png differ diff --git a/pt-PT/images/door-sprite.png b/pt-PT/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/pt-PT/images/door-sprite.png differ diff --git a/pt-PT/images/draw-a-line.png b/pt-PT/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/pt-PT/images/draw-a-line.png differ diff --git a/pt-PT/images/falling-cats.png b/pt-PT/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/pt-PT/images/falling-cats.png differ diff --git a/pt-PT/images/flailing-at-edge.png b/pt-PT/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/pt-PT/images/flailing-at-edge.png differ diff --git a/pt-PT/images/flower-random.png b/pt-PT/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/pt-PT/images/flower-random.png differ diff --git a/pt-PT/images/pen-sprite.png b/pt-PT/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/pt-PT/images/pen-sprite.png differ diff --git a/pt-PT/meta.yml b/pt-PT/meta.yml new file mode 100644 index 0000000..390216a --- /dev/null +++ b/pt-PT/meta.yml @@ -0,0 +1,30 @@ +--- +title: GATOS! +hero_image: images/banner.png +description: Cria um jogo em que guias gatos para a segurança e impedes que eles caiam em buracos +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Introdução + - + title: Desenhar linhas + - + title: Clonar gatos + completion: + - engaged + - + title: Faz com que os gatos se movam + - + title: Aderir às linhas + - + title: Alcançar a segurança + completion: + - internal + - + title: 'Desafio: mais obstáculos' + challenge: true + - + title: O que se segue? diff --git a/pt-PT/resources/cats-resources.sb3 b/pt-PT/resources/cats-resources.sb3 new file mode 100644 index 0000000..ac303c8 Binary files /dev/null and b/pt-PT/resources/cats-resources.sb3 differ diff --git a/pt-PT/solutions/cats-solution.sb3 b/pt-PT/solutions/cats-solution.sb3 new file mode 100644 index 0000000..82f63cc Binary files /dev/null and b/pt-PT/solutions/cats-solution.sb3 differ diff --git a/pt-PT/step_1.md b/pt-PT/step_1.md new file mode 100644 index 0000000..04dcc91 --- /dev/null +++ b/pt-PT/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +Esta é a versão **Scratch 3** do projeto. Existe também uma versão [Scratch 2 do projeto](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Introdução + +Neste projeto, vais criar um jogo no qual é necessário guiar os gatos para um lugar seguro e não deixar que nenhum deles caia nas aberturas! + +### O que é que vais fazer + +\--- no-print \--- + +Clica e arrasta com o rato para desenhar uma linha com o lápis. O teu objetivo é impedir que os gatos caiam nas aberturas, criando um caminho seguro até à saída. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Gatos terminados](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: O que vais aprender + ++ Como usar um loop `para sempre`{: class = "block3control"} para gerar constantemente gatos em movimento ++ Como usar uma repetição `até`{: class = "block3control"} para garantir que os teus gatos seguem uma linha + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Do que é que vais necessitar + +### Hardware + ++ Um computador com capacidade para executar o Scratch 3 + +### Software + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### Downloads + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Notas adicionais para educadores + +\--- no-print \--- + +Se necessitar imprimir este projeto, por favor utilize a [versão para impressão](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/pt-PT/step_2.md b/pt-PT/step_2.md new file mode 100644 index 0000000..dea202b --- /dev/null +++ b/pt-PT/step_2.md @@ -0,0 +1,140 @@ +## Desenhar linhas + +\--- task \--- + +Abre o 'GATOS!' Projeto Scratch inicial. + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +Se tiveres uma 'conta Scratch' podes fazer uma cópia ao clicares **Remix**. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Adiciona a extensão "caneta" ao teu projeto. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Clica no ator chamado 'Lápis' e adiciona-lhe código para definir a cor do lápis para o mesmo azul dos obstáculos no palco. + +![Caneta sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +Para selecionar uma cor, clica no quadrado de cores no bloco `set pen color`{: class = "block3extensions"} para transformar o cursor do rato numa pipeta e clica na cor correta no palco. + +\--- /task \--- + +\--- task \--- + +Adiciona um pouco mais de código para obrigar o ator a seguir o ponteiro do rato. Testa o teu programa para verificar se o código está a funcionar. + +![Caneta sprite](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Adiciona mais algum código para que o ator desenhe uma linha no palco quando o botão do rato for pressionado. + +![Caneta sprite](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`Se`{: class = "block3control"} o mouse `estiver pressionado`{: class = "block3sensing"}, coloque a caneta `pressionada`{: class = "block3extensions"} e mais `outras`{: class = " block3control "}, levante a caneta `cima`{: class =" block3extensions "}. + +\--- /hint \--- + +\--- hint \--- + +Estes são os blocos de que necessitas: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +Este é o aspeto que o teu código deve ter: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Testa o teu código. Você poderá clicar e arrastar com o mouse para desenhar uma linha azul no palco. + +![Desenhe uma linha](images/draw-a-line.png) + +\--- /task \--- + +Você provavelmente vê que um ponto azul sempre aparece no canto superior direito do palco (está circulado na imagem acima). Isso ocorre porque, quando você clica na bandeira verde para iniciar o jogo, pressiona o mouse e a caneta começa a desenhar imediatamente. + +\--- task \--- + +Para impedir que isso aconteça, adicione um bloco `caneta {`: class = "block3extensions"} no início do script e `espere um segundo`{: class = "block3control"} acima dos `para sempre`{ : class = "block3control"} bloco. + +![Caneta sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/pt-PT/step_3.md b/pt-PT/step_3.md new file mode 100644 index 0000000..a0a714c --- /dev/null +++ b/pt-PT/step_3.md @@ -0,0 +1,73 @@ +## Clonar gatos + +Você quer um fluxo interminável de gatos que o jogador precisa orientar ao longo do caminho até a saída. + +\--- task \--- + +Clique no sprite chamado 'Cat' e adicione algum código ao `hide`{: class = "block3looks"} do sprite, e também ao `clone`{: class = "block3control"} a cada três segundos. + +![Sprite de gato](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +Se você executar o programa agora, nada acontece no palco. Para verificar se um novo clone de sprite Cat é criado a cada três segundos, faça com que cada clone apareça e caia do céu. + +\--- task \--- + +Adicione código para dizer ao sprite que `quando ele começa como um clone`{: class = "block3control"}, deve- `show de`{: class = "block3looks"}-se e cair até que ele `toques`{: class =" block3sensing "} o piso azul desenhado no palco. + +![Sprite de gato](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`Quando o sprite começa como um clone`{: class = "block3control"}, `mostra`{: class = "block3looks"} o sprite. `Repetidamente`{: class = "block3control"} `Altere`{: class = "block3motion"} as coordenadas `e` do sprite por `-2`, até o sprite `tocar`{: class = "block3sensing"} no azul Palco. + +\--- /hint \--- + +\--- hint \--- + +Estes são os blocos de que necessitas: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +Este é o aspeto que o teu código deve ter: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +Ao clicar na bandeira verde, você verá um novo gato cair do topo do palco a cada três segundos. Todo gato deve pousar em uma grande pilha de gatos sobrepostos no chão azul na parte inferior. + +![Gatos caindo](images/falling-cats.png) \ No newline at end of file diff --git a/pt-PT/step_4.md b/pt-PT/step_4.md new file mode 100644 index 0000000..67745d7 --- /dev/null +++ b/pt-PT/step_4.md @@ -0,0 +1,115 @@ +## Faça os gatos se mexerem + +Quando um gato atinge o chão, deve pisar lentamente para a direita. + +\--- task \--- + +Adicione código ao `quando eu começar como um clone`{: class = "block3control"} para fazer o sprite de gato `mover dez etapas`{: class = "block3motion"} e alterne entre os dois figurinos do sprite a cada 0,1 segundos para fazer o gato parecer andar. + +![Sprite de gato](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +O sprite de gato deve `mover 10 etapas`{: class = "block3motion"} e `alternar o traje`{: class = "block3looks"} a cada `0,1 segundos`{: class = "block3control"}. Este código deve repetir `para sempre`{: class = "block3control"}, assim como o código para fazer o gato cair. + +\--- /hint \--- + +\--- hint \--- + +Estes são os blocos de que necessitas: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +Este é o aspeto que o teu código deve ter: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Pressione a bandeira verde e verifique se os gatos agora se movem ao longo da plataforma azul na parte inferior. + +\--- /task \--- + +Se você desenhar uma ponte através da abertura para que os gatos possam chegar até o lado direito do Palco, poderá ver que eles acabam ficando presos andando na parede direita. + +![Gatos agitados na borda](images/flailing-at-edge.png) + +\--- task \--- + +Remova o loop `para sempre`{: class = "block3control"} e adicione um loop diferente para fazer com que os gatos andem apenas até atingirem uma borda. Quando um gato atinge a borda do palco, ele deve desaparecer. + +![Sprite de gato](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Pressione a bandeira verde e verifique se os gatos desaparecem quando atingem a borda do palco. + +\--- /task \--- + +Você pode perceber que, se os gatos caem no buraco, eles não desaparecem, mas ficam presos no fundo. Isso ocorre porque eles continuam tentando cair para baixo. + +Esta é a parte do código que diz ao gato para continuar caindo até tocar em azul: + +```blocks3 +repeat until +end +``` + +No entanto, no buraco, o gato nunca pode chegar ao azul, por isso fica preso para sempre. + +\--- task \--- + +Adicione mais blocos a esse loop para que ele repita até o sprite de gato tocar em azul `ou`{: class = "block3operators"} `tocando na borda`{: class = "block3sensing"}. Dessa forma, o sprite para de tentar cair se atingir a borda do Palco. + +![Sprite de gato](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/pt-PT/step_5.md b/pt-PT/step_5.md new file mode 100644 index 0000000..6fefabe --- /dev/null +++ b/pt-PT/step_5.md @@ -0,0 +1,65 @@ +## Aderir à linhas + +Podes já ter notado que, se desenhares uma ponte baixa entre as duas plataformas, ou uma linha que inclina para cima, os gatos acabam por caminhar através da plataforma e não por cima dela! + +![Gatos a andar na plataforma](images/cat-walk-through-platform.png) + +\--- task \--- + +No código do ator gato, adiciona outro ciclo antes do bloco `passa para o teu próximo traje` {: class = "block3looks"}. Desta vez, o ciclo deve dizer ao gato para subir ` 2 ` até não estar a tocar na cor azul. + +![Ator gato](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +O gato deve ` subir 2 ` {: class = "block3motion"} ` até ` {: class = "block3control"} ` não estar a ` {: class = "block3operators"} ` tocar na cor azul ` {: class = "block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Estes são os blocos de que necessitas: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +Este é o aspeto que o teu código deve ter: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Clica na bandeira verde e tenta desenhar uma linha inclinada para cima. Verifica se o teu gato segue a linha. + +\--- /task \--- \ No newline at end of file diff --git a/pt-PT/step_6.md b/pt-PT/step_6.md new file mode 100644 index 0000000..d84984c --- /dev/null +++ b/pt-PT/step_6.md @@ -0,0 +1,89 @@ +## Alcançar a segurança + +O objetivo do jogo é guiar os gatos para a segurança, criando um caminho para que eles possam alcançar a porta. Cria uma variável de pontuação para controlar quantos gatos chegam à porta. + +\--- task \--- + +Cria uma nova variável chamada `pontuação`{:class="block3variables"}. + +![Ator gato](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Adiciona código ao teu ator de gato para adicionar ` 1 ` à `pontuação` {: class = "block3variables"} de cada vez que um gato chega à porta. Define também a `pontuação` {: class = "block3variables"} como ` 0 ` `quando alguém clicar a bandeira ` {: class = "block3events"} no início do jogo. + +![Ator gato](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +` Se ` {: class = "block3control"} o gato está ` a tocar no ator porta ` {: class = "block3sensing"}, então, ` adiciona a pontuação o valor 1 ` {: class = "block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Estes são os novos blocos de código que necessitas adicionar ao teu comando ` quando fores criado como um clone `: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +Este é o aspeto que o teu código deve ter: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Acrescenta um pouco mais de código para que se oiça miar sempre que um ator gato chega à porta, e depois então desapareça. + +![Ator gato](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/pt-PT/step_7.md b/pt-PT/step_7.md new file mode 100644 index 0000000..abefb51 --- /dev/null +++ b/pt-PT/step_7.md @@ -0,0 +1,13 @@ +## Desafio: mais obstáculos + +De momento, é muito fácil vencer este jogo. Consegues pensar em algumas ideias para fazer o jogo mais difícil? + ++ Acrescenta mais fundos com plataformas diferentes. + ++ Muda a localização da porta em função do fundo que está a ser apresentado. + ++ Acrescenta mais atores como obstáculos em movimento. Talvez possas ter cães de guarda ou rodas com espinhos que o gato tenha que evitar? + ++ Limita a quantidade de "tinta" que o jogador tem para desenhar linhas durante o jogo. Podes controlar quanta "tinta" é utilizada através de uma variável que registe durante quanto tempo é que o botão de rato foi pressionado. + ++ Cria um ator que mostre ao jogador quanta é a "tinta" que ainda tem. \ No newline at end of file diff --git a/pt-PT/step_8.md b/pt-PT/step_8.md new file mode 100644 index 0000000..e87def4 --- /dev/null +++ b/pt-PT/step_8.md @@ -0,0 +1,19 @@ +## O que se segue? + +Experimenta o projeto [Gerador de Flores](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects) onde irás blocos personalizados para criar padrões em forma de flores. + +\--- no-print \--- + +Pressiona tecla ` f ` para desenhar algumas flores, ` r ` para desenhar muitas flores de forma aleatória ou ` p ` para desenhar um padrão em forma de flor. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![flores aleatórias](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/ro-RO/images/banner.png b/ro-RO/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/ro-RO/images/banner.png differ diff --git a/ro-RO/images/cat-sprite.png b/ro-RO/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/ro-RO/images/cat-sprite.png differ diff --git a/ro-RO/images/cat-walk-through-platform.png b/ro-RO/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/ro-RO/images/cat-walk-through-platform.png differ diff --git a/ro-RO/images/cats-finished.png b/ro-RO/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/ro-RO/images/cats-finished.png differ diff --git a/ro-RO/images/door-sprite.png b/ro-RO/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/ro-RO/images/door-sprite.png differ diff --git a/ro-RO/images/draw-a-line.png b/ro-RO/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/ro-RO/images/draw-a-line.png differ diff --git a/ro-RO/images/falling-cats.png b/ro-RO/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/ro-RO/images/falling-cats.png differ diff --git a/ro-RO/images/flailing-at-edge.png b/ro-RO/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/ro-RO/images/flailing-at-edge.png differ diff --git a/ro-RO/images/flower-random.png b/ro-RO/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/ro-RO/images/flower-random.png differ diff --git a/ro-RO/images/pen-sprite.png b/ro-RO/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/ro-RO/images/pen-sprite.png differ diff --git a/ro-RO/meta.yml b/ro-RO/meta.yml new file mode 100644 index 0000000..c1c0ecc --- /dev/null +++ b/ro-RO/meta.yml @@ -0,0 +1,30 @@ +--- +title: CATS! +hero_image: images/banner.png +description: Create a game in which you guide cats to safety and stop them from falling into holes +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Introduction + - + title: Draw lines + - + title: Clone cats + completion: + - engaged + - + title: Make the cats move + - + title: Stick to the lines + - + title: Get to safety + completion: + - internal + - + title: 'Challenge: more obstacles' + challenge: true + - + title: What next? diff --git a/ro-RO/resources/cats-resources.sb3 b/ro-RO/resources/cats-resources.sb3 new file mode 100644 index 0000000..d952bff Binary files /dev/null and b/ro-RO/resources/cats-resources.sb3 differ diff --git a/ro-RO/solutions/cats-solution.sb3 b/ro-RO/solutions/cats-solution.sb3 new file mode 100644 index 0000000..a2dc7c8 Binary files /dev/null and b/ro-RO/solutions/cats-solution.sb3 differ diff --git a/ro-RO/step_1.md b/ro-RO/step_1.md new file mode 100644 index 0000000..838986d --- /dev/null +++ b/ro-RO/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +This is the **Scratch 3** version of the project. There is also a [Scratch 2 version of the project](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Introduction + +In this project, you will create a game in which you need to guide cats to safety and not let any of them fall through the gaps! + +### What you will make + +\--- no-print \--- + +Click and drag with the mouse to draw a line with the pencil. Your goal is to stop the cats from falling into holes by creating a safe path to the exit. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Cats finished](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: What you will learn + ++ How to use a `forever`{:class="block3control"} loop to constantly generate moving cats ++ How to use a `repeat until`{:class="block3control"} loop to ensure your cats follow a line + +\--- /collapse \--- + +## \--- collapse \--- + +## title: What you will need + +### Hardware + ++ A computer capable of running Scratch 3 + +### Software + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### Downloads + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Additional notes for educators + +\--- no-print \--- + +If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/ro-RO/step_2.md b/ro-RO/step_2.md new file mode 100644 index 0000000..264770c --- /dev/null +++ b/ro-RO/step_2.md @@ -0,0 +1,140 @@ +## Draw lines + +\--- task \--- + +Open the 'CATS!' Scratch starter project. + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +If you have a Scratch account you can make a copy by clicking **Remix**. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Add the Pen extension to your project. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Click on the sprite called 'Pen', and add code to set the pen colour to the same blue as the obstacles on the Stage. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +To select a colour, click on the colour square in the `set pen color`{:class="block3extensions"} block to make your mouse cursor turn into a pipette, and then click on the correct colour on the Stage. + +\--- /task \--- + +\--- task \--- + +Add some more code to make the sprite follow the mouse pointer. Test your program to check that the code works. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Add some code to tell the sprite to draw a line on the Stage if the mouse button is pressed down. + +![Pen sprite](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the `mouse is down`{:class="block3sensing"}, put the `pen down`{:class="block3extensions"}, and `else`{:class="block3control"}, lift the `pen up`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Test your code. You should be able to click and drag with the mouse to draw a blue line on the Stage. + +![Draw a line](images/draw-a-line.png) + +\--- /task \--- + +You probably see that a blue dot always appears in the top right-hand corner of the Stage (it's circled in the image above). This is because, when you click the green flag to start the game, you press the mouse down, and so the pen immediately starts drawing. + +\--- task \--- + +To stop this from happening, add a `pen up`{:class="block3extensions"} block at the start of the script, and a `wait one second`{:class="block3control"} block above the `forever`{:class="block3control"} block. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/ro-RO/step_3.md b/ro-RO/step_3.md new file mode 100644 index 0000000..d5f8d46 --- /dev/null +++ b/ro-RO/step_3.md @@ -0,0 +1,73 @@ +## Clone cats + +You want a never-ending stream of cats that the player has to guide along the path to the exit. + +\--- task \--- + +Click on the sprite called 'Cat', and add some code to `hide`{:class="block3looks"} the sprite, and also to `clone`{:class="block3control"} it every three seconds. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +If you run the program now, nothing happens on the Stage. To check that a new Cat sprite clone is created every three seconds, make each clone appear and fall out of the sky. + +\--- task \--- + +Add code to tell the sprite that `when it starts as a clone`{:class="block3control"}, it should `show`{:class="block3looks"} itself and fall until it `touches`{:class="block3sensing"} the blue floor that is drawn on the Stage. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`When the sprite starts as a clone`{:class="block3control"}, `show`{:class="block3looks"} the sprite. `Repeatedly`{:class="block3control"} `Change`{:class="block3motion"} the sprite's `y` coordinate by `-2`, until the sprite `touches`{:class="block3sensing"} the blue Stage. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +When you click the green flag, you should see a new cat fall from the top of the Stage every three seconds. Every cat should land in a big pile of overlapping cats on the blue floor at the bottom. + +![Falling cats](images/falling-cats.png) \ No newline at end of file diff --git a/ro-RO/step_4.md b/ro-RO/step_4.md new file mode 100644 index 0000000..8c10235 --- /dev/null +++ b/ro-RO/step_4.md @@ -0,0 +1,115 @@ +## Make the cats move + +Once a cat reaches the floor, it should step slowly to the right. + +\--- task \--- + +Add code to the `when I start as a clone`{:class="block3control"} section to make the cat sprite `move ten steps`{:class="block3motion"}, and switch between the sprite's two costumes every 0.1 seconds to make the cat look like it's walking. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat sprite should `move 10 steps`{:class="block3motion"}, and `switch costume`{:class="block3looks"} every `0.1 seconds`{:class="block3control"}. This code should repeat `forever`{:class="block3control"}, just like the code to make the cat fall. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats now move along the blue platform at the bottom. + +\--- /task \--- + +If you draw a bridge across the gap so that the cats can get all the way to the right side of the Stage, you can see that they end up getting stuck walking into the right wall. + +![Flailing cats at the edge](images/flailing-at-edge.png) + +\--- task \--- + +Remove the `forever`{:class="block3control"} loop, and instead add a different loop to make the cats only walk until they reach an edge. When a cat reaches the edge of the Stage, it should disappear. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats disappear when they reach the edge of the Stage. + +\--- /task \--- + +You may notice that, if the cats fall into the hole, they don't disappear but instead get stuck at the bottom. This is because they keep trying to fall downwards. + +This is the part of the code that tells the cat to keep falling until it touches blue: + +```blocks3 +repeat until +end +``` + +However, in the hole, the cat can never reach blue, so it is stuck forever. + +\--- task \--- + +Add more blocks to this loop so that it repeats until the cat sprite is touching blue `or`{:class="block3operators"} `touching the edge`{:class="block3sensing"}. This way, the sprite stops trying to fall if it reaches the edge of the Stage. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/ro-RO/step_5.md b/ro-RO/step_5.md new file mode 100644 index 0000000..ff776e8 --- /dev/null +++ b/ro-RO/step_5.md @@ -0,0 +1,65 @@ +## Stick to the lines + +You might notice that, if you draw a low bridge between the two platforms, or a line that slopes upwards, the cats end up walking through the platform rather than on top of it! + +![Cats walking through the platform](images/cat-walk-through-platform.png) + +\--- task \--- + +In the code for the cat sprite, add another loop before the `next costume`{:class="block3looks"} block. This time, the loop should tell the cat to move upwards by `2` until it is not touching blue. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat should `move up 2`{:class="block3motion"} `repeatedly until`{:class="block3control"} it is `not`{:class="block3operators"} `touching blue`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Click the green flag and try drawing a line that slopes upwards. Check that your cat follows this line. + +\--- /task \--- \ No newline at end of file diff --git a/ro-RO/step_6.md b/ro-RO/step_6.md new file mode 100644 index 0000000..deb146e --- /dev/null +++ b/ro-RO/step_6.md @@ -0,0 +1,89 @@ +## Get to safety + +The object of the game is to guide the cats to safety by creating a path so they can reach the door. Create a score variable to keep track of how many cats reach the door. + +\--- task \--- + +Create a variable called `score`{:class="block3variables"}. + +![Cat sprite](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Add code to your cat sprite to add `1` to the `score`{:class="block3variables"} each time a cat reaches the door. Also set `score`{:class="block3variables"} to `0` `when the flag is clicked`{:class="block3events"} at the start of the game. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the cat is `touching the door sprite`{:class="block3sensing"}, then `add 1 to the score`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the new code blocks you need to add to your `when I start as a clone` script: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Add some more code so that, when a cat sprite reaches the door, the cat makes a 'meow' sound and then disappears. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/ro-RO/step_7.md b/ro-RO/step_7.md new file mode 100644 index 0000000..6e609ac --- /dev/null +++ b/ro-RO/step_7.md @@ -0,0 +1,13 @@ +## Challenge: more obstacles + +At the moment, the game is rather easy to win. Can you think of ideas to you make your game harder? + ++ Add more backgrounds with different platform designs. + ++ Move the location of the door depending on which background is displayed. + ++ Add more sprites as moving obstacles. Perhaps you could have roaming dogs or rotating spikes the cats need to avoid? + ++ Only allow the player to use a limited amount of "ink" to draw lines in the game. You can keep track of how much "ink" is used by creating a timer variable that records how long the mouse is held down. + ++ Create a sprite to show the player how much ink is left. \ No newline at end of file diff --git a/ro-RO/step_8.md b/ro-RO/step_8.md new file mode 100644 index 0000000..2295a72 --- /dev/null +++ b/ro-RO/step_8.md @@ -0,0 +1,19 @@ +## What next? + +Try the [Flower generator](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects) project, where you will use custom blocks to create flower patterns. + +\--- no-print \--- + +Press `f` to draw a few flowers, or `r` to draw lots of random flowers, or `p` to draw a flower pattern. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![random flowers](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/ru-RU/images/banner.png b/ru-RU/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/ru-RU/images/banner.png differ diff --git a/ru-RU/images/cat-sprite.png b/ru-RU/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/ru-RU/images/cat-sprite.png differ diff --git a/ru-RU/images/cat-walk-through-platform.png b/ru-RU/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/ru-RU/images/cat-walk-through-platform.png differ diff --git a/ru-RU/images/cats-finished.png b/ru-RU/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/ru-RU/images/cats-finished.png differ diff --git a/ru-RU/images/door-sprite.png b/ru-RU/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/ru-RU/images/door-sprite.png differ diff --git a/ru-RU/images/draw-a-line.png b/ru-RU/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/ru-RU/images/draw-a-line.png differ diff --git a/ru-RU/images/falling-cats.png b/ru-RU/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/ru-RU/images/falling-cats.png differ diff --git a/ru-RU/images/flailing-at-edge.png b/ru-RU/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/ru-RU/images/flailing-at-edge.png differ diff --git a/ru-RU/images/flower-random.png b/ru-RU/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/ru-RU/images/flower-random.png differ diff --git a/ru-RU/images/pen-sprite.png b/ru-RU/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/ru-RU/images/pen-sprite.png differ diff --git a/ru-RU/meta.yml b/ru-RU/meta.yml new file mode 100644 index 0000000..3b202aa --- /dev/null +++ b/ru-RU/meta.yml @@ -0,0 +1,30 @@ +--- +title: КОТЫ! +hero_image: images/banner.png +description: Создай игру, в которой ты поможешь котам добраться в безопасное место и не дашь им упасть в пропасть +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Введение + - + title: Нарисуй линии + - + title: Клонируй котов + completion: + - engaged + - + title: Заставь котов двигаться + - + title: Придерживайся линий + - + title: Доберись до безопасного места + completion: + - internal + - + title: 'Задача: больше препятствий' + challenge: true + - + title: Что дальше? diff --git a/ru-RU/resources/cats-resources.sb3 b/ru-RU/resources/cats-resources.sb3 new file mode 100644 index 0000000..70978cd Binary files /dev/null and b/ru-RU/resources/cats-resources.sb3 differ diff --git a/ru-RU/solutions/cats-solution.sb3 b/ru-RU/solutions/cats-solution.sb3 new file mode 100644 index 0000000..e44b655 Binary files /dev/null and b/ru-RU/solutions/cats-solution.sb3 differ diff --git a/ru-RU/step_1.md b/ru-RU/step_1.md new file mode 100644 index 0000000..cd95e00 --- /dev/null +++ b/ru-RU/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +Это версия проекта для **Scratch 3**. Есть также [версия для Scratch 2](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Введение + +В этом проекте ты создашь игру, в которой тебе нужно помочь котам добраться до безопасного места и не дать ни одному из них упасть в пропасть! + +### Что ты сделаешь + +\--- no-print \--- + +Нажми и проведи мышкой, чтобы нарисовать линию карандашом. Твоя цель - не дать котам упасть в пропасть, создав безопасную дорогу к выходу. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Проект "Коты" завершен](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: Чему ты научишься + ++ Как использовать цикл `повторять всегда`{:class="block3control"} для постоянного генерирования движущихся котов ++ Как использовать цикл `повторять пока не`{:class="block3control"}, чтобы коты следовали за линией + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Что тебе понадобится + +### Оборудование + ++ Компьютер, способный запускать Scratch 3 + +### Программное обеспечение + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### Загрузки + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Дополнительные примечания для педагогов + +\--- no-print \--- + +Если вы хотите распечатать этот проект, то воспользуйтесь [версией для печати](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/ru-RU/step_2.md b/ru-RU/step_2.md new file mode 100644 index 0000000..5ed1736 --- /dev/null +++ b/ru-RU/step_2.md @@ -0,0 +1,142 @@ +## Нарисуй линии + +\--- task \--- + +Открой стартовый проект «КОТЫ». + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +Если у тебя есть учетная запись Scratch, то ты можешь сделать копию, нажав **Ремикс**. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Добавь расширение Перо в свой проект. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Нажми на спрайт под названием «Перо» и добавьте код, чтобы установить цвет пера таким же синим, как и у объектов на сцене. + +![Спрайт пера](images/pen-sprite.png) + +```blocks3 +когда флажок установлен +установи цвет пера на [# 0000ff] +сотри все +установи размер пера на (5) +``` + +Чтобы выбрать цвет, нажми на цветовой квадрат в блоке `установить цвет для пера`{:class="block3extensions"}, чтобы курсор мыши превратился в пипетку, а затем щёлкни нужный цвет на Сцене. + +\--- /task \--- + +\--- task \--- + +Добавь еще немного кода, чтобы спрайт следовал за указателем мыши. Протестируй свою программу, чтобы убедиться, что код работает. + +![Спрайт пера](images/pen-sprite.png) + +```blocks3 +forever +перейти на (указатель мыши v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Добавь код, чтобы cпрайт рисовал линию на Сцене, если кнопка мыши нажата. + +![Спрайт пера](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`Если`{:class="block3control"} `мышь нажата`{:class="block3sensing"}, то `опустить перо`{:class="block3extensions"}, `иначе`{:class="block3control"}, `поднять перо`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Вот блоки кода, которые тебе нужны: + +```blocks3 + + +опустить перо + +поднять перо + +если <>, то +иначе +end +``` + +\--- /hint \--- + +\--- hint \--- + +Вот как должен выглядеть твой код: + +```blocks3 +когда щёлкнут по зелёному флагу +установить цвет пера [#0000ff] +стереть всё +установить размер пера (5) +повторять всегда + перейти на (указатель мыши v) + + если , то + опустить перо + иначе + поднять перо + end +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Проверь свою программу. Ты должен иметь возможность нажать и перемещать мышку, чтобы нарисовать синюю линию на Сцене. + +![Рисовать линию](images/draw-a-line.png) + +\--- /task \--- + +Ты, вероятно, видишь, что в правом верхнем углу Сцены всегда появляется синяя точка (обведено на рисунке выше). Это потому, что, когда ты нажимаешь на зелёный флажок, чтобы начать игру, ты нажимаешь кнопку мыши, и поэтому перо сразу начинает рисовать. + +\--- task \--- + +Чтобы это перестало происходить, добавь блок `поднять перо`{:class="block3extensions"} в начало своего кода и блок `ждать 1 секунд`{:class="block3control"} перед блоком `всегда`{:class="block3control"}. + +![Спрайт пера](images/pen-sprite.png) + +```blocks3 +когда щёлкнут по зелёному флагу ++ поднять перо +установить цвет пера [#0000ff] +стереть всё +установить размер пера (5) ++ ждать (1) секунд +повторять всегда + перейти на (указатель мыши v) + если , то + опустить перо + иначе + поднять перо + end +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/ru-RU/step_3.md b/ru-RU/step_3.md new file mode 100644 index 0000000..e158575 --- /dev/null +++ b/ru-RU/step_3.md @@ -0,0 +1,73 @@ +## Клонируй котов + +То, что ты хочешь, это бесконечный поток котов, которых игрок должен вести к выходу. + +\--- task \--- + +Нажми на спрайт с именем «Кот‎» и добавь код `cпрятаться`{:class="block3looks"} в спрайт, а также `клонировать`{:class="block3control"} каждые три секунды. + +![Спрайт кота](images/cat-sprite.png) + +```blocks3 +когда щёлкнут по зелёному флагу +спрятаться +повторять всегда + создать клон (самого себя v) + ждать (3) секунд +end +``` + +\--- /task \--- + +Если ты запустишь программу сейчас, на сцене ничего не произойдет. Чтобы проверить, что новый клон спрайта Кот создается каждые три секунды, сделай так, чтобы каждый клон появлялся и падал с неба. + +\--- task \--- + +Добавь это код, чтобы сказать спрайту `когда я начинаю как клон`{:class="block3control"}, он должен `показаться`{:class="block3looks"} и падать пока не `касается`{:class="block3sensing"} синего пола, нарисованного на Сцене. + +![Спрайт кота](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`когда я начинаю как клон`{:class="block3control"}, `покажи`{:class="block3looks"} спрайт. `Повторно`{:class="block3control"} `изменять`{:class="block3motion"} координату `y` спрайта на `-2`, пока спрайт не `коснется`{:class="block3sensing"} синей Сцены. + +\--- /hint \--- + +\--- hint \--- + +Вот блоки кода, которые тебе нужны: + +```blocks3 +повторять пока не <> +end + +показаться + + + +изменить y на (-2) + +когда я начинаю как клон +``` + +\--- /hint \--- + +\--- hint \--- + +Вот как должен выглядеть твой код: + +```blocks3 +когда я начинаю как клон +показаться +повторять пока не + изменить y на (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +Когда ты нажмёшь на зелёный флаг, ты должен увидеть, что новый кот падает сверху Сцены каждые 3 секунды. Каждый кот должен приземлиться в большой толпе других котов на синем полу внизу. + +![Падающие кошки](images/falling-cats.png) \ No newline at end of file diff --git a/ru-RU/step_4.md b/ru-RU/step_4.md new file mode 100644 index 0000000..ac304b7 --- /dev/null +++ b/ru-RU/step_4.md @@ -0,0 +1,115 @@ +## Заставь котов двигаться + +Как только кот достигает пола, он должен медленно двигаться вправо. + +\--- task \--- + +Добавь код в секцию `когда я начинаю как клон`{:class="block3control"}, чтобы спрайт кота `шёл 10 шагов`{:class="block3motion"}, и переключался между двумя костюмами спрайта каждую 0.1 секунду, чтобы кот выглядел так, как будто он идёт. + +![Спрайт кота](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +Спрайт кота должен `идти 10 шагов`{:class="block3motion"}, и `следующий костюм`{:class="block3looks"} каждую `0.1 секунд`{:class="block3control"}. Этот код должен повторяться `всегда`{:class="block3control"}, так же, как и код, заставляющий кота падать. + +\--- /hint \--- + +\--- hint \--- + +Вот блоки кода, которые тебе нужны: + +```blocks3 +идти (10) шагов + +ждать (0.1) секунд + +следующий костюм + +повторять всегда +end +``` + +\--- /hint \--- + +\--- hint \--- + +Вот как должен выглядеть твой код: + +```blocks3 +когда я начинаю как клон +показаться ++ повторять всегда + идти (10) шагов + повторять пока не + изменить y на (-2) + end + следующий костюм + ждать (0.1) секунд +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Нажми зелёный флаг и убедись, что кошки теперь движутся по синей платформе внизу. + +\--- /task \--- + +Если ты нарисуешь мост через пропасть, чтобы кошки смогли добраться до правой стороны Сцены, то ты увидишь, что они в конце концов застревают упёршись в стену справа. + +![Падающие коты на краю](images/flailing-at-edge.png) + +\--- task \--- + +Удали цикл `всегда`{:class="block3control"}, и вместо этого добавь другой цикл, чтобы коты ходили, пока не достигнут края. Когда кот достигает края Сцены, он должен исчезнуть. + +![Спрайт кота](images/cat-sprite.png) + +```blocks3 +когда я начинаю как клон +показаться ++ повторять пока не + идти (10) шагов + повторять пока не + изменить y на (-2) + end + следующий костюм + ждать (0.1) секунд +end ++ удалить клон +``` + +\--- /task \--- + +\--- task \--- + +Нажми на зелёный флаг и убедись, что коты исчезают, когда они достигают края Сцены. + +\--- /task \--- + +Ты можешь заметить, что, если коты падают в пропасть, они не исчезают, а застревают на дне. Это потому, что они продолжают пытаться упасть вниз. + +Это часть кода, которая говорит котам продолжать падать, пока они не прикоснуться к синему цвету: + +```blocks3 +повторять пока не +end +``` + +Однако кот никогда не сможет достичь синего цвета в пропасти, поэтому он застрянет навсегда. + +\--- task \--- + +Добавь больше блоков в этот цикл, чтобы он повторялся до тех пор, пока спрайт кота не коснётся синего цвета `или`{:class="block3operators"} `коснется края`{:class="block3sensing"}. Таким образом, спрайт перестанет падать, если достигнет края Сцены. + +![Спрайт кота](images/cat-sprite.png) + +```blocks3 +повторять пока не < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/ru-RU/step_5.md b/ru-RU/step_5.md new file mode 100644 index 0000000..68cb502 --- /dev/null +++ b/ru-RU/step_5.md @@ -0,0 +1,65 @@ +## Придерживайся линий + +Ты можешь заметить, что если нарисовать низкий мост между двумя платформами, или линию, наклоненную наверх, то коты в конце концов будут ходить через платформу, а не по ней! + +![Коты проходят по платформе](images/cat-walk-through-platform.png) + +\--- task \--- + +В коде для спрайта кота добавь еще один цикл перед блоком `следующий костюм`{:class="block3looks"}. На этот раз цикл должен сказать коту двигаться вверх на `2` пока он не коснётся синего цвета. + +![Спрайт кота](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +Кот должен `подняться на 2`{:class="block3motion"} `повторяя пока `{:class="block3control"} он `не`{:class="block3operators"} `коснётся синего цвета`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Вот блоки кода, которые тебе нужны: + +```blocks3 + + +изменить y на (2) + +повторять пока не <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +Вот как должен выглядеть твой код: + +```blocks3 +когда я начинаю как клон +показаться +повторять пока не + идти (10) шагов + повторять пока не + изменить y на (-2) + end + повторять пока не > + изменить y на (2) + end + следующий костюм + ждать (0.1) секунд +end +удалить клон +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Нажми на зелёный флаг и попробуй нарисовать линию, которая идёт вверх. Убедись, что твой кот следует этой линии. + +\--- /task \--- \ No newline at end of file diff --git a/ru-RU/step_6.md b/ru-RU/step_6.md new file mode 100644 index 0000000..7aadf29 --- /dev/null +++ b/ru-RU/step_6.md @@ -0,0 +1,89 @@ +## Доберись до безопасного места + +Цель игры состоит в том, чтобы направить котов в безопасное место, создав для них путь, чтобы они могли добраться до двери. Создай переменную для счёта, чтобы отслеживать, сколько котов достигает двери. + +\--- task \--- + +Создай новую переменную с именем `счёт`{:class="block3variables"}. + +![Спрайт кота](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Добавь код к спрайту кота, чтобы увеличивать `счёт`{:class="block3variables"} на `1` каждый раз, когда кот достигает двери. Также установи `счёт`{:class="block3variables"} равным `0` `когда зелёный флаг нажат`{:class="block3events"} в начале игры. + +![Спрайт кота](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`Если`{:class="block3control"} кот `касается спрайта двери`{:class="block3sensing"}, тогда `добавить 1 к счёту`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Вот новые блоки кода, которые нужно добавить в блок `когда я начинаю как клон`: + +```blocks3 +изменить [счёт v] на (1) + +если <>, то +end + + + +задать [счёт v] значение (0) +``` + +\--- /hint \--- + +\--- hint \--- + +Вот как должен выглядеть твой код: + +```blocks3 +когда я начинаю как клон +показаться +повторять пока не + идти (10) шагов + повторять пока не + изменить y на (-2) + end + повторять пока не > + изменить y на (2) + end + следующий костюм + ждать (0.1) секунд + + если , то + изменить [счет v] на (1) + end +end +удалить клон + +когда щёлкнут по зелёному флагу + +задать [счет v] значение (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Добавь ещё немного кода, чтобы, когда спрайт кота достигает двери, он издавала «мяу», а затем исчезал. + +![Спрайт кота](images/cat-sprite.png) + +```blocks3 +включить звук (мяу v) +удалить клон +``` + +\--- /task \--- \ No newline at end of file diff --git a/ru-RU/step_7.md b/ru-RU/step_7.md new file mode 100644 index 0000000..ba80fb9 --- /dev/null +++ b/ru-RU/step_7.md @@ -0,0 +1,13 @@ +## Задача: больше препятствий + +На данный момент в игре довольно легко выиграть. Может у тебя есть идеи, как сделать игру сложнее? + ++ Добавь больше фонов с различными видами платформы. + ++ Перемещать расположение двери в зависимости от того, какой фон отображается. + ++ Добавь больше спрайтов в качестве движущихся препятствий. Возможно, у тебя могут быть бродящие собаки или вращающиеся шипы, которых коты должны избегать? + ++ Разрешить игроку использовать ограниченное количество «чернил» для рисования линий в игре. Ты можешь отслеживать, сколько «чернил» используется, создав переменную таймера, которая записывает, как долго удерживается мышь. + ++ Создайте спрайт, чтобы показать игроку, сколько осталось чернил. \ No newline at end of file diff --git a/ru-RU/step_8.md b/ru-RU/step_8.md new file mode 100644 index 0000000..dbae1f2 --- /dev/null +++ b/ru-RU/step_8.md @@ -0,0 +1,19 @@ +## Что дальше? + +Попробуй проект [Генератор цветов](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects), где ты будешь использовать пользовательские блоки для создания цветочных узоров. + +\--- no-print \--- + +Нажми `f`, чтобы нарисовать несколько цветов, или `r`, чтобы нарисовать много случайных цветов, или `р` нарисовать цветочный узор. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![случайные цветы](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/sk-SK/images/banner.png b/sk-SK/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/sk-SK/images/banner.png differ diff --git a/sk-SK/images/cat-sprite.png b/sk-SK/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/sk-SK/images/cat-sprite.png differ diff --git a/sk-SK/images/cat-walk-through-platform.png b/sk-SK/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/sk-SK/images/cat-walk-through-platform.png differ diff --git a/sk-SK/images/cats-finished.png b/sk-SK/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/sk-SK/images/cats-finished.png differ diff --git a/sk-SK/images/door-sprite.png b/sk-SK/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/sk-SK/images/door-sprite.png differ diff --git a/sk-SK/images/draw-a-line.png b/sk-SK/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/sk-SK/images/draw-a-line.png differ diff --git a/sk-SK/images/falling-cats.png b/sk-SK/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/sk-SK/images/falling-cats.png differ diff --git a/sk-SK/images/flailing-at-edge.png b/sk-SK/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/sk-SK/images/flailing-at-edge.png differ diff --git a/sk-SK/images/flower-random.png b/sk-SK/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/sk-SK/images/flower-random.png differ diff --git a/sk-SK/images/pen-sprite.png b/sk-SK/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/sk-SK/images/pen-sprite.png differ diff --git a/sk-SK/meta.yml b/sk-SK/meta.yml new file mode 100644 index 0000000..c1c0ecc --- /dev/null +++ b/sk-SK/meta.yml @@ -0,0 +1,30 @@ +--- +title: CATS! +hero_image: images/banner.png +description: Create a game in which you guide cats to safety and stop them from falling into holes +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Introduction + - + title: Draw lines + - + title: Clone cats + completion: + - engaged + - + title: Make the cats move + - + title: Stick to the lines + - + title: Get to safety + completion: + - internal + - + title: 'Challenge: more obstacles' + challenge: true + - + title: What next? diff --git a/sk-SK/resources/cats-resources.sb3 b/sk-SK/resources/cats-resources.sb3 new file mode 100644 index 0000000..d952bff Binary files /dev/null and b/sk-SK/resources/cats-resources.sb3 differ diff --git a/sk-SK/solutions/cats-solution.sb3 b/sk-SK/solutions/cats-solution.sb3 new file mode 100644 index 0000000..a2dc7c8 Binary files /dev/null and b/sk-SK/solutions/cats-solution.sb3 differ diff --git a/sk-SK/step_1.md b/sk-SK/step_1.md new file mode 100644 index 0000000..838986d --- /dev/null +++ b/sk-SK/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +This is the **Scratch 3** version of the project. There is also a [Scratch 2 version of the project](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Introduction + +In this project, you will create a game in which you need to guide cats to safety and not let any of them fall through the gaps! + +### What you will make + +\--- no-print \--- + +Click and drag with the mouse to draw a line with the pencil. Your goal is to stop the cats from falling into holes by creating a safe path to the exit. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Cats finished](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: What you will learn + ++ How to use a `forever`{:class="block3control"} loop to constantly generate moving cats ++ How to use a `repeat until`{:class="block3control"} loop to ensure your cats follow a line + +\--- /collapse \--- + +## \--- collapse \--- + +## title: What you will need + +### Hardware + ++ A computer capable of running Scratch 3 + +### Software + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### Downloads + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Additional notes for educators + +\--- no-print \--- + +If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/sk-SK/step_2.md b/sk-SK/step_2.md new file mode 100644 index 0000000..264770c --- /dev/null +++ b/sk-SK/step_2.md @@ -0,0 +1,140 @@ +## Draw lines + +\--- task \--- + +Open the 'CATS!' Scratch starter project. + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +If you have a Scratch account you can make a copy by clicking **Remix**. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Add the Pen extension to your project. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Click on the sprite called 'Pen', and add code to set the pen colour to the same blue as the obstacles on the Stage. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +To select a colour, click on the colour square in the `set pen color`{:class="block3extensions"} block to make your mouse cursor turn into a pipette, and then click on the correct colour on the Stage. + +\--- /task \--- + +\--- task \--- + +Add some more code to make the sprite follow the mouse pointer. Test your program to check that the code works. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Add some code to tell the sprite to draw a line on the Stage if the mouse button is pressed down. + +![Pen sprite](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the `mouse is down`{:class="block3sensing"}, put the `pen down`{:class="block3extensions"}, and `else`{:class="block3control"}, lift the `pen up`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Test your code. You should be able to click and drag with the mouse to draw a blue line on the Stage. + +![Draw a line](images/draw-a-line.png) + +\--- /task \--- + +You probably see that a blue dot always appears in the top right-hand corner of the Stage (it's circled in the image above). This is because, when you click the green flag to start the game, you press the mouse down, and so the pen immediately starts drawing. + +\--- task \--- + +To stop this from happening, add a `pen up`{:class="block3extensions"} block at the start of the script, and a `wait one second`{:class="block3control"} block above the `forever`{:class="block3control"} block. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/sk-SK/step_3.md b/sk-SK/step_3.md new file mode 100644 index 0000000..d5f8d46 --- /dev/null +++ b/sk-SK/step_3.md @@ -0,0 +1,73 @@ +## Clone cats + +You want a never-ending stream of cats that the player has to guide along the path to the exit. + +\--- task \--- + +Click on the sprite called 'Cat', and add some code to `hide`{:class="block3looks"} the sprite, and also to `clone`{:class="block3control"} it every three seconds. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +If you run the program now, nothing happens on the Stage. To check that a new Cat sprite clone is created every three seconds, make each clone appear and fall out of the sky. + +\--- task \--- + +Add code to tell the sprite that `when it starts as a clone`{:class="block3control"}, it should `show`{:class="block3looks"} itself and fall until it `touches`{:class="block3sensing"} the blue floor that is drawn on the Stage. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`When the sprite starts as a clone`{:class="block3control"}, `show`{:class="block3looks"} the sprite. `Repeatedly`{:class="block3control"} `Change`{:class="block3motion"} the sprite's `y` coordinate by `-2`, until the sprite `touches`{:class="block3sensing"} the blue Stage. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +When you click the green flag, you should see a new cat fall from the top of the Stage every three seconds. Every cat should land in a big pile of overlapping cats on the blue floor at the bottom. + +![Falling cats](images/falling-cats.png) \ No newline at end of file diff --git a/sk-SK/step_4.md b/sk-SK/step_4.md new file mode 100644 index 0000000..8c10235 --- /dev/null +++ b/sk-SK/step_4.md @@ -0,0 +1,115 @@ +## Make the cats move + +Once a cat reaches the floor, it should step slowly to the right. + +\--- task \--- + +Add code to the `when I start as a clone`{:class="block3control"} section to make the cat sprite `move ten steps`{:class="block3motion"}, and switch between the sprite's two costumes every 0.1 seconds to make the cat look like it's walking. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat sprite should `move 10 steps`{:class="block3motion"}, and `switch costume`{:class="block3looks"} every `0.1 seconds`{:class="block3control"}. This code should repeat `forever`{:class="block3control"}, just like the code to make the cat fall. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats now move along the blue platform at the bottom. + +\--- /task \--- + +If you draw a bridge across the gap so that the cats can get all the way to the right side of the Stage, you can see that they end up getting stuck walking into the right wall. + +![Flailing cats at the edge](images/flailing-at-edge.png) + +\--- task \--- + +Remove the `forever`{:class="block3control"} loop, and instead add a different loop to make the cats only walk until they reach an edge. When a cat reaches the edge of the Stage, it should disappear. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats disappear when they reach the edge of the Stage. + +\--- /task \--- + +You may notice that, if the cats fall into the hole, they don't disappear but instead get stuck at the bottom. This is because they keep trying to fall downwards. + +This is the part of the code that tells the cat to keep falling until it touches blue: + +```blocks3 +repeat until +end +``` + +However, in the hole, the cat can never reach blue, so it is stuck forever. + +\--- task \--- + +Add more blocks to this loop so that it repeats until the cat sprite is touching blue `or`{:class="block3operators"} `touching the edge`{:class="block3sensing"}. This way, the sprite stops trying to fall if it reaches the edge of the Stage. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/sk-SK/step_5.md b/sk-SK/step_5.md new file mode 100644 index 0000000..ff776e8 --- /dev/null +++ b/sk-SK/step_5.md @@ -0,0 +1,65 @@ +## Stick to the lines + +You might notice that, if you draw a low bridge between the two platforms, or a line that slopes upwards, the cats end up walking through the platform rather than on top of it! + +![Cats walking through the platform](images/cat-walk-through-platform.png) + +\--- task \--- + +In the code for the cat sprite, add another loop before the `next costume`{:class="block3looks"} block. This time, the loop should tell the cat to move upwards by `2` until it is not touching blue. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat should `move up 2`{:class="block3motion"} `repeatedly until`{:class="block3control"} it is `not`{:class="block3operators"} `touching blue`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Click the green flag and try drawing a line that slopes upwards. Check that your cat follows this line. + +\--- /task \--- \ No newline at end of file diff --git a/sk-SK/step_6.md b/sk-SK/step_6.md new file mode 100644 index 0000000..deb146e --- /dev/null +++ b/sk-SK/step_6.md @@ -0,0 +1,89 @@ +## Get to safety + +The object of the game is to guide the cats to safety by creating a path so they can reach the door. Create a score variable to keep track of how many cats reach the door. + +\--- task \--- + +Create a variable called `score`{:class="block3variables"}. + +![Cat sprite](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Add code to your cat sprite to add `1` to the `score`{:class="block3variables"} each time a cat reaches the door. Also set `score`{:class="block3variables"} to `0` `when the flag is clicked`{:class="block3events"} at the start of the game. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the cat is `touching the door sprite`{:class="block3sensing"}, then `add 1 to the score`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the new code blocks you need to add to your `when I start as a clone` script: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Add some more code so that, when a cat sprite reaches the door, the cat makes a 'meow' sound and then disappears. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/sk-SK/step_7.md b/sk-SK/step_7.md new file mode 100644 index 0000000..6e609ac --- /dev/null +++ b/sk-SK/step_7.md @@ -0,0 +1,13 @@ +## Challenge: more obstacles + +At the moment, the game is rather easy to win. Can you think of ideas to you make your game harder? + ++ Add more backgrounds with different platform designs. + ++ Move the location of the door depending on which background is displayed. + ++ Add more sprites as moving obstacles. Perhaps you could have roaming dogs or rotating spikes the cats need to avoid? + ++ Only allow the player to use a limited amount of "ink" to draw lines in the game. You can keep track of how much "ink" is used by creating a timer variable that records how long the mouse is held down. + ++ Create a sprite to show the player how much ink is left. \ No newline at end of file diff --git a/sk-SK/step_8.md b/sk-SK/step_8.md new file mode 100644 index 0000000..2295a72 --- /dev/null +++ b/sk-SK/step_8.md @@ -0,0 +1,19 @@ +## What next? + +Try the [Flower generator](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects) project, where you will use custom blocks to create flower patterns. + +\--- no-print \--- + +Press `f` to draw a few flowers, or `r` to draw lots of random flowers, or `p` to draw a flower pattern. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![random flowers](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/sl-SI/images/banner.png b/sl-SI/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/sl-SI/images/banner.png differ diff --git a/sl-SI/images/cat-sprite.png b/sl-SI/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/sl-SI/images/cat-sprite.png differ diff --git a/sl-SI/images/cat-walk-through-platform.png b/sl-SI/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/sl-SI/images/cat-walk-through-platform.png differ diff --git a/sl-SI/images/cats-finished.png b/sl-SI/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/sl-SI/images/cats-finished.png differ diff --git a/sl-SI/images/door-sprite.png b/sl-SI/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/sl-SI/images/door-sprite.png differ diff --git a/sl-SI/images/draw-a-line.png b/sl-SI/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/sl-SI/images/draw-a-line.png differ diff --git a/sl-SI/images/falling-cats.png b/sl-SI/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/sl-SI/images/falling-cats.png differ diff --git a/sl-SI/images/flailing-at-edge.png b/sl-SI/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/sl-SI/images/flailing-at-edge.png differ diff --git a/sl-SI/images/flower-random.png b/sl-SI/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/sl-SI/images/flower-random.png differ diff --git a/sl-SI/images/pen-sprite.png b/sl-SI/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/sl-SI/images/pen-sprite.png differ diff --git a/sl-SI/meta.yml b/sl-SI/meta.yml new file mode 100644 index 0000000..c1c0ecc --- /dev/null +++ b/sl-SI/meta.yml @@ -0,0 +1,30 @@ +--- +title: CATS! +hero_image: images/banner.png +description: Create a game in which you guide cats to safety and stop them from falling into holes +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Introduction + - + title: Draw lines + - + title: Clone cats + completion: + - engaged + - + title: Make the cats move + - + title: Stick to the lines + - + title: Get to safety + completion: + - internal + - + title: 'Challenge: more obstacles' + challenge: true + - + title: What next? diff --git a/sl-SI/resources/cats-resources.sb3 b/sl-SI/resources/cats-resources.sb3 new file mode 100644 index 0000000..d952bff Binary files /dev/null and b/sl-SI/resources/cats-resources.sb3 differ diff --git a/sl-SI/solutions/cats-solution.sb3 b/sl-SI/solutions/cats-solution.sb3 new file mode 100644 index 0000000..a2dc7c8 Binary files /dev/null and b/sl-SI/solutions/cats-solution.sb3 differ diff --git a/sl-SI/step_1.md b/sl-SI/step_1.md new file mode 100644 index 0000000..838986d --- /dev/null +++ b/sl-SI/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +This is the **Scratch 3** version of the project. There is also a [Scratch 2 version of the project](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Introduction + +In this project, you will create a game in which you need to guide cats to safety and not let any of them fall through the gaps! + +### What you will make + +\--- no-print \--- + +Click and drag with the mouse to draw a line with the pencil. Your goal is to stop the cats from falling into holes by creating a safe path to the exit. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Cats finished](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: What you will learn + ++ How to use a `forever`{:class="block3control"} loop to constantly generate moving cats ++ How to use a `repeat until`{:class="block3control"} loop to ensure your cats follow a line + +\--- /collapse \--- + +## \--- collapse \--- + +## title: What you will need + +### Hardware + ++ A computer capable of running Scratch 3 + +### Software + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### Downloads + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Additional notes for educators + +\--- no-print \--- + +If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/sl-SI/step_2.md b/sl-SI/step_2.md new file mode 100644 index 0000000..264770c --- /dev/null +++ b/sl-SI/step_2.md @@ -0,0 +1,140 @@ +## Draw lines + +\--- task \--- + +Open the 'CATS!' Scratch starter project. + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +If you have a Scratch account you can make a copy by clicking **Remix**. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Add the Pen extension to your project. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Click on the sprite called 'Pen', and add code to set the pen colour to the same blue as the obstacles on the Stage. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +To select a colour, click on the colour square in the `set pen color`{:class="block3extensions"} block to make your mouse cursor turn into a pipette, and then click on the correct colour on the Stage. + +\--- /task \--- + +\--- task \--- + +Add some more code to make the sprite follow the mouse pointer. Test your program to check that the code works. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Add some code to tell the sprite to draw a line on the Stage if the mouse button is pressed down. + +![Pen sprite](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the `mouse is down`{:class="block3sensing"}, put the `pen down`{:class="block3extensions"}, and `else`{:class="block3control"}, lift the `pen up`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Test your code. You should be able to click and drag with the mouse to draw a blue line on the Stage. + +![Draw a line](images/draw-a-line.png) + +\--- /task \--- + +You probably see that a blue dot always appears in the top right-hand corner of the Stage (it's circled in the image above). This is because, when you click the green flag to start the game, you press the mouse down, and so the pen immediately starts drawing. + +\--- task \--- + +To stop this from happening, add a `pen up`{:class="block3extensions"} block at the start of the script, and a `wait one second`{:class="block3control"} block above the `forever`{:class="block3control"} block. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/sl-SI/step_3.md b/sl-SI/step_3.md new file mode 100644 index 0000000..d5f8d46 --- /dev/null +++ b/sl-SI/step_3.md @@ -0,0 +1,73 @@ +## Clone cats + +You want a never-ending stream of cats that the player has to guide along the path to the exit. + +\--- task \--- + +Click on the sprite called 'Cat', and add some code to `hide`{:class="block3looks"} the sprite, and also to `clone`{:class="block3control"} it every three seconds. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +If you run the program now, nothing happens on the Stage. To check that a new Cat sprite clone is created every three seconds, make each clone appear and fall out of the sky. + +\--- task \--- + +Add code to tell the sprite that `when it starts as a clone`{:class="block3control"}, it should `show`{:class="block3looks"} itself and fall until it `touches`{:class="block3sensing"} the blue floor that is drawn on the Stage. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`When the sprite starts as a clone`{:class="block3control"}, `show`{:class="block3looks"} the sprite. `Repeatedly`{:class="block3control"} `Change`{:class="block3motion"} the sprite's `y` coordinate by `-2`, until the sprite `touches`{:class="block3sensing"} the blue Stage. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +When you click the green flag, you should see a new cat fall from the top of the Stage every three seconds. Every cat should land in a big pile of overlapping cats on the blue floor at the bottom. + +![Falling cats](images/falling-cats.png) \ No newline at end of file diff --git a/sl-SI/step_4.md b/sl-SI/step_4.md new file mode 100644 index 0000000..8c10235 --- /dev/null +++ b/sl-SI/step_4.md @@ -0,0 +1,115 @@ +## Make the cats move + +Once a cat reaches the floor, it should step slowly to the right. + +\--- task \--- + +Add code to the `when I start as a clone`{:class="block3control"} section to make the cat sprite `move ten steps`{:class="block3motion"}, and switch between the sprite's two costumes every 0.1 seconds to make the cat look like it's walking. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat sprite should `move 10 steps`{:class="block3motion"}, and `switch costume`{:class="block3looks"} every `0.1 seconds`{:class="block3control"}. This code should repeat `forever`{:class="block3control"}, just like the code to make the cat fall. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats now move along the blue platform at the bottom. + +\--- /task \--- + +If you draw a bridge across the gap so that the cats can get all the way to the right side of the Stage, you can see that they end up getting stuck walking into the right wall. + +![Flailing cats at the edge](images/flailing-at-edge.png) + +\--- task \--- + +Remove the `forever`{:class="block3control"} loop, and instead add a different loop to make the cats only walk until they reach an edge. When a cat reaches the edge of the Stage, it should disappear. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats disappear when they reach the edge of the Stage. + +\--- /task \--- + +You may notice that, if the cats fall into the hole, they don't disappear but instead get stuck at the bottom. This is because they keep trying to fall downwards. + +This is the part of the code that tells the cat to keep falling until it touches blue: + +```blocks3 +repeat until +end +``` + +However, in the hole, the cat can never reach blue, so it is stuck forever. + +\--- task \--- + +Add more blocks to this loop so that it repeats until the cat sprite is touching blue `or`{:class="block3operators"} `touching the edge`{:class="block3sensing"}. This way, the sprite stops trying to fall if it reaches the edge of the Stage. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/sl-SI/step_5.md b/sl-SI/step_5.md new file mode 100644 index 0000000..ff776e8 --- /dev/null +++ b/sl-SI/step_5.md @@ -0,0 +1,65 @@ +## Stick to the lines + +You might notice that, if you draw a low bridge between the two platforms, or a line that slopes upwards, the cats end up walking through the platform rather than on top of it! + +![Cats walking through the platform](images/cat-walk-through-platform.png) + +\--- task \--- + +In the code for the cat sprite, add another loop before the `next costume`{:class="block3looks"} block. This time, the loop should tell the cat to move upwards by `2` until it is not touching blue. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat should `move up 2`{:class="block3motion"} `repeatedly until`{:class="block3control"} it is `not`{:class="block3operators"} `touching blue`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Click the green flag and try drawing a line that slopes upwards. Check that your cat follows this line. + +\--- /task \--- \ No newline at end of file diff --git a/sl-SI/step_6.md b/sl-SI/step_6.md new file mode 100644 index 0000000..deb146e --- /dev/null +++ b/sl-SI/step_6.md @@ -0,0 +1,89 @@ +## Get to safety + +The object of the game is to guide the cats to safety by creating a path so they can reach the door. Create a score variable to keep track of how many cats reach the door. + +\--- task \--- + +Create a variable called `score`{:class="block3variables"}. + +![Cat sprite](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Add code to your cat sprite to add `1` to the `score`{:class="block3variables"} each time a cat reaches the door. Also set `score`{:class="block3variables"} to `0` `when the flag is clicked`{:class="block3events"} at the start of the game. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the cat is `touching the door sprite`{:class="block3sensing"}, then `add 1 to the score`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the new code blocks you need to add to your `when I start as a clone` script: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Add some more code so that, when a cat sprite reaches the door, the cat makes a 'meow' sound and then disappears. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/sl-SI/step_7.md b/sl-SI/step_7.md new file mode 100644 index 0000000..6e609ac --- /dev/null +++ b/sl-SI/step_7.md @@ -0,0 +1,13 @@ +## Challenge: more obstacles + +At the moment, the game is rather easy to win. Can you think of ideas to you make your game harder? + ++ Add more backgrounds with different platform designs. + ++ Move the location of the door depending on which background is displayed. + ++ Add more sprites as moving obstacles. Perhaps you could have roaming dogs or rotating spikes the cats need to avoid? + ++ Only allow the player to use a limited amount of "ink" to draw lines in the game. You can keep track of how much "ink" is used by creating a timer variable that records how long the mouse is held down. + ++ Create a sprite to show the player how much ink is left. \ No newline at end of file diff --git a/sl-SI/step_8.md b/sl-SI/step_8.md new file mode 100644 index 0000000..2295a72 --- /dev/null +++ b/sl-SI/step_8.md @@ -0,0 +1,19 @@ +## What next? + +Try the [Flower generator](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects) project, where you will use custom blocks to create flower patterns. + +\--- no-print \--- + +Press `f` to draw a few flowers, or `r` to draw lots of random flowers, or `p` to draw a flower pattern. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![random flowers](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/sr-SP/images/banner.png b/sr-SP/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/sr-SP/images/banner.png differ diff --git a/sr-SP/images/cat-sprite.png b/sr-SP/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/sr-SP/images/cat-sprite.png differ diff --git a/sr-SP/images/cat-walk-through-platform.png b/sr-SP/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/sr-SP/images/cat-walk-through-platform.png differ diff --git a/sr-SP/images/cats-finished.png b/sr-SP/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/sr-SP/images/cats-finished.png differ diff --git a/sr-SP/images/door-sprite.png b/sr-SP/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/sr-SP/images/door-sprite.png differ diff --git a/sr-SP/images/draw-a-line.png b/sr-SP/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/sr-SP/images/draw-a-line.png differ diff --git a/sr-SP/images/falling-cats.png b/sr-SP/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/sr-SP/images/falling-cats.png differ diff --git a/sr-SP/images/flailing-at-edge.png b/sr-SP/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/sr-SP/images/flailing-at-edge.png differ diff --git a/sr-SP/images/flower-random.png b/sr-SP/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/sr-SP/images/flower-random.png differ diff --git a/sr-SP/images/pen-sprite.png b/sr-SP/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/sr-SP/images/pen-sprite.png differ diff --git a/sr-SP/meta.yml b/sr-SP/meta.yml new file mode 100644 index 0000000..c1c0ecc --- /dev/null +++ b/sr-SP/meta.yml @@ -0,0 +1,30 @@ +--- +title: CATS! +hero_image: images/banner.png +description: Create a game in which you guide cats to safety and stop them from falling into holes +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Introduction + - + title: Draw lines + - + title: Clone cats + completion: + - engaged + - + title: Make the cats move + - + title: Stick to the lines + - + title: Get to safety + completion: + - internal + - + title: 'Challenge: more obstacles' + challenge: true + - + title: What next? diff --git a/sr-SP/resources/cats-resources.sb3 b/sr-SP/resources/cats-resources.sb3 new file mode 100644 index 0000000..d952bff Binary files /dev/null and b/sr-SP/resources/cats-resources.sb3 differ diff --git a/sr-SP/solutions/cats-solution.sb3 b/sr-SP/solutions/cats-solution.sb3 new file mode 100644 index 0000000..a2dc7c8 Binary files /dev/null and b/sr-SP/solutions/cats-solution.sb3 differ diff --git a/sr-SP/step_1.md b/sr-SP/step_1.md new file mode 100644 index 0000000..838986d --- /dev/null +++ b/sr-SP/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +This is the **Scratch 3** version of the project. There is also a [Scratch 2 version of the project](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Introduction + +In this project, you will create a game in which you need to guide cats to safety and not let any of them fall through the gaps! + +### What you will make + +\--- no-print \--- + +Click and drag with the mouse to draw a line with the pencil. Your goal is to stop the cats from falling into holes by creating a safe path to the exit. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Cats finished](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: What you will learn + ++ How to use a `forever`{:class="block3control"} loop to constantly generate moving cats ++ How to use a `repeat until`{:class="block3control"} loop to ensure your cats follow a line + +\--- /collapse \--- + +## \--- collapse \--- + +## title: What you will need + +### Hardware + ++ A computer capable of running Scratch 3 + +### Software + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### Downloads + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Additional notes for educators + +\--- no-print \--- + +If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/sr-SP/step_2.md b/sr-SP/step_2.md new file mode 100644 index 0000000..264770c --- /dev/null +++ b/sr-SP/step_2.md @@ -0,0 +1,140 @@ +## Draw lines + +\--- task \--- + +Open the 'CATS!' Scratch starter project. + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +If you have a Scratch account you can make a copy by clicking **Remix**. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Add the Pen extension to your project. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Click on the sprite called 'Pen', and add code to set the pen colour to the same blue as the obstacles on the Stage. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +To select a colour, click on the colour square in the `set pen color`{:class="block3extensions"} block to make your mouse cursor turn into a pipette, and then click on the correct colour on the Stage. + +\--- /task \--- + +\--- task \--- + +Add some more code to make the sprite follow the mouse pointer. Test your program to check that the code works. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Add some code to tell the sprite to draw a line on the Stage if the mouse button is pressed down. + +![Pen sprite](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the `mouse is down`{:class="block3sensing"}, put the `pen down`{:class="block3extensions"}, and `else`{:class="block3control"}, lift the `pen up`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Test your code. You should be able to click and drag with the mouse to draw a blue line on the Stage. + +![Draw a line](images/draw-a-line.png) + +\--- /task \--- + +You probably see that a blue dot always appears in the top right-hand corner of the Stage (it's circled in the image above). This is because, when you click the green flag to start the game, you press the mouse down, and so the pen immediately starts drawing. + +\--- task \--- + +To stop this from happening, add a `pen up`{:class="block3extensions"} block at the start of the script, and a `wait one second`{:class="block3control"} block above the `forever`{:class="block3control"} block. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/sr-SP/step_3.md b/sr-SP/step_3.md new file mode 100644 index 0000000..d5f8d46 --- /dev/null +++ b/sr-SP/step_3.md @@ -0,0 +1,73 @@ +## Clone cats + +You want a never-ending stream of cats that the player has to guide along the path to the exit. + +\--- task \--- + +Click on the sprite called 'Cat', and add some code to `hide`{:class="block3looks"} the sprite, and also to `clone`{:class="block3control"} it every three seconds. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +If you run the program now, nothing happens on the Stage. To check that a new Cat sprite clone is created every three seconds, make each clone appear and fall out of the sky. + +\--- task \--- + +Add code to tell the sprite that `when it starts as a clone`{:class="block3control"}, it should `show`{:class="block3looks"} itself and fall until it `touches`{:class="block3sensing"} the blue floor that is drawn on the Stage. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`When the sprite starts as a clone`{:class="block3control"}, `show`{:class="block3looks"} the sprite. `Repeatedly`{:class="block3control"} `Change`{:class="block3motion"} the sprite's `y` coordinate by `-2`, until the sprite `touches`{:class="block3sensing"} the blue Stage. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +When you click the green flag, you should see a new cat fall from the top of the Stage every three seconds. Every cat should land in a big pile of overlapping cats on the blue floor at the bottom. + +![Falling cats](images/falling-cats.png) \ No newline at end of file diff --git a/sr-SP/step_4.md b/sr-SP/step_4.md new file mode 100644 index 0000000..8c10235 --- /dev/null +++ b/sr-SP/step_4.md @@ -0,0 +1,115 @@ +## Make the cats move + +Once a cat reaches the floor, it should step slowly to the right. + +\--- task \--- + +Add code to the `when I start as a clone`{:class="block3control"} section to make the cat sprite `move ten steps`{:class="block3motion"}, and switch between the sprite's two costumes every 0.1 seconds to make the cat look like it's walking. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat sprite should `move 10 steps`{:class="block3motion"}, and `switch costume`{:class="block3looks"} every `0.1 seconds`{:class="block3control"}. This code should repeat `forever`{:class="block3control"}, just like the code to make the cat fall. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats now move along the blue platform at the bottom. + +\--- /task \--- + +If you draw a bridge across the gap so that the cats can get all the way to the right side of the Stage, you can see that they end up getting stuck walking into the right wall. + +![Flailing cats at the edge](images/flailing-at-edge.png) + +\--- task \--- + +Remove the `forever`{:class="block3control"} loop, and instead add a different loop to make the cats only walk until they reach an edge. When a cat reaches the edge of the Stage, it should disappear. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats disappear when they reach the edge of the Stage. + +\--- /task \--- + +You may notice that, if the cats fall into the hole, they don't disappear but instead get stuck at the bottom. This is because they keep trying to fall downwards. + +This is the part of the code that tells the cat to keep falling until it touches blue: + +```blocks3 +repeat until +end +``` + +However, in the hole, the cat can never reach blue, so it is stuck forever. + +\--- task \--- + +Add more blocks to this loop so that it repeats until the cat sprite is touching blue `or`{:class="block3operators"} `touching the edge`{:class="block3sensing"}. This way, the sprite stops trying to fall if it reaches the edge of the Stage. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/sr-SP/step_5.md b/sr-SP/step_5.md new file mode 100644 index 0000000..ff776e8 --- /dev/null +++ b/sr-SP/step_5.md @@ -0,0 +1,65 @@ +## Stick to the lines + +You might notice that, if you draw a low bridge between the two platforms, or a line that slopes upwards, the cats end up walking through the platform rather than on top of it! + +![Cats walking through the platform](images/cat-walk-through-platform.png) + +\--- task \--- + +In the code for the cat sprite, add another loop before the `next costume`{:class="block3looks"} block. This time, the loop should tell the cat to move upwards by `2` until it is not touching blue. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat should `move up 2`{:class="block3motion"} `repeatedly until`{:class="block3control"} it is `not`{:class="block3operators"} `touching blue`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Click the green flag and try drawing a line that slopes upwards. Check that your cat follows this line. + +\--- /task \--- \ No newline at end of file diff --git a/sr-SP/step_6.md b/sr-SP/step_6.md new file mode 100644 index 0000000..deb146e --- /dev/null +++ b/sr-SP/step_6.md @@ -0,0 +1,89 @@ +## Get to safety + +The object of the game is to guide the cats to safety by creating a path so they can reach the door. Create a score variable to keep track of how many cats reach the door. + +\--- task \--- + +Create a variable called `score`{:class="block3variables"}. + +![Cat sprite](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Add code to your cat sprite to add `1` to the `score`{:class="block3variables"} each time a cat reaches the door. Also set `score`{:class="block3variables"} to `0` `when the flag is clicked`{:class="block3events"} at the start of the game. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the cat is `touching the door sprite`{:class="block3sensing"}, then `add 1 to the score`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the new code blocks you need to add to your `when I start as a clone` script: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Add some more code so that, when a cat sprite reaches the door, the cat makes a 'meow' sound and then disappears. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/sr-SP/step_7.md b/sr-SP/step_7.md new file mode 100644 index 0000000..6e609ac --- /dev/null +++ b/sr-SP/step_7.md @@ -0,0 +1,13 @@ +## Challenge: more obstacles + +At the moment, the game is rather easy to win. Can you think of ideas to you make your game harder? + ++ Add more backgrounds with different platform designs. + ++ Move the location of the door depending on which background is displayed. + ++ Add more sprites as moving obstacles. Perhaps you could have roaming dogs or rotating spikes the cats need to avoid? + ++ Only allow the player to use a limited amount of "ink" to draw lines in the game. You can keep track of how much "ink" is used by creating a timer variable that records how long the mouse is held down. + ++ Create a sprite to show the player how much ink is left. \ No newline at end of file diff --git a/sr-SP/step_8.md b/sr-SP/step_8.md new file mode 100644 index 0000000..2295a72 --- /dev/null +++ b/sr-SP/step_8.md @@ -0,0 +1,19 @@ +## What next? + +Try the [Flower generator](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects) project, where you will use custom blocks to create flower patterns. + +\--- no-print \--- + +Press `f` to draw a few flowers, or `r` to draw lots of random flowers, or `p` to draw a flower pattern. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![random flowers](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/sv-SE/images/banner.png b/sv-SE/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/sv-SE/images/banner.png differ diff --git a/sv-SE/images/cat-sprite.png b/sv-SE/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/sv-SE/images/cat-sprite.png differ diff --git a/sv-SE/images/cat-walk-through-platform.png b/sv-SE/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/sv-SE/images/cat-walk-through-platform.png differ diff --git a/sv-SE/images/cats-finished.png b/sv-SE/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/sv-SE/images/cats-finished.png differ diff --git a/sv-SE/images/door-sprite.png b/sv-SE/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/sv-SE/images/door-sprite.png differ diff --git a/sv-SE/images/draw-a-line.png b/sv-SE/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/sv-SE/images/draw-a-line.png differ diff --git a/sv-SE/images/falling-cats.png b/sv-SE/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/sv-SE/images/falling-cats.png differ diff --git a/sv-SE/images/flailing-at-edge.png b/sv-SE/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/sv-SE/images/flailing-at-edge.png differ diff --git a/sv-SE/images/flower-random.png b/sv-SE/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/sv-SE/images/flower-random.png differ diff --git a/sv-SE/images/pen-sprite.png b/sv-SE/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/sv-SE/images/pen-sprite.png differ diff --git a/sv-SE/meta.yml b/sv-SE/meta.yml new file mode 100644 index 0000000..ea88a99 --- /dev/null +++ b/sv-SE/meta.yml @@ -0,0 +1,26 @@ +--- +title: CATS! +hero_image: images/banner.png +description: Create a game in which you guide cats to safety and stop them from falling into holes +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Introduction + - + title: Draw lines + - + title: Clone cats + - + title: Make the cats move + - + title: Stick to the lines + - + title: Get to safety + - + title: "Challenge: more obstacles" + challenge: true + - + title: What next? diff --git a/sv-SE/resources/cats-resources.sb3 b/sv-SE/resources/cats-resources.sb3 new file mode 100644 index 0000000..d952bff Binary files /dev/null and b/sv-SE/resources/cats-resources.sb3 differ diff --git a/sv-SE/solutions/cats-solution.sb3 b/sv-SE/solutions/cats-solution.sb3 new file mode 100644 index 0000000..a2dc7c8 Binary files /dev/null and b/sv-SE/solutions/cats-solution.sb3 differ diff --git a/sv-SE/step_1.md b/sv-SE/step_1.md new file mode 100644 index 0000000..75244c0 --- /dev/null +++ b/sv-SE/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +This is the **Scratch 3** version of the project. There is also a [Scratch 2 version of the project](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Introduction + +In this project, you will create a game in which you need to guide cats to safety and not let any of them fall through the gaps! + +### What you will make + +\--- no-print \--- + +Click and drag with the mouse to draw a line with the pencil. Your goal is to stop the cats from falling into holes by creating a safe path to the exit. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Cats finished](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: What you will learn + ++ How to use a `forever`{:class="block3control"} loop to constantly generate moving cats ++ How to use a `repeat until`{:class="block3control"} loop to ensure your cats follow a line + +\--- /collapse \--- + +## \--- collapse \--- + +## title: What you will need + +### Hardware + ++ A computer capable of running Scratch 3 + +### Software + ++ Scratch 3 (either [online](http://rpf.io/scratchon){:target="_blank"} or [offline](http://rpf.io/scratchoff){:target="_blank"}) + +### Downloads + ++ [Offline starter project](http://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Additional notes for educators + +\--- no-print \--- + +If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](http://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/sv-SE/step_2.md b/sv-SE/step_2.md new file mode 100644 index 0000000..bd3358c --- /dev/null +++ b/sv-SE/step_2.md @@ -0,0 +1,140 @@ +## Draw lines + +\--- task \--- + +Open the 'CATS!' Scratch starter project. + +**Online:** open the starter project at [rpf.io/cats-on](http://rpf.io/cats-on){:target="_blank"}. + +If you have a Scratch account you can make a copy by clicking **Remix**. + +**Offline:** open the [starter project](http://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](http://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Add the Pen extension to your project. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Click on the sprite called 'Pen', and add code to set the pen colour to the same blue as the obstacles on the Stage. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +To select a colour, click on the colour square in the `set pen color`{:class="block3extensions"} block to make your mouse cursor turn into a pipette, and then click on the correct colour on the Stage. + +\--- /task \--- + +\--- task \--- + +Add some more code to make the sprite follow the mouse pointer. Test your program to check that the code works. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Add some code to tell the sprite to draw a line on the Stage if the mouse button is pressed down. + +![Pen sprite](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the `mouse is down`{:class="block3sensing"}, put the `pen down`{:class="block3extensions"}, and `else`{:class="block3control"}, lift the `pen up`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Test your code. You should be able to click and drag with the mouse to draw a blue line on the Stage. + +![Draw a line](images/draw-a-line.png) + +\--- /task \--- + +You probably see that a blue dot always appears in the top right-hand corner of the Stage (it's circled in the image above). This is because, when you click the green flag to start the game, you press the mouse down, and so the pen immediately starts drawing. + +\--- task \--- + +To stop this from happening, add a `pen up`{:class="block3extensions"} block at the start of the script, and a `wait one second`{:class="block3control"} block above the `forever`{:class="block3control"} block. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/sv-SE/step_3.md b/sv-SE/step_3.md new file mode 100644 index 0000000..d5f8d46 --- /dev/null +++ b/sv-SE/step_3.md @@ -0,0 +1,73 @@ +## Clone cats + +You want a never-ending stream of cats that the player has to guide along the path to the exit. + +\--- task \--- + +Click on the sprite called 'Cat', and add some code to `hide`{:class="block3looks"} the sprite, and also to `clone`{:class="block3control"} it every three seconds. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +If you run the program now, nothing happens on the Stage. To check that a new Cat sprite clone is created every three seconds, make each clone appear and fall out of the sky. + +\--- task \--- + +Add code to tell the sprite that `when it starts as a clone`{:class="block3control"}, it should `show`{:class="block3looks"} itself and fall until it `touches`{:class="block3sensing"} the blue floor that is drawn on the Stage. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`When the sprite starts as a clone`{:class="block3control"}, `show`{:class="block3looks"} the sprite. `Repeatedly`{:class="block3control"} `Change`{:class="block3motion"} the sprite's `y` coordinate by `-2`, until the sprite `touches`{:class="block3sensing"} the blue Stage. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +When you click the green flag, you should see a new cat fall from the top of the Stage every three seconds. Every cat should land in a big pile of overlapping cats on the blue floor at the bottom. + +![Falling cats](images/falling-cats.png) \ No newline at end of file diff --git a/sv-SE/step_4.md b/sv-SE/step_4.md new file mode 100644 index 0000000..8c10235 --- /dev/null +++ b/sv-SE/step_4.md @@ -0,0 +1,115 @@ +## Make the cats move + +Once a cat reaches the floor, it should step slowly to the right. + +\--- task \--- + +Add code to the `when I start as a clone`{:class="block3control"} section to make the cat sprite `move ten steps`{:class="block3motion"}, and switch between the sprite's two costumes every 0.1 seconds to make the cat look like it's walking. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat sprite should `move 10 steps`{:class="block3motion"}, and `switch costume`{:class="block3looks"} every `0.1 seconds`{:class="block3control"}. This code should repeat `forever`{:class="block3control"}, just like the code to make the cat fall. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats now move along the blue platform at the bottom. + +\--- /task \--- + +If you draw a bridge across the gap so that the cats can get all the way to the right side of the Stage, you can see that they end up getting stuck walking into the right wall. + +![Flailing cats at the edge](images/flailing-at-edge.png) + +\--- task \--- + +Remove the `forever`{:class="block3control"} loop, and instead add a different loop to make the cats only walk until they reach an edge. When a cat reaches the edge of the Stage, it should disappear. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats disappear when they reach the edge of the Stage. + +\--- /task \--- + +You may notice that, if the cats fall into the hole, they don't disappear but instead get stuck at the bottom. This is because they keep trying to fall downwards. + +This is the part of the code that tells the cat to keep falling until it touches blue: + +```blocks3 +repeat until +end +``` + +However, in the hole, the cat can never reach blue, so it is stuck forever. + +\--- task \--- + +Add more blocks to this loop so that it repeats until the cat sprite is touching blue `or`{:class="block3operators"} `touching the edge`{:class="block3sensing"}. This way, the sprite stops trying to fall if it reaches the edge of the Stage. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/sv-SE/step_5.md b/sv-SE/step_5.md new file mode 100644 index 0000000..ff776e8 --- /dev/null +++ b/sv-SE/step_5.md @@ -0,0 +1,65 @@ +## Stick to the lines + +You might notice that, if you draw a low bridge between the two platforms, or a line that slopes upwards, the cats end up walking through the platform rather than on top of it! + +![Cats walking through the platform](images/cat-walk-through-platform.png) + +\--- task \--- + +In the code for the cat sprite, add another loop before the `next costume`{:class="block3looks"} block. This time, the loop should tell the cat to move upwards by `2` until it is not touching blue. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat should `move up 2`{:class="block3motion"} `repeatedly until`{:class="block3control"} it is `not`{:class="block3operators"} `touching blue`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Click the green flag and try drawing a line that slopes upwards. Check that your cat follows this line. + +\--- /task \--- \ No newline at end of file diff --git a/sv-SE/step_6.md b/sv-SE/step_6.md new file mode 100644 index 0000000..deb146e --- /dev/null +++ b/sv-SE/step_6.md @@ -0,0 +1,89 @@ +## Get to safety + +The object of the game is to guide the cats to safety by creating a path so they can reach the door. Create a score variable to keep track of how many cats reach the door. + +\--- task \--- + +Create a variable called `score`{:class="block3variables"}. + +![Cat sprite](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Add code to your cat sprite to add `1` to the `score`{:class="block3variables"} each time a cat reaches the door. Also set `score`{:class="block3variables"} to `0` `when the flag is clicked`{:class="block3events"} at the start of the game. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the cat is `touching the door sprite`{:class="block3sensing"}, then `add 1 to the score`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the new code blocks you need to add to your `when I start as a clone` script: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Add some more code so that, when a cat sprite reaches the door, the cat makes a 'meow' sound and then disappears. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/sv-SE/step_7.md b/sv-SE/step_7.md new file mode 100644 index 0000000..6e609ac --- /dev/null +++ b/sv-SE/step_7.md @@ -0,0 +1,13 @@ +## Challenge: more obstacles + +At the moment, the game is rather easy to win. Can you think of ideas to you make your game harder? + ++ Add more backgrounds with different platform designs. + ++ Move the location of the door depending on which background is displayed. + ++ Add more sprites as moving obstacles. Perhaps you could have roaming dogs or rotating spikes the cats need to avoid? + ++ Only allow the player to use a limited amount of "ink" to draw lines in the game. You can keep track of how much "ink" is used by creating a timer variable that records how long the mouse is held down. + ++ Create a sprite to show the player how much ink is left. \ No newline at end of file diff --git a/sv-SE/step_8.md b/sv-SE/step_8.md new file mode 100644 index 0000000..2295a72 --- /dev/null +++ b/sv-SE/step_8.md @@ -0,0 +1,19 @@ +## What next? + +Try the [Flower generator](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects) project, where you will use custom blocks to create flower patterns. + +\--- no-print \--- + +Press `f` to draw a few flowers, or `r` to draw lots of random flowers, or `p` to draw a flower pattern. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![random flowers](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/tr-TR/images/banner.png b/tr-TR/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/tr-TR/images/banner.png differ diff --git a/tr-TR/images/cat-sprite.png b/tr-TR/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/tr-TR/images/cat-sprite.png differ diff --git a/tr-TR/images/cat-walk-through-platform.png b/tr-TR/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/tr-TR/images/cat-walk-through-platform.png differ diff --git a/tr-TR/images/cats-finished.png b/tr-TR/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/tr-TR/images/cats-finished.png differ diff --git a/tr-TR/images/door-sprite.png b/tr-TR/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/tr-TR/images/door-sprite.png differ diff --git a/tr-TR/images/draw-a-line.png b/tr-TR/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/tr-TR/images/draw-a-line.png differ diff --git a/tr-TR/images/falling-cats.png b/tr-TR/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/tr-TR/images/falling-cats.png differ diff --git a/tr-TR/images/flailing-at-edge.png b/tr-TR/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/tr-TR/images/flailing-at-edge.png differ diff --git a/tr-TR/images/flower-random.png b/tr-TR/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/tr-TR/images/flower-random.png differ diff --git a/tr-TR/images/pen-sprite.png b/tr-TR/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/tr-TR/images/pen-sprite.png differ diff --git a/tr-TR/meta.yml b/tr-TR/meta.yml new file mode 100644 index 0000000..c1c0ecc --- /dev/null +++ b/tr-TR/meta.yml @@ -0,0 +1,30 @@ +--- +title: CATS! +hero_image: images/banner.png +description: Create a game in which you guide cats to safety and stop them from falling into holes +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Introduction + - + title: Draw lines + - + title: Clone cats + completion: + - engaged + - + title: Make the cats move + - + title: Stick to the lines + - + title: Get to safety + completion: + - internal + - + title: 'Challenge: more obstacles' + challenge: true + - + title: What next? diff --git a/tr-TR/resources/cats-resources.sb3 b/tr-TR/resources/cats-resources.sb3 new file mode 100644 index 0000000..d952bff Binary files /dev/null and b/tr-TR/resources/cats-resources.sb3 differ diff --git a/tr-TR/solutions/cats-solution.sb3 b/tr-TR/solutions/cats-solution.sb3 new file mode 100644 index 0000000..a2dc7c8 Binary files /dev/null and b/tr-TR/solutions/cats-solution.sb3 differ diff --git a/tr-TR/step_1.md b/tr-TR/step_1.md new file mode 100644 index 0000000..838986d --- /dev/null +++ b/tr-TR/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +This is the **Scratch 3** version of the project. There is also a [Scratch 2 version of the project](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Introduction + +In this project, you will create a game in which you need to guide cats to safety and not let any of them fall through the gaps! + +### What you will make + +\--- no-print \--- + +Click and drag with the mouse to draw a line with the pencil. Your goal is to stop the cats from falling into holes by creating a safe path to the exit. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Cats finished](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: What you will learn + ++ How to use a `forever`{:class="block3control"} loop to constantly generate moving cats ++ How to use a `repeat until`{:class="block3control"} loop to ensure your cats follow a line + +\--- /collapse \--- + +## \--- collapse \--- + +## title: What you will need + +### Hardware + ++ A computer capable of running Scratch 3 + +### Software + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### Downloads + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Additional notes for educators + +\--- no-print \--- + +If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/tr-TR/step_2.md b/tr-TR/step_2.md new file mode 100644 index 0000000..264770c --- /dev/null +++ b/tr-TR/step_2.md @@ -0,0 +1,140 @@ +## Draw lines + +\--- task \--- + +Open the 'CATS!' Scratch starter project. + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +If you have a Scratch account you can make a copy by clicking **Remix**. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Add the Pen extension to your project. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Click on the sprite called 'Pen', and add code to set the pen colour to the same blue as the obstacles on the Stage. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +To select a colour, click on the colour square in the `set pen color`{:class="block3extensions"} block to make your mouse cursor turn into a pipette, and then click on the correct colour on the Stage. + +\--- /task \--- + +\--- task \--- + +Add some more code to make the sprite follow the mouse pointer. Test your program to check that the code works. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Add some code to tell the sprite to draw a line on the Stage if the mouse button is pressed down. + +![Pen sprite](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the `mouse is down`{:class="block3sensing"}, put the `pen down`{:class="block3extensions"}, and `else`{:class="block3control"}, lift the `pen up`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Test your code. You should be able to click and drag with the mouse to draw a blue line on the Stage. + +![Draw a line](images/draw-a-line.png) + +\--- /task \--- + +You probably see that a blue dot always appears in the top right-hand corner of the Stage (it's circled in the image above). This is because, when you click the green flag to start the game, you press the mouse down, and so the pen immediately starts drawing. + +\--- task \--- + +To stop this from happening, add a `pen up`{:class="block3extensions"} block at the start of the script, and a `wait one second`{:class="block3control"} block above the `forever`{:class="block3control"} block. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/tr-TR/step_3.md b/tr-TR/step_3.md new file mode 100644 index 0000000..d5f8d46 --- /dev/null +++ b/tr-TR/step_3.md @@ -0,0 +1,73 @@ +## Clone cats + +You want a never-ending stream of cats that the player has to guide along the path to the exit. + +\--- task \--- + +Click on the sprite called 'Cat', and add some code to `hide`{:class="block3looks"} the sprite, and also to `clone`{:class="block3control"} it every three seconds. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +If you run the program now, nothing happens on the Stage. To check that a new Cat sprite clone is created every three seconds, make each clone appear and fall out of the sky. + +\--- task \--- + +Add code to tell the sprite that `when it starts as a clone`{:class="block3control"}, it should `show`{:class="block3looks"} itself and fall until it `touches`{:class="block3sensing"} the blue floor that is drawn on the Stage. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`When the sprite starts as a clone`{:class="block3control"}, `show`{:class="block3looks"} the sprite. `Repeatedly`{:class="block3control"} `Change`{:class="block3motion"} the sprite's `y` coordinate by `-2`, until the sprite `touches`{:class="block3sensing"} the blue Stage. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +When you click the green flag, you should see a new cat fall from the top of the Stage every three seconds. Every cat should land in a big pile of overlapping cats on the blue floor at the bottom. + +![Falling cats](images/falling-cats.png) \ No newline at end of file diff --git a/tr-TR/step_4.md b/tr-TR/step_4.md new file mode 100644 index 0000000..8c10235 --- /dev/null +++ b/tr-TR/step_4.md @@ -0,0 +1,115 @@ +## Make the cats move + +Once a cat reaches the floor, it should step slowly to the right. + +\--- task \--- + +Add code to the `when I start as a clone`{:class="block3control"} section to make the cat sprite `move ten steps`{:class="block3motion"}, and switch between the sprite's two costumes every 0.1 seconds to make the cat look like it's walking. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat sprite should `move 10 steps`{:class="block3motion"}, and `switch costume`{:class="block3looks"} every `0.1 seconds`{:class="block3control"}. This code should repeat `forever`{:class="block3control"}, just like the code to make the cat fall. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats now move along the blue platform at the bottom. + +\--- /task \--- + +If you draw a bridge across the gap so that the cats can get all the way to the right side of the Stage, you can see that they end up getting stuck walking into the right wall. + +![Flailing cats at the edge](images/flailing-at-edge.png) + +\--- task \--- + +Remove the `forever`{:class="block3control"} loop, and instead add a different loop to make the cats only walk until they reach an edge. When a cat reaches the edge of the Stage, it should disappear. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats disappear when they reach the edge of the Stage. + +\--- /task \--- + +You may notice that, if the cats fall into the hole, they don't disappear but instead get stuck at the bottom. This is because they keep trying to fall downwards. + +This is the part of the code that tells the cat to keep falling until it touches blue: + +```blocks3 +repeat until +end +``` + +However, in the hole, the cat can never reach blue, so it is stuck forever. + +\--- task \--- + +Add more blocks to this loop so that it repeats until the cat sprite is touching blue `or`{:class="block3operators"} `touching the edge`{:class="block3sensing"}. This way, the sprite stops trying to fall if it reaches the edge of the Stage. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/tr-TR/step_5.md b/tr-TR/step_5.md new file mode 100644 index 0000000..ff776e8 --- /dev/null +++ b/tr-TR/step_5.md @@ -0,0 +1,65 @@ +## Stick to the lines + +You might notice that, if you draw a low bridge between the two platforms, or a line that slopes upwards, the cats end up walking through the platform rather than on top of it! + +![Cats walking through the platform](images/cat-walk-through-platform.png) + +\--- task \--- + +In the code for the cat sprite, add another loop before the `next costume`{:class="block3looks"} block. This time, the loop should tell the cat to move upwards by `2` until it is not touching blue. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat should `move up 2`{:class="block3motion"} `repeatedly until`{:class="block3control"} it is `not`{:class="block3operators"} `touching blue`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Click the green flag and try drawing a line that slopes upwards. Check that your cat follows this line. + +\--- /task \--- \ No newline at end of file diff --git a/tr-TR/step_6.md b/tr-TR/step_6.md new file mode 100644 index 0000000..deb146e --- /dev/null +++ b/tr-TR/step_6.md @@ -0,0 +1,89 @@ +## Get to safety + +The object of the game is to guide the cats to safety by creating a path so they can reach the door. Create a score variable to keep track of how many cats reach the door. + +\--- task \--- + +Create a variable called `score`{:class="block3variables"}. + +![Cat sprite](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Add code to your cat sprite to add `1` to the `score`{:class="block3variables"} each time a cat reaches the door. Also set `score`{:class="block3variables"} to `0` `when the flag is clicked`{:class="block3events"} at the start of the game. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the cat is `touching the door sprite`{:class="block3sensing"}, then `add 1 to the score`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the new code blocks you need to add to your `when I start as a clone` script: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Add some more code so that, when a cat sprite reaches the door, the cat makes a 'meow' sound and then disappears. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/tr-TR/step_7.md b/tr-TR/step_7.md new file mode 100644 index 0000000..6e609ac --- /dev/null +++ b/tr-TR/step_7.md @@ -0,0 +1,13 @@ +## Challenge: more obstacles + +At the moment, the game is rather easy to win. Can you think of ideas to you make your game harder? + ++ Add more backgrounds with different platform designs. + ++ Move the location of the door depending on which background is displayed. + ++ Add more sprites as moving obstacles. Perhaps you could have roaming dogs or rotating spikes the cats need to avoid? + ++ Only allow the player to use a limited amount of "ink" to draw lines in the game. You can keep track of how much "ink" is used by creating a timer variable that records how long the mouse is held down. + ++ Create a sprite to show the player how much ink is left. \ No newline at end of file diff --git a/tr-TR/step_8.md b/tr-TR/step_8.md new file mode 100644 index 0000000..2295a72 --- /dev/null +++ b/tr-TR/step_8.md @@ -0,0 +1,19 @@ +## What next? + +Try the [Flower generator](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects) project, where you will use custom blocks to create flower patterns. + +\--- no-print \--- + +Press `f` to draw a few flowers, or `r` to draw lots of random flowers, or `p` to draw a flower pattern. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![random flowers](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/uk-UA/images/banner.png b/uk-UA/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/uk-UA/images/banner.png differ diff --git a/uk-UA/images/cat-sprite.png b/uk-UA/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/uk-UA/images/cat-sprite.png differ diff --git a/uk-UA/images/cat-walk-through-platform.png b/uk-UA/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/uk-UA/images/cat-walk-through-platform.png differ diff --git a/uk-UA/images/cats-finished.png b/uk-UA/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/uk-UA/images/cats-finished.png differ diff --git a/uk-UA/images/door-sprite.png b/uk-UA/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/uk-UA/images/door-sprite.png differ diff --git a/uk-UA/images/draw-a-line.png b/uk-UA/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/uk-UA/images/draw-a-line.png differ diff --git a/uk-UA/images/falling-cats.png b/uk-UA/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/uk-UA/images/falling-cats.png differ diff --git a/uk-UA/images/flailing-at-edge.png b/uk-UA/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/uk-UA/images/flailing-at-edge.png differ diff --git a/uk-UA/images/flower-random.png b/uk-UA/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/uk-UA/images/flower-random.png differ diff --git a/uk-UA/images/pen-sprite.png b/uk-UA/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/uk-UA/images/pen-sprite.png differ diff --git a/uk-UA/meta.yml b/uk-UA/meta.yml new file mode 100644 index 0000000..33f1441 --- /dev/null +++ b/uk-UA/meta.yml @@ -0,0 +1,30 @@ +--- +title: КОТИ! +hero_image: images/banner.png +description: Створи гру, в якій ти проводиш котів у безпечне місце та не даєш їм потрапити у прірву +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Вступ + - + title: Малювання ліній + - + title: Клонування котів + completion: + - engaged + - + title: Коти, що рухаються + - + title: Переміщення по поверхні + - + title: Шлях до безпечного місця + completion: + - internal + - + title: 'Завдання: більше перешкод' + challenge: true + - + title: Що далі? diff --git a/uk-UA/resources/cats-resources.sb3 b/uk-UA/resources/cats-resources.sb3 new file mode 100644 index 0000000..5d58963 Binary files /dev/null and b/uk-UA/resources/cats-resources.sb3 differ diff --git a/uk-UA/solutions/cats-solution.sb3 b/uk-UA/solutions/cats-solution.sb3 new file mode 100644 index 0000000..8b72dae Binary files /dev/null and b/uk-UA/solutions/cats-solution.sb3 differ diff --git a/uk-UA/step_1.md b/uk-UA/step_1.md new file mode 100644 index 0000000..4b163e0 --- /dev/null +++ b/uk-UA/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +Це — версія проєкту для **Скретч 3**. Також існує проєкт для [Скретч 2](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Вступ + +У цьому проєкті ти створиш гру, в якій треба проводити котів у безпечне місце та не давати їм потрапити у прірву! + +### Що ти зробиш + +\--- no-print \--- + +Клікни та перетягни мишкою так, щоб намалювати лінію олівцем. Твоя мета — не дати котам потрапити у прірву, створивши безпечний шлях до виходу. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Завершений проєкт "Коти"](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: Чого ти навчишся + ++ Як використовувати цикл `завжди`{:class="block3control"} для постійного генерування рухомих котів ++ Як використовувати цикл `повторити до`{:class="block3control"}, щоб твої спрайти дотримувалися лінії + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Що тобі знадобиться + +### Обладнання + ++ Комп'ютер, що підтримує Scratch 3 + +### Програмне забезпечення + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### Завантаження + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Додаткові примітки для викладачів + +\--- no-print \--- + +Якщо вам потрібно роздрукувати цей проєкт, будь ласка, скористайтеся [версією для друку](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/uk-UA/step_2.md b/uk-UA/step_2.md new file mode 100644 index 0000000..981e3af --- /dev/null +++ b/uk-UA/step_2.md @@ -0,0 +1,140 @@ +## Малювання ліній + +\--- task \--- + +Відкрий початковий проєкт "КОТИ!" у Скретч. + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +Якщо у тебе є обліковий запис Скретч, то ти можеш зробити його копію, натиснувши **Ремікс**. + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Додай розширення Олівець до свого проєкту. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Клацни на спрайт з назвою "Олівець" та додай код, щоб встановити колір того ж відтінку синього, що й перешкоди на сцені. + +![Спрайт олівець](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +Щоб вибрати колір, натисни на кольоровий квадрат у блоці `надати олівцю колір`{:class="block3extensions"}, та вибери піпетку, а потім натисни нею на потрібний колір на сцені. + +\--- /task \--- + +\--- task \--- + +Додай ще деякий код, щоб спрайт рухався за вказівником миші. Протестуй свою програму, для перевірки правильності коду. + +![Спрайт олівець](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Додай код, щоб спрайт міг намалювати лінії на сцені, якщо натиснута кнопка миші. + +![Спрайт олівець](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`Якщо`{:class="block3control"} `мишку натиснуто?`{:class="block3sensing"}, то `опустити олівець`{:class="block3extensions"} `інакше`{:class="block3control"}, ` підняти олівець`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Ось необхідні тобі блоки коду: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +Ось як має виглядати твій код: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Протестуй свій код. Ти повинен (-на) мати можливість клікнути й перетягнути мишку, для малювання лінії на сцені. + +![Намалювати лінію](images/draw-a-line.png) + +\--- /task \--- + +Напевно, ти бачиш, що синя крапка завжди з’являється у верхньому правому куті сцени (це проілюстровано на зображенні зверху). Це тому, що, коли ти натискаєш зелений прапорець, щоб почати гру, ти натискаєш кнопку миші, і олівець негайно починає малювати. + +\--- task \--- + +Щоб цього уникнути додай блок `підняти олівець`{:class="block3extensions"} на початку скрипта, а `чекати 1 секунд`{:class="block3control"} – перед блоком `завжди`{:class="block3control"}. + +![Спрайт олівець](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/uk-UA/step_3.md b/uk-UA/step_3.md new file mode 100644 index 0000000..8f6130c --- /dev/null +++ b/uk-UA/step_3.md @@ -0,0 +1,73 @@ +## Клонування котів + +Тобі потрібен нескінченний потік котів, яких гравець повинен скеровувати вздовж шляху до виходу. + +\--- task \--- + +Клацніи спрайт під назвою "Кіт" і додай код, щоб `сховати`{:class="block3looks"} спрайт, а також `створювати клон`{:class="block3control"} кожні три секунди. + +![Спрайт "Кіт"](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +Якщо ти зараз запустиш програму, на сцені нічого не відбуватиметься. Щоб перевірити, чи створюється новий клон із спрайту "Кіт" кожні три секунди, зроби так, щоб кожен клон з’являвся вгорі й падав вниз із неба. + +\--- task \--- + +Додай код до спрайту, щоб `коли він починав як клон`{:class="block3control"}, він мав `показатися`{:class="block3looks"} і падати доки не `торкнеться`{:class="block3sensing"} синьої підлоги, яка зображена на сцені. + +![Спрайт "Кіт"](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`Коли спрайт починає як клон`{:class="block3control"}, `показати`{:class="block3looks"} спрайт. `Повторити`{:class="block3control"} `зміну`{:class="block3motion"} значення координати `y` спрайта на `-2`, поки він не `торкнеться`{:class="block3sensing"} на синьої частини сцени. + +\--- /hint \--- + +\--- hint \--- + +Тобі будуть потрібні наступні блоки коду: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +Ось як має виглядати твій код: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +Після натискання на зелений прапорець, ти маєш побачити, як новий кіт падає з верхньої частини сцени кожні три секунди. Кожен кіт повинен приземлитися у велику купу котів на блакитній підлозі внизу. + +![Падаючі коти](images/falling-cats.png) \ No newline at end of file diff --git a/uk-UA/step_4.md b/uk-UA/step_4.md new file mode 100644 index 0000000..412b379 --- /dev/null +++ b/uk-UA/step_4.md @@ -0,0 +1,115 @@ +## Коти, що рухаються + +Як тільки кіт досягає підлоги, він повинен повільно крокувати праворуч. + +\--- task \--- + +Додай код до секції `коли я починаю як клон`{:class="block3control"}, щоб змусити спрайт кота `переміщатися на 10 кроків`{:class="block3motion"} і перемикатися між двома своїми образами кожні 0.1 секунди, щоб кіт виглядав так, ніби він йде. + +![Спрайт "Кіт"](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +Спрайт кота має `преміщатися на 10 кроків`{:class="block3motion"}, і показувати `наступний образ`{:class="block3looks"} кожні `0.1 секунди`{:class="block3control"}. Цей код має повторюватись `завжди`{:class="block3control"} так, як і код, який змушує кота падати. + +\--- /hint \--- + +\--- hint \--- + +Ось необхідні тобі блоки коду: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +Ось як має виглядати твій код: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Натисни зелений прапорець і перевір, чи коти тепер переміщаються по синій платформі внизу. + +\--- /task \--- + +Якщо намалювати міст через прірву, щоб коти могли дістатися до правої сторони сцени, ти можеш бачити, що вони в кінцевому підсумку застрягають біля правого краю сцени. + +![Коти на краю](images/flailing-at-edge.png) + +\--- task \--- + +Видали цикл `завжди`{:class="block3control"} і замість нього додай інший цикл, щоб змусити котів ходити лише до того, як вони досягають краю. Коли кіт досягає краю сцени, він повинен зникнути. + +![Спрайт "Кіт"](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Натисни зелений прапорець і перевір, чи зникають коти, коли досягають краю сцени. + +\--- /task \--- + +Ти можеш помітити, що коли коти потрапляють у прірву, вони не зникають, а натомість застрягають внизу. Це тому, що вони намагаються продовжувати падати вниз. + +Це частина коду, яка каже котові продовжувати падати доки не торкнеться синього кольору: + +```blocks3 +repeat until +end +``` + +Однак у прірві кіт не може досягти блакитного кольору, тому застрягає там назавжди. + +\--- task \--- + +Додай більше блоків до цього циклу так, щоб він повторювався, поки спрайт кота не торкнеться синього `або`{:class="block3operators"} не `торкнеться межі`{:class="block3sensing"}. Таким чином, спрайт зупиняє падіння, коли він досягає краю сцени. + +![Спрайт "Кіт"](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/uk-UA/step_5.md b/uk-UA/step_5.md new file mode 100644 index 0000000..d5650ce --- /dev/null +++ b/uk-UA/step_5.md @@ -0,0 +1,65 @@ +## Переміщення по поверхні + +Ти можеш помітити, що якщо намалювати низький міст між двома платформами або висхідну лінію, то коти будуть йти крізь платформу, а не по ній! + +![Коти, які проходять крізь платформу](images/cat-walk-through-platform.png) + +\--- task \--- + +У код для спрайта кота, додай ще один цикл перед блоком `наступний образ`{:class="block3looks"}. На цей раз, цикл повинен сказати котові рухатися вгору на `2` доки він не торкнеться синього. + +![Спрайт "Кіт"](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +Кіт повинен `повторити`{:class="block3control"} `зміну у на 2`{:class="block3motion"} поки `не`{:class="block3operators"} `торкнеться синього кольору`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Тобі будуть потрібні наступні блоки коду: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +Ось як має виглядати твій код: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Натисни на зелений прапорець і спробуй намалювати висхідну лінію. Перевір чи твій кіт іде по цій лінії. + +\--- /task \--- \ No newline at end of file diff --git a/uk-UA/step_6.md b/uk-UA/step_6.md new file mode 100644 index 0000000..00f6012 --- /dev/null +++ b/uk-UA/step_6.md @@ -0,0 +1,89 @@ +## Шлях до безпечного місця + +Мета гри — скерувати котів у безпечне місце, створюючи шлях, щоб вони могли дістатися до дверей. Створи змінну для балів, щоб відстежувати, скільки котів доходить до дверей. + +\--- task \--- + +Створи нову змінну з назвою `рахунок`{:class="block3variables"}. + +![Спрайт "Кіт"](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Додай код до свого спрайта, щоб збільшувати на `1` `рахунок`{:class="block3variables"} кожного разу, коли кіт досягне дверей. Також встанови `рахунок`{:class="block3variables"} рівним `0` `коли прапорець натиснуто`{:class="block3events"} на початку гри. + +![Спрайт "Кіт"](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`Якщо`{:class="block3control"} кіт `торкається дверей`{:class="block3sensing"}, то ` змінити рахунок на 1`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Ось нові блоки коду, які потрібно додати до твого скрипта `коли я починаю як клон`: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +Ось як має виглядати твій код: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Додай код для того, щоб спрайт відтворював звук "meow" ("няв") і зникав після того, коли дістанеться дверей. + +![Спрайт "Кіт"](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/uk-UA/step_7.md b/uk-UA/step_7.md new file mode 100644 index 0000000..99a9378 --- /dev/null +++ b/uk-UA/step_7.md @@ -0,0 +1,13 @@ +## Завдання: більше перешкод + +На даний момент у грі досить легко перемогти. Чи можеш ти придумати, як її ускладнити? + ++ Додай більше фонів з різними дизайнами платформ. + ++ Змінюй розташування дверей в залежності від фону. + ++ Додай нові спрайти, як рухомі перешкоди. Можливо, це могли би бути собаки або обертові шипи, яких потрібно уникати? + ++ Дозволь гравцеві використовувати обмежену кількість «чорнил» для малювання ліній у грі. Ти можеш відслідковувати, скільки "чорнил" використовується, створивши змінну таймера, яка записує, як довго утримується миша. + ++ Створи спрайт, щоб показувати гравцю, скільки чорнил залишилось. \ No newline at end of file diff --git a/uk-UA/step_8.md b/uk-UA/step_8.md new file mode 100644 index 0000000..0f03132 --- /dev/null +++ b/uk-UA/step_8.md @@ -0,0 +1,19 @@ +## Що далі? + +Спробуй проєкт [Квітковий генератор](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects), де використовуються спеціальні блоки для створення узорів квітів. + +\--- no-print \--- + +Натискай `f`, щоб намалювати кілька квітів, або `r`, щоб намалювати безліч випадкових квітів, або `p` для квіткового візерунку. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![випадкові квіти](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/vi-VN/images/banner.png b/vi-VN/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/vi-VN/images/banner.png differ diff --git a/vi-VN/images/cat-sprite.png b/vi-VN/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/vi-VN/images/cat-sprite.png differ diff --git a/vi-VN/images/cat-walk-through-platform.png b/vi-VN/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/vi-VN/images/cat-walk-through-platform.png differ diff --git a/vi-VN/images/cats-finished.png b/vi-VN/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/vi-VN/images/cats-finished.png differ diff --git a/vi-VN/images/door-sprite.png b/vi-VN/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/vi-VN/images/door-sprite.png differ diff --git a/vi-VN/images/draw-a-line.png b/vi-VN/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/vi-VN/images/draw-a-line.png differ diff --git a/vi-VN/images/falling-cats.png b/vi-VN/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/vi-VN/images/falling-cats.png differ diff --git a/vi-VN/images/flailing-at-edge.png b/vi-VN/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/vi-VN/images/flailing-at-edge.png differ diff --git a/vi-VN/images/flower-random.png b/vi-VN/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/vi-VN/images/flower-random.png differ diff --git a/vi-VN/images/pen-sprite.png b/vi-VN/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/vi-VN/images/pen-sprite.png differ diff --git a/vi-VN/meta.yml b/vi-VN/meta.yml new file mode 100644 index 0000000..ea88a99 --- /dev/null +++ b/vi-VN/meta.yml @@ -0,0 +1,26 @@ +--- +title: CATS! +hero_image: images/banner.png +description: Create a game in which you guide cats to safety and stop them from falling into holes +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: Introduction + - + title: Draw lines + - + title: Clone cats + - + title: Make the cats move + - + title: Stick to the lines + - + title: Get to safety + - + title: "Challenge: more obstacles" + challenge: true + - + title: What next? diff --git a/vi-VN/resources/cats-resources.sb3 b/vi-VN/resources/cats-resources.sb3 new file mode 100644 index 0000000..d952bff Binary files /dev/null and b/vi-VN/resources/cats-resources.sb3 differ diff --git a/vi-VN/solutions/cats-solution.sb3 b/vi-VN/solutions/cats-solution.sb3 new file mode 100644 index 0000000..a2dc7c8 Binary files /dev/null and b/vi-VN/solutions/cats-solution.sb3 differ diff --git a/vi-VN/step_1.md b/vi-VN/step_1.md new file mode 100644 index 0000000..75244c0 --- /dev/null +++ b/vi-VN/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +This is the **Scratch 3** version of the project. There is also a [Scratch 2 version of the project](https://projects.raspberrypi.org/en/projects/cats-scratch2). + +\--- /no-print \--- + +## Introduction + +In this project, you will create a game in which you need to guide cats to safety and not let any of them fall through the gaps! + +### What you will make + +\--- no-print \--- + +Click and drag with the mouse to draw a line with the pencil. Your goal is to stop the cats from falling into holes by creating a safe path to the exit. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![Cats finished](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: What you will learn + ++ How to use a `forever`{:class="block3control"} loop to constantly generate moving cats ++ How to use a `repeat until`{:class="block3control"} loop to ensure your cats follow a line + +\--- /collapse \--- + +## \--- collapse \--- + +## title: What you will need + +### Hardware + ++ A computer capable of running Scratch 3 + +### Software + ++ Scratch 3 (either [online](http://rpf.io/scratchon){:target="_blank"} or [offline](http://rpf.io/scratchoff){:target="_blank"}) + +### Downloads + ++ [Offline starter project](http://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: Additional notes for educators + +\--- no-print \--- + +If you need to print this project, please use the [printer-friendly version](https://projects.raspberrypi.org/en/projects/cats/print). \--- /no-print \--- + +You can find the [completed project here](http://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/vi-VN/step_2.md b/vi-VN/step_2.md new file mode 100644 index 0000000..bd3358c --- /dev/null +++ b/vi-VN/step_2.md @@ -0,0 +1,140 @@ +## Draw lines + +\--- task \--- + +Open the 'CATS!' Scratch starter project. + +**Online:** open the starter project at [rpf.io/cats-on](http://rpf.io/cats-on){:target="_blank"}. + +If you have a Scratch account you can make a copy by clicking **Remix**. + +**Offline:** open the [starter project](http://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](http://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +Add the Pen extension to your project. + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +Click on the sprite called 'Pen', and add code to set the pen colour to the same blue as the obstacles on the Stage. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +To select a colour, click on the colour square in the `set pen color`{:class="block3extensions"} block to make your mouse cursor turn into a pipette, and then click on the correct colour on the Stage. + +\--- /task \--- + +\--- task \--- + +Add some more code to make the sprite follow the mouse pointer. Test your program to check that the code works. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +Add some code to tell the sprite to draw a line on the Stage if the mouse button is pressed down. + +![Pen sprite](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the `mouse is down`{:class="block3sensing"}, put the `pen down`{:class="block3extensions"}, and `else`{:class="block3control"}, lift the `pen up`{:class="block3extensions"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Test your code. You should be able to click and drag with the mouse to draw a blue line on the Stage. + +![Draw a line](images/draw-a-line.png) + +\--- /task \--- + +You probably see that a blue dot always appears in the top right-hand corner of the Stage (it's circled in the image above). This is because, when you click the green flag to start the game, you press the mouse down, and so the pen immediately starts drawing. + +\--- task \--- + +To stop this from happening, add a `pen up`{:class="block3extensions"} block at the start of the script, and a `wait one second`{:class="block3control"} block above the `forever`{:class="block3control"} block. + +![Pen sprite](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/vi-VN/step_3.md b/vi-VN/step_3.md new file mode 100644 index 0000000..d5f8d46 --- /dev/null +++ b/vi-VN/step_3.md @@ -0,0 +1,73 @@ +## Clone cats + +You want a never-ending stream of cats that the player has to guide along the path to the exit. + +\--- task \--- + +Click on the sprite called 'Cat', and add some code to `hide`{:class="block3looks"} the sprite, and also to `clone`{:class="block3control"} it every three seconds. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +If you run the program now, nothing happens on the Stage. To check that a new Cat sprite clone is created every three seconds, make each clone appear and fall out of the sky. + +\--- task \--- + +Add code to tell the sprite that `when it starts as a clone`{:class="block3control"}, it should `show`{:class="block3looks"} itself and fall until it `touches`{:class="block3sensing"} the blue floor that is drawn on the Stage. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`When the sprite starts as a clone`{:class="block3control"}, `show`{:class="block3looks"} the sprite. `Repeatedly`{:class="block3control"} `Change`{:class="block3motion"} the sprite's `y` coordinate by `-2`, until the sprite `touches`{:class="block3sensing"} the blue Stage. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +When you click the green flag, you should see a new cat fall from the top of the Stage every three seconds. Every cat should land in a big pile of overlapping cats on the blue floor at the bottom. + +![Falling cats](images/falling-cats.png) \ No newline at end of file diff --git a/vi-VN/step_4.md b/vi-VN/step_4.md new file mode 100644 index 0000000..8c10235 --- /dev/null +++ b/vi-VN/step_4.md @@ -0,0 +1,115 @@ +## Make the cats move + +Once a cat reaches the floor, it should step slowly to the right. + +\--- task \--- + +Add code to the `when I start as a clone`{:class="block3control"} section to make the cat sprite `move ten steps`{:class="block3motion"}, and switch between the sprite's two costumes every 0.1 seconds to make the cat look like it's walking. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat sprite should `move 10 steps`{:class="block3motion"}, and `switch costume`{:class="block3looks"} every `0.1 seconds`{:class="block3control"}. This code should repeat `forever`{:class="block3control"}, just like the code to make the cat fall. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats now move along the blue platform at the bottom. + +\--- /task \--- + +If you draw a bridge across the gap so that the cats can get all the way to the right side of the Stage, you can see that they end up getting stuck walking into the right wall. + +![Flailing cats at the edge](images/flailing-at-edge.png) + +\--- task \--- + +Remove the `forever`{:class="block3control"} loop, and instead add a different loop to make the cats only walk until they reach an edge. When a cat reaches the edge of the Stage, it should disappear. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +Press the green flag and check that the cats disappear when they reach the edge of the Stage. + +\--- /task \--- + +You may notice that, if the cats fall into the hole, they don't disappear but instead get stuck at the bottom. This is because they keep trying to fall downwards. + +This is the part of the code that tells the cat to keep falling until it touches blue: + +```blocks3 +repeat until +end +``` + +However, in the hole, the cat can never reach blue, so it is stuck forever. + +\--- task \--- + +Add more blocks to this loop so that it repeats until the cat sprite is touching blue `or`{:class="block3operators"} `touching the edge`{:class="block3sensing"}. This way, the sprite stops trying to fall if it reaches the edge of the Stage. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/vi-VN/step_5.md b/vi-VN/step_5.md new file mode 100644 index 0000000..ff776e8 --- /dev/null +++ b/vi-VN/step_5.md @@ -0,0 +1,65 @@ +## Stick to the lines + +You might notice that, if you draw a low bridge between the two platforms, or a line that slopes upwards, the cats end up walking through the platform rather than on top of it! + +![Cats walking through the platform](images/cat-walk-through-platform.png) + +\--- task \--- + +In the code for the cat sprite, add another loop before the `next costume`{:class="block3looks"} block. This time, the loop should tell the cat to move upwards by `2` until it is not touching blue. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +The cat should `move up 2`{:class="block3motion"} `repeatedly until`{:class="block3control"} it is `not`{:class="block3operators"} `touching blue`{:class="block3sensing"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the code blocks you need: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +Click the green flag and try drawing a line that slopes upwards. Check that your cat follows this line. + +\--- /task \--- \ No newline at end of file diff --git a/vi-VN/step_6.md b/vi-VN/step_6.md new file mode 100644 index 0000000..deb146e --- /dev/null +++ b/vi-VN/step_6.md @@ -0,0 +1,89 @@ +## Get to safety + +The object of the game is to guide the cats to safety by creating a path so they can reach the door. Create a score variable to keep track of how many cats reach the door. + +\--- task \--- + +Create a variable called `score`{:class="block3variables"}. + +![Cat sprite](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +Add code to your cat sprite to add `1` to the `score`{:class="block3variables"} each time a cat reaches the door. Also set `score`{:class="block3variables"} to `0` `when the flag is clicked`{:class="block3events"} at the start of the game. + +![Cat sprite](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`If`{:class="block3control"} the cat is `touching the door sprite`{:class="block3sensing"}, then `add 1 to the score`{:class="block3variables"}. + +\--- /hint \--- + +\--- hint \--- + +Here are the new code blocks you need to add to your `when I start as a clone` script: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +This is what your code should look like: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +Add some more code so that, when a cat sprite reaches the door, the cat makes a 'meow' sound and then disappears. + +![Cat sprite](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/vi-VN/step_7.md b/vi-VN/step_7.md new file mode 100644 index 0000000..6e609ac --- /dev/null +++ b/vi-VN/step_7.md @@ -0,0 +1,13 @@ +## Challenge: more obstacles + +At the moment, the game is rather easy to win. Can you think of ideas to you make your game harder? + ++ Add more backgrounds with different platform designs. + ++ Move the location of the door depending on which background is displayed. + ++ Add more sprites as moving obstacles. Perhaps you could have roaming dogs or rotating spikes the cats need to avoid? + ++ Only allow the player to use a limited amount of "ink" to draw lines in the game. You can keep track of how much "ink" is used by creating a timer variable that records how long the mouse is held down. + ++ Create a sprite to show the player how much ink is left. \ No newline at end of file diff --git a/vi-VN/step_8.md b/vi-VN/step_8.md new file mode 100644 index 0000000..2295a72 --- /dev/null +++ b/vi-VN/step_8.md @@ -0,0 +1,19 @@ +## What next? + +Try the [Flower generator](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects) project, where you will use custom blocks to create flower patterns. + +\--- no-print \--- + +Press `f` to draw a few flowers, or `r` to draw lots of random flowers, or `p` to draw a flower pattern. + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![random flowers](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/zh-CN/images/banner.png b/zh-CN/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/zh-CN/images/banner.png differ diff --git a/zh-CN/images/cat-sprite.png b/zh-CN/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/zh-CN/images/cat-sprite.png differ diff --git a/zh-CN/images/cat-walk-through-platform.png b/zh-CN/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/zh-CN/images/cat-walk-through-platform.png differ diff --git a/zh-CN/images/cats-finished.png b/zh-CN/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/zh-CN/images/cats-finished.png differ diff --git a/zh-CN/images/door-sprite.png b/zh-CN/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/zh-CN/images/door-sprite.png differ diff --git a/zh-CN/images/draw-a-line.png b/zh-CN/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/zh-CN/images/draw-a-line.png differ diff --git a/zh-CN/images/falling-cats.png b/zh-CN/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/zh-CN/images/falling-cats.png differ diff --git a/zh-CN/images/flailing-at-edge.png b/zh-CN/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/zh-CN/images/flailing-at-edge.png differ diff --git a/zh-CN/images/flower-random.png b/zh-CN/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/zh-CN/images/flower-random.png differ diff --git a/zh-CN/images/pen-sprite.png b/zh-CN/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/zh-CN/images/pen-sprite.png differ diff --git a/zh-CN/meta.yml b/zh-CN/meta.yml new file mode 100644 index 0000000..31c06b5 --- /dev/null +++ b/zh-CN/meta.yml @@ -0,0 +1,30 @@ +--- +title: 猫! +hero_image: images/banner.png +description: 创建一个游戏,在游戏中引导猫咪别让它们掉到洞里 +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: 介绍 + - + title: 画线 + - + title: 克隆猫咪 + completion: + - engaged + - + title: 让猫咪动起来 + - + title: 让猫咪沿着线行走 + - + title: 让猫咪保持安全 + completion: + - internal + - + title: '挑战:更多的障碍' + challenge: true + - + title: 接下来呢? diff --git a/zh-CN/resources/cats-resources.sb3 b/zh-CN/resources/cats-resources.sb3 new file mode 100644 index 0000000..8a12a2f Binary files /dev/null and b/zh-CN/resources/cats-resources.sb3 differ diff --git a/zh-CN/solutions/cats-solution.sb3 b/zh-CN/solutions/cats-solution.sb3 new file mode 100644 index 0000000..96b0192 Binary files /dev/null and b/zh-CN/solutions/cats-solution.sb3 differ diff --git a/zh-CN/step_1.md b/zh-CN/step_1.md new file mode 100644 index 0000000..70323de --- /dev/null +++ b/zh-CN/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +这是该项目的 **Scratch 3** 版本。 这个项目还有一个[Scratch 2](https://projects.raspberrypi.org/en/projects/cats-scratch2) 版本。 + +\--- /no-print \--- + +## 介绍 + +在这个项目中,您将创建一个游戏,在游戏中您需要引导猫注意安全,并且不能让猫掉入任何深渊里! + +### 你将制作: + +\--- no-print \--- + +点击并拖动鼠标来用铅笔画一条线。 您的目标是通过创建一条通往出口的安全路径来阻止猫咪掉入洞中。 + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![项目完成](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## 标题: 你将学到什么 + ++ 如何使用 `重复执行`{:class ="block3control"} 循环来不断生成移动的猫咪 ++ 如何使用 `重复执行直到`{:class ="block3control"} 循环来确保猫咪沿着直线移动 + +\--- /collapse \--- + +## \--- collapse \--- + +## 标题: 你需要准备什么 + +### 硬件部分 + ++ 一台能够运行 Scratch 3 的电脑 + +### 软件部分 + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### 下载 + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## 标题: 给教师的附加说明 + +\--- no-print \--- + +如果您需要打印本项目文件,请使用[合适的打印版本](https://projects.raspberrypi.org/en/projects/cats/print) \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/zh-CN/step_2.md b/zh-CN/step_2.md new file mode 100644 index 0000000..d109f75 --- /dev/null +++ b/zh-CN/step_2.md @@ -0,0 +1,140 @@ +## 画线 + +\--- task \--- + +打开“猫!”的初始项目。 + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +如果您有 Scratch 帐户,可以单击 **改编** 复制这个项目。 + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +将 画笔 扩展库添加到项目中。 + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +单击名为 “笔” 的精灵,然后添加代码将笔的颜色设置为与舞台上的障碍物相同的蓝色。 + +![笔精灵](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +要选择一种颜色,请在 `将笔的颜色设置为`{:class=" block3extensions"} 积木块中单击颜色块,在打开的弹窗中选择滴管工具并移动到舞台中的障碍物上,来获取正确的颜色 + +\--- /task \--- + +\--- task \--- + +添加更多代码来让精灵随着鼠标移动。 测试您的程序以检查代码是否有效。 + +![笔精灵](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +添加一些代码,告诉精灵如果按下鼠标按钮,则可以在舞台上画一条线。 + +![笔精灵](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`如果`{:class="block3control"}`按下鼠标?`{:class=" block3sensing"},则 `落笔`{:class="block3extensions"},`否则`{:class="block3control"},`抬笔`{:class ="block3extensions"}。 + +\--- /hint \--- + +\--- hint \--- + +下面是你需要的代码块: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +你的代码应该是这样的: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +测试你的代码。 您应该能够单击并拖动鼠标在舞台上绘制蓝色的线。 + +![画一条线](images/draw-a-line.png) + +\--- /task \--- + +您可能会看到一个蓝点始终出现在舞台的右上角(在上图中被圈出)。 这是因为,当您单击绿色标志开始游戏时,您按下了鼠标,因此笔立即开始绘制。 + +\--- task \--- + +为了阻止这种情况发生,在代码块开始的部分添加 `抬笔`{:class="block3extensions"} 和 `等待 1 秒`{:class="block3control"} 积木块,放在 `重复执行`{:class=" block3control"} 积木块前面。 + +![笔精灵](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/zh-CN/step_3.md b/zh-CN/step_3.md new file mode 100644 index 0000000..09317a2 --- /dev/null +++ b/zh-CN/step_3.md @@ -0,0 +1,73 @@ +## 克隆猫咪 + +您需要源源不断的生成猫咪来让玩家画出路径引导猫咪直到出口。 + +\--- task \--- + +单击名为 "猫咪" 的精灵,然后添加代码来 `隐藏`{:class=" block3looks"} 猫咪精灵,并每 3 秒 `克隆自己`{:class="block3looks"}。 + +![猫咪精灵](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +如果您现在运行程序,舞台上什么也不会发生。 要检查是否每 3 秒克隆了一个新的猫咪精灵,我们需要让猫咪显示出来并从天空中掉下来 + +\--- task \--- + +添加代码,`当作为克隆体启动时`{:class="block3control"},它应该`显示`{:class="block3control"},然后 `碰到颜色`{:class="block3control"} 为舞台上绘制的蓝色。 + +![猫咪精灵](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`当作为克隆体启动时`{:class="block3control"},`显示`{:class="block3control"} 精灵。 `重复执行直到`{:class =“ block3control”}`碰到颜色`{:class =“ block3control”} 蓝色 `将 y 坐标增加`{:class =“ block3control”}`-2` + +\--- /hint \--- + +\--- hint \--- + +以下是你需要的代码块: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +你的代码应该是这样的: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +单击绿色小旗标志时,您应该看到每三秒钟一只新的猫咪从舞台的顶部掉下来。 蓝色的地板上应该有一大堆的猫咪 + +![掉落的猫咪](images/falling-cats.png) \ No newline at end of file diff --git a/zh-CN/step_4.md b/zh-CN/step_4.md new file mode 100644 index 0000000..e52f1ba --- /dev/null +++ b/zh-CN/step_4.md @@ -0,0 +1,115 @@ +## 让猫咪动起来 + +一旦猫咪到达地面,它就应慢慢向右边走。 + +\--- task \--- + +添加代码到 `当作为克隆体启动时`{:class="block3control"} ,使猫咪精灵 `移动 10 步`{:class="block3control"} 并且 每隔 0.1 秒在猫咪精灵的两个造型之间切换,来让猫咪看起来像在走路。 + +![猫咪精灵](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +猫咪精灵应该 `移动 10 步`{:class="block3motion"} 并且每 `0.1秒`{:class="block3motion"} 切换 `下一个造型`{:class="block3motion"} 。 这个代码应该和猫咪下落的代码一样在 `重复执行`{:class="block3control"}积木块里。 + +\--- /hint \--- + +\--- hint \--- + +以下是你需要的代码块: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +你的代码应该是这样的: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +按下绿色小旗标志,然后检查猫现在是否沿着底部的蓝色平台移动。 + +\--- /task \--- + +如果您在间隙上通过画线架起一座桥,来让猫咪可以一直走到舞台的右侧,您会发现它们最终被困在右墙中。 + +![在边缘挣扎的猫咪](images/flailing-at-edge.png) + +\--- task \--- + +删除 `重复执行` {:class =“ block3control”} 循环,替换为一个 重复执行直到碰到舞台边缘 的循环积木块。 当猫咪到达舞台边缘时,它应该消失。 + +![猫咪精灵](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +按下绿色小旗标志,并检查猫咪到达舞台边缘时是否消失。 + +\--- /task \--- + +您可能会注意到,如果猫掉入洞中,它们不会消失,而会卡在底部。 这是因为他们不断试图向下下滑。 + +这是代码的一部分,它告诉猫继续跌落,直到它碰到蓝色: + +```blocks3 +repeat until +end +``` + +但是,在洞中,猫永远无法到达蓝色,因此它会一直被卡住。 + +\--- task \--- + +向此循环添加更多块,重复执行直到碰到颜色蓝色 `或`{:class="block3operators"}, `碰到舞台边缘`{:class="block3sensing"}。 这样,如果精灵到达舞台的边缘,它将停止尝试掉落。 + +![猫咪精灵](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/zh-CN/step_5.md b/zh-CN/step_5.md new file mode 100644 index 0000000..67c9d95 --- /dev/null +++ b/zh-CN/step_5.md @@ -0,0 +1,65 @@ +## 让猫咪沿着线行走 + +您可能会注意到,如果您在两个平台之间画了一座稍微低一些的桥, 或者一条向上倾斜的直线,猫最终会在平台或线上穿行而不是走在它们上面! + +![小猫咪们走过平台](images/cat-walk-through-platform.png) + +\--- task \--- + +在猫咪精灵的代码中,在 `下一个造型`{:class="block3looks"} 积木块之前添加另一个循环。 这一次,循环应该告诉猫咪上移 `2` 步直到它不触碰蓝色。 + +![猫咪精灵](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +猫咪应该 `重复执行直到`{:class="block3motion"} `碰到颜色 蓝色`{:class="block3motion"} `不成立`{:class="block3motion"} `将 y 坐标增加2 `{:class="block3motion"}。 + +\--- /hint \--- + +\--- hint \--- + +以下是你需要的代码块: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +你的代码应该是这样的: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +单击绿色小旗标志,然后尝试绘制一条向上倾斜的线。 请检查您的猫是否跟随这条线。 + +\--- /task \--- \ No newline at end of file diff --git a/zh-CN/step_6.md b/zh-CN/step_6.md new file mode 100644 index 0000000..ea9b37c --- /dev/null +++ b/zh-CN/step_6.md @@ -0,0 +1,89 @@ +## 让猫保持安全 + +游戏的目标是通过绘制一条路径引导猫咪保持安全,这样他们就可以到达门型出口。 创建一个 分数 变量以跟踪有多少只猫到达了门口。 + +\--- task \--- + +创建一个新的名为 `分数`{:class="block3variables"} 的变量 + +![猫咪精灵](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +添加代码,每次当有猫咪到达门口时,将`分数`{:class="block3variables"} 增加 `1`{:class="block3variables"}。 同时在 `当绿旗被点击`{:class="block3variables"} 将 `分数`{:class="block3variables"} 设为 `0`{:class="block3variables"} 。 + +![猫咪精灵](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`如果`{:class="block3variables"} 猫咪精灵 `碰到门`{:class="block3variables"},`将 分数 增加 1`{:class="block3variables"}。 + +\--- /hint \--- + +\--- hint \--- + +下面是你需要添加到`当作为克隆体启动时` 代码块的代码: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +你的代码应该是这样的: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +添加更多代码,以便当猫咪精灵到达门口时,发出 “meow” 的声音,然后消失。 + +![猫咪精灵](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/zh-CN/step_7.md b/zh-CN/step_7.md new file mode 100644 index 0000000..8096997 --- /dev/null +++ b/zh-CN/step_7.md @@ -0,0 +1,13 @@ +## 挑战:更多障碍 + +目前,游戏很容易获胜。 你能想到一些想法使你的游戏变得更难吗? + ++ 添加更多背景不同的平台设计。 + ++ 根据显示的背景移动门的位置。 + ++ 添加更多的精灵作为移动的障碍。 也许可以添加一些来回游走的狗或其它障碍物物来让猫咪躲避? + ++ 仅允许玩家使用有限数量的“墨水”在游戏中画线。 您可以通过创建一个计时器变量来跟踪使用了多少“墨水”,该变量记录了按下鼠标的时间。 + ++ 创建一个精灵以显示玩家剩余的墨水量。 \ No newline at end of file diff --git a/zh-CN/step_8.md b/zh-CN/step_8.md new file mode 100644 index 0000000..2e48427 --- /dev/null +++ b/zh-CN/step_8.md @@ -0,0 +1,19 @@ +## 接下来呢? + +尝试 [花朵生成器](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects)项目,您将在其中使用自定义积木块创建花朵图案。 + +\--- no-print \--- + +按 `f` 画几朵花,或 `r` 画很多随机生成的花,或 `p` 画出花朵图案。 + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![随机生成花朵](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file diff --git a/zh-TW/images/banner.png b/zh-TW/images/banner.png new file mode 100644 index 0000000..ec597e9 Binary files /dev/null and b/zh-TW/images/banner.png differ diff --git a/zh-TW/images/cat-sprite.png b/zh-TW/images/cat-sprite.png new file mode 100644 index 0000000..ccca81e Binary files /dev/null and b/zh-TW/images/cat-sprite.png differ diff --git a/zh-TW/images/cat-walk-through-platform.png b/zh-TW/images/cat-walk-through-platform.png new file mode 100644 index 0000000..c7052e6 Binary files /dev/null and b/zh-TW/images/cat-walk-through-platform.png differ diff --git a/zh-TW/images/cats-finished.png b/zh-TW/images/cats-finished.png new file mode 100644 index 0000000..b0dbad5 Binary files /dev/null and b/zh-TW/images/cats-finished.png differ diff --git a/zh-TW/images/door-sprite.png b/zh-TW/images/door-sprite.png new file mode 100644 index 0000000..fc2f1a4 Binary files /dev/null and b/zh-TW/images/door-sprite.png differ diff --git a/zh-TW/images/draw-a-line.png b/zh-TW/images/draw-a-line.png new file mode 100644 index 0000000..44d0ec3 Binary files /dev/null and b/zh-TW/images/draw-a-line.png differ diff --git a/zh-TW/images/falling-cats.png b/zh-TW/images/falling-cats.png new file mode 100644 index 0000000..5b2e2c9 Binary files /dev/null and b/zh-TW/images/falling-cats.png differ diff --git a/zh-TW/images/flailing-at-edge.png b/zh-TW/images/flailing-at-edge.png new file mode 100644 index 0000000..f26f620 Binary files /dev/null and b/zh-TW/images/flailing-at-edge.png differ diff --git a/zh-TW/images/flower-random.png b/zh-TW/images/flower-random.png new file mode 100644 index 0000000..ab9cfe6 Binary files /dev/null and b/zh-TW/images/flower-random.png differ diff --git a/zh-TW/images/pen-sprite.png b/zh-TW/images/pen-sprite.png new file mode 100644 index 0000000..6d9e486 Binary files /dev/null and b/zh-TW/images/pen-sprite.png differ diff --git a/zh-TW/meta.yml b/zh-TW/meta.yml new file mode 100644 index 0000000..2ff632a --- /dev/null +++ b/zh-TW/meta.yml @@ -0,0 +1,30 @@ +--- +title: 貓! +hero_image: images/banner.png +description: 創作一個遊戲,在其中引導貓到安全處並阻止它們掉入洞中 +listed: true +copyedit: true +version: 4.0.2 +last_tested: 2018-10-18 +steps: + - + title: 介紹 + - + title: 畫線 + - + title: 複製貓 + completion: + - engaged + - + title: 讓貓咪動起來 + - + title: 讓貓咪沿著線走 + - + title: 安全起見 + completion: + - internal + - + title: '挑戰: 更多的障礙' + challenge: true + - + title: 然後呢? diff --git a/zh-TW/resources/cats-resources.sb3 b/zh-TW/resources/cats-resources.sb3 new file mode 100644 index 0000000..8f5dfd5 Binary files /dev/null and b/zh-TW/resources/cats-resources.sb3 differ diff --git a/zh-TW/solutions/cats-solution.sb3 b/zh-TW/solutions/cats-solution.sb3 new file mode 100644 index 0000000..7ccbf32 Binary files /dev/null and b/zh-TW/solutions/cats-solution.sb3 differ diff --git a/zh-TW/step_1.md b/zh-TW/step_1.md new file mode 100644 index 0000000..d498807 --- /dev/null +++ b/zh-TW/step_1.md @@ -0,0 +1,66 @@ +\--- no-print \--- + +這個專案是 **Scratch 3** 版本。 另外還有 [Scratch 2](https://projects.raspberrypi.org/en/projects/cats-scratch2) 版本。 + +\--- /no-print \--- + +## 介紹 + +在這個項目中,您將創作出一個遊戲,在這遊戲中您需要引導貓走到安全的地方,不能讓任何貓掉進空隙裡喔! + +### 你會做出: + +\--- no-print \--- + +單擊並拖曳滑鼠游標,用鉛筆畫出線條。 你的任務是畫出一條安全的路徑通往出口,不要讓貓咪掉到了坑洞裡。 + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![搶救貓咪大作戰](images/cats-finished.png) + +\--- /print-only \--- + +## \--- collapse \--- + +## title: 你會學到 + ++ 如何使用 `重複無限次`{:class ="block3control"} 迴圈來產生不停移動的貓咪 ++ 如何使用 `重複直到`{:class =“ block3control”}迴圈以確保您的貓能順著一條線走 + +\--- /collapse \--- + +## \--- collapse \--- + +## title: 你會用到 + +### 硬體 + ++ 可運行 Scratch 3 的電腦 + +### 軟體 + ++ Scratch 3 (either [online](https://rpf.io/scratchon){:target="_blank"} or [offline](https://rpf.io/scratchoff){:target="_blank"}) + +### 下載 + ++ [Offline starter project](https://rpf.io/p/en/cats-go){:target="_blank"} + +\--- /collapse \--- + +## \--- collapse \--- + +## title: 給教師的其它資訊 + +\--- no-print \--- + +如果你需要列印這個專案,可以先切換成[列印友好模式](https://projects.raspberrypi.org/en/projects/cats/print)。 \--- /no-print \--- + +You can find the [completed project here](https://rpf.io/p/en/cats-get){:target="_blank"}. + +\--- /collapse \--- \ No newline at end of file diff --git a/zh-TW/step_2.md b/zh-TW/step_2.md new file mode 100644 index 0000000..03b2562 --- /dev/null +++ b/zh-TW/step_2.md @@ -0,0 +1,140 @@ +## 畫線 + +\--- task \--- + +打開“貓!”Scratch入門項目。 + +**Online:** open the starter project at [rpf.io/cats-on](https://rpf.io/cats-on){:target="_blank"}. + +如果你有 Scratch 帳戶,你就可以直接**改編**專案。 + +**Offline:** open the [starter project](https://rpf.io/p/en/cats-go) in the offline editor. If you need to download and install the Scratch offline editor, you can find it at [rpf.io/scratchoff](https://rpf.io/scratchoff){:target="_blank"}. + +\--- /task \--- + +\--- task \--- + +把畫筆這個擴充功能加入到專案裡。 + +[[[generic-scratch3-add-pen-extension]]] + +\--- /task \--- + +\--- task \--- + +點一下名為“鉛筆”的角色,然後加入以下程式碼將筆的顏色設為與舞台上的障礙物相同的藍色。 + +![筆角色](images/pen-sprite.png) + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +``` + +如要選擇一種顏色,請在 `筆跡顏色設為`{:class =“ block3extensions”}積木中單擊顏色方塊,當滑鼠游標變成吸管,就可以在舞台上點取物品找到你要的正確顏色。 + +\--- /task \--- + +\--- task \--- + +加入更多程式碼讓這角色能跟著鼠標走。 測試您的程序以檢查程式代碼是否有效。 + +![筆角色](images/pen-sprite.png) + +```blocks3 +forever +go to (mouse pointer v) +end +``` + +[[[generic-scratch3-saving]]] + +\--- /task \--- + +\--- task \--- + +添加一些程式代碼,告訴這角色如果按下鼠標按鈕,就可以在舞台上畫一條線。 + +![筆角色](images/pen-sprite.png) + +\--- hints \--- \--- hint \--- + +`如果`{:class =“ block3control”} `滑鼠鍵被按下`{:class =“ block3sensing”},則放入 `下筆`{:class =“ block3extensions”},`否則`{:class =“ block3control“},使用`停筆`{:class =” block3extensions“}。 + +\--- /hint \--- + +\--- hint \--- + +這裡是你需要的程式積木: + +```blocks3 + + +pen down + +pen up + +if <> then +else +end +``` + +\--- /hint \--- + +\--- hint \--- + +你的程式看起來應該像這樣: + +```blocks3 +when flag clicked +set pen color to [#0000ff] +erase all +set pen size to (5) +forever +go to (mouse pointer v) ++ if then +pen down +else +pen up +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +測試你的程式。 您應該能夠單擊並拖曳鼠標在舞台上繪製藍線。 + +![畫一條線](images/draw-a-line.png) + +\--- /task \--- + +您可能會看到一個藍點始終出現在舞台的右上角(被圈出的藍點如上圖所示)。 這是因為,當您單擊綠色旗幟開始遊戲時,您按下了鼠標,因而筆立即開始繪製的動作。 + +\--- task \--- + +為了避免這種情況發生,可添加 `停筆`{:class=“block3extensions”}積木在程式區腳本的開頭和一塊`等待1秒鐘`{:class=“block3control”}積木塊,這積木在 `重複無限次`{ :class =“ block3control”}積木的上面。 + +![筆角色](images/pen-sprite.png) + +```blocks3 +when flag clicked ++ pen up +set pen color to [#0000ff] +erase all +set pen size to (5) ++ wait (1) seconds +forever +go to (mouse pointer v) +if then +pen down +else +pen up +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/zh-TW/step_3.md b/zh-TW/step_3.md new file mode 100644 index 0000000..62a7bb2 --- /dev/null +++ b/zh-TW/step_3.md @@ -0,0 +1,73 @@ +## 複製貓 + +您需要玩家引導這些源源不斷出現的貓群找到出口的路。 + +\--- task \--- + +點一下名為“ Cat”的角色,然後添加代碼來 `隱藏`{:class =“ block3looks”}角色,並每3秒`複製`{:class =“ block3looks”}它。 + +![貓角色](images/cat-sprite.png) + +```blocks3 +when flag clicked +hide +forever + create clone of (myself v) + wait (3) seconds +end +``` + +\--- /task \--- + +如果您現在執行程序,舞台上會什麼動靜也沒有。 要檢查是否每三秒鐘就出現一個新的複製貓,我們可以讓每隻分身都從天空出現掉下來。 + +\--- task \--- + +添加代碼以告知這角色,當它
{:class =“ block3control”}開始分身時 `,它應該要 顯示`{:class =“ block3looks”},然後一直下降到牠 `碰到`{:class =“ block3sensing“}畫在舞台上的藍色地板為止。 + +![貓角色](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`當角色作為分身`{:class =“ block3control”}開始時, `顯示`{:class =“ block3looks”}角色。 `重複`{:class =“ block3control”} `更改`{:class =“ block3motion”}這個角色的 `y` 坐標 `-2`,直到這個角色 `碰到`{:class =“ block3control”“}了藍色舞台。 + +\--- /hint \--- + +\--- hint \--- + +這裡是你需要的程式積木: + +```blocks3 +repeat until <> +end + +show + + + +change y by (-2) + +when I start as a clone +``` + +\--- /hint \--- + +\--- hint \--- + +你的程式看起來應該像這樣: + +```blocks3 +when I start as a clone +show +repeat until +change y by (-2) +end +``` + +\--- /hint \--- \--- /hints \--- + +\--- /task \--- + +點一下綠色旗幟時,您應該會每三秒鐘看到一隻新的貓從舞台上方掉下來。 每隻貓都應該都會掉在底部藍色地板上的那一大堆貓咪中。 + +![掉下來的貓咪](images/falling-cats.png) \ No newline at end of file diff --git a/zh-TW/step_4.md b/zh-TW/step_4.md new file mode 100644 index 0000000..4c4a8c9 --- /dev/null +++ b/zh-TW/step_4.md @@ -0,0 +1,115 @@ +## 讓貓咪動起來 + +當貓碰到地板後,它應該慢慢地向右前進。 + +\--- task \--- + +添加代碼到 `當分身產生`{:class="block3control"} 這部分,讓貓咪 `移動十步`{:class="block3control"} ,然後每隔 0.1 秒從貓咪的兩種造型中切換一次,使它看起來像在走路一樣。 + +![貓咪](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +貓咪應該要`移動10步` {:class =“ block3motion”}和每` 0.1秒` {:class =“ block3control”}`切換到下個造型` {:class =“ block3looks”}。 這代碼應重複` 重複無限次` {:class =“ block3control”},就像使貓掉下來的代碼一樣。 + +\--- /hint \--- + +\--- hint \--- + +這是你需要的程式積木: + +```blocks3 +move (10) steps + +wait (0.1) seconds + +next costume + +forever +end +``` + +\--- /hint \--- + +\--- hint \--- + +你的程式看起來應該像這樣: + +```blocks3 +when I start as a clone +show ++ forever + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +按下綠色旗幟,然後檢查貓咪現在是否有沿著底部的藍色平台移動。 + +\--- /task \--- + +如果您在間隙上搭起一座橋樑,就能讓貓咪可以一直走到舞台的右側,您會發現它們最後都會卡在右邊的牆裡。 + +![在邊緣掙扎的貓咪](images/flailing-at-edge.png) + +\--- task \--- + +移除`重複無限次` {:class =“ block3control”}迴圈,然後添加一個不同的迴圈使貓咪只走到當它們到達邊緣為止。 當貓咪到達舞台邊緣時,它應該要消失。 + +![貓咪](images/cat-sprite.png) + +```blocks3 +when I start as a clone +show ++ repeat until + move (10) steps + repeat until + change y by (-2) + end + next costume + wait (0.1) seconds +end ++ delete this clone +``` + +\--- /task \--- + +\--- task \--- + +按下綠色旗幟,並檢查貓咪們走到舞台邊緣時是否有消失。 + +\--- /task \--- + +您可能有注意到,如果貓掉入洞中,它們不會消失,而是會卡在底部。 這是因為他們一直不斷試圖著往下掉。 + +這是原代碼的一部分,讓貓一直一直往下掉到它碰到藍色才停止: + +```blocks3 +repeat until +end +``` + +但是,在洞中,貓永遠無法到達藍色,因此它會一直卡住。 + +\--- task \--- + +在這重複無限次區塊中加入更多積木,讓它能重複執行直到碰到藍色 `或`{:class="block3operators"}, `碰到舞台邊緣`{:class="block3sensing"}。 這樣一來,如果貓咪到了舞台的邊緣,它就會停止繼續往下掉。 + +![貓咪](images/cat-sprite.png) + +```blocks3 +repeat until < or > +end +``` + +\--- /task \--- \ No newline at end of file diff --git a/zh-TW/step_5.md b/zh-TW/step_5.md new file mode 100644 index 0000000..7e8212e --- /dev/null +++ b/zh-TW/step_5.md @@ -0,0 +1,65 @@ +## 讓貓咪沿著線走 + +您會注意到,如果在兩個平台間畫了一座矮橋或是一條向上的斜坡,貓咪還是最終會穿過平台而不是走在平台上呢! + +![貓咪們走過平台](images/cat-walk-through-platform.png) + +\--- task \--- + +在貓咪的代碼中,在 `下個造型`{:class="block3looks"} 積木之前加入另一個迴圈。 這次,迴圈應告訴貓向上移動` 2 `直到它不碰到藍色為止。 + +![貓咪](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +貓咪應該 `將 y 座標增加2 `{:class="block3motion"}`重複無限次直到`{:class="block3motion"} 它`沒有`{:class="block3motion"}`碰到藍色`{:class="block3motion"} 為止。 + +\--- /hint \--- + +\--- hint \--- + +這是你需要的程式積木: + +```blocks3 + + +change y by (2) + +repeat until <> +end + +not <> +``` + +\--- /hint \--- + +\--- hint \--- + +你的程式看起來應該像這樣: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds +end +delete this clone +``` + +\--- /hint \--- + +\--- /hints \--- \--- /task \--- + +\--- task \--- + +點一下綠色旗幟,然後畫一條向上的斜線。 看看貓咪是否有沿著這條線走。 + +\--- /task \--- \ No newline at end of file diff --git a/zh-TW/step_6.md b/zh-TW/step_6.md new file mode 100644 index 0000000..93a36a8 --- /dev/null +++ b/zh-TW/step_6.md @@ -0,0 +1,89 @@ +## 安全抵達 + +遊戲的目標是畫出一條路徑引導貓咪讓他們能夠平安到達出口的門。 建立一個計分的變數來紀錄有多少隻貓咪到達了門口。 + +\--- task \--- + +建立一個新的變數,稱作`得分`{:class="block3variables"}。 + +![貓咪](images/cat-sprite.png) + +[[[generic-scratch3-add-variable]]] + +\--- /task \--- + +\--- task \--- + +添加代碼,每當有一隻貓咪到達門口時,`分數`{:class="block3variables"} 就加 `1`分。 同時在`點擊綠色旗幟開始遊戲` {:class =“ block3events”}時將`分數` {:class =“ block3variables”}歸` 0 ` 。 + +![貓咪](images/cat-sprite.png) + +\--- hints \--- \--- hint \--- + +`如果` {:class =“ block3control”}貓咪`碰到了門` {:class =“ block3sensing”},將分數`加1 ` {:class =“ block3variables”}。 + +\--- /hint \--- + +\--- hint \--- + +下面是你需要添加到`當分身產生` 區塊的代碼: + +```blocks3 +change [score v] by (1) + +if <> then +end + + + +set [score v] to (0) +``` + +\--- /hint \--- + +\--- hint \--- + +你的程式看起來應該像這樣: + +```blocks3 +when I start as a clone +show +repeat until + move (10) steps + repeat until + change y by (-2) + end + repeat until > + change y by (2) + end + next costume + wait (0.1) seconds ++ if then + change [score v] by (1) + end +end +delete this clone + +when flag clicked + ++ set [score v] to (0) +``` + +\--- /hint \--- + +\--- /hints \--- + +\--- /task \--- + +\--- task \--- + +添加更多代碼,以便讓貓咪到達門時,會發出“喵”的聲音,然後消失。 + +![貓咪](images/cat-sprite.png) + +```blocks3 +play sound (meow v) +delete this clone +``` + +\--- /task \--- \ No newline at end of file diff --git a/zh-TW/step_7.md b/zh-TW/step_7.md new file mode 100644 index 0000000..8597164 --- /dev/null +++ b/zh-TW/step_7.md @@ -0,0 +1,13 @@ +## 挑戰: 更多的障礙 + +目前,這個遊戲還很容易獲勝。 您能想到讓您的遊戲更有挑戰性嗎? + ++ 添加更多背景不同的平台設計。 + ++ 根據顯示的背景變換門的位置。 + ++ 添加更多的角色作為移動障礙。 也許可以考慮設計閒晃的狗或會旋轉的障礙物讓貓能躲開? + ++ 僅允許玩家使用限量的“墨水”在遊戲中畫線。 您可以通過建立一個計時器變數,該變數記錄了按下鼠標的時間來追踪使用了多少“墨水”。 + ++ 創建一個物件來顯示玩家剩餘的墨水量。 \ No newline at end of file diff --git a/zh-TW/step_8.md b/zh-TW/step_8.md new file mode 100644 index 0000000..b137539 --- /dev/null +++ b/zh-TW/step_8.md @@ -0,0 +1,19 @@ +## 下一步 + +試試看[花](https://projects.raspberrypi.org/en/projects/flower-generator?utm_source=pathway&utm_medium=whatnext&utm_campaign=projects)專案,您會在其中使用自訂區塊來建立花的圖案。 + +\--- no-print \--- + +按` f `畫出幾朵花,或` r `畫很多隨機花,或` p `畫出花朵圖案。 + +
+ +
+ +\--- /no-print \--- + +\--- print-only \--- + +![隨機花朵](images/flower-random.png) + +\--- /print-only \--- \ No newline at end of file