/pygame

Primary LanguagePython

Monster Catching Pygame


📖 About the project

This is my first solo project using Python. This PyGame has two modes, single player and multi player. This monster catching game has five levels, the higher the level, the more monsters. Score is shown of the top left corner and level on the top right corner.

🛠️ Used Technologies

Python

📋 Preview

👇 Single player game

multiplay

👇 Multi player game

singleplay


🕹 How to run

  1. Fork this respository
    Click the Fork button on the upper right-hand side of this repository's page.
  2. Clone the repository
    Under the repository name, click on the code button and copy the clone URL for the repository.
  3. Run the file
python -m pip install pygame

Open the file on Visual Studio Code and run

💻Usage

class Block(pygame.sprite.Sprite):
    def __init__(self, image, pos):

        pygame.sprite.Sprite.__init__(self)
        self.image = image
        self.rect = self.image.get_rect()
        self.rect.center = pos
    def update(self, height, width): # boundary for monsters
        if self.rect.x > width or self.rect.x < 0 or self.rect.y > height or self.rect.y < 0:
            self.rect.x = random.randint(0, 490)
            self.rect.y = random.randint(0, 490)

📔 License

This project is under MIT license. See the license for more information.