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

82 of 360 comments (clear)

  1. All of a sudden... by Anonymous Coward · · Score: 5, Funny

    ... a big scream was heard, as if a thousand hours had suddenly been lost.

    1. Re:All of a sudden... by fodi · · Score: 5, Funny

      There's nothing wrong with the copy at all. This is just the open source version. To get it working:

      1. Reinstall your OS, taking note of which libraries you compile into the kernel and which you merely reference as modules (this will be used later).

      2. Scan all the ansi files in the download and replace references to other hardware with the .c files representing those in your own system. Re-Make the game and the installer and install it to a folder accessible by all users on your system, unless you're the only user and have a separate partition for your /usr path and wish to install there.

      3. Start the game, turn off sound and network options (don't kid yourself; it's for the best) and start a new game.

      4. If it runs too slowly, go back to step one and change the kernel\module mix to something more suitable.

      Yes, this was an OSS troll and a superficial attempt at light humour... take a breath, count to ten, then mod me down.

      - fodi
      5. Play !!

  2. 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 chgros · · Score: 3, Informative

      But from a quality-of-product point-of-view, very little could match (and can match) SimCity
      Well, except for the use after free bug that required a special case in Windows 95 so that the game would keep working.
      See e.g. here (look for SimCity):
      http://www.joelonsoftware.com/articles/APIWar.html

    2. Re:Craptastic Code? by ddrichardson · · Score: 5, Funny

      Slashdot, the only place one can make a flippant remark regarding the state of 20 year old code and successfully find someone who worked on it.

      --
      A thistle is a fat salad for an ass's mouth...
    3. Re:Craptastic Code? by jericho4.0 · · Score: 5, Funny

      My personal favorite /. moment was someone telling John Carmack he didn't know what he was talking about.....

      --
      "A language that doesn't affect the way you think about programming, is not worth knowing" - Alan Perlis
    4. 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.

    5. Re:Craptastic Code? by jericho4.0 · · Score: 2, Informative

      Sorry, no link, and /. search is no help. He was talking about OpenGL and why it's worth supporting, IIRC.

      --
      "A language that doesn't affect the way you think about programming, is not worth knowing" - Alan Perlis
    6. Re:Craptastic Code? by jensend · · Score: 5, Informative

      That would be this.

    7. Re:Craptastic Code? by tuxic · · Score: 2, Interesting

      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.

      --
      "People are stupid. Persons are smart" -- Agent K, MiB.
    8. 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 :)).
  3. Version? by Anonymous Coward · · Score: 5, Interesting

    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!

    1. Re:Version? by ShadowMarth · · Score: 2, Informative

      Apologies for the unnecessary correction, but it's Sim City 4, not 4000. Just nitpicking, I'm afraid. Honestly, though, I thought 3000 was the best. Sim City 4 is just entirely unforgiving.

    2. Re:Version? by X0563511 · · Score: 5, Informative

      had you looked at the links, you would see this screenshot.

      Looks a lot like Classic.

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    3. Re:Version? by X0563511 · · Score: 3, Informative

      And, because nyud.net is slow-as-hell, here is a direct link.

      (there is a larger version on the website but I'm trying NOT to set fire to his provider's systems)

      --
      For large sets, this will be our guide even unto death, for the LORD will work for each type of data it is applied to...
    4. Re:Version? by __aawdrj2992 · · Score: 2, Informative

      My gripe about SimCity 4 was money. It was really hard to have any sort of budget that profited money for projects and expansions. (And I've played my share of SimCity). This is something that worked much better in SimCity 3000. I did however love the regions, the way the transport systems built, the better graphics, and the ability to rotate the camera as I see fit. My $.02.

    5. 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.

    6. Re:Version? by cbreaker · · Score: 2, Interesting

      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.

      --
      - It's not the Macs I hate. It's Digg users. -
  4. Finally! by angryfirelord · · Score: 3, Funny

    My very own Linux city!

    1. Re:Finally! by Anonymous Coward · · Score: 5, Informative

      Luckily we already have much more advanced clones on Linux than the old original whose code has been opened.

      Though their move is still good, and interesting just to dig into the code.

    2. Re:Finally! by Realistic_Dragon · · Score: 2, Informative

      You have been able to make a Linux City for quite a while with Lincity, and in 3D with Lincity NG which is surprisingly addictive.

      --
      Beep beep.
    3. Re:Finally! by Ailure · · Score: 4, Interesting

      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.

  5. Maybe now we can finally find out by Anonymous Coward · · Score: 5, Funny

    why it is that commercial zones placed more than a certain distance to the left of the city center never developed. I wonder if it was some kind of subtle political commentary on how leftist policy hurts business or something.

    1. Re:Maybe now we can finally find out by Animats · · Score: 4, Informative

      left of the city center

      Probably because they borrowed some of the code from SimAnt, which had less ant growth towards the upper left due to a processing order issue in the updating algorithm. It's one of those problems where step N+1 is computed incrementally from the current state, rather than from a frozen copy of step N.

    2. Re:Maybe now we can finally find out by Anonymous Coward · · Score: 4, Interesting

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

  6. Boo-hoo by Anonymous Coward · · Score: 5, Interesting

    The plane crash disaster has been removed as a result of 9/11 This is ridiculous.
    1. 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.
    2. Re:Boo-hoo by Brobock · · Score: 3, Informative

      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. Let us not forget:
      Nuclear meltdown because of Chernobyl.
      Earthquakes because of California, Kobe Japan, and Pakistan.
      Alien Invasion because of Orson Welles war of the worlds radio broadcast.
    3. Re:Boo-hoo by Anonymous Coward · · Score: 4, Funny

      It had to be done because a bug was found that meant the players could then take any action, and it would have no affect on public mood, aslong as it was justified by the plan crash somehow!

    4. Re:Boo-hoo by Bluesman · · Score: 2, Funny

      It's GPL, we can add it back.

      And we can add in kidnappings and beheadings. Everyone wins!

      --
      If moderation could change anything, it would be illegal.
  7. Tried it, builds but doesn't work. by Zombie+Ryushu · · Score: 3, Informative

    It builds, but you get to the loading screen and then you can't actually start a game. It Freezes.

  8. Win32 binary versions available? by Skim123 · · Score: 2, Interesting

    Does anyone know if there are Win32 binaries available?

    --

    I could not justify my existence if I were a turkey farmer. Would I terminate myself? Undoubtably, yes.

    1. Re:Win32 binary versions available? by Anonymous Coward · · Score: 2, Interesting

      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.

    2. Re:Win32 binary versions available? by rsmith-mac · · Score: 2, Informative

      Ditto to this. The original version of SimCity Classic for Windows technically runs, but besides not working under 64bit versions of Windows (no 16bit compatibility layer) it runs far too quickly on modern machines. It would be great to have it playable on Windows again.

    3. Re:Win32 binary versions available? by Anonymous Coward · · Score: 2, Funny

      okay, just what really geeky street do people talk about Xlib, cygwin, and X servers for windows like the latest gossip? I want to find this mythical "geek street" that you're telling me about! Is it the east downtown Tokyo ghetto? IT IS, ISN'T IT!

  9. The Brown Sheet of Paper by that+this+is+not+und · · Score: 3, Funny

    Now, if they will only open-source that dark brown piece of paper with the glyphs printed in black on it...

    1. Re:The Brown Sheet of Paper by that+this+is+not+und · · Score: 3, Interesting

      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)

  10. Re:WARNING: MYMINICITY LINK by McGiraf · · Score: 2, Funny

    Who would have known? Thanks for the warning I almost got close to maybe think about clicking the link, you saved me!

  11. Don't destroy the church by Anonymous Coward · · Score: 2, Funny

    The godless atheist Linux crowd can now eliminate the 1 line of code that creates a tornado every time you bulldoze a church.

  12. 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.
    1. Re:So where is it? by jollyreaper · · Score: 4, Funny

      This is as useful for historical insight a klingon version of the new testament. I don't understand. Wouldn't you want to read it in the original?
      --
      Kwisatz Haderach
      Sell the spice to CHOAM
      This Mahdi took Shaddam's Throne
  13. If you read the article... by jesterzog · · Score: 2, Informative

    This is actually clearly explained in one of the linked articles:

    In the long term, Micropolis can be recast from C to C++ classes, so it's possible to define clean interfaces between software modules, and make multiple instances of the simulator that don't interfere with each other, as well as easily interfacing it to Python using the SWIG interface generator. That should be done in a language-neutral way, so you could plug the simulator engine into many different languages and programming systems. Then more work needs to be done to open it up, and make it re-vectorable (plug-ins, events, callbacks, hooks, aspect oriented programming, etc), so you can replace and extend the various modules with the host language(s), eventually re-implementing most if not all of SimCity in another language.

    1. Re:If you read the article... by SimHacker · · Score: 5, Informative

      You can do anything in C you can do in C++, but it's a total pain in the ass. Why, you can even write a C++ compiler in C that compiles C++ into C, and call it CFront.

      If you want to see what happens when you try to simulate C++ interfaces in C, then look at Microsoft's COM header files, which do exactly that.

      The reasons I translated the C code to C++ were: 1) eliminate all global variables, so multiple simulators could exist simultaneously without interfering with each other, 2) define all interfaces in one place so it's easier to work with and evolve the code, 3) enable SWIG to automatically generate an object oriented wrapper for any of a large number of scripting languages, like Python, 4) Impose some sane programming conventions on the code, for reliability and readability's sake.

      I hate C++ as much as anyone else does, probably more than most. But I know when it's better to use C++ than C, and this is one of those times.

      -Don

      ``The more important question of whether or not systems like C++ and X-Windows cause actual permanent brain damage in humans, will have to wait for the autopsies of human brain doners. That won't be soon, since they're still only in the animal experimentation stages. But I think it's reprehensible how they're exposing all those poor innocent bunnies to shoddy static class libraries without garbage collection, and high doses of raw Motif.''
      [From comp.lang.functional, ``Re: Effect of programming languages on thought'', Don Hopkins]
      --
      Take a look and feel free: http://www.PieMenu.com
    2. Re:If you read the article... by SimHacker · · Score: 5, Informative

      In order to modify a C program to use structures and function pointers instead of global variables, you have to meticulously modify almost every line of code. And that is simply far too much work to do, and would be extremely tedious and error prone.

      The one thing C++ is really great at, is taking a C program with global variables and global functions, and easily transforming it into a C++ class that encapsulates all the variables and functions, without disrupting every line of code. Because "this" is an implicit argument. Because member references don't have to explicitly go through "this".

      But if you did that kind of a transformation on C code by hand, you would have to rewrite every function signature to take an explicit "this" argument, and rewrite every variable or function reference to go through the "this" pointer.

      Actually, I really dislike GTK's Python binding mechanism. It's horribly complex, totally undocumented, and very brittle. It doesn't handle other languages, either. SWIG is a much more advanced, much easier to use tool. I also don't like GTK's "yet another object system". It accounts for most of the time spent by OLPC Sugar python applications initializing. It takes a horribly long time for GTK to initialize, and it's not Python's fault, it's GObject's fault. There's nothing worse than having several object systems, especially when some of them are slow, non-standard and difficult to work with.

      Have you ever looked at or used the COM macros for generating C++ vtable layouts? It's attrocious! Actually, I really like COM for what it is (I use XPCOM at work, since we use xulrunner to implement TomTom Home), but COM's C bindings are total crap. It's much easier to use from C++ with templates, ala ATL (ActiveX Template Library), WFC (Windows Foundation Classes), etc. The MFC COM and OLE stuff is much worse, but not as bad as the C stuff.

      C++ templates can't hold a candle to Common Lisp macros. C++ templates are a totally different animal, totally inferior to the macros that Lisp has had for many years. The arcane C++ syntax makes it impossible to support the kind of high level metaprogramming macros that Lisp so easily supports.

      -Don

      --
      Take a look and feel free: http://www.PieMenu.com
  14. Re:huh? by that+this+is+not+und · · Score: 5, Funny

    Why all the effort to port to C++ ? C rocks !


    It needed to be updated, because it ran too fast on modern hardware.

  15. It's stated in the article by jesterzog · · Score: 5, Informative

    It actually states the history of where it's come from in one of the linked articles (emphasis added):

    • The original version of SimCity was developed by Maxis on the C64, and ported to various platforms, including the Macintosh. Maxis licensed the Macintosh SimCity source code to DUX software, to port to Unix.
    • DUX Software contracted me (Don Hopkins) to port SimCity to Unix, and I developed "SimCity HyperLook Edition", while working at the Turing Institute on HyperLook with Arthur van Hoff. The user interface was written in PostScript, which ran on the NeWS window system on Sun workstations, and it supported multiple zoomable views, pie menus, annotating and printing maps, and many user interface improvements.
    • After Sun canceled NeWS, DUX Software contracted me to rewrite the HyperLook user interface in TCL/Tk for X11, and I developed a multi-player networked user interface using the X11 protocol. The TCL/Tk version of SimCity has been ported to various Unix and non-Unix platforms, including SunOS, Solaris, Irix, HP/UX, OSF/1, Quarterdeck Desqview/X, NDC X Terminals, Warp, and Linux. The contract to sell SimCity for Unix expired after ten years, so the TCL/Tk version was no longer commercially available.
    • OLPC SimCity is based on the TCL/Tk version of SimCity. SimCity is a trademark of Electronic Arts. Don Hopkins adapted SimCity to the OLPC, thanks to the support of John Gilmore. OLPC SimCity will be shipped with the OLPC, and it has been run through EA's quality assurance process and reviewed for integrity. EA reserves the right to review and approve any version of the game distributed under the name SimCity.

    So it looks as if it's some kind of mutated version of SimCity Classic which dates back to the C64 version.

  16. 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.

  17. No build on MacOS X by Midnight+Thunder · · Score: 4, Informative

    Because someone is likely to ask it, this does not yet build on MacOS X, even if you are willing to accept X11 as the interface. If anyone has any success it would be worth knowing.

    --
    Jumpstart the tartan drive.
    1. Re:No build on MacOS X by stargo · · Score: 5, Interesting

      Success :-)
      My patch agains micropolis can be found at: http://rmdir.de/~michael/micropolis_mac-osx.patch
      This patch also seems to fix graphic problems on Linux with a 24 bit X server.

    2. Re:No build on MacOS X by redwoodtree · · Score: 2, Informative

      Wow, thanks stargo!

      In regards to patching the files...

      Just download the source and unzip/untar it, put it in /tmp, download the patch that stargo put together, into the /micropolis-activity directory.

      Then execute the patch command, like this for example: patch < micropolis_mac-osx.patch. The the paths are off, it will ask you what file to patch, take a look at the "diff" line and simply supply the file name from there, for example (src/tclx/ossupp/makefile), or whatever the right path is for you to that file.

      Then run make from the src directory (assuming you have the developer tools installed of course).

      Then, assuming it compiled with no errors, run make install (you don't need to be root to do any of this by the way).

      Then launch X11 (assuming you have it installed of course) and from the top level directory run ./Micropolis.

      Works great so far!

  18. 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.

  19. Re:port to win32 by BrentH · · Score: 3, Interesting

    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.

  20. Lincity Absorption by Zombie+Ryushu · · Score: 4, Interesting

    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.

  21. Re:SNES version? by k_187 · · Score: 2, Informative

    Yes it did. I believe it was in June or so of last year. Now the browser costs 500 points.

    --
    11 was a racehorse
    12 was 12
    1111 Race
    12112
  22. 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.

  23. Re:No, its worse by SimHacker · · Score: 5, Informative

    To clear up some confusion: The old version of SimCity/Micropolis uses TCL/Tk to implement the user interface. That is the version currently being distributed on the OLPC. The new version is rewritten in C++, and has all the TCL/Tk and user interface stuff ripped out of it. I converted it to C++ for the reasons I described in other posts (quoted above), so it is now modular and can be run through SWIG to integrate it with many different scripting languages.

    But the core simulator is independent of Python, and runs extremely fast (the TCL/Tk version can run more than a year a second on the relatively slow OLPC). The OLPC uses Python as its standard system wide programming language, and all of its important libraries (like Cairo and Pango) are integrated as Python modules. So it makes the most sense to use SWIG to cast Micropolis into a Python module, first. Of course SWIG also makes it easy to integrate it with any other scripting language.

    If it's not immediately obvious to you (or even if it is), why anyone would want to integrate SimCity with a scripting language, instead of just writing the whole thing in C, then you should read some of the discussions I've been having with Alan Key about that topic, on my blog.

    -Don

    --
    Take a look and feel free: http://www.PieMenu.com
  24. 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.
  25. Slashdotted by noidentity · · Score: 2, Funny

    I guess a new disaster needs to be added: Slashdotting

  26. 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.

  27. 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
  28. 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."
  29. 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
  30. 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
  31. Re:Nice move, but... by SimHacker · · Score: 5, Funny

    Yes, it'll be great to port Micropolis (SimCity) to embedded devices! I'd like to port it to the TomTom, and hook it up so you can operate the bulldozer or road building tool via GPS, just by driving around!

    -Don

    (Disclaimer: I work for TomTom, and this should NOT be interpreted as a product announcement!)

    --
    Take a look and feel free: http://www.PieMenu.com
  32. Re:What the fuck are you talking about? by SimHacker · · Score: 5, Interesting

    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.

    -Don

    --
    Take a look and feel free: http://www.PieMenu.com
  33. Re:No, its worse by SimHacker · · Score: 4, Interesting

    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.

    -Don

    --
    Take a look and feel free: http://www.PieMenu.com
  34. Re:The plane crash disaster has been removed as a by Workaphobia · · Score: 4, Funny

    I couldn't hear you, I was busy watching the NYC episode of the Simpsons and - NOOOOooooooooo...

    --
    Evidently, the key to understanding recursion is to begin by understanding recursion. The rest is easy.
  35. Re:What the fuck are you talking about? by Anonymous Coward · · Score: 2, Funny

    Hey, dipshit. It doesn't matter if this game only runs at 30000 FPS on your 4 GHz quad-core Core2 Duo just because it uses Python, rather than the 80000 FPS it would achieve were it completely written in C. I mean, your goddamn fucking eyes and brain don't even notice any difference once you exceed 40 FPS. What the hell is wrong with you? Your ignorance of Python makes you look like a shitfool.

  36. Re:And yet... by Anonymous Coward · · Score: 5, Funny

    What the hell is this Lunix thing that so many keep talking about?

  37. Re:Where's *my* pity? by kryten_nl · · Score: 3, Funny

    Bro, you suck at your job.

    --
    For the perfect anti-Unix, write an OS that thinks it knows what you're doing better than you do and let it be wrong.
  38. Re:And yet... by Leftist+Troll · · Score: 5, Funny

    Lunix is one of the most powerful contraceptives evar ....It is an operating system that was the result of really crappy reverse-engineering efforts to create a free version of UNIX. Linus Torvalds and Alan Cox are the perpetrators behind this travesty. Tons of people use it, especially hippies, and no one really likes it except the terminally uncool. Most of them use it in violation of SCO's intellectual property rights. To use Lunix legally, one must pay a $699 license fee to SCO for each processor that runs the Lunix kernel.

  39. Lisp Re:PostScript by rhyre417 · · Score: 2, Funny

    I believe I understand.
    NeWS is like Lisp, but with PostScript instead of Lisp for programming, PostScript instead of Lisp for rendering, and PostScript instead of S-expressions for data representation.

  40. Welcoming a master coder by Atomic+Fro · · Score: 5, Funny

    I, for one, would like to welcome Don Hopkins: our sim-hacking overlord.

    --

    ==================
    Hippie Logger Jock
    ==================
  41. 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.

  42. Hide teh LUnix by tepples · · Score: 2, Informative

    What the hell is this Lunix thing that so many keep talking about? LUnix is a UNIX-clone operating system for Commodore 64 computers. SimCity was developed on a Commodore 64, but not in LUnix.
  43. Re:And yet... by tepples · · Score: 5, Funny

    And yet... still no plans for Lunix support. Lunix runs on an 8-bit Commodore computer. Programs written in C or in C++ generally don't run fast on 8-bit machines, in part because C and C++ make heavy use of a data type called int, whose size varies from compiler to compiler but must be at least 16 bits.
  44. Re:iMicropolis by Constantine+XVI · · Score: 2, Informative

    UNIX SimCity was actually the first multiplayer SimCity game, and Micropolis seems to hold on to this feature. Not sure how to work it though.

    --
    "I think an etch-a-sketch with an ethernet port would beat IE7 in web standards compliance."
  45. Re:Opportunity for a more realistic SimCity... by toddestan · · Score: 2, Funny

    I imagine that I could probably run things at a pretty low tax rate in a world where a coal power plant costs $3000, and an airport costs $10000, and I can fully fund a police station for $50/year.

  46. Re:port to win32 by kestasjk · · Score: 5, Funny

    You can pick up Simcity4 for like 5 euro I can't afford to pay US$60 for a game
    --
    // MD_Update(&m,buf,j);
  47. 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.)

  48. It's a classic type of bug by Animats · · Score: 2, Interesting

    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.

  49. 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.