Search Unity

Grid based, snake-like game question.

Discussion in '2D' started by shogan21, Jul 22, 2014.

  1. shogan21

    shogan21

    Joined:
    Sep 25, 2012
    Posts:
    3
    I have an idea for a simple snake like game and I am stumped on the best approach for the main component, the snake. Unlike the typical snake games where the snake "grows" as it eats, I want my snake to be full sized from the start.

    Picture the snake in a hole and only his head is showing. As the player moves the head through the grid, the rest of the body will follow. Here is a picture to help (warning programmer art). http://i.imgur.com/LrfaPhN.png

    The head starts at the blue "hole". The player hits left to put the snake in motion. Then down, etc. and the body follows along from out of the "hole".

    What is the best approach to accomplish this? The only idea I have come up with is adding the body sprites behind the head and as the head is moving the body part will be revealed. I just feel like getting the timing right and getting the desired effect will be more work than necessary. This just doesn't feel like the right approach to me.

    Ideally I would like something similar to the game Flow Free if anyone is familiar with that but where once the movement is started it is continuously in motion.

    If anyone has any advice, links, or questions to better understand my problem, please share.
     
  2. arklay_corp

    arklay_corp

    Joined:
    Apr 23, 2014
    Posts:
    242