Turing Snake Movement Problem
Author |
Message |
iowndd
|
Posted: Sun Jun 17, 2012 1:51 pm Post subject: Turing Snake Movement Problem |
|
|
What is it you are trying to achieve?
I am trying to make a snake game, where the snake moves based on the user's key inputs. The snake will also eat food after which it will grow and the food position will be randomized.
What is the problem you are having?
The snake is not moving even though the specified boolean's and if statements are set up.
Describe what you have tried to solve this problem
I have tried to proof read my code but sadly no luck, it might be a small problem that I am having that I am not aware of.
Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
My code is in the attachments section
Turing: |
<Add your code here>
|
Please specify what version of Turing you are using
I am using Turing version 4.1 most likely
Description: |
|
Filesize: |
1000 Bytes |
Viewed: |
2355 Time(s) |

|
Description: |
|
Filesize: |
884 Bytes |
Viewed: |
2355 Time(s) |

|
Description: |
|
 Download |
Filename: |
Example2.t |
Filesize: |
3.78 KB |
Downloaded: |
108 Time(s) |
|
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Dreadnought
|
Posted: Sun Jun 17, 2012 2:44 pm Post subject: Re: Turing Snake Movement Problem |
|
|
When in the game loop do you actually draw the snake?
|
|
|
|
|
 |
iowndd
|
Posted: Sun Jun 17, 2012 3:06 pm Post subject: Re: Turing Snake Movement Problem |
|
|
I don't draw it inside the loop, I draw it before
for i : 30 .. (30 + body_size)
Pic.Draw (snake_body (i), snake_x (i), 200, picCopy)
end for
Right there
|
|
|
|
|
 |
Raknarg

|
Posted: Sun Jun 17, 2012 3:35 pm Post subject: RE:Turing Snake Movement Problem |
|
|
So... You never update the snakes position, right? How do you expect it to move when you only drew it once?
|
|
|
|
|
 |
Dreadnought
|
Posted: Sun Jun 17, 2012 3:43 pm Post subject: Re: Turing Snake Movement Problem |
|
|
Imagine the screen is a piece of paper.
You draw a circle on it.
Should the circle move around for any reason?
|
|
|
|
|
 |
iowndd
|
Posted: Sun Jun 17, 2012 3:47 pm Post subject: Re: Turing Snake Movement Problem |
|
|
Oh I see, that was a dumb mistake, thank you for the help
|
|
|
|
|
 |
|
|