loading...

Just getting started with pyxel

tonetheman profile image Tony Colston ・1 min read

I got the idea for this post from this tweet https://twitter.com/kitao/status/1152919321032589317
It is harder to read but still super cool.

pyxel is a fun way to learn/play with Python. You can write programs that are easy to interact with and not need to think about graphics programming.

See here for the github repo: https://github.com/kitao/pyxel

To get started do a pip install

pip install pyxel

Then type this in and run it

import pyxel
from random import random as r
pyxel.init(64,64)

def update():
    if pyxel.btnp(pyxel.KEY_Q):
        pyxel.quit()

def draw():
    pyxel.cls(0)
    pyxel.line(r()*64,r()*64,r()*64,r()*64,7)

pyxel.run(update,draw)

You will end up with something like this:

Posted on by:

tonetheman profile

Tony Colston

@tonetheman

wanna be gamedev ... all around nerd and dev

Discussion

markdown guide