/anim-snake-pygame

animated snake game

Primary LanguagePython

Snake Game made with pygame 1.9.6 and python 3.8.4

Whats special about this game is that the snake is a series of simple png images

To play the game just make sure you're using python > 3.8 and pygame > 1.9.6

This is the second pygame game i make, i enjoy working on such projects because i learn a lot and have to solve different problems in the process.

I am not an experimented programmer so please help me improve by sending me comments and feedback at idriss.el.moussaouiti@gmail.com

functionnalities in the game

  • The snake is made of different png images, there are 3 different types of snake parts
    1. the head, with mouth open or closed and in different directions
    2. the tail in all 4 directions (up, down, left and right)
    3. the corners, when the snake change it's direction
    4. the middle parts (5 squares) for randomness
  • the snake opens it's mouth when it eats
  • you can control the speed of the snake
  • i added some difficulty to the game, after 30 moves the food changes positions. there is a blue pointer on the right to indicate the number of moves
  • if you lose, a menu appears with your current score, your highscore and a new game button

please note that the game sometimes uses between 15 and 20 percent of cpu ressources (i use an i5 9300h), i have not been able to identify the reason but i think it's a pygame problem. So if you know a solution please let me know.

Idriss El Moussaouiti