Run in turbo mode. Use arrow keys or WASD Note: This game has intentionally been slowed down by using a wait block. You can modify or remove this block if you wish.
This project is a replica of the classic game Snake! It was built by @peppermintpatty5 in Scratch 1.4, using only 1 sprite and 1 script. The way this project works is by using a list to hold the data for all 2,596 cells. When the head of the snake moves on the screen, it replaces the corresponding 0 in the list with its length value. After each move, all values in the list that are greater than 0 are reduced by 1. So, a length of x will take x moves to be erased. However, checking all the values in the list would take too long. Therefore, a caching system has been implemented to only perform calculations on cells that have been modified recently. The preceding system combined with a simple keystroke monitor produces one compact script that runs efficiently.