File README.md changed (mode: 100644) (index 564d407..9c2113d) |
... |
... |
and see the results quickly. |
21 |
21 |
I think it would be great to turn the project into more of a library / API... a Python package that you import and then |
I think it would be great to turn the project into more of a library / API... a Python package that you import and then |
22 |
22 |
use / configure to setup a world and run it. Something along these lines... |
use / configure to setup a world and run it. Something along these lines... |
23 |
23 |
|
|
24 |
|
import mc |
|
25 |
|
|
|
26 |
|
world = mc.World(...) |
|
27 |
|
world.set_block(x, y, z, mc.DIRT) |
|
28 |
|
mc.run(world) |
|
|
24 |
|
|
|
25 |
|
```python |
|
26 |
|
import mc |
|
27 |
|
|
|
28 |
|
world = mc.World(...) |
|
29 |
|
world.set_block(x, y, z, mc.DIRT) |
|
30 |
|
mc.run(world) |
|
31 |
|
``` |
29 |
32 |
|
|
30 |
33 |
The API could contain functionality for the following: |
The API could contain functionality for the following: |
31 |
34 |
|
|
|
... |
... |
The API could contain functionality for the following: |
34 |
37 |
|
|
35 |
38 |
## How to Run |
## How to Run |
36 |
39 |
|
|
37 |
|
pip install pyglet |
|
38 |
|
git clone https://github.com/fogleman/Minecraft.git |
|
39 |
|
cd Minecraft |
|
40 |
|
python main.py |
|
|
40 |
|
```shell |
|
41 |
|
pip install pyglet |
|
42 |
|
git clone https://github.com/fogleman/Minecraft.git |
|
43 |
|
cd Minecraft |
|
44 |
|
python main.py |
|
45 |
|
``` |
41 |
46 |
|
|
42 |
47 |
### Mac |
### Mac |
43 |
48 |
|
|
44 |
49 |
On Mac OS X, you may have an issue with running Pyglet in 64-bit mode. Try running Python in 32-bit mode first: |
On Mac OS X, you may have an issue with running Pyglet in 64-bit mode. Try running Python in 32-bit mode first: |
45 |
50 |
|
|
46 |
|
arch -i386 python main.py |
|
|
51 |
|
```shell |
|
52 |
|
arch -i386 python main.py |
|
53 |
|
``` |
47 |
54 |
|
|
48 |
55 |
If that doesn't work, set Python to run in 32-bit mode by default: |
If that doesn't work, set Python to run in 32-bit mode by default: |
49 |
56 |
|
|
50 |
|
defaults write com.apple.versioner.python Prefer-32-Bit -bool yes |
|
|
57 |
|
```shell |
|
58 |
|
defaults write com.apple.versioner.python Prefer-32-Bit -bool yes |
|
59 |
|
``` |
51 |
60 |
|
|
52 |
61 |
This assumes you are using the OS X default Python. Works on Lion 10.7 with the default Python 2.7, and may work on other versions too. Please raise an issue if not. |
This assumes you are using the OS X default Python. Works on Lion 10.7 with the default Python 2.7, and may work on other versions too. Please raise an issue if not. |
53 |
62 |
|
|
54 |
63 |
Or try Pyglet 1.2 alpha, which supports 64-bit mode: |
Or try Pyglet 1.2 alpha, which supports 64-bit mode: |
55 |
64 |
|
|
56 |
|
pip install https://pyglet.googlecode.com/files/pyglet-1.2alpha1.tar.gz |
|
|
65 |
|
```shell |
|
66 |
|
pip install https://pyglet.googlecode.com/files/pyglet-1.2alpha1.tar.gz |
|
67 |
|
``` |
57 |
68 |
|
|
58 |
69 |
### If you don't have pip or git |
### If you don't have pip or git |
59 |
70 |
|
|