Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Making a snake game with character graphics and can't figure out how to make the snake's tail move correctly
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
inxrx8




PostPosted: 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



vipee.t
 Description:

Download
 Filename:  vipee.t
 Filesize:  7.64 KB
 Downloaded:  25 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
smool




PostPosted: 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.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: