ursina engine
ursina engine
ʕ •ᴥ•ʔゝ□
--------------------------------------
open source game engine
--------------------------------------

GitHub🡕 Tutorials Documentation Twitter🡕




A variety of games made with Ursina



Powered by Python

    Ursina makes it easier to develop games, visualizations and other kinds software.
    The concise API combined with the power of the Python programming language,
    makes life easier for the developer so they can focus on what they are making.

    Things you won't miss:

        • Waiting for your code to compile
        • The editor crashing and possibly losing your work
        • Not being able to fix engine bugs or add features
        • Overly verbose code
        • Uncustomizable workflow
        • Waiting for imports
        • Long build times
        • Revenue cut or subscription fee


Useful Features

        • Reload code/textures/models while in-game
        • Automatic import of .psd and .blend files
        • Play in fullscreen while developing
        • Easy to use mesh class for making procedural geometry
        • Lots of included procedural 3D primitives



Platforms

        • Windows
        • Mac
        • Linux


Free and Open Source

    Licenced under the permissive MIT license,
    you can use Ursina for whatever you want. No supscription fee, no revenue cut.



Getting Started

    1) Install Python 3.6 or newer. https://www.python.org/downloads/
    2) Make sure you have git installed. https://git-scm.com/
    3) Open cmd/terminal and type:

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 install as develop like this:

git clone https://github.com/pokepetter/ursina.git
python setup.py develop

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

pip install git+https://github.com/pokepetter/ursina.git#egg=ursina[extras]



Dependencies

    • python 3.6+
    • panda3d
    • screeninfo, for detecting screen resolution
    • pillow, for texture manipulation

    • psutil, for measuring memory usage (optional)
    • hurry.size, for converting bytes to megabytes (optional)
    • imageio, for recording and converting to gifs (optional)
    • psd-tools, 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.