1. Create game display
    • Create and title project
    • Choose background
    • Delete cat sprite
  2. Create snake sprite
    1. Create and name sprite
    2. Resize sprite
    3. Place sprite on screen
    4. Set up a game loop for the snake
    5. Make the snake move in the direction of whatever arrow key is pressed
    6. If the snake touches the edges of the display screen, the game ends
    7. If the snake touches itself (the end of its body), the game ends
    8. Hint 1: Research and use pen extension for snake body

      Hint 2: Define and execute draw, erase, and sensor methods for snake body

  3. Create and display a points table on the screen
    • Set initial score to 0
    • Increase the number of points a user gets by 1 every single time the snake eats an apple
  4. Create apple element
    • Create and name object
    • Resize object
    • Set initial position of apple to outside the game area
    • Make a clone of the apple, and set its location to be random
    • Make a game loop (forever)
    • If the snake touches the apple, make a new clone of the apple and delete the clone that the snake touched
  5. Create clear game instructions to be displayed at the beginning of the game
    • Explain the objective of the game
    • Explain how to play the game
  6. Create display for the end of the game
    • Display the words “Game Over”
    • Display the user’s total points
    • Prompt the user to play again

Previous Section

Intro to Snake Game


Copyright © 2021 Code 4 Tomorrow. All rights reserved. If you would like to use content from any of our courses, you must obtain our explicit written permission and provide credit. Please contact classes@code4tomorrow.org for inquiries.