I've been thinking of this for quite some time (3 hours), and I can't seem to understand how it work. I've managed to come up with an algorithm that only allows logical movements(you can only turn left or right from your current direction). Here're what I need help with:
1) how to keep generating blocks inside the game loop that allows the snake to swallow?
2) how to add the block to the end of the snake, and make it follow it when it moves?
These are my current problem. I believe this would be pretty useful, as it seems pretty similiar to creating 2d or 3d trails. :)
Please help, and thanks in advance!
1) how to keep generating blocks inside the game loop that allows the snake to swallow?
2) how to add the block to the end of the snake, and make it follow it when it moves?
These are my current problem. I believe this would be pretty useful, as it seems pretty similiar to creating 2d or 3d trails. :)
Please help, and thanks in advance!