Recently I have been working on a bunch of random projects, havent completed anything and they have ranged from top down shooters, asteroids style games, match 3 games etc. So I decided to screw all the complicated designs and just make a complete snake game real quick, however I then realized I HAVE NO IDEA how to properly design a snake game.
I know there is no “right” way to design it but I cant even figure out any way to do it. The way I have been trying to do it is without a grid just using bounding boxes for collisions and having the snake move at a fixed distance every couple of frames or so. Why would I need a grid?
My current design is working, but it seems like its stupid. It is basically a Snake which is made up of a list of Body parts, each update I save the head’s old position, update the head, and then loop through each of the Body parts from the end of the list to the front and set each body part to the location of the one next to it, and if its the first element in the array I set it to the “old head” position. It works but seems sloppy or hacked together.
But anyways, how would you guys design this seemingly simple game?