Presented at PyCon UK 2014.
See the code at: https://github.com/pyland/pyland
This summer, a team of interns at the University of Cambridge Computer Lab have been working on a project to teach children to program in Python through a programming game. The primary target platform is the Raspberry Pi, though multi-platform ports are planned for the future. It is, of course, open source. The game consists of a number of challenges and puzzles which invite the user to apply programming techniques in order to progress. I will discuss the motivation for the game, give a demo, give some insight into its implementation, our plans for the future, and how you can get involved.
Teaching children to program
Python with the Pyland game
Alex Bradbury @asbradbury
Who is this guy?
● Alex Bradbury, @asbradbury, [email protected]
● Researcher at University of Cambridge Computer
Laboratory (compiler! many core architectures!)
● Contributor to Raspberry Pi since the beginning
● Co-author of Learning Python with Raspberry Pi
● Writes the LLVM Weekly newsletter http://llvmweekly.
● Co-founder of lowRISC, a project to create a mass
produced open-source System-on-Chip http://lowrisc.
What is Pyland?
● A programming game
consisting of a set of
challenges - solve the
puzzles, get the treasure
● Characters can be
controlled with Python
● Featuring lovely 2D tile-
● Summer intern project:
Ben Catterall, Heidi
Howard, Joshua Landau
and Ashley Newson
supervised by me and
Pyland motivation and aims
● “To provide a fun and creative environment on the
Raspberry Pi to aid children learning programming and
more general Computer Science concepts.”
● Provide a bridge between Scratch and Python (11-12
● Be engaging, appealing, fun!
● Give motivations for programming: demonstrate how
programming can be used to achieve goals much faster
● It was a 10 week project...
● Runs great on the Raspberry Pi
● Core engine features implemented and
● Three ‘sample challenges’
● Not quite ready for exposure to the little ones
● Support multiple characters, concurrent
execution of multiple scripts
A blast from the past
● Code plus some architecture docs at github.com/pyland/pyland
● MIT licensed code, Creative Commons Attribution-ShareAlike (CC-BY-SA)
● SDL2, OpenGL and OpenGL ES rendering
● Python 3 (of course!)
● Main engine: C++11. Each user script runs in a different Python thread
● Python API calls push to the event queue to be processed by main event
● Maps created using Tiled map editor, challenges implemented with some
C++ code :/
What’s next for Pyland?
● Full set of challenges
○ This is *difficult* (thanks for your help, PyCon UK
● Integrated text editor
● Multi-platform support
● Better error message feedback (see Khan Academy
● GUI prettification
● Make your own levels in Python and share them
● Collaborative programming over the network
“Hey Alex, how can I help?”
● Sponsorship (we’re looking for matched funding for art
assets, more development work, ...)
● Code (try it out, add new features, bugfix)
● Challenge design (we have a bunch of art assets
● Test it out with kids (in a few months time)
● Advice - how do you think we should take this further?
Twitter: @ProjectPyland, @asbradbury
Thanks to: our summer interns (Ben Catterall, Heidi
Howard, Joshua Landau and Ashley Newson) and the