/Pygame-Projects

Here are some multiplayer/singleplayer games based on pygame and socket communication

Primary LanguagePython

Single-player Gluttonous Snake

This is a single-player version of my first pygame project - gluttonous snake.

I studied pygame by myself and created this project from scratch. Although you cannot play this game with other players, its functions are quite complete: you can play the game over and over; it has background music; you can check your score in the caption, etc.

However, some problems still remain:

1.The speed of the snake is fixed because the snake body is made up of block of fixed sizes. A more complicated algorithm may be adopted (decomposing the snake's body into several rectangles) so that we'll be able to set the speed arbitrarily.

2.Sometimes if you press the keyboard after the snake died the game will be restarted immediately after "Game Over" is shown.

3.The code is not programmed in the most neat way, which decreases its readability.