一个用于Python的3D和2D游戏引擎
网站 | Discord | Twitter | Patreon | 赞助
一个易于使用的游戏引擎/框架,适用于Python。
打开 cmd/终端并输入:
pip install ursina要获取来自 GitHub 的最新开发版本,请按如下方式安装:
pip install git+https://github.com/pokepetter/ursina.git如果你想方便地编辑源代码,建议克隆 git 仓库,并使用 --editable 标志通过 pip 安装,如下所示。请确保已安装 git。
git clone https://github.com/pokepetter/ursina.git
cd ursina
pip install --editable .还可以从下面的列表中选择安装任何你想要的可选依赖项,或者一次性全部安装:
pip install ursina[extras]在某些系统上,你可能需要使用 pip3 而不是 pip,以便使用 Python 3 而不是旧的 Python 2。
要使用特定的 Python 版本,请使用:
python3.xx -m pip install ursina其中 3.xx 是你想要针对的版本。
from ursina import * # this will import everything we need from ursina with just one line.
app = Ursina()
ground = Entity(
model = 'cube',
color = color.magenta,
z = -.1,
y = -3,
origin = (0, .5),
scale = (50, 1, 10),
collider = 'box',
)
app.run() # opens a window and starts the game.在 samples 文件夹 或 示例网站 中还有其他示例。
暂无开放 Issues,或尚未同步最近议题。