發表文章

目前顯示的是 3月, 2019的文章

How to Make a Flyswatter game using Scratch(TM)

Scratch is a simple coding website that shows the code using blocks like “move forward 10 steps” instead of real code language. Today I will show you how to make a simple flyswatter game using Scratch. Step 1: The Flyswatter For your flyswatter game, you might want a flyswatter instead of your mouse. Because there aren’t any flyswatter sprites* in the Scratch sprite library, you will have to draw your own or download an image from the Internet. To make the flyswatter follow your mouse, you can put a “go to mouse-pointer” block in a “forever” block inside a “when green flag clicked**” block. This will cause the flyswatter to infinitely follow your mouse when you run your code. *That’s the word they use for the characters that you add on the screen, not the soda drink. **How you run your code in Scratch. Step 2: The Flies Now that you have a flyswatter, you will need some flies. I suggest you fully code one fly and then use the “duplicate” tool to make more copies. I found