Favicon of Pyxel

Pyxel

Pyxel is an open-source retro game engine for Python, limited to 16 colors and 4 sound channels, with built-in editors for pixel art and music.

Pyxel website screenshot
Pyxel GitHub repository preview

Pyxel is a game engine for Python built around the constraints of classic retro consoles: a 16-color palette, 4 sound channels, and simple pixel-based graphics. It's aimed at developers who want to make small, pixel-art-style games without wrestling with a full-featured modern engine. The core is written in Rust for speed, but you write your games entirely in Python.

The project is maintained by a single developer and has built a community around sharing finished games and tools, with a public gallery of user examples and a discussion board for showcasing work.

Key features

  • Retro-style constraints: fixed 16-color palette and 4 sound channels keep the scope small and the aesthetic consistent, similar in spirit to Pico-8.
  • Python API: games are scripted in plain Python, so you get a readable, beginner-friendly workflow on top of a fast Rust core.
  • Built-in editors: image, tilemap, sound, and music editors ship with the engine, so you don't need external tools to build assets.
  • Cross-platform output: games run on desktop (Windows, Mac, Linux) and can be exported to run in a browser via WebAssembly.
  • OpenGL rendering: graphics are handled through OpenGL under the hood for consistent performance across platforms.
  • Open license: released under the MIT License, so it's free to use, modify, and distribute.
  • Active showcase: a curated gallery of user-made games and apps, plus a discussion thread for submitting your own work.

Ideal use cases

Pyxel fits game jams, learning projects, and anyone who wants to build a small arcade-style or platformer game without a heavy engine. It works well for teaching programming concepts through game-making, since the API is compact and the visual output is simple to reason about. It's also a good choice if you want to prototype a pixel-art game idea quickly and share it as a browser-playable demo.

It's not the right tool if you need high-resolution graphics, full RGB color ranges, 3D rendering, or a physics/animation pipeline suited for commercial-scale production. If your project needs more than 16 on-screen colors or more than 4 simultaneous sound channels, you'll be fighting the engine's design rather than using it. Teams building large, asset-heavy games with complex UI systems will likely outgrow Pyxel's intentionally minimal feature set.

Installation

Pyxel is distributed as a Python package, so the standard way to get it is through pip:

pip install pyxel

Once installed, you write your game logic in a Python script using Pyxel's API (handling update and draw loops, input, sprites, and sound), then run it with Python as you would any script. The built-in editors for images, tilemaps, and sound can be launched from the command line to create and manage game assets without leaving the toolchain.

Full API details and step-by-step tutorials are available in the official user guide, and the project's user examples page is a useful reference for seeing complete, working games built with the engine.

Frequently asked questions

Share:

Stars
18.4K
Forks
966
Last commit
11 days ago
Repository age
8 years
Self-hosted
No
Activity score
80/100
View Repository
Ad
Favicon

 

  
 

Similar to Pyxel

Favicon

 

  
 
Favicon

 

  
 
Favicon