A 2D game engine that's handy to use, to change, to own.
Rust core, Python 3.12 scripting, visual editor, and single-command desktop exports. Build games from scenes and nodes (not ECS).
The Pite editor running the "Gem Collector" example
import pite
class Player(pite.Node2D):
speed: float = 220.0
def _process(self, delta: float):
move = pite.action.vector(
"move_left",
"move_right",
"move_up",
"move_down"
)
self.position += move * self.speed * delta| Area | Capabilities |
|---|---|
| Scene Tree | Human-readable .ptscn TOML scenes, content-hashed binary _cache/, reusable scene instances |
| 2D Rendering | Pure-Rust wgpu batch renderer, z_index layering, modulate tinting, AnimatedSprite2D (.ptatlas), TileMap2D (.ptmap) |
| Physics & Audio | rapier2d 2D physics & character controller; WAV/OGG/MP3/FLAC audio with silent-simulation fallback |
| Visual Editor | Viewport pan/zoom & 2D transform gizmo, Scene Tree, Inspector, Visual Atlas Editor, built-in Pyright LSP, Undo/Redo |
| Scripting & Plugins | Embedded Python 3.12, pite.tween(), pite.action input mapping, live hot reload, project-local plugins (plugins/) |
| Export & Tooling | pite check static validation, assets.pite.toml hash tracking, pite export linux|windows|macos (~20–52 MB standalone) |
Install the engine bundle (engine + player binaries for all platforms, so any machine exports for any platform) — latest stable, verified on download (~30 MB):
Linux / macOS Terminal:
curl -fsSL https://raw.githubusercontent.com/piteengine/pite/main/install.sh | shWindows PowerShell:
irm https://raw.githubusercontent.com/piteengine/pite/main/install.ps1 | iexOr install with cargo:
cargo install piteThen:
# Create a new project (blank by default, or pass --template minimal-2d)
pite new hello
# Enter the project and launch the visual editor (or run `pite edit`)
cd hello
pite
# Run the game (defaults to main_scene, or pass a scene path, with hot-reload)
pite run
# Validate assets, scripts, and scenes in milliseconds (add --reimport-assets to sync moved files)
pite checkInstall once, then use pite command. Run pite help to see full command list. Use pite new to scaffold a project (blank or templated with --template <name>). See Installation for the complete guide.
pite export linuxexport linux|windows|macos writes a executable or directory when passing --unpacked (dist/<name>-<platform>/). Only referenced assets are included. Provide [export] include in pite.toml for extra files. Any machine exports for any platform with no compiler. Use pite toolchain status|download|verify|clean to manage these toolchain artifacts.
The exported game runs with no system Python installed. Passing --no-bundle-python falls back to end-user's system Python 3.12.
- Python for scripting, Rust at the core: Gameplay logic stays in standard Python 3.12, while 2D rendering (
wgpu), physics (rapier2d), scene traversal, and audio decoding run in native Rust. - Scene Tree & TOML (
.ptscn): Scenes are human-readable TOML files with clean git diffs and automatic content-hashed binary caching (_cache/). - Static verification (
pite check): Detects orphan assets, tracks file moves viaassets.pite.tomlcontent hashes, validates decoding, and warns on unvendored imports. - Thoughtful defaults: Silent audio fallback when hardware is missing, live hot reload preserving state/velocities, built-in Pyright LSP, and one-command standalone exports (no system Python required).
- Godot: Use Godot if GDScript fits your workflow; Pite targets developers who want standard Python, lean exports (~20–52 MB), and a smaller 2D-only toolset.
- Bevy: Bevy is code-first ECS in Rust; Pite is Scene Tree + visual editor + Python scripting.
- Pygame / LÖVE: Code-only frameworks; Pite adds an integrated visual editor, declarative scenes, built-in physics/audio, and zero-config desktop export.
Pite is dedicated to 2D desktop games (Linux, Windows, macOS) and is in the 0.x release series (3D, mobile, and web are out of scope). See docs/changelog.md for full release notes.
Pite is structured as a modular Rust workspace consisting of 13 crates, all located in crates/. For crate roles, crate dependencies, and architecture documentation, see the Rust Architecture Reference.
flowchart LR
CLI["pite (CLI)"] --> RT["pite-runtime"]
CLI --> ED["pite-editor"]
CLI --> EX["pite-export"]
RT --> CORE["pite-core (Scene Tree)"]
RT --> SCENE["pite-scene (.ptscn)"]
RT --> SCRIPT["pite-script (Python 3.12)"]
RT --> RENDER["pite-render (wgpu)"]
RT --> PHYS["pite-physics (rapier2d)"]
RT --> AUDIO["pite-audio"]
RT --> ASSETS["pite-assets"]
EX --> PLAYER["pite-player (Standalone)"]
All 13 crates are published in lockstep with the engine on crates.io and documented on docs.rs.
Autonomous coding assistants operating in this repository follow AGENTS.md for workspace conventions, CI commands, and crate boundaries.
Documentation is available online at piteengine.github.io/pite.
All documentation source files are located in the docs/ folder. Node class reference documentation is automatically generated from the engine schema defined in crates/pite-core/src/schema.rs and crates/pite-core/src/nodes/ (with Python bindings in crates/pite-script/src/python/nodes/).
We accept contributions, and we help newcomers. Review our core contribution and governance guides:
- Contributing Guide — Local development workflow, testing, and PR conventions.
- Code of Conduct — Community standards, pledge, and enforcement responsibilities.
- Security Policy — Vulnerability reporting, supported versions, and memory safety invariants.
- Accessibility Statement — Accessibility baseline, supported assistive tech, and barrier reporting.
Ways to participate:
- Found a bug or have an idea? Open an issue.
- Want to fix or build something? Open a PR.
- Not sure where to start, or just want to talk? Join the discussions.
Dual-licensed MIT + Apache-2.0 (Rust standard): LICENSE-MIT, LICENSE-APACHE.
New source files carry an SPDX header (SPDX-License-Identifier: MIT OR Apache-2.0); see CONTRIBUTING.md.
Pite is built by Mahan Khalili (@mkh-user) as a long-term bet that Python-native game development deserves a real engine. Contributions and feedback are welcome.