locked
Making a snake game RRS feed

  • Question

  • Hi i am trying to create a snake game.

    I can make a head that moves, but i am at a loss when trying to make an actual snake.

     

    How do keep track of the snakes body? i have seen some sample C++ code but i need a more theorethical explaination to understand the "why's" of it all.

     

    Can anyone help me?

    Saturday, November 20, 2010 7:41 PM

Answers

  • hmm...

    you could try to set up an array which consists of where the points in the body are, and use a variable as the point where the snake turns. If you need to just get the body to follow the head, i guess you could just set up a seperate array for the whole screen, and mark where the snake is


    ~~AirWaves!!~~
    Sunday, November 21, 2010 7:11 AM

All replies

  • I don't personally know, but there is a game, made by Davey-Wavey:

    Import Code: VHG623


    ~~AirWaves!!~~
    Saturday, November 20, 2010 7:45 PM
  • Thanks, but i still have the same problem =/
    Saturday, November 20, 2010 11:13 PM
  • hmm...

    you could try to set up an array which consists of where the points in the body are, and use a variable as the point where the snake turns. If you need to just get the body to follow the head, i guess you could just set up a seperate array for the whole screen, and mark where the snake is


    ~~AirWaves!!~~
    Sunday, November 21, 2010 7:11 AM