PyBitEngine ⚡
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 —
CheckCollisionworks 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,MouseWheelOnwork directly with any shape and optionally with a camera for world-space picking. - Full rounded shapes —
DrawRoundedRect,DrawRoundedTriangleand their outline variants, with GPU-instanced batch versions (DrawRoundedRectsBatch,DrawRoundedTrianglesBatch). - Pixel‑perfect texture collisions —
CollidePointTextureandCollidePointTextureBatchuse the alpha channel stored on the CPU (no GPU readback, no disk I/O at runtime). - Texture atlas —
LoadTextureAtlasinserts an image into the shared atlas;DrawSpritesBatchcan then render thousands of sprites from the same atlas in one draw call. - Easy‑to‑use batch wrappers —
DrawRects,DrawLines,DrawCircles,DrawEllipses,DrawSprites,DrawTextsaccept lists of tuples with the same parameters as their immediate counterparts. No NumPy knowledge required. - Early‑Z / depth sorting —
enable_early_z()and thebegin_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, plusAsyncTimer/AsyncAfterfor background work withRunOnMainThreadandPumpMainThread. - PE_PAKER module —
pack()creates standalone executables usingcx_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 —
DrawTexturenow 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)
| 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)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| 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.