Skip to main content

An easy to use game engine/framework for python.

Project description

ursina ʕ •ᴥ•ʔゝ□

An easy to use game engine/framework for python.

Banner

Getting Started

  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 git, you can install 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 install as develop like this. Make sure you have git installed. https://git-scm.com/

    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 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.

Dependencies

  • python 3.6+
  • panda3d
  • screeninfo, for detecting screen resolution
  • hurry.filesize, for converting bytes to megabytes
  • 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.

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. Type this in the terminal to start the game:

    python ursina_game.py
    

    If you use Atom, I recommend installing the package atom-python-run to run your scripts with the press of a button.

  2. 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. to disable this, write 'window.exit_button.enabled = False' somewhere in your code.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ursina-3.5.0.tar.gz (994.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ursina-3.5.0-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file ursina-3.5.0.tar.gz.

File metadata

  • Download URL: ursina-3.5.0.tar.gz
  • Upload date:
  • Size: 994.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.2

File hashes

Hashes for ursina-3.5.0.tar.gz
Algorithm Hash digest
SHA256 9b940962bbbc9ec90bbe10a63f798d18079320f53a52fa87d110641e9f23e1db
MD5 9e8f578045d66e160f167f61054bc1fa
BLAKE2b-256 3a14a67d34588effb47c8045eaf9a4c807ca0b6afd62b6db9ea4ad723c39327a

See more details on using hashes here.

File details

Details for the file ursina-3.5.0-py3-none-any.whl.

File metadata

  • Download URL: ursina-3.5.0-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.2

File hashes

Hashes for ursina-3.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 def0ef8ef8e6c4c51129ce7ff9ed1d352d781e151165812cb3c7cd434f3aa757
MD5 cf9c819f9fb8a75bdb417c2b56c85910
BLAKE2b-256 4a118c15677872076b37c510a412c9ca36d979578ac090c8f4efb75841dc9082

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page