SimCity goes free software

SimCity has just been released as free software under the GPL version 3 license (though the name has been changed to Micropolis for trademark reasons; it was the original working title). This was precipitated by the inclusion of SimCity on the One Laptop Per Child XO machines, but no reason the kids should have all the fun. Can't wait to see the SimCity hacks that emerge now:

The "MicropolisCore" project includes the latest Micropolis (SimCity) source code, cleaned up and recast into C++ classes, integrated into Python, using the wonderful SWIG interface generator tool. It also includes a Cairo based TileEngine, and a cellular automata machine CellEngine, which are independent but can be plugged together, so the tile engine can display cellular automata cells as well as SimCity tiles, or any other application's tiles.

The key thing here is to peek inside the mind of the original Maxis programmers when they built it. Remember, this was back in the day when games had to fit inside of 640k so some "creative" programming techniques were employed. SimCity has been long a model used for urban planning and while it's just a game, there are a lot of business rules, ecosystem modeling, social dependencies, and other cool stuff going on in this codebase. It may not be pretty code but it's content sure is interesting to see.

In any case, it's out there for you to grab and have fun with. It was originally written in C and of course is old (created before 1983 which is ancient in Internet time). Don spent a lot of time cleaning the code up (including ANSIfying it, reformatting it, optimizing, and bullet-proofing it) as best he could. Don ported the Mac version of SimCity to SunOS Unix running the NeWS window system about 15 years ago, writing the user interface in PostScript. A year or so later he ported it to various versions of Unix running X-Windows, using the TCL/Tk scripting language and gui toolkit. Several years later when Linux became viable, it was fairly straightforward to port that code to Linux, and then to port that to the OLPC.

Link (via /.)

21

  1. great, but the only interesting port would be nintendo DS. And we already have a Sim City DS and soon a Sim City DS 2…

  2. Regardless of the port, this is big news to those of us who knew and loved Sim City back when it first came out. I gave a part of my life to that “game”.

  3. I had a friend who worked for Maxis for a while ‘back in the day’. He built the abstraction layers and cross-platform code engine that allowed SimTown to have near-simultaneous Mac/PC release, rather than having to start each port from scratch. I suppose by that point fitting the bytecode into such a small footprint wasn’t as important, and OOP methodologies were getting a stronger foothold in the development communities outside the halls of academia. Good to hear that the original source of the first game has continued to evolve.

  4. Great game, great news!

    Can’t wait to see the SimCity hacks that emerge now

    And I can wait to see the hacks from the more talented childs with their OLPCs:
    http://www.python.org/doc/essays/everybody.html

    The “MicropolisCore” project includes the latest Micropolis (SimCity) source code, cleaned up and recast into C++ classes, integrated into Python,

    Take a week to learn Python and hack it yourself :)

  5. The best thing I learned from SimCity (other than how to deal with a monster attack) stays with me to this day: the only way you can ease traffic congestion is to build more effective mass transportation. If you just build more roads, they’ll just fill up with more cars.

    Now that it’s open source, I think I’ll send a copy to everyone in government here in Los Angeles, so they can understand why our city is such a clusterfuck of constant traffic misery, and why our metro is such a joke.

  6. Los Angeles’ traffic is spread-out misery; for truly concentrated traffic hell just head due north. Seattle’s traffic misery is second to none – we’ve even got a Loma Prieta earthquake horror all set to happen (“the alaskan way viaduct”). and yes every citizen of seattle that recently voted against mass transit should be forced to play SimCity until they “get it” [wheeze]

  7. Theophrastus, I’ve lived in Los Angeles, and I’ve lived in Seattle, and I have to say that I found getting around LA every day much more painful than commuting across the floating bridges. The 520 clears up pretty well by 10am. Getting from Wilshire to Burbank remains a nightmare til midnight.

    That said, I’m as peeved as you are that a majority of regional voters chose against building mass transit — that light rail line would have gone directly from my home to my office. I view its cancellation as a personal attack by the 698,635 people who voted against Prop 1.

  8. Just like to point out there have been open source simcity like engines and games, that are far more evolved than this. While it’s a great peice of history and deserves to be gpl’d if you want something a little more appealing. Check

    http://lincity-ng.berlios.de/

    There is also an opencity project but having not used that I can’t comment.

  9. Wow, that’s a flashback, raised my kids playing this era Sim city. They learned macro economics better from that game than any high school course.
    In fact some enrterprising teachers I knew used it as a class team project. Now lets see how I can screw up the code!

  10. The best thing I learned from SimCity (other than how to deal with a monster attack) stays with me to this day: the only way you can ease traffic congestion is to build more effective mass transportation. If you just build more roads, they’ll just fill up with more cars.

    Wait, are you saying the exabyte flood is real and we can’t simply overprovision bandwidth forever?

    Regardless of the port, this is big news to those of us who knew and loved Sim City back when it first came out. I gave a part of my life to that “game”.

    Ironically, these are often the same people who “don’t see the point” of Second Life. A decade from now people “playing” SL will probably reminisce in the same fashion.

    writing the user interface in PostScript. Wait, what?

    See NeWS. PostScript is Turing complete after all.

  11. “The plane crash disaster has been removed as a result of 9/11.”

    Oh, frakkin’ please.

    All the more incentive to put it back in, and make it even worse.

  12. I had this thought the other day (a combination of updating my Resume and reading this post): What have I learned from video games?

    Online Certificate Courses in an afternoon? Online colleges? Brainbench.com? How well do I have to do at SimCity to get a certificate in introductory city planning? How well do I have to do at Myst to get a certificate in rudimentary logic and problem solving?

    There is a very real ability for games to teach us things, and ironically we’ve yet to learn that.

    There are exceptions… combat sims for the military, consumer products for youngsters, and even dull dull poorly designed SAT and life skills training games for young adults (for godsakes someone make THAT a consumer entertainment product), but we’ve yet to realize the full potential here. Hell, Dance Dance Revolution just barely teaches us how to dance and Guitar Hero doesn’t teach us to play guitar. How funny is that?

    SimCity already has the following, someone should revamp it as an adult education tool (without sucking the fun out of it).

    Also, put the damn plane crash back in; removing neither undoes nor causes 9/11. I helped put together lists of casualties during Katrina and it was really tough, but whether or not my video games come with flooding has no bearing on that whatsoever. Actually, change the stats so that plane crashes more realistically and we can all learn how NOT to urban plan near airports.

    All Last Starfighter references are obligatory.

  13. The plane crash disaster has been removed as a result of 9/11.

    Yes, because obviously passenger jets smashing into skyscrapers has been proven an unrealistic disaster for cities, and thus was removed from the simulation.

  14. @Christopher Lotito

    “…and life skills training games for young adults…”

    Wait, isn’t that what those hentai/dating sim games are for? Or are they somehow unrealistic?!

    Noes!

  15. THEOPHRASTUS and others, you’ve got it backwards why I and some other Seattle-area residents voted against the last transit proposition. We would vote for mass transit if it did not include more roads.

  16. THEOPHRASTUS and others, you’ve got it backwards why I and some other Seattle-area residents voted against the last transit proposition. We would vote for mass transit if it did not include more roads.

  17. The Life of Bryan@12:

    Yes indeed, Postscript isn’t just a printing language, it’s also a display language. NeXT’s OpenStep GUI was written in it, was licensed by Sun and subsequently appeared in their Common Desktop Environment. It’s also part of OS X, although the display engine has moved away from it since 10.0 and recent versions haven’t been OpenStep compliant. I believe its main function is now in some printing engines and the native PDF support.

  18. I’d love for other classic PC games to go open source. Such as MechWarrior 2 or the Papyrus Nascar Racing games. These games are all out-of-print, the only copies floating around are from resellers or collectors who are making big bucks on rare copies. What have the publishers got to lose?

Comments are closed.