[A83] Re: nibbles / snake
[Prev][Next][Index][Thread]
[A83] Re: nibbles / snake
> 3) Do I use a collision detection routine to check
> if the snake touches an apple?
Write a collision routine that checks the the borders around the apple, with
the borders around the first snake section. There's many ways to write a
collision routine, and I would write out a simple algorithm for yourself
first.
Here's a diagram of an 8x8 sprite:
x,y _________ x+8,y
| |
| |
| |
x,y+8|_________|x+8,y+8
Then check if the snake head hits between or on any of those corners.
----------------------------
Colin Hart
Xempest@aol.com