SimCity for OLPC (One Laptop Per Child): Applying Papert's Ideas About Constructionist Education and Teaching Kids to Program

Here are some ideas about applying Seymour Papert's philosophy of "Constructionist Education" to SimCity, by integrating it with the OLPC's "Sugar" user interface and Python-based scripting system.

Back in the early 90's, I ported the classic version of SimCity to Unix, first implementing a PostScript-based user interface for the NeWS window system with the HyperLook gui environment, then a multi-player TCL/Tk based user interface for the X11 window system, for the Sun, SGI, NCD and other X11-based systems.

I've updated the TCL/Tk/X11 version of SimCity to run on the latest version of Linux, and I'm in the process of adapting it for the OLPC. I got permission from Will Wright to show the unreleased development version of OLPC SimCity at the 2007 Game Developer's Conference (GDC). OLPC News wrote an article about SimCity on the OLPC XO, and Gamasutra reported that SJ Klein Asks For Serious OLPC Content at GCD.

SJ said that the OLPC project is looking not just for games, but for tools that enable kids to program their own games. "Existing games are nice, and cute," but games for things like learning language are the "gem they're targeting." Most importantly, Klein said in a direct plea to the serious game developers in front of him, the project needed frameworks and scripting environments -- tools with which children themselves could create their own content.

The TCL/Tk scripting languages and user interface toolkit was a great choice for X11 at the time (around 1992), and it still runs fine because the code is self-contained and X11 hasn't changed in all that time. But it would be wonderful to re-implement SimCity with a modern, powerful scripting language like Python, and create a kid-friendly user interface and scripting API, focused on Constructionist Education, and teaching kids creative writing and programming language skills.

The HyperLook version of SimCity had some cool features like map zooming and editing at any scale, and a user-customizable hypercard-like interface, that weren't easy to implement in TCL/Tk/X11 at the time. But fortunately, the OLPC's Sugar user interface takes advantage of Cairo and Pango for rendering graphics and text, which are better than PostScript!

The first step in integrating SimCity with Sugar is to clean up and modularize the C simulator code, and plug it into Python (which is a much more powerful scripting language than TCL, and the standard language for OLPC programming).

Sugar is based on Python, and uses the GTK toolkit, Cairo rendering library, Pango international text layout library, and Hippo drawing canvas, and many others useful modules. Once SimCity is integrated with Python, it will be great fun to create a kid-friendly multi-player user interface that's totally integrated with the OLPC's unique hardware design (like the hires mono/color LCD screen, which flips over into book mode with a game controller pad) and Sugar's advanced features, like scalable graphics, journaling, mesh networking, messaging, collaboration, and (most importantly) applying Seymour Papert's philosophy of "Constructionist Education" to SimCity.

The goals of deeply integrating SimCity with Sugar are to focus on education and accessibility for younger kids, as well as motivating and enabling older kids to learn programming, in the spirit of Seymour Papert's work with Logo. It should be easy to extend and re-program SimCity in many interesting ways. For example: kids should be able to create new disasters and agents (like the monster, tornado, helicopter and train), and program them like Logo's turtle graphics or Robot Odyssey's visual robot programming language!

The long term goal is to refactor the code so it can be scripted and extended in Python, and break out reusable general purpose components like the tile engine, sprite engine, etc, so kids can use them to build their own games, or create plug-ins and modify the graphics and behavior of SimCity.

The Cairo graphics based user interface will let you zoom into the map like Google Maps, overlay scalable information visualizations, drawings and text. The journaling interface will extend the SimCity save files with a blog-like history of events in the city timeline, enable players to write their own time-stamped and geo-coded stories about events on the map, and let you fast forward, rewind and branch time like a virtual TiVo. The mesh networking interface will let you share cities and play with friends over the network, vote on plans and issues, tell stories and publish journals/newspapers/blogs/maps about your cities.

Other Sugar developers are building visual programming interfaces that can be eventually be used to script the behavior of SimCity plug-ins!

OLPC project and programming philosophy

You say "it would be wonderful to re-implement SimCity with a modern, powerful scripting language like Python, and create a kid-friendly user interface and scripting API"...I say why not create an everyone-friendly user interface and scripting API. I have a hunch that people will jump on board the OLPC per your ideas because it won't be seen as a threat to commercial game creation business models. If one had a modern scripting language and a user-friendly interface and scripting API, the barriers to entry for producing commercial quality games would drop significantly, and likely the price of PC games at least would drop significantly.

Red Cloud Research