i am trying to figure our how to make a snake like tail for a XNA game. The snake it self is a sprite of 34×20 pixel, and my sprite of the tail is a 34×20 sprite.
But i am having problems finding a way to create a tale on.
My first idea is to make it tile based, and the remember the visited tiles, to a limit of the tail length. but this will make the tail lag, so after the snake have left the tile will there be a tail.
Do any one have an idear that i can make a tail of X length that follows the snake smooth, in an XNA game?
The snaked movement is based on pixel location, and can not stop, only change direction!
Nick Gravelyn wrote Sammy the Snake for XNA sometime ago (albeit in XNA 3), but I think that you’ll find this most useful for your game.
In this example, he uses
List<Point>to store the body points, which makes it very easy to add new body parts:Then, when it comes to rendering, you can simply loop through the body points: