百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
U

ursina

> 编程语言
开源

一个用于Python的3D和2D游戏引擎

2.6K stars0 点赞1 次浏览
访问官网GitHub

工具介绍

一个用于Python的3D和2D游戏引擎

ursina ʕ •ᴥ•ʔゝ□

网站 | Discord | Twitter | Patreon | 赞助

一个易于使用的游戏引擎/框架,适用于Python。

快速开始

  1. 安装 Python 3.10 或更高版本。

  2. 打开 cmd/终端并输入:

bash
pip install ursina

要获取来自 GitHub 的最新开发版本,请按如下方式安装:

bash
pip install git+https://github.com/pokepetter/ursina.git

如果你想方便地编辑源代码,建议克隆 git 仓库,并使用 --editable 标志通过 pip 安装,如下所示。请确保已安装 git。

bash
git clone https://github.com/pokepetter/ursina.git
cd ursina
pip install --editable .

还可以从下面的列表中选择安装任何你想要的可选依赖项,或者一次性全部安装:

bash
pip install ursina[extras]

在某些系统上,你可能需要使用 pip3 而不是 pip,以便使用 Python 3 而不是旧的 Python 2。 要使用特定的 Python 版本,请使用:

python3.xx -m pip install ursina

其中 3.xx 是你想要针对的版本。

依赖项

  • Python 3.10+
  • panda3d
  • pillow,用于纹理处理
  • psd-tools,用于转换 .psd 文件
  • blender,用于转换 .blend 文件
  • pyperclip,用于复制/粘贴

示例

python
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.
  • Minecraft 克隆

  • 平台游戏

在 samples 文件夹 或 示例网站 中还有其他示例。

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python3d-game-enginegame-developmentgame-enginepython

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言