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
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
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.0.2.tar.gz
(6.0 kB
view hashes)
Built Distribution
Close
Hashes for pygame_tools-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f5fece0a1f7c9718c84b788fdf679a8e9b1c00b2563a94e036b3e34383c6a1d |
|
MD5 | 18b3fdc851cfa2237e65fc63c4669edf |
|
BLAKE2b-256 | 6a5dd146c2fe51a39d88268ddaebf11d2b74dd6c561aa4fe624bc37cf596d1fe |