kygame 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kygame-0.1.0/LICENSE +5 -0
- kygame-0.1.0/PKG-INFO +26 -0
- kygame-0.1.0/README.md +8 -0
- kygame-0.1.0/kygame/__init__.py +25 -0
- kygame-0.1.0/kygame/controls.py +0 -0
- kygame-0.1.0/kygame.egg-info/PKG-INFO +26 -0
- kygame-0.1.0/kygame.egg-info/SOURCES.txt +11 -0
- kygame-0.1.0/kygame.egg-info/dependency_links.txt +1 -0
- kygame-0.1.0/kygame.egg-info/requires.txt +2 -0
- kygame-0.1.0/kygame.egg-info/top_level.txt +1 -0
- kygame-0.1.0/pyproject.toml +27 -0
- kygame-0.1.0/setup.cfg +4 -0
- kygame-0.1.0/setup.py +11 -0
kygame-0.1.0/LICENSE
ADDED
kygame-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: kygame
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A simple bridge between Kivy and Pygame for mobile development.
|
|
5
|
+
Author-email: Твое Имя <your_email@example.com>
|
|
6
|
+
Project-URL: Homepage, https://github.com/твой_профиль/kygame
|
|
7
|
+
Project-URL: Bug Tracker, https://github.com/твой_профиль/kygame/issues
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: Android
|
|
11
|
+
Classifier: Topic :: Games/Entertainment
|
|
12
|
+
Requires-Python: >=3.8
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: kivy
|
|
16
|
+
Requires-Dist: pygame-ce
|
|
17
|
+
Dynamic: license-file
|
|
18
|
+
|
|
19
|
+
# kygame 🐍📱
|
|
20
|
+
|
|
21
|
+
**kygame** — это легкий мост между Kivy и Pygame (pygame-ce).
|
|
22
|
+
Создавайте игры на Pygame и запускайте их внутри Kivy-приложений с полноценной поддержкой мобильного тачскрина!
|
|
23
|
+
|
|
24
|
+
## Установка
|
|
25
|
+
```bash
|
|
26
|
+
pip install kygame
|
kygame-0.1.0/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
from kivy.uix.image import Image
|
|
2
|
+
from kivy.clock import Clock
|
|
3
|
+
from kivy.graphics.texture import Texture
|
|
4
|
+
import pygame
|
|
5
|
+
|
|
6
|
+
class KyGame(Image):
|
|
7
|
+
def __init__(self, screen, fps=60, **kwargs):
|
|
8
|
+
super().__init__(**kwargs)
|
|
9
|
+
self.screen = screen
|
|
10
|
+
# Автоматически обновляем экран с заданным FPS
|
|
11
|
+
Clock.schedule_interval(self.update_canvas, 1.0 / fps)
|
|
12
|
+
|
|
13
|
+
def update_canvas(self, dt):
|
|
14
|
+
# Переводим графику Pygame в байты
|
|
15
|
+
raw_data = pygame.image.tostring(self.screen, 'RGBA', False)
|
|
16
|
+
|
|
17
|
+
# Создаем текстуру, если она еще не создана
|
|
18
|
+
if not self.texture:
|
|
19
|
+
w, h = self.screen.get_size()
|
|
20
|
+
self.texture = Texture.create(size=(w, h), colorfmt='rgba')
|
|
21
|
+
self.texture.flip_vertical()
|
|
22
|
+
|
|
23
|
+
# Обновляем картинку
|
|
24
|
+
self.texture.blit_buffer(raw_data, colorfmt='rgba', bufferfmt='ubyte')
|
|
25
|
+
self.canvas.ask_update()
|
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: kygame
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A simple bridge between Kivy and Pygame for mobile development.
|
|
5
|
+
Author-email: Твое Имя <your_email@example.com>
|
|
6
|
+
Project-URL: Homepage, https://github.com/твой_профиль/kygame
|
|
7
|
+
Project-URL: Bug Tracker, https://github.com/твой_профиль/kygame/issues
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Operating System :: Android
|
|
11
|
+
Classifier: Topic :: Games/Entertainment
|
|
12
|
+
Requires-Python: >=3.8
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: kivy
|
|
16
|
+
Requires-Dist: pygame-ce
|
|
17
|
+
Dynamic: license-file
|
|
18
|
+
|
|
19
|
+
# kygame 🐍📱
|
|
20
|
+
|
|
21
|
+
**kygame** — это легкий мост между Kivy и Pygame (pygame-ce).
|
|
22
|
+
Создавайте игры на Pygame и запускайте их внутри Kivy-приложений с полноценной поддержкой мобильного тачскрина!
|
|
23
|
+
|
|
24
|
+
## Установка
|
|
25
|
+
```bash
|
|
26
|
+
pip install kygame
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
kygame
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "kygame"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
authors = [
|
|
9
|
+
{ name="Твое Имя", email="your_email@example.com" },
|
|
10
|
+
]
|
|
11
|
+
description = "A simple bridge between Kivy and Pygame for mobile development."
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
requires-python = ">=3.8"
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"License :: OSI Approved :: MIT License",
|
|
17
|
+
"Operating System :: Android",
|
|
18
|
+
"Topic :: Games/Entertainment",
|
|
19
|
+
]
|
|
20
|
+
dependencies = [
|
|
21
|
+
"kivy",
|
|
22
|
+
"pygame-ce", # Рекомендую pygame-ce (Community Edition), она быстрее и лучше обновляется
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[project.urls]
|
|
26
|
+
"Homepage" = "https://github.com/твой_профиль/kygame"
|
|
27
|
+
"Bug Tracker" = "https://github.com/твой_профиль/kygame/issues"
|
kygame-0.1.0/setup.cfg
ADDED