Skip to main content

SpritePro

Высокоуровневый 2D game framework на Python (поверх pygame). Desktop, web и mobile из одной кодовой базы.

Python License Version

SpritePro

Demo


Установка

pip install spritepro

Для mobile: pip install "spritepro[kivy]"

Шаблон проекта: python -m spritePro.cli --create (минимальный: --create --simple)

Обновление

pip install --upgrade spritepro

Почему SpritePro

Обычно приходится В SpritePro
Ручной игровой цикл s.run(scene=...) — сцена + auto-render
Своя камера Camera API, follow, zoom, shake
UI с нуля Button, ToggleButton, TextSprite, Slider, TextInput, Layout
Физика отдельно pymunk-интеграция, типы тел, коллизии
Визуальный editor Sprite Editor → JSON → spawn_scene(...)
Сохранения парсить PlayerPrefs → JSON
Мультиплеер с нуля TCP, лобби, ChatScene, синхронизация
Mobile отдельно platform="kivy" — та же логика
Скроллируемый UI ScrollView + ClipMask — готовый клиппинг

SpritePro = pygame + физика, Layout, ScrollView, ClipMask, редактор сцен, мультиплеер, UI.


Быстрый старт

import spritePro as s

class MainScene(s.Scene):
    def __init__(self):
        super().__init__()
        self.player = s.Sprite("", (50, 50), s.WH_C, speed=5, scene=self)

    def update(self, dt):
        self.player.handle_keyboard_input()

s.run(scene=MainScene, size=(800, 600), title="My Game")

Всё: окно, сцена, игровой цикл, управление.


Что внутри

  • Sprite — базовый класс с движением, эффектами, иерархией parent-child
  • UI: Button, ToggleButton, Slider, TextInput, TextSprite, Layout (flex/grid/circle/line)
  • ClipMask — маска обрезки для viewport, инвентарей, чатов
  • ScrollView — скроллируемый контент с колёсиком и drag-and-drop
  • Физика: pymunk, DYNAMIC/STATIC/KINEMATIC тела, коллизии
  • Анимации: Tween, Fluent API (DoMove, DoScale, SetEase...)
  • Частицы: ParticleEmitter, шаблоны, пулы
  • Мультиплеер: TCP, лобби, ChatScene, синхронизация
  • Audio: звук и музыка
  • Save/Load: PlayerPrefs в JSON
  • Sprite Editor: визуальная сборка сцен → JSON

Sprite Editor

Визуальный редактор сцен с иерархией, инспектором, gizmo.

Sprite Editor
python -m spritePro.cli --editor

Собираете сцену → сохраняете в JSON → загружаете в игре:

rt = spawn_scene("level.json", scene=self)
player = rt.exact("player").Sprite(speed=5)

Мультиплеерный чат

Готовая сцена чата с маской обрезки и скроллом:

from spritePro.readyScenes import ChatScene, ChatStyle
import spritePro as s

s.run(scene=ChatScene, multiplayer=True, multiplayer_use_lobby=True, title="Chat")

Сравнение

Функция pygame arcade SpritePro
Авто-рендер
Готовая камера
Физика (pymunk)
Layout (flex/grid)
Редактор сцен (JSON)
Маска обрезки / ScrollView
Мультиплеер (TCP)
PlayerPrefs

Что создать

  • Платформеры, аркады, RPG
  • Пазлы, tower defense
  • Мультиплеерные игры
  • Мобильные игры (platform="kivy")

Демо-игры

python -m spritePro.demoGames.physics_demo       # физика
python -m spritePro.demoGames.fluent_tween_demo   # твины
python -m spritePro.demoGames.layout_demo         # лейауты
python -m spritePro.demoGames.local_multiplayer_demo --quick

Слизарио (andrulok)

Мультиплеерный клон Slither.io: змейка за курсором, еда, боты, синхронизация позиций и еды по TCP (SpritePro networking).

Слизарио — пример игры

# одиночная игра
python spritePro/demoGames/slisario_andrulok/main.py --single

# локально: сервер + 2 окна клиентов
python spritePro/demoGames/slisario_andrulok/main.py --quick

Подробнее: spritePro/demoGames/slisario_andrulok/README.md

Все 54 демо


Mobile и Web

s.run(scene=MainScene, platform="kivy")  # Android/iOS
python -m spritePro.cli --android . --android-orientation portrait

Web: docs/builds/building_web.md


Документация

Что Где
Полный индекс DOCUMENTATION_INDEX.md
Оглавление папки docs/ docs/README.md
API Reference docs/API_REFERENCE.md
Для новичков docs/GETTING_STARTED.md
Физика docs/core/physics_guide.md
UI/Layout docs/ui/layout_ui.md
ClipMask docs/ui/clip_mask.md
Мультиплеер docs/systems/networking_guide.md
Sprite Editor docs/editor/sprite_editor.md
Mobile docs/builds/mobile_kivy.md

Вклад


📖 Документация · 💬 GitHub Issues

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spritepro-3.12.0.tar.gz (363.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spritepro-3.12.0-py3-none-any.whl (435.0 kB view details)

Uploaded Python 3

File details

Details for the file spritepro-3.12.0.tar.gz.

File metadata

  • Download URL: spritepro-3.12.0.tar.gz
  • Upload date:
  • Size: 363.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for spritepro-3.12.0.tar.gz
Algorithm Hash digest
SHA256 92415ace5025f41b04136469dd7b32f43229877bfef05e40b78316e7a88622a4
MD5 79edbb6dcf601d9edb48fe8da5520630
BLAKE2b-256 a5a675f55d1c6df7ab6bb43b31e339f7cc97f138a976acdf5120f66f7bee6ed0

See more details on using hashes here.

Provenance

The following attestation bundles were made for spritepro-3.12.0.tar.gz:

Publisher: publish-to-pypi.yml on NeoXider/SpritePro

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spritepro-3.12.0-py3-none-any.whl.

File metadata

  • Download URL: spritepro-3.12.0-py3-none-any.whl
  • Upload date:
  • Size: 435.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for spritepro-3.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 242951a6144cc17c63508e858b84c79dd156acfd582ad92621ffa9e64f8bcd3f
MD5 ad8921ac86d9ab45c7286dfd6583796c
BLAKE2b-256 4efad1c30db18fbe45a8d3bb728fd85f25396d9c0caa9e72e1685333d14b86bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for spritepro-3.12.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on NeoXider/SpritePro

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

3.12.1

2 files

This release

3.12.0 This release

2 files

3.11.1

2 files

3.11.0

2 files

3.10.0

2 files

3.9.3

2 files

3.9.2

2 files

3.9.1

2 files

3.9.0

2 files

3.8.0

2 files

3.5.0

2 files

3.4.0

2 files

3.3.1

2 files

3.3.0

2 files

3.2.4

2 files

3.2.3

2 files

3.2.2

2 files

3.2.1

2 files

3.1.1

2 files

3.1.0

2 files

3.0.1

2 files

3.0.0

2 files

2.2.3

2 files

2.2.2

2 files

2.2.1

2 files

2.0.8

2 files

2.0.7

2 files

2.0.5

2 files

2.0.4

2 files

2.0.3

2 files

2.0.2

2 files

2.0.1

2 files

2.0.0

2 files

1.4.9

2 files

1.4.8

2 files

1.4.7

2 files

1.4.6

2 files

1.4.4

2 files

1.4.2

2 files

1.4.1

2 files

1.4.0

2 files

1.3.3

2 files

1.3.2

2 files

1.3.1

2 files

1.2.21

2 files

1.2.20

2 files

1.2.19

2 files

1.2.18

2 files

1.2.17

2 files

1.2.16

2 files

1.2.14

2 files

1.2.13

2 files

1.2.12

2 files

1.2.11

2 files

1.2.8

2 files

1.2.5

2 files

1.2.4

2 files

1.2.3

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.0

2 files

1.0.4

2 files

1.0.2

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page