diff --git a/UrsaCraft_video.py b/UrsaCraft_video.py index 5813d04..8106538 100644 --- a/UrsaCraft_video.py +++ b/UrsaCraft_video.py @@ -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): diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..893accc --- /dev/null +++ b/readme.md @@ -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 \ No newline at end of file