Giter Site home page Giter Site logo

pyland's Introduction

alt tag

This project is pre-alpha, the state of the project changes rapidly from day to day. Follow us on twitter for updates, @ProjectPyland.

About

Pyland aims to provide a fun and creative environment on the Raspberry Pi (or other platforms) to aid children learning programming and Computer Science Concepts. It was started as a summer intern project at the University of Cambridge Computer Laboratory June-August 2014 supported by a grant from the Broadcom Foundation. It was started by Ben Catterall, Heidi Howard, Joshua Landau and Ashley Newson under the supervision of Alex Bradbury and Robert Mullins.

Screenshot

Install

These install instructions may be incomplete and you may require additional packages to the ones listed here

Getting Dependencies (Raspberry Pi)

Install packages from raspbian repo:

sudo apt-get install --no-install-recommends libx11-dev gdebi libtinyxml-dev g++-4.7 zlib1g-dev
sudo apt-get install --no-install-recommends mesa-common-dev mesa-utils build-essential gedit
sudo apt-get install --no-install-recommends libboost1.50-all-dev python3.2-dev libgl1-mesa-dev

Download and install extra dependancies:

mkdir pyl-temp
cd pyl-temp
wget http://people.ds.cam.ac.uk/ajn44/files/libsdl2_2.0.3-1_armhf.deb
sudo gdebi libsdl2_2.0.3-1_armhf.deb
wget http://people.ds.cam.ac.uk/ajn44/files/libsdl2-image_2.0.0-1_armhf.deb
sudo gdebi libsdl2-image_2.0.0-1_armhf.deb
wget http://people.ds.cam.ac.uk/ajn44/files/libsdl2-ttf_2.0.12-1_armhf.deb
sudo gdebi libsdl2-ttf_2.0.12-1_armhf.deb
wget http://people.ds.cam.ac.uk/ajn44/files/libgoogle-glog0_0.3.3-1_armhf.deb
sudo gdebi libgoogle-glog0_0.3.3-1_armhf.deb
wget http://people.ds.cam.ac.uk/ajn44/files/libgoogle-glog-dev_0.3.3-1_armhf.deb
sudo gdebi libgoogle-glog-dev_0.3.3-1_armhf.deb
cd ..

Get source code using git:

sudo apt-get install --no-install-recommends git-core
git clone http://github.com/pyland/pyland

Compiling on Raspberry Pi

cd pyland
#Put your python version here (change both PYTHON_VERSION and LIBBOOST_PYTHON). Need at least 3.2.
COMPILER=g++-4.7 PYTHON_VERSION=3.2 LIBBOOST_PYTHON=boost_python-py32 make

Compiling on Desktop - Unix

For desktop, you will need the packages listed above, many of which can be found on the repos e.g.

sudo apt-get install libsdl2-ttf-dev

For compiling on desktop, use:

# Set both PYTHON_VERSION and LIBBOOST_PYTHON.
# LIBBOOST_PYTHON is typically boost_python-py32 or boost_python3.
#
# Set COMPILER to the most recent g++ or clang++ version available,
# but at least g++-4.7 or a recent clang++. Plain "g++" is the default.
PLATFORM=desktop COMPILER=g++-4.7 PYTHON_VERSION=3.2 LIBBOOST_PYTHON=boost_python-py32 make

Please note that desktop support is secondary, and may be incomplete. At the moment, there is only a Unix version.

##Usage

To launch :

cd src
./main.bin

Keybindings

  • e - open the editor with current sprite's script

  • r - run the script for the current sprite

  • h - stop the script

  • Shift - Hold down when running a script for fast mode (can't use with manual control)

  • updownleftright / wasd - move sprite

  • m - print the focused sprite's location

  • escape - go back to level selection map

  • =- - zooming in and out

  • Ctrl-0 - return to default zoom level

##API

  • help() and help(command) - Get help on the current task and any in-game (or other) commands.

  • move(direction) - Move the character in the given direction. Parameter direction: north, east, south or west

  • walkable(direction) - Determines if the character can move in that direction. Parameter direction: north, east, south or west

  • cut(direction) - Cuts down vines or logs. Parameter direction: north, east, south or west

  • look(radius) - Find all objects in a given radius from the character. Parameter: radius of the area to search for objects in.

pyland's People

Contributors

asb avatar ashleynewson avatar bencatterall avatar cgbarnwell avatar heidihoward avatar jwakely avatar russel avatar veedrac avatar vinnievg avatar

Watchers

 avatar  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.