Posted: Wed Apr 20, 2005 11:17 pm Post subject: 'snake' help
okay... new problem
when I touch teh mouse, Im suppsoed to grow bigger, I know how to get my guy to grow bigger... but how do I get it so that when my 'head' tuns, the other sections dont all turn right away?
hope sombody knows what I'm talking about
Sponsor Sponsor
[Gandalf]
Posted: Thu Apr 21, 2005 1:23 am Post subject: (No subject)
Am I understanding correctly when I assume 'mouse' is like a dot or whatever the snake eats? OK.
I strongly suggest going to the ''tutorials" section and doing a search on collision detection. You will probably be using whatdotcolour or Math.Distance.
Cervantes
Posted: Thu Apr 21, 2005 7:06 am Post subject: (No subject)
Not even. Snake works on a grid system. So determining whether the snake is over top of the mouse is as simple as checking if the snake.x = the mouse.x and the snake.y = the mouse.y. It's also as complex as checking if the snake.x + the snake.dir = the mouse.x and the snake.y + the snake.dir = the mouse.y.
Chaos_Theory
Posted: Thu Apr 21, 2005 11:58 am Post subject: (No subject)
Cervantes wrote:
Not even. Snake works on a grid system. So determining whether the snake is over top of the mouse is as simple as checking if the snake.x = the mouse.x and the snake.y = the mouse.y. It's also as complex as checking if the snake.x + the snake.dir = the mouse.x and the snake.y + the snake.dir = the mouse.y.