In this project, we're going to dance game. The more you dance, the more awesome it gets!
1) Go to the link below and click "Remix" at the top. This will get us our Dancer and all of his costumes. Feel free to make your own if you prefer!
2) Choose a background for your dancer to dance in. Make sure to set your dancer to start in the correct position. Also choose your music and make it auto-repeat!
3) Animate your dancer!
4) Add the "Video Sensing" library to your project. You can add libraries by clicking the bottom left icon in Scratch. We are going to use the "Camera Motion on Stage" block! This block tells us how much motion (like dancing) your camera can see! We recommend you set video transparency to 100%.
Okay, now make a list. Over and over again, add the current camera motion value to the list. If the list gets too big, maybe more than ten, remove the oldest number.
Test! What do you think of the numbers? What are the highest and lowest numbers you see? What number is most common? Does anything seem strange? Why?
5) We need to figure out how to measure the amount of dancing you are doing. The list shows us what we get! Hmm, the numbers are very chaotic. Dancing is messy, who knew? We need to figure out a way to smooth the numbers a little, just so our game doesn't stop and start jarringly. There are two options:
A) We can calculate an average from our list. Averages change more slowly and thus we'll have better control over what happens in our game,
B) We can use a rolling maximum: the highest in our list at any given time. Since every number in the list stays for a while, a single large number may stay the maximum for some time, also giving us control over our game.
Choose one option, and figure out how to calculate the value!
6) Using your calculation, make your dancer dance faster or slower based on how much you dance!
7) When you dance a lot, more dancers! When you stop dancing, make them go away. No clones for non-dancers!
8) From here, it's all you! Add as many strange and fun effects as you like. Make the screen go crazy the more you dance!
Bonus) Remember when you chose either to calculate the average or the maximum? Copy your project and change it to do it the other way. Which way was better? Why do you think that is?