
3D.City – Game built with three.js and sea3d - huskyr
http://lo-th.github.io/3d.city/index.html
======
bhouston
Beautiful work with Three.js. But the simulation work is also really
impressive -- and a lot of work.

Simulation code here:

[http://lo-th.github.io/3d.city/build/city.3d.js](http://lo-
th.github.io/3d.city/build/city.3d.js)

Background worker (neat idea) that handles all user input and costly events,
to keep the 3D animations consistently fast:

[http://lo-th.github.io/3d.city/js/worker.city.js](http://lo-
th.github.io/3d.city/js/worker.city.js)

~~~
graememcc
> The simulation work is also really impressive -- and a lot of work.

The simulation is from my own micropolisJS
([http://micropolisjs.graememcc.co.uk](http://micropolisjs.graememcc.co.uk)
and
[https://github.com/graememcc/micropolisJS](https://github.com/graememcc/micropolisJS))
just stripped of the GPL License headers and attribution.

micropolisJS in turn is a port of Micropolis, the open-source release of Sim
City 1989 for One Laptop Per Child.

Edit: edited the link. You'd think I should get links to my own site correct!

~~~
judk
Is that compliant with your license?

~~~
PythonicAlpha
I think, when he is the author, than he can decide which licence to use. There
are many examples (like MySQL) where double licensing is used. The original
author can decide, which licence he finds appropriate.

~~~
jvilk
The author of micropolisJS is not the author of 3D City. In this case, 3D City
needs to be licensed under the GPL, and I believe 3D City needs to include the
copyright details for the original port.

In addition, micropolisJS has additional terms added to the GPL [0], which are
clearly linked to from the top of every source file in micropolisJS [1], which
need to be distributed with 3D City.

[0]
[http://micropolisjs.graememcc.co.uk/LICENSE](http://micropolisjs.graememcc.co.uk/LICENSE)

[1]
[https://github.com/graememcc/micropolisJS/blob/master/js/Blo...](https://github.com/graememcc/micropolisJS/blob/master/js/BlockMap.js#L1)

~~~
PythonicAlpha
If he is not the same author, then you are right. One statement from an other
poster suggested, that he is.

The original author would have the right to add new alternative license
conditions as he wishes to.

Maybe the author of 3D City should say something about it.

Edit: Now I saw, what you mean. MicropolisJS seems to be an alteration of the
GPL'ed Micropolis of an other author. And the owner of MicropolisJS stripped
the GPL license from it to use it in the other project (btw. why?). I am no
lawyer, but it really looks to me as a violation of the GPL, at least without
permission of the first author.

~~~
bhouston
The author of MicropolisJS is not the author of the ThreeJS SimCity clone that
is the top of this HW story.

~~~
DonHopkins
It's not a clone, it's derived from the original SimCity source code, which EA
licensed under GPL V3 with the added condition that it should not be called
"SimCity" without EA's approval. So it's important that all versions of the
code include that license and the required provisions.

[http://donhopkins.com/home/micropolis/olpc-ea-
contract.pdf](http://donhopkins.com/home/micropolis/olpc-ea-contract.pdf)

[https://code.google.com/p/micropolis/wiki/License](https://code.google.com/p/micropolis/wiki/License)

2.1 Modification. EA hereby grants to OLPC a non-exclusive, non-transferable,
non-sub licensable, non-assignable, revocable right and license to modify the
Original SimCity as provided by EA for the sole purpose of producing a version
of the Original SimCity for distribution on laptops provided through the OLPC
Program pursuant to the specifications set forth in Exhibit A ("OLPC
SimCity"). All right, title and interest in OLPC SimCity and any interim
modifications shall belong solely to EA. OLPC SimCity, and any subsequent
versions, will not be distributed by OLPC unless the software meets the
requirements set forth in Exhibit A. For the avoidance of doubt, nothing
contained in this Agreement shall be deemed to limit or restrict EA’s right to
use, modify, sell, distribute or license the Original SimCity in any other
manner as EA so desires.

And on a completely unrelated topic:

Q: How do you know there's an elephant hiding under your bed?

A: Your face is pressed up against the ceiling!

------
Kequc
In Chrome on OS X I find myself clicking to place a zone then having to wait,
then move my mouse a tiny bit before the zone would appear. If I started
moving the mouse too much after clicking it gets put in the wrong place and if
I don't move the mouse the zone never appears.

After 10 minutes I hit a bug where adding more zones seemed to place an
'invisible' zone. Which deleted the trees that were there and could be
connected to electricity but didn't draw anything on the ground and would
never populate. Or at least I couldn't see if it was populated and I couldn't
play anymore.

~~~
M2Ys4U
I've hit that bug a few times. If you save the map, refresh the page, load the
map again and bulldoze the invisible zones everything works again.

------
mxfh
The developers, Laurent Thillet, blog is here:
[http://3dflashlo.wordpress.com/](http://3dflashlo.wordpress.com/)

including other crazy stuff like this:
[http://3dflashlo.wordpress.com/2014/02/17/png-to-
script/](http://3dflashlo.wordpress.com/2014/02/17/png-to-script/)

------
diltonm
The Load and Save worked, the game is amazingly good. The use of "use strict"
blew me away, I had no idea that existed, it gives me a sense that JavaScript
is becoming a solid language.

The game, day/night, seasons, I would buy this. It might need to be converted
to Java to lower CPU usage but even as JavaScript it actually uses less than
I'd have thought.

Very nice work.

On "use strict" I can't believe all the stuff JavaScript allows when it's not
used, so I'm glad it exists:
[http://www.w3schools.com/js/js_strict.asp](http://www.w3schools.com/js/js_strict.asp)

------
jplahn
Really enjoy this! Like everyone else, the nostalgia is so strong.

The only thing that seemed off for me was the "Drag", which I think somebody
else mentioned. I found myself clicking and re-clicking it multiple times to
pan around the map, which got old after a bit. That was in latest Chrome on
Mac OSX.

Great work however!

------
ceeK
Thanks for wasting away the last 30 mins of my life (really it's fantastic,
great job!).

~~~
huskyr
Not my game, just posted the link!

------
nakedrobot2
Awesome! Brings back old memories of late nights and precious cities with the
very first simcity.

At this point, my browser has ground to a halt, my retina macbook is running
very hot, and the little green rectangle does not follow the cursor anymore to
aim where i'm going to plant the next building:
[https://dl.dropboxusercontent.com/u/14314213/Screen%20Shot%2...](https://dl.dropboxusercontent.com/u/14314213/Screen%20Shot%202014-11-28%20at%207.02.56%20PM.jpg)

cheers!

------
willvarfar
Here's what Simcity 3D ought to look like!
[http://media.tumblr.com/tumblr_m1ouer157w1r3qp3f.jpg](http://media.tumblr.com/tumblr_m1ouer157w1r3qp3f.jpg)

(Found it [http://www.darkroastedblend.com/2012/03/retro-future-
gloriou...](http://www.darkroastedblend.com/2012/03/retro-future-glorious-
transportation.html) here and used it as a desktop wallpaper for ages!)

------
odiroot
Surprisingly it runs on my Jolla. I thought the browser is not enough
bleeding-edge. It's pretty smooth as well, although switching to snow kills it
a bit.

------
DonHopkins
I'm really glad to see this wonderful work that people have done based on the
original SimCity source code! many thanks to Will Wright and the people at
EA/Maxis and OLPC for helping make it open source, and to everyone who worked
on making it run so nicely and easily in the web browser. This project shows
exactly why that was an important thing to do, and I hope it inspires others
to do similar things.

------
erikb
It's nearly killing my whole computer. What are the requirements to run it?

~~~
AlexeyBrin
Preferably a WebGL capable browser and video card, otherwise Three.js could
potentially switch to HTML5 canvas.

~~~
erikb
On the newest FF it's very slow (maybe not WebGL?) and on the current Chromium
it's not even loading. Both running on a freshly installed Ubuntu 14.04.

~~~
AlexeyBrin
Do you have proper drivers for your video card on Ubuntu ?

On my MacBook Air runs smooth on both Chrome and Firefox. Same on Windows 8.1.
Unfortunately, I can't test it on Ubuntu because I don't have a GUI
installation of Ubuntu (I use the server version).

------
judk
It runs almost as fast as simcity native ran on my 33Mhz 486 in 1991.

Is WebGL evere going to really work?

~~~
prezjordan
Something tells me your browser doesn't support WebGL, in which case Three.js
will default to canvas operations.

~~~
judk
Right. That's what's frustrating about WebGL.

------
fffrad
This is amazing. I remember playing this game before and it was all choppy. I
am not sure it used threejs before. Good job in improving it.

------
johnloeber
Wow, this is very impressive. Some people say that anything that can be done
in a C-type language will be done in JS between five and ten years later --
this is evidence for that point.

The gameplay feels nice, and it reminds me of Caesar II, if that game is
familiar to anyone. That being said, I think the game would benefit from
introducing a few objectives.

~~~
frik
You are right.

About Caesar II/III, it was a nice city building game. But the 3DCity game is
very similar to another game called SimCity/SimCity2000. Some mentioned in
this thread that it even uses the open source code of the original SimCity 1
for its city simulation code.

------
bobajeff
It ran pretty well in Chrome for Android.

A few observations about it: The drag view was buggy so I had to re-click it
over and over again. It also crashed on me a a couple of times. Also placing
objects was hard to do and it took me awhile to figure out how to drag the
screen.

------
olofd
Feel asleep after playing the game. I woke up rich!
[http://imgur.com/BTZdkCo](http://imgur.com/BTZdkCo)

------
ilija139
What to do to solve the pollution problem? :D

~~~
Animats
Haven't found anything yet. Concentrating all the industry away from the
residential sections doesn't help. Using all nuclear power doesn't help.

~~~
anonfunction
Building a lot of parks?

------
make3
pretty awesome. just wanted to say that in latest chrome on windows 8.1, when
the city gets in 30k population range, new buildings and zonings model's don't
appear; well, everything new doesn't appear, pretty much. also, wire seems to
have trouble being built over steets most of the time

------
Shengbo
This is beautiful, thank you for posting.

------
jguimont
The last 10 min reminded me how much time I spent playing SimCity, SimTower
and Civilization.

------
msie
Didn't work until I reenabled Hardware Acceleration in Chrome settings. Doh!

------
cturhan
As a three.js fun, I enjoyed very much. Great job.

------
Nmachine
Crashes Firefox mobile

------
clarry
Got any screenshots?

~~~
louhike
[http://3dflashlo.files.wordpress.com/2014/07/sim14.jpg?w=518](http://3dflashlo.files.wordpress.com/2014/07/sim14.jpg?w=518)

------
aikah
Nice! quite fun!

------
Apofis
Doesn't work Chromium 38.0.2125.111 Ubuntu 14.10

------
PsychopompPoet
wow thanks this is awesome

------
Animats
Breaks Ghostery:

Exception { message: "", result: 2147746065, name: "NS_ERROR_NOT_AVAILABLE",
filename: "resource://gre/modules/addons/XPIProvider.jsm ->
jar:file:///home/john/.mozilla/firefox/ifg18hmm.default/extensions/551f2920-3c19-11e1-b86c-0800200c9a66@jetpack.xpi!/bootstrap.js
-> resource://gre/modules/commonjs/toolkit/loader.js -> resource://firefox-at-
ghostery-dot-com/ghostery/lib/ui/desktop/button.js", lineNumber: 60,
columnNumber: 0, inner: null, data: null, stack:
"create@resource://gre/modules/addons/XPIProvider.jsm ->
jar:file:///home/john/.mozilla/firefox/ifg18hmm.default/extensions/551f2920-3c19-11e1-b86c-0800200c9a66@jetpack.xpi!/bootstrap.js
-> resource://gre/modules/commonjs/toolkit/loader.js -> resource://firefox-at-
ghostery-dot-com/ghostery/lib/ui/desktop/button.js:60:11

Reported to Ghostery support.

