3D.City – Game built with three.js and sea3d
lo-th.github.io
lo-th.github.io
Simulation code here:
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:
There are small details like laying out roads and making power lines go over them etc that are super-fiddly too.
I know this because I played around with my own simcity for a while, first in true 3D (making curvy roads look nice is damn difficult) and then a 2D grid.
Here's a screenshot I was particularly proud of - the effort to get to that point was more than it looks! http://media.tumblr.com/c9b51ca1eb2b3e89eb8d5af0f560ec34/tum...
More on my algos http://williamedwardscoder.tumblr.com/post/49797579721/willc...
I was going to procedurally produce the buildings using a variation on Eisenscript https://sites.google.com/site/williamedwardscoder/home/exten... with variables in the script based on things like price, distance to other zones, scores etc
I look at the files you link and think "yeah!". I put my city simulation into a Web Worker and the UI in the browser thread though.
The simulation is from my own micropolisJS (http://micropolisjs.graememcc.co.uk and 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!
`The simulation is from my own micropolisJS (http://micropolisjs.graememcc.co.uk and https://github.com/graememcc/micropolisJS) just stripped of the GPL License headers and attribution.`
https://github.com/lo-th/3d.city/blob/gh-pages/README.md
"Start with the excelent port of Micropolis by graememcc"
UPDATE: As much I see now, it seems that graememcc did not consent in using his work with altered license. So it is a violation.
Micropolis is gpl'd.
MicropolisJS is a version of that, and is also correctly licensed.
3DCity - the submission here - is written by someone else. This person stripped the gpl headers and re-used some code without correctly licensing that code.
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
[1] https://github.com/graememcc/micropolisJS/blob/master/js/Blo...
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.
http://donhopkins.com/home/micropolis/olpc-ea-contract.pdf
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!
https://code.google.com/p/micropolis/wiki/License
This is from section 2.1 of contract between EA and OLPC:
http://donhopkins.com/home/micropolis/olpc-ea-contract.pdf
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.
EXHIBIT A  Territory: Worldwide
Original SimCity Code: Title: SimCity (published in or about 1990)
Format: Unix Platform
Deliverable Items: EA will deliver to OLPC the following materials on or shortly after the Effective Date:
1. Source code for the Unix port version of the Original SimCity.
2. Any EA Documentation that EA deems necessary.
General Software Requirements: OLPC agrees that the OLPC SimCity will not be approved by EA for distribution under Section 2.2 of this Agreement, until the OLPC SimCity meets the following general software requirements:
1. EA’s QA team is unable to crash the game in sixteen (16) man-hours of play-time.
2. EA’s QA team is unable to find images/language that is deemed inappropriate to achieve an “E” rating by the ESRB standard.
3. No use of any EA Trademarks that would reflect negatively upon the established reputation of EA.
4. Add copyright/license information to each source file to reflect the proper licensing. Specific Software Requirements: OLPC agrees that the OLPC SimCity will not be approved by EA for distribution under Section 2.2 of this Agreement, until the OLPC SimCity meets the following specific software requirements
1. The Air Crash Disaster is removed from the game.
2. EA approved splash screen is shown before the start of the game.
3. Simplify the Main Menu with EA provided GUI elements.
4. All text in the game must be legible.
5. Game audio must work.
6. Remove all attempted multi-player features.
7. SimCity Should be properly integrated to the XO’s GUI
8. Code for the EA approved splash screen is not included in the source code to be distributed with the OLPC SimCity executable.
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.
including other crazy stuff like this: http://3dflashlo.wordpress.com/2014/02/17/png-to-script/
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
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!
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...
cheers!
(Found it http://www.darkroastedblend.com/2012/03/retro-future-gloriou... here and used it as a desktop wallpaper for ages!)
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).
what does about://gpu say in Chrome? There are bugs in the latest version of Chrome for Ubuntu in both the Intel and nVidia drivers.
Is WebGL evere going to really work?
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.
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.
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.
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.