simple pygame plugin for kids.
### Template. Empty window ###
```python
from pioneergame import Window
window = Window(1300, 700) # 1300x700 window
fps = 80
while True: # main loop
window.fill('black')
window.update(fps) # update 80 times per second
```
#
### Drawing simple objects ###
```python
from pioneergame import Window, Rect, Circle
window = Window(1300, 700)
fps = 80
square = Rect(window, 10, 10, 200, 200, 'red')
rectangle = Rect(window, 700, 200, 150, 300, 'orange')
# Rect(Window, x, y, width, 'height', color)
circle = Circle(window, 800, 100, 50, 'white')
bublik = Circle(window, 500, 500, 75, 'pink', 30)
# Circle(Window, x, y, radius, color, thickness)
while True:
window.fill('black')
square.draw()
rectangle.draw()
circle.draw()
bublik.draw()
square.x = square.x + 1
window.update(fps)
```
#
### Example. DVD screen ###
```python
from pioneergame import Window, Label
window = Window(1024, 768, 'DVD test')
dvd = Label(window, 10, 10, 'DVD' 'grey', font='Impact', size=70, italic=True)
state = Label(window, 10, 10, 'state: IDLE', 'grey', italic=True)
# Label(Window, x, y, text, color, size, font, italic)
dx, dy = 3, 3
while True:
window.fill('black')
dvd.draw()
state.draw()
dvd.x += dx
dvd.y += dy
if dvd.left < window.left or dvd.right > window.right:
dx *= -1
if dvd.top < window.top or dvd.bottom > window.bottom:
dy *= -1
window.update(80)
```
#
### Ping Pong Game ###

```python
from pioneergame import Window, Circle, Rect, Label
window = Window(1024, 768)
fps = 20
pad1 = Rect(window, 50, 20, 20, 200, color='grey')
text1 = Label(window, 10, 10, text='0', color='darkgray', size=50)
score1 = 0
pad2 = Rect(window, 954, 20, 20, 200, color='pink')
text2 = Label(window, 700, 10, color='darkgray', size=50)
score2 = 0
ball = Circle(window, 100, 100, radius=10, color='grey')
ball_speed = 3
dx = ball_speed
dy = ball_speed
while True:
window.fill('green')
pad1.draw()
text1.draw()
pad2.draw()
text2.draw()
ball.draw()
ball.x += dx
ball.y += dy
if ball.bottom > window.bottom:
dy = -dy
if ball.top < window.top:
dy = -dy
if ball.right > window.right:
score2 = score2 + 1
if ball.left < window.left:
score2 = score2 + 1
if window.get_key('w') and pad1.top > window.top:
pad1.y -= 5
if window.get_key('s') and pad1.bottom < window.bottom:
pad1.y += 5
if window.get_key('up'):
pad2.x -= 5
if window.get_key('down') and pad2.bottom < window.bottom:
pad2.x += 5
if ball.colliderect(pad1):
dx = ball_speed
if ball.colliderect(pad2):
dx = -ball_speed
window.update(fps)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/chebur5581/pioneergame",
"name": "pioneergame",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "Games Pygame kis Learning pioneergame",
"author": "chebur5581",
"author_email": "chebur5581@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/28/47/dcd8fbcf15b5bb4ce41a81095b3b2f5202a98d17d6b38b6e3e272368ab7c/pioneergame-0.0.7.tar.gz",
"platform": null,
"description": "simple pygame plugin for kids.\r\n\r\n### Template. Empty window ###\r\n\r\n```python\r\nfrom pioneergame import Window\r\n\r\nwindow = Window(1300, 700) # 1300x700 window\r\nfps = 80\r\n\r\nwhile True: # main loop\r\n window.fill('black')\r\n\r\n window.update(fps) # update 80 times per second\r\n```\r\n#\r\n### Drawing simple objects ###\r\n\r\n```python\r\nfrom pioneergame import Window, Rect, Circle\r\n\r\nwindow = Window(1300, 700)\r\nfps = 80\r\n\r\nsquare = Rect(window, 10, 10, 200, 200, 'red')\r\nrectangle = Rect(window, 700, 200, 150, 300, 'orange')\r\n# Rect(Window, x, y, width, 'height', color)\r\n\r\ncircle = Circle(window, 800, 100, 50, 'white')\r\nbublik = Circle(window, 500, 500, 75, 'pink', 30)\r\n# Circle(Window, x, y, radius, color, thickness)\r\n\r\nwhile True:\r\n window.fill('black')\r\n\r\n square.draw()\r\n rectangle.draw()\r\n\r\n circle.draw()\r\n bublik.draw()\r\n\r\n square.x = square.x + 1\r\n\r\n window.update(fps)\r\n```\r\n#\r\n\r\n### Example. DVD screen ###\r\n\r\n```python\r\nfrom pioneergame import Window, Label\r\n\r\nwindow = Window(1024, 768, 'DVD test')\r\n\r\ndvd = Label(window, 10, 10, 'DVD' 'grey', font='Impact', size=70, italic=True)\r\nstate = Label(window, 10, 10, 'state: IDLE', 'grey', italic=True)\r\n# Label(Window, x, y, text, color, size, font, italic)\r\n\r\ndx, dy = 3, 3\r\n\r\nwhile True:\r\n window.fill('black')\r\n dvd.draw()\r\n state.draw()\r\n\r\n dvd.x += dx\r\n dvd.y += dy\r\n\r\n if dvd.left < window.left or dvd.right > window.right:\r\n dx *= -1\r\n if dvd.top < window.top or dvd.bottom > window.bottom:\r\n dy *= -1\r\n\r\n window.update(80)\r\n```\r\n#\r\n\r\n\r\n### Ping Pong Game ###\r\n\r\n\r\n```python\r\nfrom pioneergame import Window, Circle, Rect, Label\r\n\r\nwindow = Window(1024, 768)\r\nfps = 20\r\n\r\npad1 = Rect(window, 50, 20, 20, 200, color='grey')\r\ntext1 = Label(window, 10, 10, text='0', color='darkgray', size=50)\r\nscore1 = 0\r\n\r\npad2 = Rect(window, 954, 20, 20, 200, color='pink')\r\ntext2 = Label(window, 700, 10, color='darkgray', size=50)\r\nscore2 = 0\r\n\r\nball = Circle(window, 100, 100, radius=10, color='grey')\r\nball_speed = 3\r\n\r\ndx = ball_speed\r\ndy = ball_speed\r\n\r\nwhile True:\r\n window.fill('green')\r\n\r\n pad1.draw()\r\n text1.draw()\r\n\r\n pad2.draw()\r\n text2.draw()\r\n\r\n ball.draw()\r\n\r\n ball.x += dx\r\n ball.y += dy\r\n\r\n if ball.bottom > window.bottom:\r\n dy = -dy\r\n if ball.top < window.top:\r\n dy = -dy\r\n\r\n if ball.right > window.right:\r\n score2 = score2 + 1\r\n if ball.left < window.left:\r\n score2 = score2 + 1\r\n\r\n if window.get_key('w') and pad1.top > window.top:\r\n pad1.y -= 5\r\n if window.get_key('s') and pad1.bottom < window.bottom:\r\n pad1.y += 5\r\n\r\n if window.get_key('up'):\r\n pad2.x -= 5\r\n if window.get_key('down') and pad2.bottom < window.bottom:\r\n pad2.x += 5\r\n\r\n if ball.colliderect(pad1):\r\n dx = ball_speed\r\n if ball.colliderect(pad2):\r\n dx = -ball_speed\r\n\r\n window.update(fps)\r\n```\r\n",
"bugtrack_url": null,
"license": null,
"summary": "Simple Pygame plugin for small kids",
"version": "0.0.7",
"project_urls": {
"GitHub": "https://github.com/chebur5581/pioneergame",
"Homepage": "https://github.com/chebur5581/pioneergame"
},
"split_keywords": [
"games",
"pygame",
"kis",
"learning",
"pioneergame"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "02457869eda228760036501957db9fc991d2b89485362dc49af492758f9b53f9",
"md5": "11d90900d0115feb6601e357d0495e2f",
"sha256": "bf56a691aba4bb3ff3ba4c39e56441b429af1d71c11a91bcbe4e35ac40c15719"
},
"downloads": -1,
"filename": "pioneergame-0.0.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "11d90900d0115feb6601e357d0495e2f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 177916,
"upload_time": "2025-04-09T04:30:44",
"upload_time_iso_8601": "2025-04-09T04:30:44.070306Z",
"url": "https://files.pythonhosted.org/packages/02/45/7869eda228760036501957db9fc991d2b89485362dc49af492758f9b53f9/pioneergame-0.0.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "2847dcd8fbcf15b5bb4ce41a81095b3b2f5202a98d17d6b38b6e3e272368ab7c",
"md5": "4cc03b6efffd903d77ec9d34d7102173",
"sha256": "260b41eb64d67d321310163bf2d03e080b26f8e245aa41627db374445f63806c"
},
"downloads": -1,
"filename": "pioneergame-0.0.7.tar.gz",
"has_sig": false,
"md5_digest": "4cc03b6efffd903d77ec9d34d7102173",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 175914,
"upload_time": "2025-04-09T04:30:46",
"upload_time_iso_8601": "2025-04-09T04:30:46.566804Z",
"url": "https://files.pythonhosted.org/packages/28/47/dcd8fbcf15b5bb4ce41a81095b3b2f5202a98d17d6b38b6e3e272368ab7c/pioneergame-0.0.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-04-09 04:30:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "chebur5581",
"github_project": "pioneergame",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pioneergame"
}