Skip to content

Simple Minecraft-inspired program using Python and Pyglet

License

Notifications You must be signed in to change notification settings

gentoomaniac/Minecraft

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Minecraft

Simple Minecraft-inspired demo written in Python and Pyglet.

Goals and Vision

This is a fork of a project from fogleman. It is purely educational for learning Python.

How to Run

pip install pyglet
git clone https://github.com/gentoomaniac/Minecraft.git
cd Minecraft
./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:

arch -i386 python main.py

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

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:

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 using the linked .MSI installers.

For git:

  • Mac: install Homebrew first, then brew install git.
  • Windows or Linux: see Installing Git from the Pro Git book.

See the 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
  • C: crouch
  • Tab: toggle flying mode
  • ctrl + c: save config
  • ctrl + s: save game

Building

  • Selecting type of block to create:
    • 1: stone (5 life)
    • 2: sand (0 life)
    • 3: grass (1 life)
    • 4: brick
  • Mouse left-click: remove block
  • Mouse right-click: create block

Quitting

  • ESC: release mouse, then close window

About

Simple Minecraft-inspired program using Python and Pyglet

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%