Skip to main content

A package to make creating pygame applications much easier

Project description

PyGame Tools

This is a package designed to make development in pygame easier my creating some classes that handle alot of the loop

installation

pip install pygame-tools

The most important class GameScreen is a class that represents a 'screen' in the game and is meant to be inherited to be used.

import pygame
from pygame_tools import GameScreen, Point

class Example(GameScreen):
    def __init__(self):
        pygame.init()
        real_size = Point(600, 600) # size of window itself
        size = real_size / 40 # 1 pixel for every 40
        super().__init__(pygame.display.set_mode(real_size), real_size, size)

    def update(self):
        pygame.draw.line(self.screen, (255, 255, 255), (0, self.window_size.y / 2), (self.window_size.x, self.window_size.y / 2))

example = Example()
example.run()
# This example shows a black screen with a white line through the center

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygame-tools-0.1.6.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

pygame_tools-0.1.6-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file pygame-tools-0.1.6.tar.gz.

File metadata

  • Download URL: pygame-tools-0.1.6.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.17

File hashes

Hashes for pygame-tools-0.1.6.tar.gz
Algorithm Hash digest
SHA256 5ea6365c7a85e8cfe27eb34df610bb86d71d9da22a1113222844880e0e220aa7
MD5 b1412fceda4d6388e670f523680d13d3
BLAKE2b-256 368e4a382ccb3abc6b2d4e09207f9edb4f972b9080057bde8099f996c1572788

See more details on using hashes here.

File details

Details for the file pygame_tools-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: pygame_tools-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.17

File hashes

Hashes for pygame_tools-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7f2b4199caf3ac06a94af09ed12e502e3406b0a2f73169c24c09b0659130ba49
MD5 ebd185d6d4104c10b97cf77ccae1dc88
BLAKE2b-256 2d5630380cab2e8420d9d438ebc16493025362101b286c056d8d1f60366fe0cc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page