ursina ʕ •ᴥ•ʔゝ□
Website | Discord | Twitter | Patreon | Sponsor
An easy to use game engine/framework for python.
Getting Started
-
Install Python 3.10 or newer.
-
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.
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.
- Create an empty .py file called
ursina_game.py - 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.
-
Run this in the terminal start the game:
python ursina_game.py... or run it with your editor/IDE of choice.
-
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
## Project Structure
📁docs
📃index.txt
📃documentation.txt
📃inventory_tutorial.txt
...
# text files for the website. gets turned into .html files with sswg.
📃cheat_sheet.html
# auto generated documentation made with documentation_generator.py.
📃tutorial_generator.py
# turns specific .py files into .txt files, which can then be turned into .html by sswg.
# this extracts the comments from the source files into description for that step and the code after into code blocks.
# see platformer_tutorial.py for an example.
📁samples # small example games.
📁ursina # the actual ursina module.
📁audio # built-in audio clips.
📁editor # the 3d level editor for ursina.
📁fonts # built-in fonts.
📁models # .blend files, source files, for built-in 3d models.
📁procedural # classes for generating 3d models, like Cylinder, Quad and Terrain.
📁models_compressed # .blend files converted to .ursinamesh.
📁prefabs # higher level classes like Draggable, Slider, Sprite, etc.
📃__init__.py
📃application.py
📃audio.py
...
# ursina base modules, like code for Entity, input_handler, Text, window and so on.
Metadata
Release files for ursina 8.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ursina-8.3.0.tar.gz | 4.3 MB | Without provenance | Details for ursina-8.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ursina-8.3.0-py3-none-any.whl | Python 3 | none | any | Details for ursina-8.3.0-py3-none-any.whl |
Total release size: 8.6 MB
Release files / ursina-8.3.0.tar.gz
| Download URL | ursina-8.3.0.tar.gz |
|---|---|
| Size | 4.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a2f6a7973c2dd805130dbdb080f76ab43995bfa5a83438c7a016fbe4268deb6d
|
|
BLAKE2b-256 checksum How to use checksums |
2a7f89ce04495597830aad2734b9a4c62068b9a61eab9f592541e46e881535f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.11
|
Release files / ursina-8.3.0-py3-none-any.whl
| Download URL | ursina-8.3.0-py3-none-any.whl |
|---|---|
| Size | 4.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9202abb94824614e837d1dd8766e295cf426c3c7910ccab9f885c7436fff8e3d
|
|
BLAKE2b-256 checksum How to use checksums |
c29af32dac3e2405dbc6613304ac660546b9a60369a1c41b8d963552793603c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.11
|
Security for ursina 8.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.