Creating Snake Using MIT Scratch
This tutorial details the implementation of a version of the classic game Snake using MIT Scratch.
The tutorial is not a line-by-line walk-through of the code but rather an explanation of the concepts that are behind the game.
In this game the player controls a snake on screen. The object of the game is to guide the snake into eating as many apples as possible. Each apple makes your snake grow longer. The game ends if you crash into yourself.
Table of Contents
- Game Design
- Implementing the Game in Scratch
- Dividing the Playing Area into a Grid
- Snake with a Segmented Body
- Moving the Snake at Regular Intervals
- Using the Arrow Keys to Control the Snake
- Calculating the Snake’s Next Position
- Detect if the Snake Eats its Own Tail
- Moving the Apple
- Sound Playback