Skip to main content

Tiny fantasy console inspired by TIC-80

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.6.tar.gz (4.9 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.6-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pix8-0.0.6.tar.gz
Algorithm Hash digest
SHA256 126ae59255743fdef019f8f3c2b3fddf3cf8b08663dd4443f998492b26f0bfd9
MD5 1da8ee4fe859d14c9096b9aa0585d061
BLAKE2b-256 e2da8acec82746ef522a349a15f4604edd71cc4f8d39d5377b55a1635ef1a6f2

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pix8-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 1be24ffb84972912f6c309cfda88222905c54ec010436d1c951f426e9c3c75e7
MD5 0c6fd156d5784402f99f44c6839da319
BLAKE2b-256 07456637209a61f815dedb225bfcfb54608d27a8ed1b10825ad22f4822904e23

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