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

ursina

> 编程语言
开源

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

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

工具介绍

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

ursina ʕ •ᴥ•ʔゝ□

Website | Discord | Twitter | Patreon | Sponsor

An easy to use game engine/framework for python.

Getting Started

  1. Install Python 3.10 or newer.

  2. Open cmd/terminal and type:

pip install ursina

To get the newest, in development version from GitHub, install it like this:

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

If you want to easily edit the source, it's recommended to clone the git repo and pip install with --editable flag like this. Make sure you have git installed.

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

Also install any of the optional dependencies you want from the list below, or install them all with:

pip install ursina[extras]

On some systems you might have to use pip3 instead of pip in order to use Python 3 and not the old Python 2. To use a specific Python version, use:

python3.xx -m pip install ursina

Where 3.xx is the version you want to target.

Dependencies

  • python 3.10+
  • panda3d
  • pillow, for texture manipulation
  • psd-tools, for converting .psd files
  • blender, for converting .blend files
  • pyperclip, for copy/pasting

Examples

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 Clone

  • Platformer Game

There are other examples in the samples folder, or in samples website

How do I make a game?

Ursina games are made by writing Python code. You can use any text editor you want, but personally I like to use Atom.

  1. Create an empty .py file called ursina_game.py
  2. Copy this text into your new file:
from ursina import *           # this will import everything we need from ursina with just one line.

app = Ursina()

player = Entity(
    model = 'cube' ,           # finds a 3d model by name
    color = color.orange,
    scale_y = 2
    )

def update():                  # update gets automatically called by the engine.
    player.x += held_keys['d'] * .1
    player.x -= held_keys['a'] * .1

app.run()                     # opens a window and starts the game.
  1. Run this in the terminal start the game:

    python ursina_game.py
    

    ... or run it with your editor/IDE of choice.

  2. You can now move the orange box around with 'a' and 'd'!

    To close the window, you can by default, press control+shift+alt+q or press the red x.

Documentation

  • Ursina Documentation
    • Written explanations of core concepts and how Ursina works.
  • Ursina API Reference
    • List of Ursina's functions, classes and assets.
  • Samples
    • Small example games.

Found a bug? Posting it in Issues. Fixed a bug? Make a pull request.

Project Structure

…

GitHub Issues· 0 开放

在 GitHub 查看全部

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

核心特点

  • •python 3.10+
  • •pillow, for texture manipulation
  • •psd-tools, for converting .psd files
  • •blender, for converting .blend files
  • •pyperclip, for copy/pasting
  • •Minecraft Clone
  • •Platformer Game
  • •Ursina Documentation
  • •Written explanations of core concepts and how Ursina works.
  • •Ursina API Reference

> 标签

Python3d-game-enginegame-developmentgame-enginepython

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

> 工具信息

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

> 相关工具

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