Skip to main content

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 = Point(real_size.x / 40, real_size.y / 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

Metadata

Release files for pygame-tools 0.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pygame-tools 0.0.9
File Size Uploaded
pygame-tools-0.0.9.tar.gz 7.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pygame-tools 0.0.9
File Interpreter ABI Platform
pygame_tools-0.0.9-py3-none-any.whl Python 3 none any Details

Total release size: 16.2 kB

Release files / pygame-tools-0.0.9.tar.gz

Download URL pygame-tools-0.0.9.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b3e07e1c2bc294ee5f9c231bd71c877d178df33e4c132570c9908c391ff50cb9
BLAKE2b-256 checksum
How to use checksums
d526ffc7b97517d642a59ff8db864ccb5b74ef005e3c48435d47e0472c173c44
Upload date
Uploaded using Trusted Publishing?
What is 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.9

Release files / pygame_tools-0.0.9-py3-none-any.whl

Download URL pygame_tools-0.0.9-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
232594f2b451834bb58ed4f7e4add1695a86cf02440f3b68a87adffc2ff62c53
BLAKE2b-256 checksum
How to use checksums
d961a3f9473b1e14e2a7f72e0e4c38069a6ba2c3ea32cc2ba98dedee503d3cc3
Upload date
Uploaded using Trusted Publishing?
What is 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.9

Release history Release notifications | RSS feed

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.10

1 release file

This release

0.0.9 This release

2 release files

0.0.8

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page