# ursina ʕ •ᴥ•ʔゝ□
An easy to use game engine/framework for python.
![Banner](/docs/made_with_ursina.jpg)
## Getting Started
1) Install Python 3.6 or newer
2) Make sure you have git installed.
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
## 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
## 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 tun 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.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
PyPI 官网下载 | ursina-0.3.tar.gz (139个子文件)
_bat_to_exe.bat 1KB
setup.cfg 42B
MANIFEST.in 189B
shore.jpg 218KB
sky_default.jpg 119KB
sky_sunset.jpg 87KB
reflection_map_3.jpg 6KB
README.md 2KB
PKG-INFO 284B
PKG-INFO 284B
gem.png 44KB
bag.png 43KB
sword.png 40KB
heightmap_1.png 32KB
bow_arrow.png 25KB
ursina_logo.png 17KB
orb.png 16KB
cursor.png 15KB
radial_gradient.png 7KB
circle.png 4KB
arrow_right.png 3KB
arrow_down.png 3KB
white_cube.png 3KB
brick.png 3KB
file_icon.png 3KB
folder.png 3KB
horizontal_gradient.png 3KB
vertical_gradient.png 3KB
ursina_wink_0001.png 827B
ursina_wink_0000.png 760B
items.psd 316KB
generate_normals.py 33KB
entity.py 32KB
text_field.py 18KB
text.py 13KB
mesh_importer.py 13KB
hot_reloader.py 10KB
mouse.py 10KB
mesh.py 9KB
window.py 9KB
curve.py 8KB
file_browser.py 7KB
main.py 6KB
raycaster.py 6KB
button.py 6KB
camera.py 6KB
texture.py 5KB
terrain.py 5KB
build.py 5KB
editor_camera.py 5KB
platformer_controller_2d.py 5KB
video_recorder.py 5KB
audio.py 5KB
slider.py 5KB
collider.py 4KB
color.py 4KB
draggable.py 4KB
ursinastuff.py 4KB
window_panel.py 4KB
animation.py 4KB
texture_importer.py 4KB
input_handler.py 4KB
ursinamath.py 3KB
button_list.py 3KB
first_person_controller.py 3KB
sequence.py 3KB
health_bar.py 3KB
prismatoid.py 3KB
combine.py 3KB
button_group.py 3KB
radial_menu.py 3KB
colored_lights.py 3KB
colorize.py 3KB
dropdown_menu.py 2KB
quad.py 2KB
scene.py 2KB
sphere.py 2KB
__init__.py 2KB
basic_lighting.py 2KB
application.py 2KB
input_field.py 2KB
duplicate.py 2KB
camera_vertical_blur.py 2KB
grid_layout.py 2KB
animator.py 2KB
trigger.py 2KB
vec3.py 2KB
cone.py 2KB
normals.py 2KB
file_browser_save.py 2KB
cube.py 1KB
string_utilities.py 1KB
camera_contrast.py 1KB
merge_vertices.py 1KB
scrollable.py 1KB
tooltip.py 1KB
smooth_follow.py 1KB
camera_grayscale.py 1KB
cursor.py 1KB
debug_menu.py 975B
共 139 条
- 1
- 2
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
前往页