# ursina ʕ •ᴥ•ʔゝ□
An easy to use game engine/framework for python.
![Banner](/docs/made_with_ursina.jpg)
[![Trailer](/docs/ursina_trailer_preview.webp)](https://youtu.be/j71j88oCTNo)
## 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
* pillow, for texture manipulation
* psd-tools, for converting .psd files
* blender, for converting .blend files
* pyperclip, for copy/pasting
## Examples
``` python
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](/samples/minecraft_clone.py)
* [Platformer Game](/samples/platformer.py)
## 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:
``` python
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.
```
3) 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.
4) 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 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.
```
Raw data
{
"_id": null,
"home_page": "https://github.com/pokepetter/ursina",
"name": "ursina",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "game development",
"author": "Petter Amland",
"author_email": "pokepetter@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/ff/13/76ff76de0839c68e58a6a927438778b98c7ca7f38dce517e359a3721498e/ursina-7.0.0.tar.gz",
"platform": null,
"description": "# ursina \u0295 \u2022\u1d25\u2022\u0294\u309d\u25a1\nAn easy to use game engine/framework for python.\n\n![Banner](/docs/made_with_ursina.jpg)\n\n[![Trailer](/docs/ursina_trailer_preview.webp)](https://youtu.be/j71j88oCTNo)\n\n## Getting Started\n1) Install Python 3.6 or newer. https://www.python.org/downloads/\n2) Open cmd/terminal and type:\n\n```\npip install ursina\n```\n\n\nIf you want to install the newest version from git, you can install like this:\n\n```\npip install git+https://github.com/pokepetter/ursina.git\n```\n\n\nIf you want to easily edit the source, it's recommended to clone the git\nrepo and install as develop like this. Make sure you have git installed. https://git-scm.com/\n\n```\ngit clone https://github.com/pokepetter/ursina.git\npython setup.py develop\n```\n\n\nAlso install any of the optional dependencies you want from the list below,\nor install them all with:\n\n```\npip install ursina[extras]\n```\n\n\nOn some systems you might have to use pip3 instead of pip in order to use Python 3 and not the old Python 2.\n\n\n## Dependencies\n * python 3.6+\n * panda3d\n * pillow, for texture manipulation\n * psd-tools, for converting .psd files\n * blender, for converting .blend files\n * pyperclip, for copy/pasting\n\n\n## Examples\n``` python\nfrom ursina import * # this will import everything we need from ursina with just one line.\n\napp = Ursina()\nground = Entity(\n model = 'cube',\n color = color.magenta,\n z = -.1,\n y = -3,\n origin = (0, .5),\n scale = (50, 1, 10),\n collider = 'box',\n )\n\napp.run() # opens a window and starts the game.\n```\n\n\n* [Minecraft Clone](/samples/minecraft_clone.py)\n\n* [Platformer Game](/samples/platformer.py)\n\n\n## How do I make a game?\nUrsina games are made by writing Python code. You can use any text editor you want, but personally I like to use Atom.\n1) Create an empty .py file called `ursina_game.py`\n2) Copy this text into your new file:\n``` python\nfrom ursina import * # this will import everything we need from ursina with just one line.\n\napp = Ursina()\n\nplayer = Entity(\n model = 'cube' , # finds a 3d model by name\n color = color.orange,\n scale_y = 2\n )\n\ndef update(): # update gets automatically called by the engine.\n player.x += held_keys['d'] * .1\n player.x -= held_keys['a'] * .1\n\n\napp.run() # opens a window and starts the game.\n```\n\n3) Type this in the terminal to start the game:\n\n python ursina_game.py\n If you use Atom, I recommend installing the package atom-python-run to run your scripts with the press of a button.\n\n4) You can now move the orange box around with 'a' and 'd'!\n\n 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.\n\n\n## Project Structure\n```\n## Project Structure\n\n\ud83d\udcc1docs\n \ud83d\udcc3index.txt\n \ud83d\udcc3documentation.txt\n \ud83d\udcc3inventory_tutorial.txt\n ...\n # text files for the website. gets turned into .html files with sswg.\n\n \ud83d\udcc3cheat_sheet.html\n # auto generated documentation made with documentation_generator.py.\n\n \ud83d\udcc3tutorial_generator.py\n # turns specific .py files into .txt files, which can then be turned into .html by sswg.\n # this extracts the comments from the source files into description for that step and the code after into code blocks.\n # see platformer_tutorial.py for an example.\n\n\ud83d\udcc1samples # small example games.\n\n\ud83d\udcc1ursina # the actual ursina module.\n \ud83d\udcc1audio # built-in audio clips.\n \ud83d\udcc1editor # the 3d level editor for ursina.\n \ud83d\udcc1fonts # built-in fonts.\n \ud83d\udcc1models # .blend files, source files, for built-in 3d models.\n \ud83d\udcc1procedural # classes for generating 3d models, like Cylinder, Quad and Terrain.\n \ud83d\udcc1models_compressed # .blend files converted to .ursinamesh.\n \ud83d\udcc1prefabs # higher level classes like Draggable, Slider, Sprite, etc.\n\n \ud83d\udcc3__init__.py\n \ud83d\udcc3application.py\n \ud83d\udcc3audio.py\n ...\n # ursina base modules, like code for Entity, input_handler, Text, window and so on.\n\n```\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "An easy to use game engine/framework for python.",
"version": "7.0.0",
"project_urls": {
"Homepage": "https://github.com/pokepetter/ursina"
},
"split_keywords": [
"game",
"development"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0579f2d8d88adc8cfc86da15ab6ac8f9f4670d5367b6bf94642ffe0ebec4d963",
"md5": "a32868da0aea1fa535e1490fd4f41aa1",
"sha256": "f80a8ee84c299b835075d37780fd4607bd20cf85f9dacc59376d9535b51bb7c3"
},
"downloads": -1,
"filename": "ursina-7.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a32868da0aea1fa535e1490fd4f41aa1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 3137991,
"upload_time": "2024-04-21T21:12:40",
"upload_time_iso_8601": "2024-04-21T21:12:40.001280Z",
"url": "https://files.pythonhosted.org/packages/05/79/f2d8d88adc8cfc86da15ab6ac8f9f4670d5367b6bf94642ffe0ebec4d963/ursina-7.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ff1376ff76de0839c68e58a6a927438778b98c7ca7f38dce517e359a3721498e",
"md5": "abecfc3d97f438fc2017c0c015396e8e",
"sha256": "838970dadcd4b40d77b4d5c80ab2c99fc869d2b455de75b733b0f1f74a8874d1"
},
"downloads": -1,
"filename": "ursina-7.0.0.tar.gz",
"has_sig": false,
"md5_digest": "abecfc3d97f438fc2017c0c015396e8e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 3034282,
"upload_time": "2024-04-21T21:13:12",
"upload_time_iso_8601": "2024-04-21T21:13:12.980725Z",
"url": "https://files.pythonhosted.org/packages/ff/13/76ff76de0839c68e58a6a927438778b98c7ca7f38dce517e359a3721498e/ursina-7.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-21 21:13:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pokepetter",
"github_project": "ursina",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ursina"
}