SimCity for OLPC (One Laptop Per Child): Applying Papert's Ideas About Constructionist Education and Teaching Kids to ProgramSubmitted by dhopkins on Mon, 2007-03-19 22:58.
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!
The Soul of The Sims, by Will Wright
Tuesday, January 28, 1997 / 9:25 AM
I had just started working at the Maxis Core Technology Group on "Project X" aka "Dollhouse", and Will Wright brought this code in one morning, to demonstrate his design for the motives, feedback loop and failure conditions of the simulated people. While going through old papers, I ran across this print-out that I had saved, so I scanned it and cleaned the images up, and got permission from Will to publish it.
This code is a interesting example of game design, programming and prototyping techniques. The Sims code has certainly changed a lot since Will wrote this original prototype code. For example, there is no longer any "stress" motive. And the game doesn't store motives in global variables, of course.
My hope is that this code will give you a glimpse of how Will Wright designs games, and what was going on in his head at the time!
Pie Menus on Python/GTK/Cairo for OLPC Sugar, by Don Hopkins.
Demos of Pie Menus for OLPC (One Laptop Per Child) Sugar User Interface on XO Laptop
I've been doing some fun OLPC user interface programming in Python. The OLPC's open source software environment includes Linux (for operating), Python (for scripting), GTK (for widgets), Cairo (for structured/stencil/paint/outline graphics) and Pango (for formatted text with markup), and it totally rocks!
Four item pie menu with submenus:
Pop up the "Compass" pie submenu, which has eight pie items and three linear overflow items and select "NE". These menus support pure pie menus, pure linear menus, and hybrid pie/linear menus. They can limit the number of pie items to a convenient number like 8, and make the rest linear items.
Pop up a ridiculously complex "Ringed" pie submenu, which has four rings of items, the inner ring with only four, which are very easy to select, the next ring with eight, which are easy to select because they're further out, the next ring with 24, and the next ring with a bunch more, which are harder but possible to select. This is the ultimate stress test of ringed pie menus. (Well actually there is no limit to the number of rings, but too many rings and menu items may result in heavy, unstable, radioactive pie menus!)
Example SimCity Pie Menus
To demonstrate how icons can work together with help text in the footer, I've made a set of example pie menus for selecting SimCity editing tools (based on the graphics and layout of the old X11/TCL/Tk SimCity interface), in simcity_piemenus.py. Note: They do not actually do anything -- it's just a simulated simulation!
SimCity tool selection menu, with two submenus ("Zone..." and "Build..."), and six important quickly selectable editing tool items. Shows icons without labels, and descriptive help text in the footers.
SimCity Zone pie submenu. Six items for zoning residential, commercial and industrial, fire stations, police stations, and querying zones.
SimCity Build pie submenu. Six items for building parks, stadiums, seaports, coal power plants, nuclear power plants, and airports.
Somebody asked me about SimFaux:
This is pretty funny as it stands, but can it parody things Libs don't like to talk about like Dem politicos that flipflop every other speech, or Lib talking heads that forge news on the fly?
Of course SimFaux can parody liberals as well as conservatives, but the fact of the matter is that it's the conservatives who are fucking up the country right now and sending kids to die. The liberals are powerless and aren't the ones to blame for the horrible calamity that Bush has caused. So it's important to call the people who are causing the death and suffering on their lies.
The conservatives had their chance with Clinton's blow job, and they totally blew it with their self rightious indignation over harmless consentual sex. Talk about flip-flops: Where is the furious anger and relentless calls for impeachment now?
It's high time to impeach Bush for going to war based on lies and deception, sending thousands of Americans to their death, killing hundreds of thousands of Iraqis, leaking classified information about a CIA employee out of revenge for her husband telling the truth, breaking the law and subverting the constitution by spying on American citizens, his miserable failure with Hurricaine Katrina, his deep shameless corruption with Haliburton and Abramoff, etc. If you think none of that is any worse than a blow job, then you're a part of the problem.
I just started programming SimFaux at the beginning of this month, and the HuffingtonPost Contagious Festival has a 15 meg limit on size. But after the festival concludes, I'll host it on my own web site without any size limitations, put up a whole lot more content like characters, sound bites and videos, and release the source code as Open Source Software so you can modify it and put your own stuff in. But right now I have to cut it to the bone to stay within the 15 meg limit.
"FauxCasting" is a cinematic leap beyond podcasting and blogging, because it integrates keyword tagged text, video, sound bites, simulated characters and interactive widgets together in a way that the viewer has control over what they see and hear. You can experienced the joy of telling Bill O'Reilly to Shut Up and Go Away! The keyword tagging enables the characters and videos to interact with each other, and results in surprizing juxtapositionings, like Frank Zappa and Dick Cheney finding common ground by using the same cuss word that begins with F.
I'm inspired by ideas like Will Wright's "Designing for Emergent Behavior" and Chris Trottier's "Tuned Emergence" and "Design by Accretion", where the more content you put in, and the better you tune it, the closer you get to a nuclear reaction.
"If a game isn't tuned, it's a drag, and you can't stand to play it for an hour. The Sims and SimCity were "designed by accretion": incrementally assembled together out of "a mass of separate components", like a planet forming out of a cloud of dust orbiting around star. They had to reach critical mass first, before they could even start down the road towards "Tuned Emergence", like life finally taking hold on the planet surface. Even then, they weren't fun until they were carefully tuned just before they shipped, like the renaissance of civilization suddenly developing science and technology. Before it was properly tuned, The Sims was called "the toilet game", for the obvious reason that there wasn't much else to do!"
Here's another more down-to-earth example of what you can do with OpenLaszlo:
It's pronounced "Sim Foe". Like the Colbert report: it's french, bitch!
It has an cinematic interactive interface consisting of several different screen layouts, each with a different number of frames, which you can configure to display a variety of simulated characters, streaming videos, interactive surveys, and text talking points. Here's the conference screen layout showing several videos, a couple of characters, a survey and talking points:
A deadly virtual plague has broken out in the online game World of Warcraft. Although limited to only a few of the game's servers the numbers of characters that have fallen victim is thought to be in the thousands.
Originally it was thought that the deadly digital disease was the result of a programming bug in a location only recently added to the Warcraft game.
However, it now appears that players kicked off the plague and then kept it spreading after the first outbreak. [...]
In the last week, it added the Zul'Gurub dungeon which gave players a chance to confront and kill the fearsome Hakkar - the god of Blood.
In his death throes Hakkar hits foes with a "corrupted blood" infection that can instantly kill weaker characters.
The infection was only supposed to affect those in the immediate vicinity of Hakkar's corpse but some players found a way to transfer it to other areas of the game by infecting an in-game virtual pet with it.
This pet was then unleashed in the orc capital city of Ogrimmar and proved hugely effective as the Corrupted Blood plague spread from player to player.
Although computer controlled characters did not contract the plague, they are said to have acted as "carriers" and infected player-controlled characters they encountered. [...]Many online discussion sites were buzzing with reports from the disaster zones with some describing seeing "hundreds" of bodies lying in the virtual streets of the online towns and cities. [...]
The "Corrupted Blood" plague is not the first virtual disease to break out in online worlds. In May 2000 many players of The Sims were outraged when their game characters died because of an infection contracted from a dirty virtual guinea pig.
USAToady wrote an article about the "Battle over violent video games heating up".
First of all, to address the lame-assed attempt at a pun in the article title: I wish USAToady would just stop trying to be mildly but non-offensively funny, or else hire some real stand-up, knock-down, drag-out comedians like Al Franken to write their headlines.
The battle over violence. Ha ha ha not. The only thing they've been able to demonstrate so far, is that video games cause foolish violence and heated battles between fully grown politicians, who should know better. So stop selling video games to politicians.
"Those who favor laws restricting the sale or rental of violent videos to minors say government should treat the games like alcohol or tobacco."
Now there's a great idea: the Government should treat Violent Video Games like they do Big Tobacco.
Price support and production controls for violent video games: The computer game industry could really use the shot in the arm that would bring!
Should the government pay video game developes NOT to produce violent video games? They could keep their employees busy writing harmless cruise missile guidance systems and tactical nuclear warfare simulations for the war on terror, instead of developing violent games for kids.
Would Jesse Helms have mounted a filibuster, to prevent a video game tax hike, and protect the video game industry in his state? Will Texas Senator John Cornyn sell lawsuit protection to the Texas Violent Video Game Industry, just like he protected the Big Tobacco Industry from being sued for killing their customers?
This is stuff about computer game design.
The Future of Content
What I learned about content from the Sims.
...and why it's driven me to procedural methods.
...And what I now plan to do with them.
Game Developers Conference
Notes taken by Don Hopkins at the talk, and from other discussions with Will Wright.
IntroductionWill Wright started his talk by saying that he wanted to show this tothe game developer community first, before a commercial show like E3.
The Armchair Empire interviewed Chris Trottier, one of the designers of The Sims and The Sims Online. She touches on some important ideas, including "Tuned Emergence" and "Design by Accretion".
Chris' honest analysis of how and why "the gameplay didn't come together until the months before the ship" is right on the mark, and that's the secret to the success of games like The Sims and SimCity.
The essential element that was missing until the last minute was tuning: The approach to game design that Maxis brought to the table is called "Tuned Emergence" and "Design by Accretion". Before it was tuned, The Sims wasn't missing any structure or content, but it just wasn't balanced yet. But it's OK, because that's how it's supposed to work!
In justifying their approach to The Sims, Maxis had to explain to EA that SimCity 2000 was not fun until 6 weeks before it shipped. But EA was not comfortable with that approach, which went against every rule in their play book. It required Will Wright's tremendous stamina to convince EA not to cancel The Sims, because according to EA's formula, it would never work.
If a game isn't tuned, it's a drag, and you can't stand to play it for an hour. The Sims and SimCity were "designed by accretion": incrementally assembled together out of "a mass of separate components", like a planet forming out of a cloud of dust orbiting around star. They had to reach critical mass first, before they could even start down the road towards "Tuned Emergence", like life finally taking hold on the planet surface. Even then, they weren't fun until they were carefully tuned just before they shipped, like the renaissance of civilization suddenly developing science and technology. Before it was properly tuned, The Sims was called "the toilet game", for the obvious reason that there wasn't much else to do!
Here are some questions and answers from the interview with The Sims designer Chris Trottier: