>Move The Growing Creature But Do Not Collide
Move the Growing Creature But Do Not collide is a classic "first game" clone. The logic for the game is fairly straightforward and the gameplay itself is very simple. Simply move the creature around the board and try not to hit any of the walls or it's ever growing tail.
This game is typically made using "grid style" movement. What that means is that the board is split up into a series of squares and the creature moves from square to square within the grid. This makes it very easy to move and check for collision because you just move from square to square and only one piece can occupy a given square in the grid. Since that method has been done so many times, I took a different route with Move the Growing Creature But Do Not Collide. The creature in this game is "free moving" so that means the movement and more importantly the tail pieces that follow have a new layer of complexity.
The tail pieces "follow" the head by moving through a series of waypoints. As the head changes to a new direction, a waypoint is given to each tail piece and they move towards that waypoint. This forces the tail pieces to then follow the exact same path as the head. This is the type of movement that might be used in an old school RPG with your party member following behind you across the map.
So how does it play?
The gameplay for "Move the Growing Creature but do not Collide" is fairly simple and pretty familiar. Your creature begins moving and continues moving in whatever you direction you press on the thumbstick. Random tail sections appear on the board. Moving over those tail sections will cause your creature's tail to grow. Collect as many tail pieces as possible to increase your score and attempt to not collide with any of the walls or any of your tail sections following behind. The longer your tail grows, the higher the score you will achieve.
Keyboard:
Left Thumbstick - Move the creature in the left, right, up or down direction
Start Button - Start/restart the game
Back Button - Exit the game
What kinds of things can you learn from the source code?
My goal for this game was to provide a good example of a simple game you can make using basic game development concepts. The game uses the concept of game state, basic player input via the gamepad and simple sprite movement and basic collision detection to make a fully functional game. The code itself is fairly readable and should be a good resource for you as you continue to explore game development with XNA Game Studio.
Take a look at the code play with it and most of all, make sure you are having fun!