Simon (0s1s!)

Here’s a game that’s simple to play. It has no sprites and just one script! In the movie below, I demonstrate how to start playing the game…

If you look at the script, you can find some wonderful and elegant commands. Here are just a few for you to think about:

1.
The commands below cause the “<Space> to start” screen to dim and brighten. How do the commands achieve this effect? (Hint! timer counts elapsed time in tenths of a second. sin is a special element called a trigonometric function; no matter what values come immediately after sin of — in this case sin of timer * 200 —  the result is always a number between -1 and 1. The rest is up to you to figure out!)

2.
The commands below detect that you’ve clicked.

3.
The commands below detect where you’ve clicked. How does JSO figure out which button you’ve clicked on?

4.
The commands below describe which button to light up and which note to play. How do they work?

Hints!

  • JSO has created 4 images called light1, light2, light3, and light4. Each image shows one of the keys brighter than the others to indicate that it was pressed.
  • Also, JSO has created a variable list called notes which contains the four different sounds played by the four keys.

Simon (0s1s!) was created by JSO. You can see more of JSO’s work at http://scratch.mit.edu/projects/JSO.