Pygame Zero(pgzrun)游戏库介绍
pgzero是python的一个第三方库。pgzrun 是 python game zero run 的缩写, 它对 Pygame 进行了封装, 屏蔽了繁琐枯燥的框架代码, 让学习者可以更专注于游戏的实现逻辑, 并且更快看到成果。
官网https://pygame-zero.readthedocs.io/en/stable/
中文https://pygame-zero.readthedocs.io/zh_CN/latest/introduction.html
pgzrun库的安装与导入说明
安装Pygame Zero(pgzrun)之前需要先安装Pygame,因为Pygame Zero是基于Pygame开发的一个简化框架。关于Pygame可参见 https://blog.csdn.net/cnds123/article/details/119514520
特别提醒一下,pgzrun模块(库)安装的时候,名称用pgzero,在cmd中输入
pip install pgzero
回车
【关于安装安装第三方库的更多情况,可参见:https://blog.csdn.net/cnds123/article/details/104393385】
导入的时候用pgzrun
import pgzrun
pgzrun库使用基础
坐标系
以左上角为原点 ( 0, 0 )