Skip to content

Added ability to use esc key to exit, and readme for details #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions UrsaCraft_video.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def update():
if held_keys['2']: block_pick = 2
if held_keys['3']: block_pick = 3
if held_keys['4']: block_pick = 4
if held_keys['escape']: sys.exit()

class Voxel(Button):
def __init__(self, position = (0,0,0), texture = grass_texture):
Expand Down
46 changes: 46 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Minecraft in python

For a walkthrough of the development, and code explanation check out the video [here](https://www.youtube.com/watch?v=DHSRaVeQxIk&feature=youtu.be). This is meant to be a ursina demo, not a full game.



**Currently ursina does not support MacOS, and so this can't be run on MacOS computers**



## Setup

You will need to have python installed, along with pip for python.



To get setup run:

1. `pip install ursina` or `sudo pip3 install ursina`
2. Run `python UrsaCraft_video.py` or `python3 UrsaCraft_video.py` to start the game



## Controls

W - Move forward

A - Move left

D - Move right

S - Move backward

Left mouse click - Add block of currently selected block type

Right mouse click - Remove currently highlighted block (highlight by hovering over with your mouse)

1 - Set block type to grass

2 - Set block type to stone

3 - Set block type to brick

4 - Set block type to dirt

esc - Exit game