← Teacher guide

Make it yours

Students add sounds with audio.beep where things happen, draw their own sprites in microStudio and draw them with screen.drawSprite, then make and playtest a game of their own and decide how to share it safely.

Games with microStudio · A whole game · about 60 minutes · Open the student lesson

Classroom resources

Load these into Waypoints Prepare: choose Load URL and paste the copied address, or download the file and import it. In Prepare, the worksheet's Teacher edition shows the answers; the student copy hides them.

Students will be able to

Timing

Predict and Run 10 min · Investigate 10 min · Modify 15 min · Make 25 min (or longer as a project)

Before class

Read the unit primer first. Turn sound on (headphones help). audio.beep("C E G") plays notes from text; words such as duration 100, tempo 160, square, saw and sine change how. Sprites are drawn in microStudio's Sprites tab and named there; screen.drawSprite("name", x, y, width, height) draws one (our site's games cannot show students' sprites, so the Modify step has no game on the page). Sharing: a project is private until it is made public; a public project can be played and copied by anyone from microStudio's Explore page, under the student's nickname. Decide your rule before the lesson (for example: publish only with your OK, nicknames only). Guest projects are deleted after about 15 days, so guests should make an account or keep a copy of their code. The Make step can run as a longer project; the Python pathway's For teachers notes suit a showcase.

Running the lesson

  1. Predict: count t up in 60s on the board; circle the multiples of 60.
  2. Investigate: ask why a beep in draw() would be a bad idea, then let one student try it.
  3. Modify: show the Sprites tab on the projector; 16 × 16 pixels is enough.
  4. Make: playtest in pairs: the player plays without being told how, the maker watches and writes down one change.

The hard part (on purpose)

Finishing: a game of their own is open-ended. Agree a small goal first (one change to the rules, own sprites, two sounds), then add.

When students get stuck

What you will seeA question to askThe fix
The sprite does not show.Is the name in drawSprite exactly the sprite's name in the Sprites tab?Use the same name, in lower case, in quotes.
The sound plays over and over.Is the beep in draw(), or in an if that is true for many frames?Move it into update(), in the if where the thing happens once.
No sound at all.Has the game been clicked, and is the sound on?Browsers only allow sound after a click in the page.
Their guest project has gone.Did they make an account, or keep a copy?Guest projects are deleted after about 15 days; make accounts for longer work.

Answers to the checks

  1. Predict: What do you hear while this game runs?
    Three notes once a second. t goes up 60 times a second, and t % 60 == 0 is true only when t is 60, 120, 180... : once every second.
  2. Where does the sound go?: Where is the best place for a sound when a life is lost?
    In update(), in the if that takes the life
    A sound belongs where the thing happens, once. draw() runs 60 times a second, so a beep there would play over and over.
  3. Draw a sprite: You drew a sprite called star in the Sprites tab. Which line draws it where the star is?
    screen.drawSprite("star", self.x, self.y, 12, 12)
    screen.drawSprite takes the sprite's name, where to draw it, and how big. It replaces the fillRound line in the star's draw().
  4. Sharing safely: You publish your game on microStudio so anyone can play it. What should you leave out?
    Your full name, school, photo and anything else that says who or where you are
    A public game can be played and copied by anyone. A nickname is fine; anything that identifies you or where you are is not.
  5. Where this leads: Your game needs a level 2 where the stars fall faster. What is the smallest change?
    A level variable, and a speed in each star that is multiplied by it
    One variable for the level, used where the speed is set, gives level 2, 3 and 10 for free. Copying the game would double every later fix.

Stretch and support

Stretch: Add a title screen: a mode variable ("title", "play", "over") that update() and draw() check first.

Support: Start the Make step from the catching game and change only the sprites, the sounds and one rule.

Exit ticket

Why does a catch sound go in update() and not in draw()?

It should play once, when the catch happens; draw() runs every frame, so a sound there would repeat 60 times a second.

What each step is for

Where it leads

The Python pathway's other extensions (data, web apps) use the same Python. microStudio's Help tab covers maps, music and multiplayer; Godot's GDScript is a natural next engine.