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.
anyone going to make a gpl port of micropolis to win32?
It builds, but you get to the loading screen and then you can't actually start a game. It Freezes.
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
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.
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:
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.
Actually it doesn't (debian-amd64/unstable) /tmp/MicropolisCore/src$ make ../tileengine.cpp -o build/temp.linux-x86_64-2.4/../tileengine.o ../tileengine.cpp: In member function 'void TileEngine::renderTiles(cairo_t*, cairo_surface_t*, int, int, PyObject*, int, int, int, int, int, double)': ../tileengine.cpp:215: error: 'Py_ssize_t' was not declared in this scope ../tileengine.cpp:215: error: expected `;' before 'tileMapLength' ../tileengine.cpp:221: error: 'tileMapLength' was not declared in this scope ../tileengine.cpp:229: error: 'tileMapLength' was not declared in this scope ../tileengine.cpp: In member function 'void TileEngine::renderTilesLazy(cairo_t*, PyObject*, int, int, int, int, int, double, PyObject*, PyObject*, PyObject*)': ../tileengine.cpp:356: error: 'Py_ssize_t' was not declared in this scope ../tileengine.cpp:356: error: expected `;' before 'tileMapLength' ../tileengine.cpp:362: error: 'tileMapLength' was not declared in this scope ../tileengine.cpp:370: error: 'tileMapLength' was not declared in this scope ../tileengine.cpp:395: error: expected `;' before 'tileCacheLength' ../tileengine.cpp:401: error: 'tileCacheLength' was not declared in this scope ../tileengine.cpp:409: error: 'tileCacheLength' was not declared in this scope ../tileengine.cpp:497: warning: deprecated conversion from string constant to 'char*' ../tileengine.cpp:516: warning: deprecated conversion from string constant to 'char*' ../tileengine.cpp: In member function 'void TileEngine::renderPixels(cairo_surface_t*, cairo_surface_t*, PyObject*, int, int, int, int)': ../tileengine.cpp:620: error: 'Py_ssize_t' was not declared in this scope ../tileengine.cpp:620: error: expected `;' before 'tileMapLength' ../tileengine.cpp:626: error: 'tileMapLength' was not declared in this scope ../tileengine.cpp:633: error: 'tileMapLength' was not declared in this scope /tmp/MicropolisCore/src$
cd TileEngine ; make
make[1]: Entering directory `/tmp/MicropolisCore/src/TileEngine'
cd python ; python setup.py build
running build
running build_py
running build_ext
building '_tileengine' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I. -I.. -I/usr/include/cairo -I/usr/include/pycairo -I/usr/include/python2.4 -c tileengine_wrap.cpp -o build/temp.linux-x86_64-2.4/tileengine_wrap.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
tileengine_wrap.cpp: In function 'void init_tileengine()':
tileengine_wrap.cpp:4529: warning: deprecated conversion from string constant to 'char*'
tileengine_wrap.cpp:4529: warning: deprecated conversion from string constant to 'char*'
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I. -I.. -I/usr/include/cairo -I/usr/include/pycairo -I/usr/include/python2.4 -c
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
error: command 'gcc' failed with exit status 1
make[1]: *** [TILEENGINE] Error 1
make[1]: Leaving directory `/tmp/MicropolisCore/src/TileEngine'
make: *** [all] Error 2
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.
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.
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
While your 2 GHz processor may be more than fast enough to run Python code, it will NEVER be as fast as a compiled binary. So while your quad core processor running at 3.2GHz will run these products just fine, you will probably find that it chokes on a 133 MHz Pentium machine in Python when the original sorce, written in C, ran just fine on your old 33 MHz 386. Please refrain from making such blatantly incorrect and, well, just plain stupid comments in the future. Thanks for proving that as long as something is open source, people will defend it even if its not the best option.
...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.
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.
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
Funny. When I was playing SimCity, my first reaction was what a right wing approach it took, especially with the ridiculously low limits on tax rates etc. compared to the level of taxation common in most of Europe for example.
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!
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
Of course, he actually said that the bytecode compiler was blazingly fast. He never said that the bytecode interpreter was :-)
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.:
-Don
Take a look and feel free: http://www.PieMenu.com
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.
Tis a good point, although I do feel some people stretch the point a tad far - although I am not saying that this is a case in point.
;-)
Just because modern hardware is incredibly fast and has copious amounts of memory is no reason to abandon the idea of writing efficient software. Microsoft and their ilk are masters of making a blazingly fast machine run like a dog on it's last legs (ie the PC I had 5 years before).
As SimHacker has pointed out the Sim City port is not a case in point as it runs ridiculously faster than it needs to, so please don't take my words as an attack in that particular direction. In fact in the right context I am quite happy to use a scripting language, you know, something like Java for instance
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
I'm a suicide bomber, you insensitive clod!
Perhaps you would like BeanShell
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
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've always thought that about SimCity, Civilization, Birth of the Federation, and all those other micromanagement games. Thing is, it may be realistic for the city/empire/whatever to prosper more the less you do, but it's also a pretty boring game.
Space game using normal deck of cards: http://BattleCards.org
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.
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.
What the hell is this Lunix thing that so many keep talking about?
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.
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
I always thought the crime model was a bit off too. If you had high crime you could just dump a bunch of police on the problem. I think reducing crime in the real world is not that simple. Also, the crime was presumably petty street crime, while white collar crime seemed to be missing from the simulation. I guess I'm just a nit-picky left-winger but those are my observations.
Ceci n'est pas une sig.
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.
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...
I always found that my cities ran best with a 6 or 7% tax rate, as compared to the 30-40% rate in most advanced democracies. How is this a left-wing bias?
Real Daleks don't climb stairs - they level the building.
The screenshots I saw of Lincity used horrible pre-rendered 3D.
Am I missing something?
It's called "abstraction." Think of police not as a police officer, but as an abstraction representing all law enforcement-- beat cops, highway patrol, even the detectives working on the white collar stuff. You're getting caught up in the word "police" and missing the big picture; everything in the game is an abstraction.
Comment of the year
Even that isn't a perfect solution, and other things affected crime, such as land values. (At least this was true in, say, SC2K.) So one solution would be to drop another police station down, but you could also plop in a few parks and hope the land value increased enough to drop crime. If the area in question was already covered by a couple police stations, the latter probably had a higher chance of success.
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.
As I recall, industrial areas bred crime at higher levels than commercial areas did, so that fits. It's either a slam on the working classes, or arch-hippie anti-industrialism!
Mind the Gap
"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
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.
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.
I think it's a cartoon, something about a penguin or something
It's free software. Put that shit back in.
(That and I want a global thermal-nuclear war scenerio.)
Why bother?
OpenTTD is a complete reverse-engineered version, compatible with virtually every GRF from "The Patch", and works just like the old one - but has reliable TCP networking, SDL graphics, SDL sound, etc. so it's portable to any number of platforms.
Plus, it incorporates hundreds of features that TTD "should have had", such as drag-drop line placement in all directions, bridges that can span over any tile etc.
Does this mean the BeOS version can finally be completed?
Sorry the Java line was meant to be tongue in cheek. A little bit of humour directed towards the envangelists out there.
;-) I must admit that since I became a family man that I struggle to keep up with it all - oh well, thats my exscuse anyway.
I guess I should make some effort to take a look at Python sometime as it is used in quite a few interesting places. I've also had a few Java types tell me that Groovy is very good.
Too little time, too many programming languages
Oh, I know... I've been around a long time.... But you're supposed to be asking that about things like new video games that get announced, or some great toaster that's being marketed.... Asking it about something that's actually a Linux project... *shrugs*
And clearly, some moderator has a bug up his butt, because neither your post nor mine were offtopic. *shrugs*
If you believe everything you read, you'd better not read. - Japanese proverb
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!
I'm sometimes playing around with various OSS compilers for 6502/10 (lcc, cc65, sdcc,
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.
Thanks, Don, for putting all these johnny-come-latelys into perspective!
And a big fuck-you to IBM, HP, et al, for forcing X onto us 'coz they were scared Sun would repeat the success of NFS with NeWS.
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
I was using the Aztex Manx C compiler on the Apple ][ back around 1982 or so, but I don't know which C compiler Will Wright used on the C64. I will ask him some time. Manx C did produce really bloated code (it had to -- the 6502 has 8 bit registers, and adding two shorts took 7 instructions: CLC LDA ADC STA LDA ADC STA), but back then people wrote C code very differently than they do today with optimizing compilers.
Every line of code you write, you had to understand and think about how the compiler was going to translate it into machine language, and write it as efficient as possible, readability be damned. SimCity had a bunch of code that went like "register z = 0; foo = z; bar = z; baz = z; z++; one = z; z++; two = z;".
Nobody writes like that any more (for a good reason: maintainability is much more important than hand coded optimization, which has hit the point of diminishing returns because the optimizers are so smart now). There is no advantage to programming that way any more, because now days the compiler deconstructs your code and applies all the optimizations automatically, using as many registers and optimization tricks as possible. Modern compilers won't let you declare a register variable with no type, and there is no longer any advantage to declaring register variables, or initializing variables from other variables instead of constants.
Designing good efficient algorithms is what's important, not typing them in so as to spoon feed a stupid compiler that can't figure out how to use registers or initialize variables efficiently. And good efficient algorithms should be written in clean maintainable readable code, so people can understand them, and bugs are easy to fix.
To paraphrase the introduction to Abelson Sussman and Sussman's "Structure and Interpretation of Computer Programs": Computer programs should be written first and foremost for people to read, and only incidentally for computers to execute.
-Don
Take a look and feel free: http://www.PieMenu.com
Of course it's possible to rewrite the simulator in any other language. It's just a question of how much work would it be, and how sure you would be that it did the same thing.
It was comparatively little work to rewrite C code in C++, because that's exactly what C++ was designed to do: take old C code with global variables and functions, and encapsulate it in a class with a well defined interface. Because C++ has the implicit this parameter to each member function, and it's not necessary to explicitly specify this when accessing member variables and methods, you don't have to change C code very much to translate it to C++. A different language with explicit this (or self) would require meticulously changing every line of code, and that would be orders of magnitude more work.
The first step to translating a big pile of C code to another higher level language is understanding and strictly defining what it does. Translating it to C++ is the first step in that process. That gives the code a lot more structure and coherence, without disrupting how it works.
The next step is to clean it up and toss out everything that isn't relevent -- all the old user interface and operating system hacks that no longer are necessary and have nothing to do with the simulator.
Once you have a clean core of code that verifyable works with well defined interfaces and without any irrelavent crap in it, it's much easier to start rewriting it in other languages like Python or Lua. (I would NOT suggest using Perl, though. That is a horrible, dead end language, antithetical to teaching kids how to program.)
Alan Kay and I have been having an interesting discussion about how to rewrite SimCity in much higher level languages than Python and Perl, specifically visual programming languages like eToys, Star Logo, Max/MSP, KidSim (Stagecraft Creator), Bounce (Body Electric), SimAntics, etc, along the lines of Robot Odyssey.
What we want to do is to open up SimCity to the Python scripting language as a first step, and then write a high level visual programming language in Python, easy enough for kids to use, but powerful enough for real programming.
Here are some references: ;-) at Apple wrote "A Taxonomy of Simulation Software"
Ideas for Sugar development environment from HyperLook SimCity
OLPC Visual Programming Languages for Education
Discussion with Alan Kay about Visual Programming
Discussion with Alan Kay about Robot Odyssey
OLPC Visual Programming Language Discussion with Guido van Rossum and Alan Kay
Alan Kay on Programming Languages
The Shape of PSIBER Space: PostScript Interactive Bug Eradication Routines
Kurt Schmucker (inventor of the C++ Barf Bag
Tim Smith at Anglia Polytechnic University in Essex wrote "A review of simulated and micro-world environments"
Brad Myers: Taxonomies of Visual Programming and Program Visualization
-Don
Take a look and feel free: http://www.PieMenu.com
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
Yup, that was Bin Laden's goal from the start - to nerf a GPL'ed release of SimCity.
Thank you alot for your post!
:-) :) for 6502.
Of course I know the modern style and work of a compiler and the programmer, and that this quite different to what existed in the 80s
Out of pure interest, I'm still looking for a really good C compiler (which is very probably a cross-compiler
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.