
OpenSC2K – An Open Source Remake of SimCity 2000 - LeoPanthera
https://github.com/rage8885/OpenSC2K
======
billpg
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.

~~~
burlesona
Haha that’s brutal :)

------
erikrothoff
In a similar vain, check out Open Red Alert:
[http://www.openra.net/](http://www.openra.net/) At my previous job we used to
play it every Friday, excellent remake of a great game.

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

~~~
chungy
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.

~~~
colechristensen
I don't think "bad faith" and "slimy" should really apply to 24 year old game
assets.

I value useful creation much higher than dated intellectual property. Or in
other words, I do not support long-tail profit and control of any creative
work.

~~~
meddlepal
That's fine, but when you get sued into oblivion don't come complaining that
you didn't know it wasn't OK.

Lobby for law changes if you don't like the law.

~~~
chongli
I don't think anyone here is claiming that the author is legally in the right.
This is a moral question and labels like "slimy" and "bad faith" are moral
labels, not legal ones.

~~~
Analemma_
"bad faith" actually is a legal label, and the author of this almost certainly
qualifies.

------
tgtweak
Interesting approach, looks like a map renderer for the moment.

There's a cool dosbox emulated version here, payable in the browser:
[https://www.myabandonware.com/game/simcity-2000-1nf/play-1nf](https://www.myabandonware.com/game/simcity-2000-1nf/play-1nf)

~~~
cpach
It’s also available at the Internet Archive:
[https://archive.org/details/msdos_SimCity_Classic_1994](https://archive.org/details/msdos_SimCity_Classic_1994)

~~~
timdiggerm
No, that's the original SimCity, the predecessor to SimCity 2000.

~~~
Elzahir
Ok, here's the correct link:

[https://archive.org/details/msdos_SimCity_2000_-_CD_Collecti...](https://archive.org/details/msdos_SimCity_2000_-_CD_Collection_1994)

------
sethgecko
My favourite game of that era is Transport Tycoon which also has an open
source remake
[https://github.com/OpenTTD/OpenTTD](https://github.com/OpenTTD/OpenTTD)

~~~
meddlepal
Not free or open source but you should check out Jan Zelenys Mashinky on Steam
if you want a more modern OpenTTD.

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

~~~
Fnoord
How do these official Sim City games compare to the newer game Cities:
Skylines. That appears to be the spiritual successor. I like that that doesn't
require an always-on connection, it also seems to have good reviews (87% on
Steam) but how does it compare to the official Sim City games?

~~~
meddlepal
I'm not big on Skylines. It looks very pretty, but the agent-simulation model
has a lot of issues versus how the older SimCity games worked. To work around
the quirks of the "every sim is independent" aspect you have to do weird
things with city design that feel counter intuitive for various reasons... for
example, who does a city of 50K need a mass transit system? Garbage management
has issues too.

I will say this though, a more experienced Skylines user should comment. I
bought it early on, played it for a little bit and went back to SC3K and
SC4... dusted it off again and played for a little bit more but went back to
SC3K again. Some of these issues may have been addressed by now.

~~~
squeaky-clean
You can get better experiences by adding mods like "Rush Hour", "Realistic
Population and Consumption", and "Traffic Manager: President Edition". General
consensus though is that Skylines prioritizes "pretty" over "realism", which
I'd agree is generally true. It's still the best current city builder, doubly
so with mods.

> for example, who does a city of 50K need a mass transit system?

There's 2 reasons for this I'd say. The first and most significant, is simply
people suck at planning traffic layouts, and this game is much more punishing
than other city builders exactly because it simulates every citizen. One bad
driver merging can back up literally thousands of other vehicles, which
propagates it's way to other exits and intersections, just like real life.

This is made worse by citizens just being shitty drivers (even more so than
reality) and not following traffic logic very well (merging across 3 lanes at
the last second over and over!) and the inability to customize intersections.
Traffic Manager: President Edition is an amazing overhaul of this system. The
UI is a bit clunky, but you can set individual turning lane rules, timed
traffic and pedestrian crossing lights (even timing rules that span several
intersections!). Adding well timed traffic lights has turned huge messes of
downtown areas of mine into very reasonable looking traffic, without needing
to rework the roads or buildings.

The top post on the game's subreddit is a guide by a traffic engineer [0] and
their city has an amaaaaaziiiing traffic flow.

But secondly, it's still a game and so it can't perfectly capture real life. A
big part of why traffic is so much worse than real life is the time scale. A
real world city may have 50x more people going to and from work than Cities
Skylines, but they also have 50x longer to get there. I can't find specific
numbers, but if a citizen doesn't reach their destination in just a few
minutes they are either reset or may lose that job (or both). I know people
who have a 90 minute commute, this is longer than an entire Skyline's
citizen's day.

The traffic system by default also isn't tied into the day/night cycle
(day/night was added to the game in a later patch and fleshed out more with an
expansion). So citizens leave for work/school at all times of day making the
traffic feel more active than it should be. The Rush Hour mod fixes this, for
example, and at 9am you'll have disgusting backed up traffic and 3am an
ambulance can cross your city in seconds because streets are barren.

Still, a good rule of thumb from C:S communities is to multiply your
population by 10x and that's how large of a real-world city matches yours.
(For example my 250k city runs more like a real-world 2.5million city).

> Garbage management has issues too.

My biggest problem here is that services like garbage and police don't seem to
give a crap how close something is to them. My current "city" is a mountain
valley with a busy downtown and dozens of little satellite towns in the
mountain ridges. Constantly I run into problems like a fire in a small town,
but instead of sending a firetruck from the local station, one comes in from
downtown, and all the local trucks are sent to deal with some downtown
emergency. It seems to get worse as time goes on, and leaving my city up and
running for over a day or so leads to a complete failure of my garbage system
as trucks service houses which are miles away, yet adjacent to another
landfill (which is also servicing houses miles away rather than nearby).

The Rush hour mod has a setting to make Cims only search for jobs and goods
locally, which works great but doesn't seem to affect the services in any way.
I'd love some way to enable that, or set a max-distance-from-base for service
vehicles, or not allowing cross-district service usage. Anything really.

[0 - content post] [https://imgur.com/a/WdJim](https://imgur.com/a/WdJim)

[0 - reddit thread]
[https://www.reddit.com/r/CitiesSkylines/comments/2zfx70/if_y...](https://www.reddit.com/r/CitiesSkylines/comments/2zfx70/if_youre_having_traffic_problems_i_feel_bad_for/)

~~~
amyjess
> or not allowing cross-district service usage

There's a mod for that. It's called "Geli-Districts" [0]. There's also the
more aptly-named "District Service Limit", but it's no longer maintained.

[0]
[https://steamcommunity.com/sharedfiles/filedetails/?id=92729...](https://steamcommunity.com/sharedfiles/filedetails/?id=927293560)

~~~
squeaky-clean
THANK YOU!! An upvote just isn't enough.

------
willsr
Hmm - cool project. Don't want to be a buzzkill, but copyright?

Should probably remove the assets to avoid a takedown.

~~~
viraptor
> 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.

~~~
LeoPanthera
As an alternative, perhaps an artist could create new free assets for use with
the engine, which is what happened with OpenTTD.

~~~
unixhero
And as happened in OpenRedAlert and OpenDune.

Remaking sprites and game assets in a more open format - while also supporting
the original game assets.

------
jelv
openage [http://openage.sft.mx/](http://openage.sft.mx/) Free (as in freedom)
open source clone of the Age of Empires II engine (work in progress)

------
LeoPanthera
Aside: I think this is the first game, or at least proto-game, I've ever seen
written in Electron.

~~~
chungy
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.

~~~
jagger27
It's a bummer—I don't know about showstopper, though. The usual first goal for
remakes like these is to get around the limitations from DOS and whatnot.
Things like resolution and map size are easy targets and improve gameplay a
bunch.

Perhaps some tools and ideas from this project will spark interest in a native
OSS remake.

------
qwerty456127
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
> 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?

~~~
qwerty456127
I mean I already have sqlite3 executable in /usr/bin and the libraries
wherever they are meant to be located. AFAIK Windows 10 comes with SQLite
within $PATH too. I don't really code JavaSctipt so I am not sure but I think
it probably is not really hard and probably is a more "right way" to detect
SQLite binaries already available this way and use them than download/compile
it for every new application using it. Of course it doesn't really matter but
it would feel good for "unix way" perfectionists at least :-)

------
subcosmos
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
How does SimCity2000 render the terrain? I know it's 2d isometric but any good
article on the actual data structure/algorithm?

~~~
TapamN
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.

~~~
samwestdev
Thanks! How do you handle different terrain heights?

~~~
TapamN
Terrain height just changes the Y position when where you draw. Draw order is
still the same. The formula for tile map space to screen space is:

scrx = mapy _16 - mapx_ 16;

scry = mapx _8 + mapy_ 8 - GetSurfaceHeight(mapx,mapy)*12;

IIRC, this assumes origin is in top most tile, with increasing Y going down.
So each step the terrain increases, you move the tile you draw up 12 pixels
higher from the lowest point.

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

~~~
mixedmath
Ah, I see. Indeed, I didn't read closely and missed that. Thank you.

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

------
blt
is there source code to SC2K anywhere? If not, won't it be really hard to even
approximate the simulation behavior?

~~~
rage8885
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.

------
erikb
Ah dang. SC3K would've been more interesting.

------
stereo
porntipsguzzardo

ardo

ardo

------
romanovcode
Gotta say 21 FPS not very pleasant to game with.

~~~
oneeyedpigeon
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?

~~~
Crespyl
In a low-fi "turn based" game like SC, it'd be pretty tolerable as long as the
cursor still moves at a normal speed.

Anything with more animation or especially real-time input like in a first
person game, if run at < 60FPS is immediately noticeable, and below 30FPS
quickly becomes entirely unplayable.

Additionally, in the past I didn't think 24FPS movies were jerky, but now that
I've started looking, there are lots of scenes that definitely look stuttery
to me. In particular, watch for "smooth" panning shots and see how the farther
background elements will jump and stutter across the screen. Excessive motion
blur helps to hide some of the problem, but there's a limit to what the
filmmakers can really do. There's a lot of cinematography rules to reduce or
hide the problem, but that comes with cutting yourself off from lots of things
you might otherwise want to do with the camera.

~~~
dragonwriter
> In a low-fi "turn based" game like SC

SimCity is real-time, not turn-based.

~~~
Crespyl
This is true, thank you. I seem to conflate SimCity and the Civ games, for
some reason, they seem to occupy a lot of the same spaces in my head.

That said, the fact that you can always pause at any time and there's never
much time pressure to respond quickly to events does mean that the low
framerate doesn't have much impact on the gameplay.

