Pyxel icon

Pyxel

Standard softwareFOSS · MIT

MIT retro pixel game engine for Python with WASM export

Free (MIT) · Takashi Kitao · Standard software workflow; Steam AI disclosure does not apply.

AI
Standard
IP
Commercial-Safe IP
Engines
PICO-8, Web / JS, Any Engine
Platforms
Windows · macOS · Linux · Web · CLI
Version
2.2
Technical Summary

Pyxel is an MIT-licensed open-source retro pixel game engine for Python 3 backed by a high-speed Rust and SDL2 core. Completely free for commercial use across Windows, macOS, Linux, and WebAssembly browsers, it bundles an integrated 16-color sprite, tilemap, and chiptune editor with single-command HTML packaging.

Technical Overview

Architecture and Production Workflow

Pyxel (2.2) bridges Python 3's clean syntax with deterministic native execution by offloading its rendering, audio synthesis, tilemap blitting, and collision primitives to a compiled Rust + SDL2 backend (pyxel-engine / pyxel-wrapper). Rather than fighting Pygame surface allocation or frame-rate jitter, developers initialize pyxel.init(width, height) and pass two callbacks to pyxel.run(update, draw). By default, Pyxel models classic 8-bit/16-bit hardware specifications (a customizable 16-color indexed palette expandable up to 256 colors in Pyxel 2.x, three 256x256 sprite image banks, eight 256x256 tilemaps, and four hardware-style chiptune audio channels supporting triangle, square, pulse, and noise waveforms) while allowing arbitrary screen resolutions and external .png/.tmx imports.

Running pyxel edit my_assets.pyxres from any terminal launches Pyxel Editor, a built-in pixel workstation for painting sprites, laying out multi-layer tilemaps, sculpting sound effects, and sequencing chiptune loops inside a single portable .pyxres zip archive. When ready to ship, pyxel package bundles your Python project and assets into a .pyxapp file, and pyxel app2html wraps that archive with a prebuilt Pyodide WebAssembly runtime into one self-contained .html file that runs offline or on itch.io with zero server backend.

Pricing, Licensing, and Commercial Rights

Pyxel is 100% free and open source under the MIT License ($0 cost, 0% royalties, full commercial rights). Studios and solo developers can distribute commercial standalone executables (via PyInstaller, Nuitka C compilation, or Pyxel's app packager) on Steam and itch.io without royalties or copyleft source obligations.

Strengths and Tradeoffs in Studio Pipelines

Pipeline DimensionProduction StrengthPractical Limitation
Python ErgonomicsFull Python 3 standard library, dataclasses, and type-checking (mypy/pyright) over a Rust coreHeavy nested Python loops (>10,000 entities) still hit CPython interpreter overhead
Web Deploymentpyxel app2html produces a single zero-config HTML file runnable on itch.io and GitHub PagesPyodide WASM browser runtime adds ~8-12 MB initial download overhead on first cold load
Integrated ToolingBuilt-in pyxel edit handles sprites, tilemaps, SFX, and music without external softwareDeliberate retro palette/blitter architecture omits GPU pixel shaders and 3D meshes

For commercial desktop Steam releases written in Pyxel, compile your Python entrypoint to native C binaries with Nuitka alongside Pyxel's Rust wheel to improve CPU loop speed and protect source scripts.

AI Transparency & Steam Disclosure

Standard Software

Procedural math, physics, or manual authoring software.

Steamworks guidance: Standard software workflow; Steam AI disclosure does not apply.

Technical FAQ about Pyxel

How does Pyxel compare to Pygame-CE for making 2D retro games in Python?
Pyxel enforces a cohesive retro spec with a Rust-accelerated renderer, built-in sprite/tilemap/chiptune editors (`pyxel edit`), and one-command WebAssembly HTML export (`pyxel app2html`). Pygame-CE is more flexible for arbitrary high-color 2D resolutions and custom SDL2 surfaces, but requires external editors (Aseprite, Tiled, Bfxr) and Pygbag for web builds.
Can Pyxel games run in mobile and desktop web browsers without installing Python?
Yes. Running `pyxel package` followed by `pyxel app2html` generates a single standalone `.html` file powered by Pyxel's WebAssembly and Pyodide runtime, complete with responsive virtual touch gamepads for mobile Safari and Chrome, ready to upload straight to itch.io or GitHub Pages.
Are you locked to 16 colors and built-in chiptune audio in Pyxel 2.2?
No. While 16-color palettes and 4-channel synth patterns are the default workflow, Pyxel 2.x lets you redefine exact 24-bit hex colors, expand palette counts up to 256 indexed colors via `pyxel.colors.from_list()`, load external Tiled `.tmx` maps, and play custom `.wav` or `.ogg` audio when needed.

More tools like Pyxel