AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Dance routines

Week 10 · Unit 4: Be a designer · 3 lessons
3

Plan a dance show

Computing 3: Unit 4, pp. 60–78
GoalPlan, build and test a two-sprite dance routine, with resets, a static object and matching times.
New words
plan · to decide what to do before you starttest · to run a program and check that it worksimprove · to make something better
Explanation

A good project starts with a plan. Choose two sprites and a backdrop. Write the steps for each sprite in a table. Start each script with the same event and a reset. Check that the two routines take the same time. Add a static object if you like. Then test: do they start together, finish together and begin in the same places each time? Last, improve the program by joining blocks that repeat, or by using a repeat block, so it is concise.

FishCrab
Startspace keyspace key
Resetgo to x: −80, y: 0go to x: 80, y: 0
Movesup 1 s, down 1 s, twiceturn 90°, wait 1 s, four times
Time4 seconds4 seconds
Worked examples
Fishwhenspacekey pressedgo to x:-80y:0glide1secs to x:-80y:50glide1secs to x:-80y:0repeat2Crabwhenspacekey pressedgo to x:80y:0turn ↻90degreeswait1secondsrepeat4
Here are the scripts from the plan. The fish goes up and down twice. Each glide takes 1 second, so the fish takes 4 seconds. The crab turns 90 degrees and waits 1 second, four times. It takes 4 seconds, and it ends facing the way it started.
whenspacekey pressedgo to x:-80y:0glide1secs to x:-80y:50glide1secs to x:-80y:0glide1secs to x:-80y:50glide1secs to x:-80y:0
The first plan for the fish had no repeat block. It had two ups and two downs, 4 glide blocks, plus the go to and the hat: 6 blocks. With the repeat it has 5 blocks. The same dance, fewer blocks.
Test the show. Press the key and watch: do both sprites start together? Do they stop at the same time? Press the key again: do they begin from their start places? If something is wrong, find the block that causes it, edit it, and test again.
Class activity

Dance show on paper (with a friend): plan a routine for two sprites in a table like the one above. Write the start event, the reset, the moves and the total time for each. Check that both times match, or add a wait. Then act the show out, one of you for each sprite. Does it work? Improve your plan and try again. If you have a computer or tablet, build it in Scratch.

Practice
1
A kite and an owl start together. Do their scripts finish together? If not, how can you fix it?
Kitewhenspacekey pressedgo to x:-100y:0glide1secs to x:-100y:80glide1secs to x:-100y:0repeat3Owlwhenspacekey pressedgo to x:100y:0turn ↻180degreeswait2secondsrepeat2
2
The crab’s repeat is changed to 3. What happens? How can we fix it?
whenspacekey pressedgo to x:80y:0turn ↻90degreeswait1secondsrepeat3
3
Which blocks make sure the dancers start in the same places each run?
4
Name two things to check when you test a dance show.