Slashdot Mirror


SimCity Source Code Is Now Open

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!"

18 of 360 comments (clear)

  1. Craptastic Code? by DingerX · · Score: 5, Insightful
    FTA:

    There's still a lot of craptastic code in there, but the heart of the software (the simulator) hasn't changed.


    I dunno, from the QA side in 88/89, the results were darn clean. The simulation would crash from time to time, but the interface, never. To all those who point to multi-threaded apps and say it's too hard for coders to do, I'd suggest that really good programmers are hard to come by.

    So maybe somebody can point to what's being complained about here. Back in the day, we didn't have the luxury of infinite space for code and variables. But from a quality-of-product point-of-view, very little could match (and can match) SimCity
    1. Re:Craptastic Code? by anss123 · · Score: 2, Insightful

      The PC version was in all likelihood ported from the Amiga, not the Mac. The Mac and Amiga versions came out around the same time (1989) with the PC version coming out months later.

    2. Re:Craptastic Code? by Jussi+K.+Kojootti · · Score: 4, Insightful

      That Microsoft would make an accommodation six years later doesn't strike me as an instance of bad coding- heck, if you present most game developers today with the choice of the "right way" or an expedient that works much better, and caution that the expedient will only work for six years, what do you think they'll pick?
      Using memory after releasing it is bad coding, however you spin it. It's also bad coding even if "most game developers" would do it. It's pretty much guaranteed that even the DOS version crashed because of this: it just didn't do it everytime. So the "works for six years" excuse is probably bollocks (although if you did QA for that version too, you probably know better :)).
  2. Re:Boo-hoo by Fred_A · · Score: 5, Insightful

    The plane crash disaster has been removed as a result of 9/11 This is ridiculous. I hope fires have also been removed as a result of California fires, tornadoes as a result of the Indian ocean tsunami and the big monster invasion as a result of Cmdr Taco. Other wise it wouldn't be very respectful for the victims you know.
    --

    May contain traces of nut.
    Made from the freshest electrons.
  3. So where is it? by eddy · · Score: 2, Insightful

    Contrary to the title, this doesn't seem to be the actual SimCity source code. I'm interested in source code like this, but I want the 'original', not something that has been mashed up and modified by a middleman. This is as useful for historical insight a klingon version of the new testament.

    --
    Belief is the currency of delusion.
  4. good news by brunoacf · · Score: 5, Insightful

    That's amazing. It would be very nice if the code of other titles were released also. Many old (but good) softwares were forgoten because their sources were not available to maintain it's life.

  5. Re:No, its worse by Zadaz · · Score: 2, Insightful

    Hunh. And here I was thinking that my 2Ghz computer could run-time compile code faster than my old 4Mhz computer could run native code.

    Glad you set me straight on that.

    C++ & Python does seem to be a weird and cumbersome choice though. But when all you have is a hammer everything looks like a nail. I hope at least the core simulation is all one language.

  6. Re:No, its worse by Sentry21 · · Score: 5, Insightful

    Your post shows a deep lack of understanding of how and where Python is used, and for what purposes. As an example, Civilzation IV is written partially in Python (the user interface, as I recall), and EVE Online has a significant portion written in Python as well. Considering that a lot of what Python does is I/O bound, and a lot more can be done in outside libraries (e.g. DirectX), using Python in game development can make things a lot easier, and a lot easier to modify down the road.

    Put aside your prejudices and you may actually learn something.

  7. Re:No, its worse by PinkPanther · · Score: 4, Insightful

    C++ & Python does seem to be a weird and cumbersome choice though. But when all you have is a hammer everything looks like a nail

    One person's hammer is another person's "right tool". If you read the article, it appears to me that the guy who ported the code has a clue about a few things. I'm gonna bet that his choice of Python was thought through. Likely he is leveraging some existing infrastructures that he knows, thus speeding the time-to-release. To me, that's a very handy hammer.

    The code is now open. Feel free to hack onto oblivion the design choices you don't appreciate.

    --
    It's a simple matter of complex programming.
  8. The plane crash disaster has been removed as a res by Anonymous+Homo · · Score: 5, Insightful

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

    It's official, the terrorists have won.

  9. Re:What the fuck are you talking about? by SimHacker · · Score: 5, Insightful

    The original SimCity code written in C ran just fine of an 8 bit 1.02 MHz 6510. And I've optimized to run even more efficiently since then. So worrying about Python slowing SimCity down is totally lacking in perspective -- penny wise but pound foolish. SimCity is already many orders of magnitude faster than it needs to be. Anyway, the core simulator is written in C, so Python doesn't slow it down at all. You should learn more about Python programming, developing Python modules in C and C++, and using SWIG for integrating Python and native code, and using Python as an embedded application extension language, before "making such [...] comments".

    Using Python drastically speeds up the software development process, which is a great thing when software developer's time is so expensive, and computers are so fast. Python is also is a much easier language for kids to read, learn and program -- and the OLPC is an educational project, not a laptop project.

    -Don

    --
    Take a look and feel free: http://www.PieMenu.com
  10. Re:SNES version? by Constantine+XVI · · Score: 2, Insightful

    Unless you live in some alternate universe, (where I would like to move), SNES games are 800 points ($8 US).

    --
    "I think an etch-a-sketch with an ethernet port would beat IE7 in web standards compliance."
  11. Re:PostScript by SimHacker · · Score: 4, Insightful

    NeWS was like AJAX, but with PostScript instead of JavaScript for programming, with PostScript instead of DHTML for rendering, and with PostScript instead of XML for data representation.

    -Don

    --
    Take a look and feel free: http://www.PieMenu.com
  12. Re:Opportunity for a more realistic SimCity... by SimHacker · · Score: 5, Insightful

    From Designing User Interfaces to Simulation Games, a summary of Will Wright's talk to Terry Winnograd's User Interface Class at Stanford, in 1996.:

    Other people wanted to use SimCity for the less noble goal of teaching people what to think, instead of just teaching them to think.

    Everyone notices the obvious built-in political bias, whatever that is. But everyone sees it from a different perspective, so nobody agrees what its real political agenda actually is. I don't think it's all that important, since SimCity's political agenda pales in comparison to the political agenda in the eye of the beholder.

    Some muckety-muck architecture magazine was interviewing Will Wright about SimCity, and they asked him a question something like "which ontological urban paridigm most influenced your design of the simulator, the Exo-Hamiltonian Pattern Language Movement, or the Intra-Urban Deconstructionist Sub-Culture Hypothesis?" He replied, "I just kind of optimized for game play."

    -Don

    --
    Take a look and feel free: http://www.PieMenu.com
  13. Re:Nice move, but... by Shados · · Score: 2, Insightful

    Im guessing part of the reason is that it takes time to release code in "open source"-able format... Often, commercial software is written assuming that no one else will ever need to use it, so it may very well have weird dependencies...stuff like, to compile it you need a machine named "JOESBUILDER" with a X drive mapping to some network ressource, and all that is hardcoded... internally it didnt matter, but when you open source it, that doesn't work.

    Cleaning up code -production code- is often not an option in the commercial world, nevermind code thats not used and doesn't return a profit anymore.

    Add to that, that a lot of games, especially more recent ones, are full of middlewares that the company doesn't own...that rules those out.

  14. Re:Version? by toddestan · · Score: 2, Insightful

    I thought that SimCity 2000 was the best myself. I tried SimCity 3000, and while it was cool and had some awesome ideas, all the micro-managing eventually got annoying (a common flaw it seems with strategy/simulations game sequels as computers get more powerful, the Master Of Orion series also suffered from this). I want to design and lay out my city, not having to constantly run around replacing the dozens of bloody water pumps as they wear out. A close second might be SimCity for the Super Nintendo, which was very well done and had a nice amount of polish on top of the PC/Mac versions of the game, with the only real flaw being that the game ran pretty slow on the SNES's CPU.

    I admitedly never have tried SimCity 4, for fear it was going to be like 3000, only even more annoying.

  15. Re:The plane crash disaster has been removed as a by Anonymous Coward · · Score: 4, Insightful

    It's free software. Put that shit back in.

    (That and I want a global thermal-nuclear war scenerio.)

  16. Re:The plane crash disaster has been removed as a by orkysoft · · Score: 2, Insightful

    Okay, that wasn't the best post ever. But Troll?

    Anyway, the plane crash is one of the milder disasters in Sim City, so it would be teaching the kids that place crashes don't do much damage.

    Actually, I think it wouldn't remind most of those kids of anything.

    --

    I suffer from attention surplus disorder.