A Minecraft-inspired game for the terminal
Python C
Latest commit 4be129c Feb 16, 2017 @olls olls committed on GitHub New GIF
Permalink
Failed to load latest commit information.
.gitignore update gitignore Dec 26, 2016
LICENSE Update LICENSE Aug 5, 2015
README.md New GIF Feb 16, 2017
colours.c Should be using fabs for floating point numbers Aug 15, 2016
colours.py Remove duplicate functions Feb 18, 2016
console.py Fix env.get typo Apr 15, 2016
convert.py Neatened some things Oct 1, 2014
data.c Merge branch 'mobs' into python-renderer-update Feb 12, 2017
data.py Merge branch 'python-renderer-update' Feb 12, 2017
items.py Player death drops last 5 mins Dec 19, 2016
main.py add mobs feature toggle Feb 12, 2017
mobs.py Player drops items when dead. Dec 18, 2016
nbinput.py Add escape code support for non-blocking input, #92 Jan 28, 2016
network.py Improve network reliability for receiving, #39, #90 Jan 31, 2016
player.py Player drops items when dead. Dec 18, 2016
render.h Merge branch 'mobs' into python-renderer-update Feb 12, 2017
render.py Merge branch 'mobs' into python-renderer-update Feb 12, 2017
render_c_module.c add get_light_level c renderer call Feb 13, 2017
saves.py disable mobs by default Feb 16, 2017
server.py add mobs feature toggle Feb 12, 2017
server_interface.py add mobs feature toggle Feb 12, 2017
setup.py Add C build stage for translating data.py to data.c Aug 22, 2016
terrain.py Chunk cellular automata cave generation Aug 23, 2016
tester.py add mobs feature toggle Feb 12, 2017
translate_data.py Use lighting buffer to fill in background lights Jan 23, 2017
ui.py save settings in menu to file Feb 16, 2017

README.md

Pycraft (Termcraft)

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

Usage: python3 main.py

Pycraft gameplay image

Controls

For the best control, you should set your 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 crafting them using the crafting system. Items that you can craft with the items in your inventory will automatically show up in the crafting grid. Press C to toggle your 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 you to craft the right tool before being able to mine it. The tool has to be selected in your inventory to be able to use it. Each tier of pickaxe allows you to 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, but to use it you must compile it first. To do this run the command: python3 setup.py build in the root of the repository. Then run the game as normal, and go in to the settings to swich the renderer.

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

Contributing

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