Easily Make Retro Games with Pyxel in Python3

While I was creating my RetroLib project, I found some cool GitHub repositories similar to what I was making. One of the was called Pyxel; which is a retro game engine for Python3. Sounds interesting, right?

I really love the idea of how you can create retro games without having to use and program for hardware that is almost 40 years old.

You can check out the Pyxel GitHub repository here.

Pyxel gives you the same constraints the Nintendo Entertainment System had. Such as the few number of colors available for use, or how you can only play a maximum of 4 sounds at a time. Because of these constraints, you’ll have to think outside the box to make your game fun, while staying within the constraints.

Creating a program is super simple. It only takes a few lines to do.

import pyxel

pyxel.init(160, 120)

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

def draw():
    pyxel.cls(0)
    pyxel.rect(10, 10, 20, 20, 11)

pyxel.run(update, draw)

Good Luck!

Leave a Reply

Your email address will not be published. Required fields are marked *