top | item 16306744

OpenSC2K – An Open Source Remake of SimCity 2000

294 points| LeoPanthera | 8 years ago |github.com | reply

126 comments

order
[+] billpg|8 years ago|reply
I once "won" SC2K when all my launch arcologies took off. However, I was busy fixing the city's plumbing (the buildings are hidden so you can deal with the pipework) and I missed it. I tried switching mode but it wouldn't let me until it finished.
[+] erikrothoff|8 years ago|reply
In a similar vain, check out Open Red Alert: http://www.openra.net/ At my previous job we used to play it every Friday, excellent remake of a great game.
[+] willvarfar|8 years ago|reply
Its very questionable to include the assets. The bottom of the readme says:

> Includes assets and graphics extracted from the original SimCity 2000 Special Edition CD. These assets are NOT covered by the GNU General Public License used by this project and are copyright EA / Maxis. I'm including these assets in the hope that because the game has been made freely available at various points in time by EA, and because it's 24 years old as of publishing this project that no action will be taken. Long story short, please don't sue me! Long term, I plan to add functionality to extract assets from the original game files within this project.

The normal way for these open-source engines work is to insist that the users get the artwork from another source.

[+] matte_black|8 years ago|reply
I once wrote a building generator that could create SC2k pixel art buildings based off a simple floor plan and some settings. It could be used to generate a lot of assets in a hurry.
[+] chungy|8 years ago|reply
EA is actively selling SimCity 2000 at least on GOG.com. With that in mind, I think there can be no real gesture of goodfaith on the author's part.

It's lazy, maybe just the "easy way" to do it in the beginning, but when the game is being actively sold, it's also slimy.

[+] alex_duf|8 years ago|reply
That's what openttd.org has been doing.

When they grew in popularity they gathered to completely redraw new assets from scratch.

It's a good way to kick start an MVP.

Also the technology choice doesn't really matter, there's a sweet spot where the new features outbalance the nostalgia of running the original game. At least that's what I think when I play OpenTTD

[+] titanix2|8 years ago|reply
OpenRA is reimplementation of the Red Alert game engine that support multiples games. They have their way to deal with the assets issue but I forgot what exact solution it is. At least RA is available for download for free for EA so its help too.

Edit: « OpenRA is 100% free, and comes bundled with three distinct mods. When you run a mod for the first time the game can automatically download the original game assets, or you can use the original game disks. »

[+] jl6|8 years ago|reply
How do these types of projects get around the fact that the new source code is clearly a derived work of the old game? I’m not saying they copied code, but they must be copying the design or the game would be a different game.
[+] jamesgeck0|8 years ago|reply
SimCity 2000 even has a demo that includes most of the graphics assets. It wouldn't put much of a burden on the user.
[+] rage8885|8 years ago|reply
I agree, but wanted to get something working out there first. I'm finishing up some code over the next day or two that will import the original assets from the game files without needing to include the assets within the repository.
[+] door2|8 years ago|reply
who cares? intellectual property law in the united states is irrational and immoral. i strongly support evading the law or fully exploiting gray areas / unenforced copyrights.
[+] NKCSS|8 years ago|reply
It's available online if you add 'abandonware' into the search. Not sure what the legal status is though.
[+] paulie_a|8 years ago|reply
This is why copyright laws are terrible in the US. It is a game that came out in the 90s, copyright protection for it should be over at this point.

Personally I pretty much just ignore copyright. I don't have a bootleg factory, but at the same time I am not concerned about downloading a file like this

[+] Quequau|8 years ago|reply
I enjoyed the first SimCity and I really enjoyed SimEarth. However, at some point I really stopped enjoying SimCity... and I'm not sure if it's that the game got more obsessively micro-managing or I just grew out of that style of game play entirely.
[+] meddlepal|8 years ago|reply
Classic, SC2K and SC3K were Will Wright games and didn't stress too much on the city micromanaging gameplay. They were plain and simple city builders. Things changed with SC4. Weirdly SCS and the last failed SimCity are probably closer in gameplay design and feel to the older titles than SC4 but the community hated them.
[+] xattt|8 years ago|reply
I was a Maxis geek as a kid, playing everything they put out right from SC2K. SC4 killed it for me when I began to get good at it, and ran into the infamous traffic bug. Above a certain population level, there was an inevitable scenario of traffic chaos, no matter the mitigations you attempted.
[+] willsr|8 years ago|reply
Hmm - cool project. Don't want to be a buzzkill, but copyright?

Should probably remove the assets to avoid a takedown.

[+] LeoPanthera|8 years ago|reply
Aside: I think this is the first game, or at least proto-game, I've ever seen written in Electron.
[+] chungy|8 years ago|reply
It's pretty trivial to run the original in DOSBox or Wine too... an open source remake has some appeal but when it requires many gigabytes more of memory to run when the original can do with 1MB, it's really a bit of a showstopper.
[+] petepete|8 years ago|reply
Early versions of CityBound[0] were written in Electron until the author had a re-think and restarted the project C++, then a few months later, again in Rust.

[0] http://cityboundsim.com/devblog

[+] willvarfar|8 years ago|reply
So its just Javascript? Why run it on Electron? Does it not work in a normal browser?
[+] qwerty456127|8 years ago|reply
Would be great if it could use SQLite and Electron already installed in the system instead of downloading/building them from the Internet sources unless that's really necessary (I actually find it strange node/electron still don't take care of this by integrating SQLite int their standard APIs anyway).

The window just shows an empty brown field and nothing else, I could find no "start new scenario" or anything like that in the menu.

Otherwise the idea is amazing. Surely SimCity 2000 is one of the greatest games ever and I can't wait for it to be implemented and extended as far beyond what it originally was as possible.

[+] kodablah|8 years ago|reply
> Would be great if it could use SQLite and Electron already installed

I don't understand what this means. These are usually application building components, not installable libs/applications. What do you mean be use the ones already installed? How do you install either of those "in the system" for use by multiple apps? Or do you mean the NPM cache which I figured it did leverage? Maybe I'm misunderstanding your statement?

[+] subcosmos|8 years ago|reply
Im trying to work on a startup right now ... and you just nerd sniped me for the next 6 months! Thanks!

(Seriously, this is amazingly awesome work. Thank you for the nostalgia. I think that I learned basic EVERYTHING by playing that game in my youth)

[+] samwestdev|8 years ago|reply
How does SimCity2000 render the terrain? I know it's 2d isometric but any good article on the actual data structure/algorithm?
[+] TapamN|8 years ago|reply
I'm also actually working on an unreleased to-be-open-source SimCity 2000 clone in C++ (which I am planning to call 21st Century Micropolis, after the existing, official open-source SimCity Classic release called Micropolis), so I've looked into how SC2K renders the screen. I'll describe it for drawing the whole map, since it's simpler, but you'd want to modify it to draw only the visible parts in an actual game.

Directions are relative to the screen, not the grid.

10 Clear the screen and set a pointer to the top corner of the map

20 If the pointed tile belongs to terrain or the leftmost tile of a building, draw it on top of what we already have on screen. (Note that for tiles that belong to a building, but aren't the leftmost tile, we do nothing) (1x1 buildings always count as a leftmost tile)

30 If we are at the last row, exit

40 If we are at the end of the row, go to the leftmost tile of the row below, and jump to 20

50 Otherwise step one tile to the right, and jump to 20

That's it.

One wrinkle in getting the exact same output as the original has to do with the magic eraser tool, which basically hacks the map and forcibly resets a tile to it's blank state, even if it's supposed to belong to a building. If the leftmost tile of a 2x2, 3x3, or 4x4 building has been magically erased, the entire building disappears. If you magic erase a tile below the leftmost tile, or to the right of it, you will draw ground tiles over the building. Erasing tiles above the leftmost tile's waterline has no visible effect. Magically erased tiles can also have things built onto them. This algorithm gets these cases correct.

[+] mixedmath|8 years ago|reply
I'm sort of stunned at just how few lines of code are necessary for this remake to work. It's just a couple thousand.
[+] squeaky-clean|8 years ago|reply
It's not a complete remake yet, right now it can just load and display cities.

> Currently a lot remains to be implemented but the basic framework is there for importing and viewing cities. Lots of stuff remains completely unimplemented such as the actual simulation, rendering of many special case tiles and buildings, support for zoom levels and anything else that exists outside of importing and viewing.

[+] collyw|8 years ago|reply
Did you ever see Elite? That ran on my Acorn electron with its whopping 32Kb of memory. My CV takes up more disk space than that these days.
[+] ramon|8 years ago|reply
I love the revival of these classic games, they're so cool and awesome! I remember I had this SimCity 2000 CD somewhere, imagine now being able to install it everywhere is so great for the creators of these games, these guys should be proud of making such a thing!
[+] theandrewbailey|8 years ago|reply
SimCity 2000 is one of the few original discs that I kept from when I was a kid. It came in handy when I built a Windows 98 machine a few years ago.
[+] baystep|8 years ago|reply
I was actually making an open source sim city clone in JS myself a while ago. Didn't get this far at all, but I was mostly in it to test if I could get async updating from the simulation portion. Essentially doing threading in JS. Which I was somewhat successful in using Web Workers and shared buffer arrays, would be interested in helping with this project. Unfortunately in my research I didn't find any concrete documentation on how the simulation algorithm actually works, so I doubt this would end up a direct clone on SC2K.
[+] hangonhn|8 years ago|reply
This may be a dumb question: How is it that in recent years small groups of programmers, sometimes just one, are able to recreate games that used to take a whole studio? Is it the availability or power of new open source tools? Did hardware advancements help (you can be more inefficient)? Is it the spread of knowledge and skills?

Anyone who knows more care to enlighten? Thanks in advance.

[+] hoopism|8 years ago|reply
This is lacking any simulation... and a number of other important features (as the author state very clearly BTW... so I am not diminishing their work).

In this case I would say the advancement of libraries and tools make efforts like this substantially easier than back then.

[+] protomikron|8 years ago|reply
Sometimes they don't ship the artwork, like tiles, but "just" the engine. Not that this lessens the achievement, it is still impressive.
[+] blt|8 years ago|reply
is there source code to SC2K anywhere? If not, won't it be really hard to even approximate the simulation behavior?
[+] rage8885|8 years ago|reply
There is no source code anywhere, unfortunately. I'm planning to approximate it the best I can based on information available online over the years and observing game behavior. In a lot of ways it's a fairly simple game but still has quite a lot of depth. My priority right now is getting rendering and some basic interactions (plopping buildings, networks, etc..) working and then move to implementing the simulation on top of that.
[+] pjc50|8 years ago|reply
It could be reverse-engineered from the original binary, although that's very time-consuming.
[+] erikb|8 years ago|reply
Ah dang. SC3K would've been more interesting.
[+] stereo|8 years ago|reply
porntipsguzzardo

ardo

ardo

[+] romanovcode|8 years ago|reply
Gotta say 21 FPS not very pleasant to game with.
[+] oneeyedpigeon|8 years ago|reply
Is it really that noticeable? I don't remember ever watching a 24 fps film thinking 'this is jerky'. Is it more about the lag between input and response than any jerking?
[+] rage8885|8 years ago|reply
It does run fairly slow with some of the debug overlays on, but with the overlays off I get a solid 60fps - it's averaging about 4-5ms per frame draw without enabling the overlays. What kind of machine are you running it on? There's a ton of room for improvement still, this is just an initial release.