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
Release history Release notifications | RSS feed
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.1.tar.gz
(9.2 kB
view hashes)
Built Distribution
Close
Hashes for pygame_tools-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7020b60e607b35d33008534d2860db51e8fe835500e5e52ed23a93c3eea0e47 |
|
MD5 | 2b6f15012bdea647da7a9c5955ce5cd9 |
|
BLAKE2b-256 | 4ff8e987b8091a94dc935813d74bdb8efe1268f1bcf2614910873d885db8f808 |