← Code

Games with microStudio

Make a real game in Python on microStudio, a free game engine in the browser: a game loop, keys, stars as objects, catching and scoring, then sprites, sound and sharing.

Start1. A game loop

The game loop

init, update and draw: how every game engine runs, and moving with the keys.

1A game loopNot started

Every game engine runs your game in a loop: init once, then update and draw about 60 times a second. Make a ball move across the screen in microStudio.

  1. Predict
  2. Run
  3. Investigate › When does each run?
  4. Investigate › How far?
  5. Investigate › Spot the bug
  6. Modify › Up, not across
  7. Modify › Bounce
  8. Something that moves
  9. Where this leads
Start lesson
2Keys and movementNot started

A whole game

Stars as objects, catching them for points, then sprites, sound and sharing what you made.

3Stars as objectsNot started

Bring the Star class from Objects with turtles into a game engine: each star moves itself in update() and draws itself in draw(). Change colours and numbers, then add a class of your own.

  1. Predict
  2. Run
  3. Investigate › Turtle to engine
  4. Investigate › Match the lines
  5. Investigate › Spot the bug
  6. Modify › A colour each
  7. Modify › More stars
  8. Another class
  9. Where this leads
Start lesson
4Catch and scoreNot started

Put the paddle and the stars together: a star that touches the paddle scores a point and starts again. Add lives, a game over and a restart, then a power-up of your own.

  1. Predict
  2. Run
  3. Investigate › Close enough
  4. Investigate › Why restart?
  5. Investigate › Spot the bug
  6. Modify › Lives
  7. Modify › Play again
  8. A power-up
  9. Where this leads
Start lesson
5Make it yoursNot started

Add sound with audio.beep, draw your own sprites in microStudio's sprite editor, then finish a game of your own and decide how to share it safely.

  1. Predict
  2. Run
  3. Investigate › Where does the sound go?
  4. Investigate › Draw a sprite
  5. Investigate › Sharing safely
  6. Modify › Your own sprites
  7. Modify › Your own sounds
  8. Your game
  9. Where this leads
Start lesson

Progress is saved in this browser only. Nothing is sent anywhere.

For teachers: Teacher guide (notes, answers, solutions, slides and worksheets)