Great job. You managed to create the snake game using array only. I am sure now you have better understanding about using array.
Many things can be done to improve the performance. But in your case, there is a big issue in your code.
I checked your code, you call TShape.Create to do the drawing. I guess you do not know TShape is class, by calling Create, it will create the object and it needs memory to store it. So you created lots of TShape objects but unfortunately you does not free it. It is not okay.
You should free the TShape object. The code should be put on your TForm1.Delete.
For comparison, rvk's code (for the balls) did not call TShape.Free. That because the total of the balls is static. In your snake game, your code creates a new TShape on Timer1Timer. That's the different.
Basically, there are 2 quick solutions for your case:
- Use canvas rectangle instead of TShape
- Free the shape object by calling TShape.Free
Canvas rectangle is a painting command, it does not create new object and you do not need to free it. Read more about canvas rectangle:
http://wiki.freepascal.org/Drawing_with_canvas