[A83] Re: nibbles / snake


[Prev][Next][Index][Thread]

[A83] Re: nibbles / snake



I am currently in the process of a snake game, and here is how I am doing it.

A list can be a bad way to keep the coords, as it can be very long and you 
have to mess with nasty coordinates.

I have a tilemap of the whole screen which is first loaded by the level.  
Then, when the snake moves, that tile is changed to the following:
2 - if snake is going up next tile
3- if snake is going left
4- down
5- right

0 is blank and 1 is the level.  Then, you just keep track of where the tail 
is, and update it according to the next tile.  Checking is also easy, just 
check the next tile and if it is >1 then die!!! =)

Need any more help? shout out an email

-joel