1) Install Python 3.6 or newer.
https://www.python.org/downloads/
2) Open cmd/terminal and type:
pip install ursina
If you want to install the newest version from GitHub, you can install like this:
or
pip install git+https://github.com/pokepetter/ursina.git
Keep in mind that things *could* break.
If you want to easily edit the source, it's recommended to clone the git
repo and install as develop like this. Make sure you have git installed.
https://git-scm.com/
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.
If the pip command is not found, you can use:
python -m pip install ursina
Dependencies
• python 3.6+
• panda3d
• screeninfo, for detecting screen resolution
• pillow, for texture manipulation
• psutil, for measuring memory usage (optional)
• hurry.filesize, for converting bytes to megabytes (optional)
• imageio, for recording and converting to gifs (optional)
• psd-tools3, for converting .psd files (optional)
• blender, for converting .blend files (optional)
Optional dependencies must be installed manually.
Examples
Entity Example:
from ursina import * # import everything we need with 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.
How do I make a game?
Ursina games are made by writing Python code. You can use any text editor you want.
1) Create an empty .py file called 'ursina_game.py'
2) Copy this text into your new file:
from ursina import *
app = Ursina()
player = Entity(model='cube', color=color.orange, scale_y=2)
def update(): # update gets automatically called.
player.x += held_keys['d'] * .1
player.x -= held_keys['a'] * .1
app.run() # opens a window and starts the game.
3) Type this in the terminal to start the game. I recommend setting a hotkey
for this in your text editor:
python ursina_game.py
The game should start! You can now move the orange box around with 'a' and 'd'!
To close the window, you can by default, press shift+q or press the red x.
A variety of games made with Ursina