189 comments

[ 3.5 ms ] story [ 237 ms ] thread
A crude 'digital twin` with detailed land use and zoning based on official city development plans and data centered around 2020; over a million virtual citizens, simulating population dynamics that reflect large-scale, real-world demographics and human movement; public transport based on actual route data.
At some point I would expect you to write your own simulation engine given the serious limitations you ran into
How bad those limitations are depends on the purpose of the simulation, they satisfy a few uses cases even with those limits. Also the skill sets involved in those two tasks are quite different.
I've had some maintenance issues with my car, guess I should just design and manufacture my own.
I think at some point I will, but this is a task that takes multiple overlapping fields of expertise - from simulations to 3D rendering. I'll teach myself over time. I build little procedural generation experiments for fun that make their way into my books. But this is one of those dreams that will take me a couple of years to get to the level where I'm competent enough to go for it.
Is it necessary to work in 3D initially? You can make the problem a lot easier when working in 2D.
Goal here was to build a visualization and communication tool; 3D is an essential component of that. For 2D, land use maps already exist.
Wow this must have taken quite awhile. I've always wanted to do something similar with my hometown (for the giggles) and now I have a guide on how to start.

Have urban planners been receptive to using this model for how they work on issues that affect the city?

is there any work done to show that Cities Skyline can approximate real problems and is not just a fancy game?
I'm asking based off of what they wrote in the readme

"While not a completely accurate simulation, this "toy universe model" provides a useful tool for visualizing and communicating urban development concepts. We present this tool in the hope that it will facilitate better communication and understanding of urban planning issues in Colombo."

Not completely accurate sounds like a bold claim of accuracy imo
Does the following description of it as a "toy universe model" affect how you judge the claims of accuracy?
That is a separate claim
Only if you're absurdly literalist. In British English that would be immediately understood as "not very accurate at all".
… really? I’m not sure I believe that.

“Not completely” seems to clearly indicate that it is not 100% accurate which seems worth clarifying only if the base assumption is that it’s very good.

Really. Especially taken with the "toy" statement that follows, this reads to me like "this isn't perfect but we had a good crack at it and are happy with how good it came out for our purposes".
I’m sorry but I fail to see how this quote you’ve provided isn’t suggesting that the model is good. Your message is clearly positive.

What I’m saying is that this is almost certainly completely untested and entirely reliant on the fun game mechanics used to simplify the experience of playing Cities: Skylines. Like, iirc, the game does not implement any sort of rush hour logic.

Even if it is "just a fancy game", things like this can be very educational for upcoming generations of real city planner types. Get kids interested in those "real problems" in healthy ways early in life, and give them tools / toys to explore their ideas with. :)
the question is, are the precepts baked into the equations around traffic flow, urban design, etc, truly a reflection of reality. In SC3K, my low density residential housing was never as happy as high density, is that based on reality? My enactment of endless (in sc3k, check all boxes) series of ordinances produced the best result. Was the neighborhood around the casino really crime ridden or was that a trope?

Are the models based on real life or are we using a game to pretend real life - like making a game about the wonders of say, collectivization, rather than maybe creating a simulator for how market trade reaallly works.

Methodology here: https://github.com/team-watchdog/colombo-skylines/wiki/Intro...

We've also tweaked many of the assumptions (traffic flow, citizen lifecycles etc) https://github.com/team-watchdog/colombo-skylines/wiki/mod-c... to get "somewhere in the vicinity" of how people actually behave - nursery school at 6 years old, high school after, then a job, maybe college, then employment and retirement at 65.

In some of the work that I was involved in years back we were using CDR (call detail records) to estimate human mobility. See: https://medium.com/@yudhanjaya/how-people-come-to-nallur-7d3...

We're certainly not that accurate, as the broader you go with simulation, the less deep you can get to. But as a teaching tool to help people think about the instersection of complex systems, it's decent.

If I had more time I'd spent it making a new asset pack so those houses look more Sri Lankan.

I wouldn't make any serious policy decisions based on City Skylines, it's a resource management game not a serious simulation if that's what you're asking.
In the case of Australia (my home), the casino itself is crime ridden (mainly the corporation behind the casino, and its behind-closed-doors relationships with organised crime and with government - but money laundering and other crimes also occur on the casino floor), while the neighbourhood around the casino is quite safe, peaceful, and upmarket.
What's the standard of proof for a commercially available package other than "these are the municipalities/planning authorities that have used this before?"
Typically you look for its use in both academia and in the field (hence CUBE, for instance; widely used by the academics at Moratuwa who then go on to work on actual projects)
Cities Skylines in the vanilla mode (and most, if not all, city builder games before it) famously ignores problems of car storage. It may actually seem like cars are somewhat sustainable.
Is there a mod out there that adds car storage? I can imagine the cities look less idealised when half the space is taken up by car parking lots lol.
TM:PE (Traffic Manager: President Edition) has a setting for more realistic parking: https://doc.tmpe.me/gameplay.html#parking-ai

I don't know if it strictly mandates having physical space persistently for every car that exists in the city, or whether cars still somehow spawn and despawn dynamically under some circumstances.

Edit: Looks like the car despawns if an attempt to find a parking space close enough to destination fails ten times.

They've been surprisingly receptive. We've taken care to point out that the map is not the territory, but we've had conversations with urban planners and professors (especially the Town and Country planning department at the University of Moratuwa): they're very interested in using this as a teaching tool for students. I recently did a presentation to 150 students + urban designers and transport specialists, and they were super interested in a) trying this on smaller pieces at greater fidelity b) simulating other cities as well (like Kandy) and smaller towns where there is more planning leeway c) using this to illustrate effects of plans like COMTRANS (https://www.transport.gov.lk/web/images/downloads/F-CoMTrans...) which is why we built the thing in the first place.
I love to hear the reception went so well. Awesome to see this game used as a tool.
> Our goal was to create a more accessible and visual tool for citizens to comprehend urban problems and judge the impact of different decisions.

Building atop an old closed source video game isn't as accessible as would be ideal.

What are some open source and open standard starting points for this (other than OpenStreetMap), and how close do they get you?

(I once built something atop Google Earth, which made sense at the time, but I would've loved to be able to do it atop Web browser features we have today, and open source.)

Not even remotely close. If you have millions of dollars and lots of talented programmers, I can build an engine from scratch. We do not live in an ideal world - public policy is about the art of the possible, and $19.99 (cost of Skylines in Sri Lanka) is a massive improvement from the $8000 a year fee for CUBE or OpenPaths. I do want to build a sim someday, but I estimate the learning of it will take me a few years to complete. Right now I'm at the stage of writing basic galaxy generator toys like https://github.com/yudhanjaya/GalaxyGen
This is super impressive! I'd agree the open-source tooling isn't there yet, but it's coming in a few places. I started a 3D street visualizer but it's only at the scope of a few blocks at a time, not as large as a city area although we'd like to get there someday: https://github.com/3dstreet/3dstreet/

There's also https://github.com/a-b-street/abstreet for larger area simulation but with less visual fidelity

Very cool, great to see progress in this!
This is crazy! What if one day the citizens in the game can be mapped to real ones also?!
I'm reminded of Tom Stoppard's Arcadia, and the child genius Thomasina . . . "If you could stop every atom in its position and direction, and if your mind could comprehend all the actions thus suspended, then if you were really, really good at algebra . . ."
You would make Heisenberg roll in his grave!
Every tornado-generating butterfly would be out of a job, for sure
This actually sounds like a great idea, I've often wondered with some of the advanced city simulators like this if this might be possible. Seems like a good use of AI if it had access to all those data sets local government GIS folks use (hopefully) to align this sort of data to make these virtual representations.

Problem I think would be most folks that might even do this as a hobby probably don't have that access to GIS and other data (cheaply) like they did here, and government workers are government workers, so nothing interesting will usually ever happen there. Certainly not in the US with any government entity I've worked with here at least

Oddly enough, this is how our own universe simulation got started
Realistically I don't think the UDA (Urban Development Authority) will use this, BUT we have had calls with them where they asked to see a demo and seemed massively excited at the prospect of being able to visualize changes in the character of the city (in fact they wanted to know if we could build municipal buildings if they gave us the maps). University students who eventually become GIS folks seem more like the audience that will actually end up running and tweaking this.
I had a similar notion, as I prior worked with a large southern California municipality that was into "smart city" things as a solutions architect, and they would have loved for something like this for the same reasons you stated, particularly visual changes or features, adjusting pedestrian/bike/car traffic flows, points of interest, etc.

I would love to know how large of a city would be possible to "import" and run with enough of a like data set. I would imagine it would give any GIS nerd a boner if they could do so themselves.

Even remotely close I would consider a feat, so bravo to the team that did this!

Thanks! You may want to read the methodology - most of the imports broke and it ended up being a lot of manual work: https://github.com/team-watchdog/colombo-skylines/wiki/Intro...

As for limits, when modded to the hilt, Skylines will give you:

298.6 sq km maximum area

1,048,576 maximum citizens

49,152 maximum individual buildings

65,636 maximum vehicles in motion

65,636 maximum parked vehicles

256 maximum transport lines (bus routes, train routes)

That will no doubt change the nature of the city you can set up - you could do a large city very sparsely, or a smaller area in greater detail.

This looks super cool! Amazing project! I am really curious to try this idea at a smaller city. How much type and how many people took this endeavor?
You can download a height map file from https://terrain.party/ or https://heightmap.skydark.pl/ and start a new game with the unlimited money cheat. Then it's just a matter of placing roads, utilities, public services and zoning the rest (that's the fun part).
I've attempted something similar for a city of 20,000 before using an overlay mod but map projection issues between the DEM and images along with city simulation scaling just yielded a stretched blob with 95% industrial traffic and a queue entering the city that never ended. I will check their tuning parameters and see how they handled it. It was fun to build regardless.

I've been waiting to try with CS:2 using aerial photo and lidar data of Vancouver that I've collected myself. Mod support is still weak compared to CS:1 but I'm hopeful that it's possible. I'd like to release a DEM, DEM+roads, and then the fully built version as three separate maps.

Can you explain the projection issues you faced with the DEM? I thought something like gdal can reproject any data into a standard projection like web Mercator.
If I recall correctly Cities Skylines needs a UTM-like projection but I think I made an error with the input data and got the X/Y scaling wrong. It was a fairly amateurish attempt and my knowledge of coordinate reference systems has improved quite a bit since then so I hope to fix that for the next attempt.
Good news is you can even overlay screenshots of Google Earth (which uses high-res data, some of it at 30 cm2 per pixel). Will take some fiddling with the coords, but it works!
Sadly, that happens. We use image overlay and exports off ESPG 4326 and tweaked the hell out of the coords until it worked. Even then there are still issues - which is why we're about 100m shorter than the real city. The overlays match perfectly, but in reality distances are always a few meters off across a large stretch. OSM imports broke completely, so I just ended up doing all the roads by hand with the maps on a second monitor.
There's always a point where you look at the automated solution and think "Okay but... how long would it take to just to do manually?"

I enjoyed your comprehensive write-up. I really like how you didn't get too lost in the details when the technical limitations cropped up and kept the focus on the interactivity and public awareness. Very fun project :)

C:S 1 has quite a few "thundering herd" issues, like perfectly cyclic deathwaves. This includes extreme industrial traffic if you zone it all in at once. The capacity of (all) buildings is also pretty extreme. Adding Realistic Population 2 and Lifecycle Rebalance Revisited brings it down to less gamey and more towards realistic, and you can tweak from there.
I should look into these mods, the death waves were annoying. I mean I get it, you build a big new residential area, people move in quickly and are all roughly the same age when they do, but they could've done something to fix it like randomize ages or have people move out of the city and replaced by a differently aged person.
Yup, we’ve got a big list of mods to help alleviate some of these issues. Due to the way we’ve modeled the corridors and daily population flow in and out of the city, we still get roving herds of ambulances…
I was hoping there'd be some report on what they'd learned about the city as a result of modeling it and, presumably, testing some changes. But don't get me wrong, this is awesome anyway.
Coming up. I'm implementing some small bits of the COMTRANs plan, as it's politically relevant to our election cycle right now (https://www.transport.gov.lk/web/images/downloads/F-CoMTrans...). It won't be a full implementation - we're a small team, and I want to encourage other people to come on board with their ideas. We do have a reasonable "how we did this" section if you're interested! https://github.com/team-watchdog/colombo-skylines/wiki/Intro...
Many, many years ago (2004?) I was on a NSF research project about participatory GIS, trying to help people (voters) make informed choices about transportation alternatives in a region—which road or rail improvements to make, and how to apportion funds between them. At the time, we dreamed about being able to let people run a simulation of the consequences of their chosen package, but that was definitely not feasible with the technology we had at the time. That's the background for why I'm so envious of what y'all pulled off!
That’s very cool! Do you have any papers I can read?

We had a similar experience with the university labs: this professor of transport telling us how he was working on letting people modify land use maps to their liking in the 90s and early 2000s, and wishing they had tools like this.

Hopefully we too will soon see stuff that makes us think “damn, I’m so envious!”

Anyone have some screenshots? I'm not installing Cities Skylines just to view this. Sounds pretty awesome overall.
Did you try clicking the link?
Not sure if it’s still there but on twitter they had a system where you’d have to click through before you’re allowed to submit a comment.

HN needs this!

[Meta] so how do you report when the link is not working, or blocked for your geo?
I don’t think they check or can check if you actually loaded the page. So I think they check only that the link was clicked
> Not sure if it’s still there but on twitter they had a system where you’d have to click through before you’re allowed to submit a comment.

The system did not prevent you from replying, it just added a warning message and a little friction to doing so.

Awesome effort, always wanted to see our colombo on a game! It's really extensive and seems to be made towards public policy, Thanks Yudanjaya and Nimesha!
Now you can grow it into Magnasanti (the 6 million inhabitants SimCity 3000 city)
Oddly enough I never played SimCity. Closest from those times for me were Ceasar III and Pharaoh (which I'm playing again now: there's a very good remake).

Is this the Magnasanti you speak of? https://www.moma.org/interactives/exhibitions/2013/designand...

It looks fascinating.

I remember doing this in SimCity 4 a few years ago for a real small town of ~7000 and it actually worked remarkably well out of the box. Residential/Commercial/Industrial came out fairly balanced. The only thing I had to mod to make it really work were the catchment areas for schools etc, which are very small by default. I found a mod that made them 2-3 times bigger radius (but actual capacity stayed the same, and worked well enough).

There's something especially fun and interesting about replicating real places you know in games. That's something I don't think the people who freaked out about kids making their house or school in Doom or Quake ever really understood.

For sure. I used to try making the layouts of our old cities (Anuradhapura etc) in games like Pharaoh and Ceasar 3.

If you’re into doom modding - have you seen myhouse.wad? Worth looking up on YouTube. Phenomenal achievement imo

> That's something I don't think the people who freaked out about kids making their house or school in Doom or Quake ever really understood.

We made maps of our school(s) to play in Counter Strike, I understand people freak out if they don't really understand what video games are. Especially when it was around the time when people were starting to freak out about if video games make people violent or not, because some school shooters in the US had some violent games they presumable played before their attack.

I always found the argument that shooters played violent video games extremely weak. Of course they play video games, like most people their age.
Same - I wanted to recreate my school for Counterstrike because I knew the building so well and if I played it with schoolmates we'd all know it like the back of our hands and associate different areas with different memories etc. leading to a more unique (and probably funny) experience. It had nothing to do with violence in reality.
Unreal Tournament level editor was the easiest for a noob like me. We created our dorm rooms, campuses, our houses back home. That being said, this was 25 years ago (in the US), not before school shootings but certainly not like they are today.
Video games and guns themselves being the cause of shootings are just typical unhealthy excuse making in order to avoid having to actually address the real issues that would require consequences or accountability for and by people who very much do not want any consequences or accountability to affect them in any way, whether that is individuals or groups.
(comment deleted)
I recall making a map of my high school in Duke Nukem 3D well before Columbine. I think the only reason was it was the closest floorplan I had readily available at the time and I had no Internet access. I was more interested in playing with the Build engine/map editor than actually shooting things.
Modified traffic behavior using TM:PE mod to reflect Sri Lankan driving habits:

- Buses may ignore lane arrows

- Vehicles may enter blocked junctions

- Vehicles may do U-turns at junctions

- 10% of drivers are reckless

- Vehicles may park on the sides of streets

- Three wheelers and scooters

Brilliant!

Haha, thanks!
Do you happen to observe same traffic jams in same area and time windows as in the real world?

Also, do City Skyline drivers behaving like drivers who would use Waze (or could be configured so that a certain amount do) ?

We see broadly the same chokepoints (Galle Road, Baseline Road, the arteries feeding into Colombo). Modify these and the chokepoints distribute themselves. Small chokepoints don't always appear.

Broadly, if you can do it by fiddling with this: https://doc.tmpe.me/vehicles.html, you can pull it off.

(comment deleted)
my god. this makes cities skylines way more accurate with regard to south asian cities. still needs random elephants loaded up on trucks.
And cows that have the right-of-way.
https://docs.legis.wisconsin.gov/statutes/statutes/346/iii/2...

I am sure you can find similar laws in other states.

Yeah but cows rarely roam free there :)
Cows don't roam free in Sri Lankan cities, either. You are aware that South Asia is a subcontinent and a whole set of islands, and not one singular city,right?
I have heard many Hindus consider the cow a holy animal and let them roam where they please. And there are many Hindus in Sri Lanka (though there are more buddhists who don't consider cows holy but are vegetarians).

And yes I know the region pretty well. I've lived more than half my life outside my home country (in 3 different ones). Though never been to Sri Lanka no.

Never seen a single cow on the road in Sri Lanka. Though I only visited the western half of the country from about the Colombo to Kandy line down to the very southernmost tip.

However, the other settings seem about right to conservative vs. reality. I literally just got out of the airport in a taxi and thought I was gonna die, so fast and close to an oncoming car was the taxi going. Probably about two atoms worth of "air" between their side mirror and the taxi's.

Traffic lights might as well not exist. Everyone was just going through the intersection at the same time. No elephants on the raods either but an army of Tuk Tuks. Actually preferable to car taxis. Never took one again. Bus travel was interesting as well.

Most Buddhists are not vegetarians. There's a huge gap between Wikipedia stats and real life, as it is the case everywhere.

Using "Knowing the region pretty well" to be confident about a country you've never set foot in is like me assuming alligators are roaming free in corn fields in Iowa because I've been to a few states in US and have seen Florida through youtube.

I am a Buddhist from Sri Lanka. Where on earth are you getting this stuff about us being vegetarians?

You clearly don't know the region half as well as you think you do.

All the Buddhists I've met told me that they're vegetarians because they believe animals also have souls and they could be reincarnated as one.

But they were mostly Tibetan or Thai Buddhists. Most of my experience is indeed from Thailand and India.

Ah yes, so all Sri Lankan buddhists must be vegetarian.

Mate, <50% of India is vegetarian.

I’ve always found amusing that it is illegal to race or furiously ride a horse or other animal on a highway in Ontario.

I’m angry, can’t ride my emu down the 401.

https://canlii.ca/t/2fq#sec173

Alot of laws in the Anglosphere use really ancient wording for things.

I think if you throw something at people in certain states (Florida comes to mind) it's considered "launching a missile" at them

> Notable issues:

> Perfect adherence to schedules in public transport, unlike real-world variation

Is the limit for vehicles really 65636, or is this just a typo for 65536?
That's what immediately caught my eye, too.
It's a typo. Also, you need a mod to even reach that figure, by default the limits are substantially lower (16384 for moving vehicles, 2x that for parked vehicles).
Thanks for the spot, will double check. Yeah, we’re modded to the hilt here. This is taking the game as far as the engine can handle.
Am I the only one that can't find "Conclusion and Future Applications" section ? I'm really interested in their plans here
You’re right, we don’t have one up yet. We did a few implementations of various government plans over the years (the Japan-funded COMTRANS being the most prominent) and I’ve invited a professional urban designer who works with the government to examine applications and limitations- so a more professional eval than just us saying “here’s a thing!”

Might write it all up as a paper if we have time.

> So we have a few notable issues: 3.Perfect adherence to schedules in public transport, unlike real-world variation

I love this quote from readme.md

Same, although I am surprised because busses in cities skylines are usually still affected by car traffic issues. Trains would run perfectly though.
So because the number of active vehicles is much lower than reality, the road network is actually a lot more efficient: it’s a nearly 1:1 scale city with less than a fifth of the real vehicles that would take up the streets. Mostly because of this, public transport in game is a lot better than our particular reality. In fact, the trains are completely underutilized - we can tweak transport modal share (and should) to get the numbers to balance better.
I suspect it's missing the traffic coming into the city from outside
No, that’s modeled in. Those lanes are always active.
Is using games for real-life city planning a viable option to later apply in real life? I.e. if my city wanted to try out a new metro line, is replicating the city in Cities: Skylines good enough to simulate what would happen?

Related (Kerbal Space Program): https://xkcd.com/1356/

Not really, conceptually it probably shares a lot of the same foundations that a useful simulator would have, but its important to keep in mind that they aren't actually simulators of cities in a realistic sense.

Games such as cities, inherently embed a view of how the "right" city would be organized, providing tools and incentives to nudge you in that direction. Consider how all social problems can be solved by simply plopping down the relevant class of building nearby. Or simply the absence of parking lots!

There's this old article on the subject: https://www.polygon.com/videos/2021/4/1/22352583/simcity-hid...

Depends on how much of the games underlying assumptions you can overwrite, and of course the fidelity you’re going for. In our case we’ve modified everything from citizen lifecycles to traffic behaviour to population calculations based on square footage - but this is still more in the realm of “visualization and communication” than “professional planning tool”.
For real life planning, many concept in Cities Skylines are also in professional software. e.g. in Autodesk Infraworks you can import roads, drag out a spline for a new metro line, then run a simulation to see the affect on traffic and other transport infrastructure.
Looks really interesting, but I'm not buying a license and setting it up just to have a look. Is there a video available ? Hindsights from the creator on possible real world application ?
Will make a YouTube video (and an eval from a professional urban designer is coming up).
I recently started a company called Good Places, actually Gode Steder in Norwegian, where we simply design good places. Our goal is to design city districts with better quality of live and status than urban sprawl. You can't force people to live in cities, but you can make urban districts that are for better suited for families than urban sprawl with single family homes. The aesthetic qualities is just as important as the quality of the rest of the city planning. If that means making buildings inspired by 150 years old buildings, then so be it.
That sounds great. How would one go about this with a city like Mumbai?
Have you heard of eMOTIONAL Cities by any chance? https://emotionalcities-h2020.eu/

It's basically an ongoing large-scale research project working to quantify the way people experience city spaces from a neuroscience perspective (or at least that's my understanding -- I work with some of the people who are working on it.) Maybe the work they're doing could be relevant to what you all are doing?

I visited Sri Lanka a few years ago, and mostly loved it (there were some annoying bits, of course, but definitely one of the best trips I've had).

Since then, Colombo is one of my favourite cities as a reference. It has such weird urban planning (or lack thereof), I often find myself comparing other cities to it. It would be awesome to be able to revisit it, and recheck my reference points, virtually in a game.

Glad you enjoyed it. "Lack of planning" is indeed the best way to describe Colombo.
I don’t think we should be encouraging tourism to an apartheid state like SL
Every country is an apartheid country if you try hard enough