Skip to main content

Tiny fantasy console

Project description

📦 PIX-8 — Tiny Fantasy Console

PIX-8 is a minimal, retro-style fantasy console written in Python.
It lets you create tiny games with a simple PEP-8-inspired Python cartridge format.


⚡ Features

  • 128×128 pixel display

  • 16-color palette

  • Simple drawing API: cls(), pset(), rectfill()

  • Input: arrow keys + Z/X as buttons

  • PEP-8–style cartridges (init(pix), update(pix), draw(pix))

  • Runs as a single Python file (pix8.py)


🏁 Installation

git clone <repo-url>
cd pix8
pip install .

Or if you just want to run it locally without pip:

python pix8.py game.py


🎮 Writing a Cartridge

Create a Python file, for example game.py:

metadata = {"title": "Tiny Demo"}

def init(pix):
pix.x = 60
pix.y = 60

def update(pix):
if pix.btn("left"):
pix.x -= 1
if pix.btn("right"):
pix.x += 1

def draw(pix):
pix.cls(1)
pix.rectfill(pix.x, pix.y, 8, 8, 8)

Run it:

pix8 game.py


🔑 API Reference

Function Description
pix.cls(color=0) Clear the screen
pix.pset(x, y, color=7) Draw a single pixel
pix.rectfill(x, y, w, h, color=7) Draw a filled rectangle
pix.btn("left") Check if a button is pressed (left, right, up, down, a, b)
pix.flip() Update the screen and tick FPS

📄 License

MIT License — free to use, modify, and share.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pix8-0.0.4.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pix8-0.0.4-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file pix8-0.0.4.tar.gz.

File metadata

  • Download URL: pix8-0.0.4.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for pix8-0.0.4.tar.gz
Algorithm Hash digest
SHA256 eb57e0834bc9419f2dd9c5364f0bf008f7bc119c0a8a0855785035c41ec35cf7
MD5 663ae33fa3d61ff06c6f255132867176
BLAKE2b-256 c075a3aa92e41374aaa4748d339edf57703059bb61bbc6a5c8930cf6effe5bcf

See more details on using hashes here.

File details

Details for the file pix8-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: pix8-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for pix8-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 576db097ff6d9059d03b4340bc07b6ac5abd8e6985d23636b4fb9c8cf387725a
MD5 244651f2f134986101ba659e55e2efa1
BLAKE2b-256 f35909ee06b4ec2de2b0f135b069d9c024a5b908d6f96cb45ecd0e811bf0b69d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page