Coder Social home page Coder Social logo

traverseda / pycraft Goto Github PK

View Code? Open in Web Editor NEW
1.1K 51.0 100.0 718 KB

A fork of "Minecraft in 500 lines of python" intended to someday be used as a real engine, instead of as a learning example.

License: MIT License

Python 97.65% GLSL 0.67% Shell 1.68%

pycraft's Introduction

https://travis-ci.org/traverseda/pycraft.svg?branch=master https://coveralls.io/repos/github/traverseda/pycraft/badge.svg?branch=master

PyCraft

A community driven fork of foglemans "Minecraft" repo.

#pycraft on freenode

Motivation

Python is somewhat poorly suited for game development. However it is well suited to data-science. A lot of our tasks, working with large voxels sets, strongly resemble the kind of problems you encounter in data science.

The big advantage comes from limiting "real-time" state. By not relying on anything having to happen now, we can do more complicated computation. At the low-end, that means we can implement much more complicated occluding algorithms, and thus draw more complicated scenes.

This kind of split could also be used to run more complicated types of operations, like a cellular automata crudely simulating things like plant growth or water.

When possible, we would prefer to "scale-out". We don't care about outright efficiency too much, rather we care that our solutions can work for very large or very complicated operations. The exact opposite of "typical" game development methodology, which would prefer solutions that "scale-up", solutions that a very fast for the type of data they expect to deal with.

It is currently pre-alpha quality.

Screenshot

Virtual Environment (Recommended)

# create a virtual environment
virtualenv -p python3 ~/.venv/pycraft # (or wherever)
# you may need to add execute permissions
chmod -R a+x ~/.venv
# activate
. ~/.venv/pycraft/bin/activate # on mac
. ~/.venv/pycraft/Scripts/activate # on windows
# deactivate (when you're done)
deactivate

Installing

pip install -e .

option 1:

pip install -e .[dev]
# or: python3 setup.py develop
pycraft

option 2:

python -m pycraft
# or: python3 -m pycraft

Features

  • Support for python 3.5
  • Simple Perlin Noise terrain generator
  • Object-oriented blocks system

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 the 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

Contributing

We support and encourage contributions.

Attributions

The game textures "Piehole" by Alex Voelk is licensed under CC BY 3.0.

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.