
Chrome Experiments: “3d city” - mmastrac
http://www.chromeexperiments.com/detail/3d-city/
======
XaspR8d
Judging by the tools provided, it looks to be a clone of SimCity Classic. I'll
remember those 3x3 zone tiles forever.

EDIT: Strictly speaking, SimCity Classic let you remove the edge tiles of
residential plots as long as you didn't destroy the center, allowing you to
force low-density suburban areas. </random sim nerdery>

Seeing this running in the browser reinvigorated my wishful excitement for the
Citybound[1] project.

[1] - [http://cityboundsim.com/](http://cityboundsim.com/)

~~~
jcl
Strictly speaking, it's not a clone... It's a port.

SimCity for XWindows, released as Micropolis under the GPL:
[https://code.google.com/p/micropolis/](https://code.google.com/p/micropolis/)

Ported to JavaScript:
[https://github.com/graememcc/micropolisJS](https://github.com/graememcc/micropolisJS)

Ported to 3d: [https://github.com/lo-th/3d.city](https://github.com/lo-
th/3d.city)

------
Kortaggio
Is anyone else building a ton of police stations but still getting the
notification "Crime Very High"?

~~~
icefox
Here is where it is computed in the source: [https://github.com/lo-
th/3d.city/blob/6d206e4df362444d4c2a36...](https://github.com/lo-
th/3d.city/blob/6d206e4df362444d4c2a36bf3582b343f5afe93c/src/utils/BlockMapUtils.js#L219)

An initial glance suggests reducing the populationDensityMap is the real
solution (aka don't put so many houses next to each other, but spread it
out?)? Feel free to dig into it and reply below with findings.

~~~
aaronharnly
Looks to me like a bug -- they do a

value -= policeStationMap.worldGet(x, y);

when they probably meant to do

value -= policeStationEffectMap.worldGet(x, y);

otherwise, crime is reduced only if there's a police station _right there_.
That's just a guess based on a cursory look, though.

~~~
icefox
[https://github.com/lo-
th/3d.city/blob/6d206e4df362444d4c2a36...](https://github.com/lo-
th/3d.city/blob/6d206e4df362444d4c2a36bf3582b343f5afe93c/src/utils/BlockMapUtils.js#L204)

Before the for loop it "smooths" the policeStationMap 3 times. And this is
reset every 15 cycles and in the first 8 cycles it re-populates the
policeStationMap before performing the crimeScan.

([https://github.com/lo-
th/3d.city/blob/5827c3be180c6b7b39076d...](https://github.com/lo-
th/3d.city/blob/5827c3be180c6b7b39076dde27f02492e9022681/src/game/Simulation.js#L168)).

So a cursory investigation it doesn't look good and any policeStation needs to
be within 3 to have any effect.

What the simulation should do is never clear the policeStationMap. The
policeStationMap is constantly cooling and diffusing and it is only by
refreshing where the police stations are is how new energy is introduced into
the system (policeStationMap). The simulation doesn't even need to reset the
spot on the map when a Tile.POLICESTATION is removed because the value will on
its own cool. As an added bonus the simulation doesn't need to waste cpu
cycles calling smoothStationMap three times in a row, but only needs to do it
once.

------
eragnew
I love seeing stuff like this. But what really excites me is when these types
of 3D models start to represent real cities. Like the ViziCities project[0].
Maybe the idea of Mirror Worlds [1] will eventually become reality.

[0]
[https://github.com/robhawkes/vizicities](https://github.com/robhawkes/vizicities)

[1] [http://www.amazon.com/Mirror-Worlds-Software-Universe-
Shoebo...](http://www.amazon.com/Mirror-Worlds-Software-Universe-
Shoebox/dp/019507906X/)

~~~
robhawkes
I'm the creator of ViziCities. It's projects like this (and SimCity proper)
that inspired the project and the attempt to making something similar for
real-world cities. We're getting close!

------
reedlaw
I have a plane stuck on train tracks and a train hovering over my city. Other
than that, it's a pretty good SimCity imitation in 3D.

~~~
azurelogic
Yeah, this happened to me too. I had a 747 doing the moonwalk down the tracks
at high speed.

------
wuliwong
Moving around the map is really difficult. When I select anything except the
dragging icon, the map seems to scroll to the edge. After right clicking and
rotating and zooming the problem was even worse. If I didn't have this issue,
it would be loads of fun to play. :)

~~~
donut2d
I have been moving around the map with WASD which has been working fine for
me. I wasn't able to get it to scroll by going to the edges.

~~~
wuliwong
Nice, thanks!

------
MiWDesktopHack
Worked for me in Firefox 31. Awesome, played for a while but the citizens
didn't like me; no save option! Would gladly play again with persistence.

Very impressive example of the richness in todays web. Well done loth!

------
Cowicide
There's no other energy choice aside from coal and nuclear? Bummer. Edit: Then
again, if this is a sim of an 80's game or something, I guess it makes sense.

~~~
bkmartin
Wait wait... how old are you? This is a port of the ground breaking game Sim
City. Look it up, you'll be pleasantly surprised :D

------
zoba
Pretty nice, though, my train and my plane got mixed up.

[http://i.imgur.com/U27syus.jpg](http://i.imgur.com/U27syus.jpg)

------
DonHopkins
This a beautiful re-implementation of the original SimCity / Micropolis code
in JavaScript, true to the original game. I was hoping somebody would finally
do that, and I'm thrilled by how well it turned out.

[http://www.reddit.com/r/SimCity/comments/1dwctf/fixing_up_mi...](http://www.reddit.com/r/SimCity/comments/1dwctf/fixing_up_micropolis/)

I'm most impressed by how fresh and clean the graphics are. I've got the
original tile expansion sets for Ancient Asia, Future Europe, Future USA,
Medieval Times, Moon Colony and Wild West, if anyone is interested in making
3D versions of those, too!

------
chrissnell
Nice. I hope the author adds some audio. There's something about the simple
songs that came with the game that helped you zone out and relax. I could play
SimFarm for days.

[https://www.youtube.com/watch?v=Q28WFGK8xxE](https://www.youtube.com/watch?v=Q28WFGK8xxE)

------
ksk
This is pretty cool, but I find it rather sad when simple games like these
consume > 50% of my CPU (E8400). Didn't the original SimCity (2000?) run on a
pentium 3?

~~~
kristianp
Wasn't the original an isometric layout though? Not true 3d.

~~~
ksk
Yes, it was probably sprite based.

------
jeremyperson
Doesn't work for me on Ubuntu 14.04 with Chrome 36. Works on Firefox with
Ubuntu but much slower to render events. Very cool.

------
triptych
funny, the trains start flying and the planes move along the tracks :)

------
pca2
If only there was some kind of "save game" feature

~~~
thathonkey
I too like to build fully functional games and then reclassify and promote
them as experiments.

------
transistor-man
This will crash your firefox instance

~~~
jstanek
Worked fine for me on Firefox 31

~~~
quotemstr
Me too

