Coder Social home page Coder Social logo

pycraft's Introduction

Run on Repl.it

Pycraft

A command line based 2D Minecraft, runs best on *nix with Python 3.3+. Built by geraintwhite and olls.

Usage: python3 main.py

Pycraft gameplay image

Controls

For the best control, set keyboard repeat time to around 200-300ms.

Menus:
   Move up                    - W or UP
   Move down                  - S or DOWN
   Select                     - SPACE or RETURN
   Pause                      - SPACE or RETURN
Blocks:
   Break/place block          - K
   Move cursor clockwise      - L
   Move cursor anti-clockwise - J
Inventory:
   Cycle inventory down       - O
   Cycle inventory up         - U
   Toggle crafting menu       - C
   Craft selected item        - I
Movement:
   Move left                  - A
   Move right                 - D
   Jump                       - W

Crafting

A number of items are only obtainable through the crafting system. Items that can be crafted with the materials in the player inventory will automatically show up in the crafting grid. Press C to toggle selection between inventory and crafting grid. Press I to craft the currently selected item.

Recipes:

  • 6 sticks:
    • 1 wood
  • 4 torches:
    • 1 stick
    • 1 coal
  • ladder:
    • 3 sticks
  • wooden pickaxe:
    • 2 sticks
    • 3 wood
  • stone pickaxe:
    • 2 sticks
    • 3 stone
  • iron pickaxe:
    • 2 sticks
    • 3 iron
  • diamond pickaxe:
    • 2 sticks
    • 3 diamonds

Tools:

Certain blocks require the right tool before being able to mine it. The tool has to be selected in inventory to be able to use it. Each tier of pickaxe can break more blocks than the previous tier.

  • fist (i.e. don't need a tool):
    • grass
    • tall grass
    • wood
    • leaves
    • torch
    • ladder
  • wooden pickaxe:
    • stone
  • stone pickaxe:
    • coal
    • iron
  • iron pickaxe:
    • redstone
    • gold
    • diamond
  • diamond pickaxe:
    • emerald

Using the C Renderer

The C renderer is likely to be faster than the Python renderer. To use the C renderer, it must be compiled first. To complile, run the command: python3 setup.py build in the root of the repository. Then run the game as normal and go into settings to switch the renderers.

Please report any bugs in the C renderer, or differences between the Python renderer and the C renderer in issues.

Contributing

We welcome pull requests or issues for bug reports/fixes or new feature ideas! Help us make the game more fun :D

pycraft's People

Contributors

olls avatar geraintwhite avatar isidentical avatar devmaxiss avatar sullyjhf avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.