Skip to main content

PyBitEngine ⚡

Documentation License Python

A GPU-accelerated 2D game engine for Python, built on SDL2, ModernGL, NumPy and Numba.

PyBitEngine helps developers draw thousands of 2D objects efficiently while keeping the API simple. It uses instanced GPU rendering, texture atlases, and Numba kernels to reduce runtime overhead.


📦 Version: 0.1.3

This release brings major new features: a unified collision system, mouse helpers, rounded shapes, pixel‑perfect texture collisions, a texture atlas, depth sorting, performance optimizations, and a complete timer module.

What is new in 0.1.3

  • Unified collision system — CheckCollision works with any combination of immutable shapes (Rect, Circle, Ellipse, Triangle, Line, RotRect, RoundedRect, Polygon, TextureCollider). Zero object creation overhead.
  • Mouse helpers — MouseOver, MousePressed, MouseClicked, MouseHeld, MouseDragging, MouseWheelOn work directly with any shape and optionally with a camera for world-space picking.
  • Full rounded shapes — DrawRoundedRect, DrawRoundedTriangle and their outline variants, with GPU-instanced batch versions (DrawRoundedRectsBatch, DrawRoundedTrianglesBatch).
  • Pixel‑perfect texture collisions — CollidePointTexture and CollidePointTextureBatch use the alpha channel stored on the CPU (no GPU readback, no disk I/O at runtime).
  • Texture atlas — LoadTextureAtlas inserts an image into the shared atlas; DrawSpritesBatch can then render thousands of sprites from the same atlas in one draw call.
  • Easy‑to‑use batch wrappers — DrawRects, DrawLines, DrawCircles, DrawEllipses, DrawSprites, DrawTexts accept lists of tuples with the same parameters as their immediate counterparts. No NumPy knowledge required.
  • Early‑Z / depth sorting — enable_early_z() and the begin_opaque_pass() / begin_transparent_pass() helpers let you sort opaque objects front‑to‑back and transparent objects back‑to‑front, dramatically reducing overdraw.
  • Performance boost — color packing in uint32, pre‑computed cos/sin on the CPU, optimized Numba kernels, and fewer allocations make batch rendering faster than ever.
  • Complete key constants — all keyboard and mouse constants are now exported, including previously missing ones like PE_K_CAPSLOCK, PE_K_NUMLOCK, PE_K_PRINTSCREEN, PE_K_LSUPER, etc.
  • PE_TIME module — non‑blocking timers: Scheduler, After, Every, Countdown, Cooldown, Stopwatch, plus AsyncTimer/AsyncAfter for background work with RunOnMainThread and PumpMainThread.
  • PE_PAKER module — pack() creates standalone executables using cx_Freeze, with automatic inclusion of assets and dependencies.
  • CameraGPU and CameraCPU — both now support smooth follow, screen‑shake, world bounds, coordinate conversion (screen_to_world / world_to_screen), and batch culling (is_visible_batch). The shake offset is now zero‑mean (no net drift).
  • Painter’s algorithm fixed — DrawTexture now participates in the same batching system as primitives, so draw calls appear in the exact order they are issued.

🚀 Installation

pip install pybitengine

Metadata

Release files for pybitengine 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pybitengine 0.1.3
File Size Uploaded Provenance Actions
pybitengine-0.1.3.tar.gz 98.0 kB Without provenance Details for pybitengine-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pybitengine 0.1.3
File Interpreter ABI Platform Actions
pybitengine-0.1.3-py3-none-any.whl Python 3 none any Details for pybitengine-0.1.3-py3-none-any.whl

Total release size: 195.7 kB

Release files / pybitengine-0.1.3.tar.gz

Download URL pybitengine-0.1.3.tar.gz
Size 98.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f0c08538f5a937bdd2c27d3d70b972fc7cc1a61a8cbcc10da329004c3e507a06
BLAKE2b-256 checksum
How to use checksums
79c49aba14767897a561052a8f552d9a28df170914dfa3239128e4d54b0e6c6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.0

Release files / pybitengine-0.1.3-py3-none-any.whl

Download URL pybitengine-0.1.3-py3-none-any.whl
Size 97.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
88af53992d66fef3bac112f898accd734adebeea527a0fd3a7b0373c88f5d265
BLAKE2b-256 checksum
How to use checksums
4d97fa3a9fd74d355e63a3fd33bbac6491e5f3fce9685f696c937542164caf25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.0

Security for pybitengine 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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