Mail Archives: djgpp/1999/01/09/21:00:58
In comp.os.msdos.djgpp, pjotr wrote:
> On Sat, 9 Jan 1999 16:31:34 -0000, arganoid AT fatal-design DOT com (Andrew
> R. Gillett) wrote:
>
> >In comp.os.msdos.djgpp, Ben Dowling wrote:
> >> I am writing a game called wormies, it is a snake
> >> clone, but I don't know how to make the snake
> >> grow! Could any one help me?
> >
> >How far have you got with the game so far? Presumably you must have a
> >variable which contains the length of the snake, otherwise how do you
> >know how much snake to draw on the screen?
>
> Wouldn't a simple array be sufficient? where snakepos[0] holds the
> snake's head position and snakepos[length_of_snake] holds the tail.
Good idea. If I was going to write a snake game, that's how I'd do it.
--
Andrew Gillett http://argnet.fatal-design.com/ ICQ: See homepage
You will meet a tall dark stranger. Unfortunately he's holding a large gun.
Run for it!
- Raw text -