Follow Slashdot stories on Twitter


Forgot your password?
Programming IT Technology Entertainment Games

SimCity Source Code Is Now Open 360

Tolkien writes "Source code for SimCity has been released under the GPLv3. For legal reasons the open source version was renamed Micropolis, which was apparently the original working title. The OLPC will also be getting a SimCity branded version that has been QA'ed by Electronic Arts. Some very cool changes have been made by Don Hopkins, who updated and ported what is now Micropolis. (Here is an earlier Slashdot discussion kicked off by a submission Don made.) Among other things, it has been revamped from the original C to using C++ with Python. Here is the page linking all the various source code versions. Happy hacking!"
This discussion has been archived. No new comments can be posted.

SimCity Source Code Is Now Open

Comments Filter:
  • Version? (Score:5, Interesting)

    by Anonymous Coward on Saturday January 12, 2008 @04:09PM (#22017624)
    I can't see anywhere stating the obvious, what version is it? Simcity classic, 2000? 3000? 4000?

    I'm assuming the classic, which is a shame as I felt 2000 was one of the few times a sequel actually made the game better. Unfortunately 3000 and 4000 continued to suggest otherwise however.

    Even if it's just classic however I'm sure I remember even that had some differences between platforms.

    Perhaps I'm just blind but it'd be interesting to know which version this is!
  • Boo-hoo (Score:5, Interesting)

    by Anonymous Coward on Saturday January 12, 2008 @04:21PM (#22017766)

    The plane crash disaster has been removed as a result of 9/11
    This is ridiculous.
  • by Skim123 ( 3322 ) <mitchell AT 4guysfromrolla DOT com> on Saturday January 12, 2008 @04:23PM (#22017800) Homepage
    Does anyone know if there are Win32 binaries available?
  • by that this is not und ( 1026860 ) on Saturday January 12, 2008 @04:46PM (#22018000)
    True, but did they open-source the expansion packs??

    (historical note- there was an early binary edit 'exploit' for SimCity that worked for bypassing the 'Brown Paper' copy protection, but as soon as you bought and installed an Expansion pack it quit working)
  • by Anonymous Coward on Saturday January 12, 2008 @05:04PM (#22018148)
    No. This code is heavily dependent on Xlib. You could try compiling it with Cygwin and running it with one of the X servers for Windows, but word on the street is that this is unsuitable. Your best bet is to just install Linux, and run it on that.
  • Re:port to win32 (Score:3, Interesting)

    by BrentH ( 1154987 ) on Saturday January 12, 2008 @05:07PM (#22018186)
    You can pick up Simcity4 for like 5 euro, and (especially with Rush Hour) is a _much_ better game and you don't need supermodern hardware to play it.
  • Lincity Absorption (Score:5, Interesting)

    by Zombie Ryushu ( 803103 ) on Saturday January 12, 2008 @05:07PM (#22018194)
    So lets have the Lincity project absorb this project. Lincity NG is graphically on par with Simcity 2000, but its playability is lower and it misses features. Simcity 2000 was just a graphically enhanced Sincity Classic with a few playability enhancements and more structures. I see no reason why the LinCity project can't just assimilate this project, call it Super Lincity, and use the nessessary areas from Metropolis to fill its deficencies.
  • Re:Craptastic Code? (Score:2, Interesting)

    by unlametheweak ( 1102159 ) on Saturday January 12, 2008 @05:17PM (#22018300)
    Sim City and all the Sim games worked very well on my High Res black and white Mac Plus. When I tried the Windows versions, in colour no less, they looked and felt so cheap and amateurish (back in the DOS and Windows 3.1 days).

    The Mac seemed such a natural platform for Maxis in those days.
  • by SimHacker ( 180785 ) on Saturday January 12, 2008 @06:31PM (#22019054) Homepage Journal

    Agreed. But Java isn't exactly what I'd call a scripting language. What I expect from a scripting language is the easy ability to interact with it on a command line or interactive interpretive interface (like Smalltalk). (It doesn't actually have to be interpreted, just compiled fast enough that I don't notice, like many Lisps and OpenLaszlo implement their interactive command line.) Java's problem is not just that the compilers and tools aren't set up for interactive evaluation, but also that the syntax makes it extremely tedious and required typing a lot of boilerplate structural crap. Of course there are some good interactive interpreted languages like JavaScript (Rhino), Python (Jython) and Groovy implemented in Java.

    The great thing about integrating C++ modules like micropolis with Python is that you can play around with it from the keyboard, test and debug it easily, and get it to work quickly. Immediately after I compiled the micropolis module for the first time, I was able to import it, make a simulator, load a city, set the tax rate, and run the simulation loop, all from the keyboard! Then I copied that code I typed into a python file, and I had the first test framework.


  • Re:No, its worse (Score:5, Interesting)

    by SimHacker ( 180785 ) on Saturday January 12, 2008 @06:57PM (#22019300) Homepage Journal

    The UI is quite abstract. I had to cleanly separate the UI and the simulator engine to port SimCity to NeWS, and TCL/Tk maintained that separation. The new MicropolisCore has all the UI code taken out, so all the rendering and event handing has to be implemented outside of the simulator core, in a scripting language like Python, with a graphics library like Cairo, and a user interface toolkit like GTK.

    The new Micropolis core simulator engine talks to the tile engine through efficient raw memory pointers. Micropolis hands the tile engine a pointer to its tile memory and a description of the format, and a tile bitmap and a description of the tile layout (including an indirect tile map). The tile engine uses Cairo to render the tiles. Cairo is a much more advanced imaging library than SDL, and most importantly it supports Unicode and fully internationalized text via the Pango library (OLPC activities must support many different languages). Cairo enables scaling and transformation, vector graphics, anti-aliasing, clipping, SVG, etc. It is more like the PostScript based user interface to SimCity I developed for NeWS. The Cairo tile engine supports zooming into the city, and the old NeWS version used to let you play the game at any scale. Zooming is very important on the OLPC's 200 dot per inch resolution screen, because the unscaled tiles are very small, and kids like to zoom in to look closer at the city, so it's easier to see. Another reason for using Cairo is that it's great for drawing map overlays and data visualizations, with scalable vector graphics, transparency, etc. And also, Cairo is hardware accelerated on Linux, the Mac and Windows, so it can draw extremely fast and still look pretty.


  • Re:Finally! (Score:4, Interesting)

    by Ailure ( 853833 ) on Saturday January 12, 2008 @07:20PM (#22019518) Homepage
    Lincity is a clone of Simcity?

    Hell, it's more similar to SimIsle than Simcity actually. Lincity was too much of a "everything is a consumable resource" game, which was rather silly...

    I would say that Simcity 4 is the most advanced simulator I played so far, that is also playable as a game.

    Though in terms of open source simulation games, nothing beats openTTD. :) Simcity, might be a good competitor though.
  • by stargo ( 523562 ) on Saturday January 12, 2008 @09:52PM (#22020626)
    Success :-)
    My patch agains micropolis can be found at: []
    This patch also seems to fix graphic problems on Linux with a 24 bit X server.
  • Re:Version? (Score:3, Interesting)

    by cbreaker ( 561297 ) on Sunday January 13, 2008 @12:43AM (#22021706) Journal
    You can switch to Zone view and you'll see bus stops, subways, etc but not buildings, and you can also view different types of buildings and they get highlighted. For instance, you can click Health and all the hospitals show up bright green on the map.

    I never found it to be a big problem.
  • by Anonymous Coward on Sunday January 13, 2008 @08:00AM (#22023972)
    Seriously, reading shit like this kinda freaks me out. This is a phenomenon only found on /.. Not only does some dude go around remembering that an ancient game had problems with stuff happening left of the city center (which makes me slightly worried regarding his mental health), but someone else comes up with an answer to it (which makes me really worried about his mental health). And this isn't just some kind of "I wanna post, just to post", bullshit, kind of answer, he actually seems to know what the hell his talking about. I think I should change my thesis to discuss this, and name it "Slashdot, we're all freaks, and we have the GPL'd code to prove it".
  • Re:Craptastic Code? (Score:2, Interesting)

    by tuxic ( 769908 ) * on Sunday January 13, 2008 @08:24AM (#22024064) Homepage
    One of the things I remember from playing the sequel, SimCity 2000, is that the GUI looks like it's been ported from the Mac.
  • by Animats ( 122034 ) on Sunday January 13, 2008 @10:12PM (#22030352) Homepage

    It's a type of bug more common back when memory was limited. Classically, it was a spreadsheet bug. The dumb way to evaluate a spreadsheet is to start at the upper left, evaluating the formula (if any) for each cell. If any formula refers to a value that's to the right or below the cell being evaluated, the spreadsheet values will be wrong. Each time you hit the recalculate key, the values propagate through one more wrong-direction dependency. Once you've hit "recalc" enough times, the values stabilize. Unless the spreadsheet actually has a dependency loop, in which case they continue to change with every recalc.

    All the early desktop spreadsheet programs (VisiCalc, etc.) used this dumb algorithm. The correct way to do it was known, but had been patented in 1969 []. It's also much more complicated to do it right; you have to build graphs, sort them by dependencies, and detect loops. It's so simple to do it with two nested FOR loops, and most of the time the complex algorithm yields the same answer as the dumb one.

    Anything that has in-place updates of a grid of cells with arbitrary dependencies on other cells potentially has this problem. So it crops up in games, in image processing algorithms, and in simulations now and then.

"So why don't you make like a tree, and get outta here." -- Biff in "Back to the Future"