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.
Commodore’s C64 had a famously decisive, if drab set of 16 colors to choose from, a note of artistic intent amid the unthinking mathematical extremities of other 8-bit color palettes. But did you know there were secret colors? Aaron Bell writes up a discovery that blew his mind many years ago and which, 26 years […]
In celebration of Zelda: Breath of the Wild, Allen Pan built a wonderful home automation system where the interface is an ocarina as seen in The Legend of Zelda: Ocarina of Time. (Thanks, Lux!)
The Offworld Collection, presenting the very best features and essays from Offworld, is finally available to buy directly from Campo Santo for $40. I had the pleasure of designing and illustrating this splendid 250-page hardcover volume, but it’s the excellent writing, edited by Leigh Alexander and Laura Hudson, that makes it an essential buy. You […]
You know the drill. You go to the dentist and they ask you how often you floss. You lie through your teeth and say, “every day!” (Bonus points if you have some cilantro or chives stuck in your gums from lunch). You don’t want to keep up the charade any longer, but rubbing that tiny strand […]
The Raspberry Pi Foundation has done outstanding work packing a fully capable desktop computer into a package the size of a deck cards—especially one that only costs $35. But if you already have a working laptop, why should you care? Oh, how much you have to learn. Besides operating well as a compact digital media hub, […]
Custom coffee vessels are the perfect piece of office flair, but it’s just a matter of time before your VOTE FOR PEDRO mug will start to lose its relevant wit. Why not have a new one every day, with whatever silly nonsense you want sticking off the sides? You can save big on your novelty […]