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.3.tar.gz (4.3 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.3-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pix8-0.0.3.tar.gz
  • Upload date:
  • Size: 4.3 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.3.tar.gz
Algorithm Hash digest
SHA256 5f5e2f58cbbe003d8f15b4c0e5e905d7bc85c282a1b1bc1e78f9d0493d51cdd7
MD5 0d632fccacc1222a910203230ceda358
BLAKE2b-256 d72e0f755b44559b02241ee691aac1a387fff6a6ca0a9b27d59405f6df02457c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pix8-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.7 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e4febd2da2e30440d2dc53c043f33a3c002b9f3e3dd6f590b26a8b1b81697e87
MD5 712921bffb539efd9ac967f0a8deb73d
BLAKE2b-256 22e64f7acc3397620f6792d425286c463be4a03e5e926e3dd7f3cc0a9b8f1faf

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