Search

NEW

Worm Python Game

Worm Python Game

GitHub Repository

Author: Arvin Javaheripur
Created: November 2023
License: GNU General Public License V3.0


Overview

This is a classic snake-style game implemented in Python with the Pygame library. Players control a worm that grows longer by eating food items appearing randomly on the screen. The objective is to avoid running into the walls or the worm’s own body and getting the highest score you can. It features a resizable grid, customizable game speed, and smooth movement.


Features

  • Classic snake/worm gameplay with smooth controls.
  • Incremental worm growth upon eating food.
  • Collision detection with walls and self.
  • Score tracking displayed on screen.
  • Simple and clean graphical interface using Pygame.

Screenshot

Worm Game Screenshot

Gameplay showing the worm navigating the grid.


How it Works

  1. Use arrow keys to control the direction of the worm.
  2. The worm continuously moves forward in the current direction.
  3. When the worm eats food (an apple), it grows longer and the score increases.
  4. The game ends if the worm hits the boundaries or itself.
  5. The final score is displayed, and the player can restart or exit.

Installation and Running

Try it yourself! You can eather download it from the GitHub page or die! Follow these steps:

1
2
3
4
git clone https://github.com/ajavaheripur/worm-python-game.git
cd worm-python-game
pip install pygame
python main.py