Skip to content

oi #93

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 63 commits into
base: rooms
Choose a base branch
from
Open

oi #93

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
886f772
Update README
Feb 15, 2012
a81e11a
Jump height and mouse sensitivity in main.py
alexjmu Oct 23, 2012
4751efc
Merge pull request #2 from H34l0r/master
fogleman Oct 23, 2012
9235631
added LICENSE
fogleman Feb 3, 2013
fb1d8b9
Merge branch 'master' of https://github.com/fogleman/Minecraft
fogleman Feb 3, 2013
6e7f962
Fixed ctypes error and load directly from PNG
BlainMaguire Mar 5, 2013
5024739
A more majestic jump/gravity combination
ubershmekel Mar 29, 2013
06133b0
removed TEXTURE_DATA, just load it from file
fogleman Mar 29, 2013
b313ff1
Merge branch 'patch-1' of https://github.com/ubershmekel/Minecraft
fogleman Mar 29, 2013
ffdd542
TextureGroup path argument
fogleman Mar 29, 2013
7106671
added draw_focused_block
fogleman Mar 29, 2013
c7fe87c
markdown readme
fogleman Mar 29, 2013
915700d
Update README.md
fogleman Mar 29, 2013
818cc44
pep8
Mar 30, 2013
7042d8c
use GLfloat instead of c_float
fogleman Mar 31, 2013
e825d87
Added support for creating all types of breakable blocks.
geppettodivacin Mar 31, 2013
6c348ae
Use Pyglet 1.2 for OS X
silent1mezzo Mar 31, 2013
f582704
Tweaked textures to be more vibrant and simillar to original Minecraft
Mar 31, 2013
84e6e2e
Suggest multiple ways to run in OS X
silent1mezzo Mar 31, 2013
1b39e03
Merge from upstream.
geppettodivacin Mar 31, 2013
5d6190b
keys 1 - 0, not 0 - 9
fogleman Mar 31, 2013
8bc3605
How to play instructions in README
Apr 1, 2013
0d77539
Merge pull request #18 from RichVel/master
fogleman Apr 1, 2013
fae6988
Update README.md
fogleman Apr 1, 2013
95bf6cb
Merge branch 'osx-readme' of https://github.com/silent1mezzo/Minecraft
fogleman Apr 1, 2013
e1dd181
README update for Mac 32-bit issue #7, and installing git+pip on vari…
Apr 2, 2013
3b989d8
Merge pull request #22 from RichVel/master
fogleman Apr 2, 2013
77560c5
fixed link in README
Apr 2, 2013
14f6f6f
Merge pull request #24 from RichVel/master
fogleman Apr 2, 2013
56a0e28
another README link fix ...
Apr 2, 2013
0c4c4f9
Merge pull request #25 from RichVel/master
fogleman Apr 2, 2013
92723e7
Update README.md
fogleman Apr 2, 2013
07d069e
pep8 and add doc strings
Apr 3, 2013
a02cd4f
merge with upstream master
Apr 3, 2013
059b80a
remove TextureGroup definition
Apr 3, 2013
df11777
Fix jump
progval Apr 3, 2013
a595b40
Fix Python 3 compatibility.
progval Apr 3, 2013
0fd908f
more docstrings
Apr 3, 2013
2da9daf
Merge branch 'patch-1' of https://github.com/ProgVal/Minecraft
fogleman Apr 3, 2013
f2e7549
add more documentation
Apr 5, 2013
1f9a8f7
removed unused code
Apr 5, 2013
9adeeb8
change kwargs to be more self consistent
Apr 5, 2013
f0686c6
remove init_block() method
Apr 5, 2013
87d3b48
use deque
fogleman Apr 6, 2013
ae4c321
Document setup work.
jesstess Apr 17, 2013
8737ad9
Remove GL_FOG_DENSITY, which is unused when using the GL_LINEAR fog m…
jesstess Apr 27, 2013
e6cc7ef
Document motion and line of sight calculations.
jesstess Apr 27, 2013
c2f6028
Turn magic movement numbers into constants and compute jump speed ins…
jesstess Apr 27, 2013
6ebbad3
Pull out ticks per second into a constant.
jesstess Apr 28, 2013
a76ca15
Document collision detection.
jesstess Apr 28, 2013
eeaaba3
Make adding blocks work on OSX.
jesstess Apr 28, 2013
75e3bb7
Merge pull request #43 from jesstess/jesstess
fogleman May 1, 2013
d02cd72
added link to my other minecraft clone
fogleman Nov 25, 2013
a084614
Syntax highlighting added ✨
rmariuzzo Jul 27, 2016
50c6dd2
Merge pull request #76 from rmariuzzo/patch-1
fogleman Jul 27, 2016
d7b32d5
Merge remote-tracking branch 'upstream/master' into python3
progval Jan 8, 2017
43cdaad
Merge pull request #34 from ProgVal/python3
fogleman Jan 9, 2017
ea8f5e5
Add files via upload
OneSharpAce Feb 16, 2019
38a98d4
Merge pull request #94 from OneSharpAce/master
fogleman Feb 17, 2019
b0d6b70
[Fix] time.clock() deprecated in Python 3.8
marco97pa Dec 14, 2020
e311522
Merge pull request #123 from marco97pa/master
fogleman Dec 14, 2020
de42fe0
docs: fix simple typo, lenth -> length
timgates42 Dec 23, 2020
65c759c
Merge pull request #126 from timgates42/bugfix_typo_length
fogleman Dec 23, 2020
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
7 changes: 7 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright (C) 2013 Michael Fogleman

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Empty file removed README
Empty file.
106 changes: 106 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Minecraft

Simple Minecraft-inspired demo written in Python and Pyglet.

http://www.youtube.com/watch?v=kC3lwK631X8

**Like this project?**

You might also like my other Minecraft clone written in C using modern OpenGL (GL shader language). It performs better, has better terrain generation and saves state to a sqlite database. See here:

https://github.com/fogleman/Craft

## Goals and Vision

I would like to see this project turn into an educational tool. Kids love Minecraft and Python is a great first language.
This is a good opportunity to get children excited about programming.

The code should become well commented and more easily configurable. It should be easy to make some simple changes
and see the results quickly.

I think it would be great to turn the project into more of a library / API... a Python package that you import and then
use / configure to setup a world and run it. Something along these lines...


```python
import mc

world = mc.World(...)
world.set_block(x, y, z, mc.DIRT)
mc.run(world)
```

The API could contain functionality for the following:

- Easily configurable parameters like gravity, jump velocity, walking speed, etc.
- Hooks for terrain generation.

## How to Run

```shell
pip install pyglet
git clone https://github.com/fogleman/Minecraft.git
cd Minecraft
python main.py
```

### Mac

On Mac OS X, you may have an issue with running Pyglet in 64-bit mode. Try running Python in 32-bit mode first:

```shell
arch -i386 python main.py
```

If that doesn't work, set Python to run in 32-bit mode by default:

```shell
defaults write com.apple.versioner.python Prefer-32-Bit -bool yes
```

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.

Or try Pyglet 1.2 alpha, which supports 64-bit mode:

```shell
pip install https://pyglet.googlecode.com/files/pyglet-1.2alpha1.tar.gz
```

### If you don't have pip or git

For pip:

- Mac or Linux: install with `sudo easy_install pip` (Mac or Linux) - or (Linux) find a package called something like 'python-pip' in your package manager.
- Windows: [install Distribute then Pip](http://stackoverflow.com/a/12476379/992887) using the linked .MSI installers.

For git:

- Mac: install [Homebrew](http://mxcl.github.com/homebrew/) first, then `brew install git`.
- Windows or Linux: see [Installing Git](http://git-scm.com/book/en/Getting-Started-Installing-Git) from the _Pro Git_ book.

See the [wiki](https://github.com/fogleman/Minecraft/wiki) for this project to install Python, and other tips.

## How to Play

### Moving

- W: forward
- S: back
- A: strafe left
- D: strafe right
- Mouse: look around
- Space: jump
- Tab: toggle flying mode

### Building

- Selecting type of block to create:
- 1: brick
- 2: grass
- 3: sand
- Mouse left-click: remove block
- Mouse right-click: create block

### Quitting

- ESC: release mouse, then close window
33 changes: 0 additions & 33 deletions encode.py

This file was deleted.

Loading