From a6b764d784da318f2ac28bad8f33873dddd7712a Mon Sep 17 00:00:00 2001 From: Kieran Wood Date: Thu, 23 Sep 2021 14:46:34 -0600 Subject: [PATCH 1/2] Added escape to exit --- UrsaCraft_video.py | 1 + 1 file changed, 1 insertion(+) 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): From 0906f45614ecb7a10f8ee7ee64137e5259872178 Mon Sep 17 00:00:00 2001 From: Kieran Wood Date: Thu, 23 Sep 2021 14:50:19 -0600 Subject: [PATCH 2/2] Added readme docs --- readme.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 readme.md 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