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!"
... a big scream was heard, as if a thousand hours had suddenly been lost.
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
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!
My very own Linux city!
So, is this like the SNES version? If so, BAAAAAAAAAD AAAAAAAAAAAAAAAASS!!!!
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.
...that just about says it all.
Palm trees and 8
anyone going to make a gpl port of micropolis to win32?
Someone told me Bill Gates owned, like, 50% of EA.
It builds, but you get to the loading screen and then you can't actually start a game. It Freezes.
run on LINUX?
Here's to the crazy ones
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.
Now, if they will only open-source that dark brown piece of paper with the glyphs printed in black on it...
Why all the effort to port to C++ ? C rocks !
:-) So it had to be ported to something if it was going to be developed.
If the whole thing is designed, and written in C... and it works... then leave it alone.
I guess following on from the Java as a first programming language discussion that there just aren't enough good C programmers left in circulation
Thank you for the warning oh Master of the Obvious.
above poser does not hide it.
(poser was a typo for poster, but i just can't find it in myself to correct it! so perfect!)
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...
Who would have known? Thanks for the warning I almost got close to maybe think about clicking the link, you saved me!
The godless atheist Linux crowd can now eliminate the 1 line of code that creates a tornado every time you bulldoze a church.
Above poster must be a script. Would a human post this in seriousness?
And I agree with op. myminicity is better than simcity.
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.
This is actually clearly explained in one of the linked articles:
A vector-based UI in 1989? Awesome! Aero eat your heart out.
And yet... still no plans for Lunix support.
It actually states the history of where it's come from in one of the linked articles (emphasis added):
So it looks as if it's some kind of mutated version of SimCity Classic which dates back to the C64 version.
Nate man, what have you been smoking? We're talking SimCity here. You know, the game where all you need to do is build one rail square next to a building development and its transportation needs are taken care of, even if that railway leads to nowhere. It's predicated on the grid system of urban planning -- a system that was in disrepute when the game was made. COINOPS? Yeah, okay, what you need is a modded SimCity backend wired into an Armed Assault/VBS2 FPS frontend.
hey wait a minute, that might just work.
someone give me a contract.
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.
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.
or am i the only that can't get to the donhopkins server?
"...that's as white as it gets; all the bits are on..."
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.
Agreed. In fact it's worse: it's a port to C++, Python and Tk.
Python and Tk? O.K, I'll be fair: this is a version based on the TCL/Tk port, so the Tk bit makes sense. Adding Python...less so.
What I really want to see is a cleaned up port that a) Removes the Python dependency b) Ports to SDL. Using SDL instead of a mishmash of different toolkits and bindings would make this infinitely more portable.
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.
There was at least one open source Sim City project before this. Probably more than one.
That's assuming you think it's the right game for the job.
Don't thank God, thank a doctor!
Now I won't need that stupid red code sheet to avoid frequent Godzilla attacks. Hooray!!
My bicyles
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.
Python compiles to bytecode, which is in turn executed line by line.
What the fuck are you talking about? Many major games today use Python as the scripting language, and they run just fine. Civilization IV is one of the most notable. But there's also Battlefield 2, EVE Online, Robot Arena 2: Design and Destroy, and Vampire: The Masquerade - Bloodlines.
.pyc file alongside the source code. Further invocations use the bytecode. Python's bytecode compiler is blazingly fast, and that's why it's suitable for the modern 3D games listed above.
And Python uses a form of precompilation. The first time a Python module is loaded, it's compiled into Python bytecode, and stored in a
You clearly know next to nothing about Python, let alone computer programming in general. Please refrain from making such blatantly incorrect and, well, just plain stupid comments in the future.
I know C, but I don't want to learn C++ (I gave it a try once.) I'm willing to try learning Python though (or a functional language, they intrigue me), but not C++!
In theory, theory and practice are the same; in practice they're different. (Yogi Berra & A. Einstein)
Think about it. The purpose of SimCity is to get a populace to like your administration, and to make the town as productive as possible.
:)
The purpose of a counter-insurgency, from the Brits in Malaysia to the Marines in Anbar, is to deny the enemy the use of the populace as cover by getting the people to want to turn them in. Sometimes it's shooting the bad guys (and making darn sure you shoot JUST the bad guys), sometimes it's building a school or making sure they get power.
Sounds like that could be easily modded. Heck, when I think about it, 9/10ths of SimCity is already good COINOPS strategy. All that's missing is off-board artillery!
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former."
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
Release the code to Simant! Anyone else love that game?
I'm waiting for SimBarber, the musical slasher sim.
...this, of course, probably back before they called anything "skins".
But I remember a friend who found various themes for his Simcity -- there was an "old west" style theme, and a futuristic one and one or two others. The game itself wasn't any different, but instead of, say, gas stations, you'd have horse pastures or something.
I should probably JFGI (again), but I have tried in the past to find anything about them and have been unable.
All your simulated base are belong to us simulations.
Knowledge is how to play a game, intelligence is how to win, wisdom is knowing what game to play.
This is an opportunity for a more realistic SimCity. One of my biggest complaints with the SimCity line was the ordinances and utilities -- notice they take a decidedly left-wing, big-government political bias. Maybe now somebody can implement certain options such as privatizing certain public services, and where merely throwing more money at a problem won't be the be-all, end-all to solving it, and will in fact complicate your city's fiscal policies even further. Finally a SimCity that can truly educate people.
Now, I wouldn't point to Civ IV to illustrate that using Python won't hurt performance. The reasons for the performance issues (especially before the patches) were complex, but Python didn't exactly help.
Ok ... now I'm just waiting for the version that runs without intervention on my part.
I've always wanted a sim that runs like an ant farm that I can just look into and mess with.
09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
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.
I guess a new disaster needs to be added: Slashdotting
It's official, the terrorists have won.
This is a great move. I applaud the developer for releasing the source once the game had run its course, so to speak. There are droves of mobile and embeded devices that can now benefit (legally) from this.
I only wish more software manufacturers would do this. When the game becomes old and they aren't making any serious money off of it, they could really be a benefit to the community by open sourcing it or at least releasing it for free. Look at all the great games from the 80s and 90s that you can't get anymore because they copyright owner isn't selling them and won't release them for free... The only option is to steal games like the Quest games, Zork, the early lucasarts games, etc.
or else!
Eve Online definitely has performance issues as well - not just on the server cluster, but also client side. The UI has always been somewhat slow, and the client has trouble handling many ships in battle. Considering the somewhat dated graphics in the "classic client", this is hardly an issue with the graphics engine alone. Patches from the last year or so has helped the situation somewhat, and as people get faster machines, it becomes less of an issue.
How abstract is the UI? Would it be a lot of work to write an SDL GUI for it, or would one have to re-implement a lot of the rendering & event handling code to make any sense from it?
I'm a suicide bomber, you insensitive clod!
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
Quality Assurance is going to be provided by EA??? Holy hell! EA can't even correct blatant spelling errors in their own bug-festive games!
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.
I don't suppose there's a chance of a Linux port of SimLife? I really liked it, but it isn't available anymore on any platform.
We'd like to start in a language about as old as the program... ;-)
Any links to the unmodified C src, please?
TIA
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.
So how hard will it be to put back in the plane crashes?
That I I wounder if I could port it to OpenGL to make a super pretty 3d version. Yes I know it would be possible but I haven't messed with OpenGL so it maybe more than I have time for.
Actually the hack away idea is just great. How about themes? You could have Futurama SimCity, Simpsons Sim City... you name it.
Sound like a fun project maybe I will grab the source and compile it.
See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
Maybe I'm doing something wrong, but here is my initial results:
./Micropolis /home/brian/Desktop/micropolis-activity ...
./Micropolis: line 4: 17236 Floating point exception(core dumped) res/sim $*
./res/sim is segfaulting... Either way, it appears really rough.
brian@brian-laptop:~/Desktop/micropolis-activity$
Starting Micropolis in
brian@brian-laptop:~/Desktop/micropolis-activity$
This is on a stock ubuntu install... I'll play with it some more and hopefully figure out why
Yeah, it's the perfect opportunity to teach kids that plane crashes are bad, mkay?
I suffer from attention surplus disorder.
I'm also trying to run it on Ubuntu. I get the main welcome screen but I can't click on anything or type anything. The only thing that happens is when I hover over the text box at the top, the cursor inside it starts blinking. It makes me sad that I can't kill my productivity tonight with a happy game from my childhood.
I actually managed it to start but it freezes the exact same way, gonna try with Cygwin's own Tcl/Tk implementation and try to get TclX building.
I, for one, would like to welcome Don Hopkins: our sim-hacking overlord.
==================
Hippie Logger Jock
==================
Been trying to see if I can fix it, but so far I haven't had a lot of luck. I started a thread on the Ubuntu Forums for Micropolis too.
Pete/Petri "damn, my chainsaw is clogged with 1's and 0's again." --clyde
Off-board artillery? Dude, that's all wrong. This is COINOPS. You know, urban areas? Off-board artillery notoriously has high-angle trajectories. For COINOPS you need realistic artillery effects (along with smoke, WP, and even those snarky SADARMS, as well as whatever terminally-guided 120mm mortar shells BOFORS is cooking up these days).
Same problem here with Fedora 8. Nice front end with a blinking cursor for the city name, but you can't do anything. No keyboard or mouse recognition. I have to go back to the command line and CTRL-C to kill it.
Maybe its time to figure out how to debug python, or TCL/TK, or whatever that front end is using.
DCEmu have challenged the Homebrew Community across all the consoles for some of the very talentted coders to port it to as many systems as possible details here http://www.dcemu.co.uk/sim-city-source-code-released-whos-up-for-the-challenge-85355.html
Where's the patch to network two running Micropolis games together, so remote players can collaborate and/or war with each other's neighboring cities in a shared world?
And where's the SecondLife gateway patch, so a city developed in Micropolis can be inhabited from a POV in SecondLife?
--
make install -not war
I know that Copperheads are terminally guided and 120mm STRIX mortar shells are active-homing. I think I even simulated them in an FPS once...
"The OLPC will also be getting a SimCity branded version that has been QA'ed by Electronic Arts."
I'm confused cause the olpc already has it on it.
is there a newer version coming out on it?
the one already on the olpc is very very very not stable.
The screenshots I saw of Lincity used horrible pre-rendered 3D.
Am I missing something?
Well, after picking up the Nintendo DS SimCity title (which plays a lot like SC2K, only less impressively so), I've come to the conclusion that they really should have just ported the classic game to the system instead. The DS hardware seems like the perfect platform to breath new life into SimCity classic, and could certainly use the second screen to demonstrate just how well the game was developed in it's original form.
For example, the touch screen could handle the traditional city building gameplay elements, while the top screen could display all of the statistical changes to your game in real-time without requiring the user to interrupt the simulation to view their progress.
Navigation of the charts, graphs and maps could be rotated though by the L and R buttons, and value changes could be entered using the D-pad, leaving the touch screen open for further, independent interaction.
8==8 Bones 8==8
NeWS is like a giraffe, but with PostScript instead of a long neck for eating, PostScript instead of spots for visual appearance, and PostScript instead of blood for moving nutrients around.
Visual IRC: Fast. Powerful. Free.
"MyMiniSimCity opens it's doors :("
posted by yadda yadda yadda
from the Where's-Gojira-when-you-need-him? dept.
In Soviet MyMiniSimCity, links click disguised YOU!
*shudder*
"I'm not anti-anything, I'm anti-everything, it fits better." - Sole
You think you could find a link? I don't believe I've seen that.
You could code Micropolis: True Patriot, with the added feature of plane crashes. For that matter, you could add in suicide bombings and school shootings, for extra realism.
Help poke pirates in the eyepatch, arr.
EVE Online has a significant portion written in Python as well.
That'd explain why a lot of the basic 2D UI in EVE is a little unresponsive compared to your run of the mill native windows app.
I can see arguments for using a high level language for UI, but EVE probably isn't the best example. EVE's UI is pretty remarkably clunky.
As an absolute statement of fact, this is not true. Since bytecode is compiled to native code when the application actually runs, it can optimize compilation to the current target platform, and it can take current usage pattern into account when compiling. There are many cases where I would expect code compiled at runtime to be faster than precompiled code.
It's free software. Put that shit back in.
(That and I want a global thermal-nuclear war scenerio.)
How about they make good ole Transport Tycoon open source too?
Does this mean the BeOS version can finally be completed?
Let's take it out of Escape from New York too. Why not pretend it ever happened.
"This game was released for the Unix platform in or about 1990 and has been modified for inclusion in the One Laptop Per Child program."
Nice move to open it up under GPL! But sad circumstances if OLPC is dead.
Not that Don would need it, I expect, but after this article, his karma is through the roof!
Yesterday was the time to do it right. Are we having a REVOLUTION yet?
Using the GPL to fight terrorism!
In a bizzare coincidence that is exactly what I was doing an hour proir to the attack - well OK not so bizzare since I did it every time my city got out of control. I haven't played the game since.
Dang. I got it to compile on FreeBSD 7 (with a bit of tweaking, there were a lot of assumptions about the locations of libraries) but it craps out with an X11 error when I try to start it.
I read the internet for the articles.
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.
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.
http://games.slashdot.org/article.pl?sid=07/11/08/200234
from 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
to 45 2F 6E 40 3C DF 10 71 4E 41 DF AA 25 7D 31 3F
to find Starflight and the original Wizardry... I still remember Wizardry on the IBM PC, complete with ASCII graphics.
* Winners compare their achievements to their goals, losers compare theirs to that of others.
the whip.wav sound is non-Free!!! infact i think the only Free sounds there is in it is the voices
just a matter of time before someone gets ahold of this and makes a sexoplis or thugopolis what's like some of the turn based online games with pimps and whores... Sim City will never be the same.
Yup, that was Bin Laden's goal from the start - to nerf a GPL'ed release of SimCity.
ithink he gave up. looks like you won this one grats
u fail
Oops sorry wrong game system ;)
I'm sorry, I'm to tired to be witty at the moment so this message will have to do.