# 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.
```python
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
```
Raw data
{
"_id": null,
"home_page": "https://github.com/shanemcdo/pygame_tools",
"name": "pygame-tools",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "pygame 2d-game video-game",
"author": "shanemcdo (Shane McDonough)",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/36/8e/4a382ccb3abc6b2d4e09207f9edb4f972b9080057bde8099f996c1572788/pygame-tools-0.1.6.tar.gz",
"platform": null,
"description": "# PyGame Tools\n\nThis is a package designed to make development in pygame easier my creating some classes that handle alot of the loop\n\n## installation\n\n`pip install pygame-tools`\n\nThe most important class `GameScreen` is a class that represents a 'screen' in the game and is meant to be inherited to be used.\n\n```python\nimport pygame\nfrom pygame_tools import GameScreen, Point\n\nclass Example(GameScreen):\n def __init__(self):\n pygame.init()\n real_size = Point(600, 600) # size of window itself\n size = real_size / 40 # 1 pixel for every 40\n super().__init__(pygame.display.set_mode(real_size), real_size, size)\n\n def update(self):\n pygame.draw.line(self.screen, (255, 255, 255), (0, self.window_size.y / 2), (self.window_size.x, self.window_size.y / 2))\n\nexample = Example()\nexample.run()\n# This example shows a black screen with a white line through the center\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A package to make creating pygame applications much easier",
"version": "0.1.6",
"project_urls": {
"Homepage": "https://github.com/shanemcdo/pygame_tools"
},
"split_keywords": [
"pygame",
"2d-game",
"video-game"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2d5630380cab2e8420d9d438ebc16493025362101b286c056d8d1f60366fe0cc",
"md5": "ebd185d6d4104c10b97cf77ccae1dc88",
"sha256": "7f2b4199caf3ac06a94af09ed12e502e3406b0a2f73169c24c09b0659130ba49"
},
"downloads": -1,
"filename": "pygame_tools-0.1.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ebd185d6d4104c10b97cf77ccae1dc88",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 9895,
"upload_time": "2023-10-05T17:26:47",
"upload_time_iso_8601": "2023-10-05T17:26:47.092489Z",
"url": "https://files.pythonhosted.org/packages/2d/56/30380cab2e8420d9d438ebc16493025362101b286c056d8d1f60366fe0cc/pygame_tools-0.1.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "368e4a382ccb3abc6b2d4e09207f9edb4f972b9080057bde8099f996c1572788",
"md5": "b1412fceda4d6388e670f523680d13d3",
"sha256": "5ea6365c7a85e8cfe27eb34df610bb86d71d9da22a1113222844880e0e220aa7"
},
"downloads": -1,
"filename": "pygame-tools-0.1.6.tar.gz",
"has_sig": false,
"md5_digest": "b1412fceda4d6388e670f523680d13d3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 9634,
"upload_time": "2023-10-05T17:26:48",
"upload_time_iso_8601": "2023-10-05T17:26:48.801659Z",
"url": "https://files.pythonhosted.org/packages/36/8e/4a382ccb3abc6b2d4e09207f9edb4f972b9080057bde8099f996c1572788/pygame-tools-0.1.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-05 17:26:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "shanemcdo",
"github_project": "pygame_tools",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pygame-tools"
}