Computer Science Canada

Making a snake game with character graphics and can't figure out how to make the snake's tail move correctly

Author:  inxrx8 [ Wed Oct 10, 2018 11:09 am ]
Post subject:  Making a snake game with character graphics and can't figure out how to make the snake's tail move correctly

What is it you are trying to achieve?
I am trying to make a Snake-type game where the player controls a snake that has a certain length, and the tail will follow the head, if that makes sense.

What is the problem you are having?
I can't get the tail to properly follow the head, the best I've been able to do is a fixed vertical line that remains the same distance below the head

Describe what you have tried to solve this problem
I've tried using a single array that contains the row and column locations of each segment of the tail

Please specify what version of Turing you are using
Turing 4.1.1

Author:  smool [ Fri Oct 19, 2018 10:32 am ]
Post subject:  RE:Making a snake game with character graphics and can\'t figure out how to make the snake\'s tail move correctly

the array is a good start!

What youll want to do is save the previous N locations of the head. This will let you accurately draw a tail of length N.


: