Pyxel Python经典像素风游戏制作引擎

Pyxel简介

Pyxel,Python第三方库,经典像素风游戏制作引擎。像素风的游戏机制非常简单 ,比如通常最多只显示16种颜色,游戏的声音一般也只播放4种声音等等。

Pyxel应用实例

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)

Pyxel Github统计数据

MIT License

Github 12.8k stars

Pyxel安装命令

windows:pip install -U pyxel;mac:python3 -m pip install -U pyxel;Linux(Ubuntu):sudo pip3 install -U pyxel

Python版本要求

3.7 或更高版本

免责声明:内容编辑自网络,仅供参考,不保证正确性,不作任何决策依据!!以上数据皆截止于博文的写稿日期。


行业导航 / Python指南 :
























Copyright © 2022-2024 笨鸟工具 x1y1z1.com All Rights Reserved.