CityBound – An open source city simulation game in Rust
github.com
github.com
Also, check out the main homepage at https://aeplay.org/citybound for a more player-centric intro
Otherwise, it’s a solid language choice. L
Elaborating the hardware (systemverilog) I'm working on (about a year of work from scratch, nothing fancy) takes 8 minutes.
The full build to a bit file that can be loaded into hardware is an NP-hard optimization problem, so as your design approaches the limits of either the desired clock speed or the amount of space in the chip, it can become very slow.
Placing (not routing!) takes around 24 hours since we need to run in a larger environment than just the block level to get realistic timing reports
I've splitted a 20k+LOC Rust project into multiple crates and compilation time improved a lot (still slow compared to other languages) but it's now manageable.
https://www.reddit.com/r/rust/comments/78bowa/hey_this_is_ky...
https://www.rust-lang.org/static/pdfs/Rust-Chucklefish-White...
That certainly interests me - particularly how the pathologies of an economy like that emerge from individual actions - and I’ve been looking at Elixir to generate the necessary actor simulation engine. Looks to me like you have that here in Rust.
How could I get involved in helping to add a more detailed economy to this sim?
I will caution that Elixir's runtime performance, particularly with simulation type code, is abysmal. Also, last time I was using Elixir, the available profiling infrastructure was really terrible; I had to buy a new workstation with 64GiB of RAM just to be able to fit the profiling artifacts from one iteration of our small model in memory, which was required in order for it to complete in less than infinite time.
https://www.youtube.com/watch?v=LiIoE8ArACs
It was great, if so!
One direction that I've seen a lot of game engines heading in lately is the Entity Component System model for a lot of the same performance reasons (cache locality of data being the big one) that you've landed on the Actor model.
I'd be curious to know if you'd looked into the ECS model at all, and if you have how you view the tradeoffs between that model and the Actor model proposed in the talk. At a gut level, I get the feeling that your model seems much better suited to the distributed nature that you accomplish in your talk, and that ECS might be slightly more effective at allowing composition in an effective way. You've got so much more experience with both, though, that I'd love to hear you take if you've got one.
Your architecture could be very useful in teaching.
What exactly would you like to see in a writeup? And which teaching setting do you have in mind?
Disclaimer: Creator & lead developer of SimAirport.
I suppose we just did it "wrong" to begin with, and have since been stuck with the wrong graph / haven't put the time into fixing it yet -- but would be curious to hear high-level of how you're doing it.
Our issues are primarily that we did lanes as graph nodes instead of "node capacity" so our pathfinding prescribes precisely which lane to use; when stuck in traffic we can't intelligently find our way around it without pathfinding again, but then 'quality' ends up being correlated to how often we pathfind with node-occupancy info, which obviously is a poor (and poorly performing) solution.
Would love to hear your approach or if you'd be interested in talking shop at all, email is in profile! :)
I'd love to discuss traffic with you on the Citybound subreddit, since I think there might be other people interested in such implementation details :)
Many universities in major urban areas have a school of housing and community development. They study planning, policy, design, economics, and other related disciplines.
Once trained with how to create new models in your system, academics could simulate the impact of ideas they are developing in research.
Your statement says that you have actor-based simulation model that's inspired by erlang - is there a reason why you picked rust instead of a BEAM language for developing the backend? My guess would be performance, maybe?
Examples:
- utility services: I keep having problems with e.g. ambulances or trash collectors that are spawned very very far from the area where they're actually needed, even if a hospital or incinerator is just around the corner.
- size of buildings: I don't like the approach of having tall buildings / high-rise in developed high-value zones by default. In my opinion the size of a building should mirror only the density of the population living in that particular area, so it should be possible to have as well tall buildings in low-value zones. As well the amount of people living in tall buildings is for my taste not a lot different from the one of med/low-buildings, taking into consideration the height of the building... => how tall is a building should be a function of the people inhabiting it and not related to the value of the zone.
- deaths/births waves: once my cities got big, I kept getting each time waves of people dying and later a lot of births. There is a plugin that fixes this, but this should really be part of the basic game.
- traffic: this is actually already working veeeery well on multiple levels (e.g. very nice/interesting to observe how queues generate - I can observe that for hours hehe) but I do miss a logic that says e.g. "if this section of street has during a certain timespan ~95% of space occupied by vehicles then assume that there is a queue => mark that section of street temporarily non-existing for non-involved vehicles so that other cars would start looking for alternative paths" or something similar.
All in all, even if Cities Skylines was already a giant leap compared to the classical Simcity-games (excluding the last one which was just horrible), I'd definitely like more "action=>reaction"/"cause=>effect" in a potential future "Cities Skylines 2" or in this case in "CityBound".
Cheers
EDIT: for more details search in this page for the post containing "Unfortunately, traffic management is the only part of the game that really holds up as a simulator" by "amyjess" - I just read it now and I think that I agree as well with all what's mentioned there about CS (but I honestly don't rememember anymore how Simcity4 worked...).
I'm just waiting for the sequel to the game where they may open up the traffic AI to modders more, or fix some of the stuff broken with the existing engine. That said, it's become kind of the gold standard for city sims so OP should definitely check it out.
The downside is you have to be very careful where you place your emergency services as you can easily get zones which are too far for firefighters to reach.
The short version is that low-density areas are denser than they look, and high-density areas aren't dense enough. For example, if you click on a single-family home and look at the population, there will be over a dozen people living there (TBH, I forgot the exact numbers, but it's way more than a single family's worth of people)! But if you click on a giant skyscraper, there's nothing even close to what would fit in that building if it existed in real life.
This has two unfortunate effects:
* The suburbs need more public transit than you think they'll need. Once you hit 50k people or so, you'll be hurting for transit badly. "But I'm building low-density housing with a street hierarchy, it works fine in real life, so why are my roads clogged in the game?" Yeah but in real life you're not cramming a dozen people into every single-family home.
* On the other hand, you can get away with building dense downtown areas with much less transit than would be required in real life.
And yes, there are mods to realistically balance population. If you run these mods, you'll have something much more realistic: the suburbs don't really need transit, but if you build any high-density at all, you'll need to get a good transit network up and running ASAP.
We can (proably should?) debate about how these mechanics should work, but I think that it must be true that any city needs in some percentage both areas (e.g. as well the extreme being built now "on demand" for the World Cup in Qatar - https://en.wikipedia.org/wiki/Lusail ) must need both, or maybe not if they modeled the city based on CS haha.
I think that I could have similar points as well for the "education" in CS - I never (still don't know) if the elementary schools that I place are a foundation for people that will then go later to College and/or University - I still place them because I personally believe in the scala Elementary=>maybe_College=>maybe_University, but who knows... . (ok, this boils down mainly to a lack of transparency/informations for the user, independently if what CS does is good or wrong from the point of view of the user)
That's an interesting way to differentiate them, but it's also something that's very specific to present-day America. And middle-class America, at that.
Kind of odd that Skylines is developed by a Finnish company and published by a Swedish one, given how US-centric that model is.
I've also written elsewhere in this thread about how Skylines doesn't have a concept of class stratification, either, and that's a problem: the only way to create neighborhoods with distinct class implications (e.g. the ghetto) is to use the RICO mod and plop buildings directly.
There's no real concept of medium-density, either: the closest it comes is to zone high-density and put it in a district with the High Rise Ban ordinance. Or, again, use RICO. Oh, and growables are limited to no more than 4x4 tiles... if you want bigger buildings (e.g. a sprawling suburban apartment complex), your only option is RICO.
I totally agree, and maybe there has been some discussions about this in the past (I forgot about those early webcasts) - but for a company to align to the US market (probably the largest & most uniform around) is usually probably the safest bet - I still admit of being a little bit sad :|
> There's no real concept of medium-density, either
Now that you say it, I think that (a realistic - see previous posts) medium-density would be absolutely important to model european cities.
> limited to no more than 4x4 tiles
You're right but personally I don't really care about this for the time being (meaning that the other problems have for me absolute priority compared to this) - maybe they just randomly put a safe limit for their first release to avoid indirect potential complications... - I would have most probably done the same, so I won't dig into this hehe.
> I've also written elsewhere in this thread about how Skylines doesn't have a concept of class stratification
I agree.
Summarizing after all these posts & remarks, I feel sad that the studio so far developed only add-ons that do not improve the core of the simulation but only add more distractions and/or superficial complexity around it :P
(E.g. I did buy "Mass Transit" but it didn't give me the feeling that it improved the game but just gave me a few more alternatives - and actually "mass transit" is in my opinion associated to trains & metro, therefore absolutely not fitting cablecars/blimps/ferry/etc...)
But maybe.... they be working on aggregating key-improvements for their next CS2? Who knows... :)
That said, it's still currently the best city sim by far. Hoping that Citybound will change that at some point :)
One could argue some cities have low-density housing next to transit though (like Berlin, or Paris). It does have the disadvantage of making metros too easy though, so commuter rail is almost never done because it is too hard to integrate to a city.
I still think it's the best City Sim game made yet. The author here should really invest some time to learn about Skyline's failings so they can avoid those problems in their own sim.
The fire department will have an opinion on this.
So many things will be difficult: construction, trash hauling, tree removal, relocation, business deliveries, etc.
I hope to learn to code. I just got my rejection letter from a coding school ("overwhelming demand -- we had to turn down many qualified candidates"). My backup plan is some free online coursework and probably finding a city-building game to mod or tinker with.
When you say open source, does that mean it would be okay for me to futz with it for myself like that?
Thanks.
So by all means start teaching yourself to code by playful experimentation, but start with something much simpler first :)
Having a license that says you can go play with it doesn’t mean it will be straightforward as a newcomer to understand the code you find or to accomplish any particular goal with your fiddling.
I haven’t looked closely at this project, but I would recommend at least considering starting out fiddling with a simpler system, if you want to learn to code.
I don't know that I will even learn Rust. I have had a Python course recommended to me.
I just am trying to figure out what my options are. I've gotten serious push back at times for what I felt were innocent activities. Trying to ask the "dumb" questions in hopes of avoiding that.
The links are helpful. Looking them over.
I’m going to give you some unsolicited advice. Start now. If you’re struggling to find a course, start here:
https://www.railstutorial.org/book
Don’t worry if Rails is the right choice. You might love it or hate it, but regardless, you’ll learn things like writing tests and using version control.
Good luck and have fun.
https://doreenlearnstocode.blogspot.com/2019/04/ask-silly-qu...
I'm currently horrendously short of sleep. I've had insomnia for about 8 days. O_o
I don't expect to try to study in earnest until I start sleeping a bit better. Hopefully soon. (Crosses fingers)
Seriously, best of luck. And remember, learning to write code is really just about momentum. Start, have fun and jfgid (just fucking getting it done).
On the other hand, how do you plan for in-game scale / limit? (Millions of population, etc) and whether you have any idea about multiplayer/server (I'm talking similar with clustertorio)
The actor architecture makes it very easy to scale the simulation across several machines and indeed run a simulation cluster that you connect to from a simple client. In fact it already almost works like that. And the only thing that's missing for multiplayer is some UI-level coordination for collaborative planning (basically preventing editing conflicts). Everything else is already "multiplayer ready".
Cool containers.
All in all I'm sure I'll spend a ton of time playing the game itself and playing with the source.
This article from 1992's LA Times quotes Maxis president Jeff Braun saying how they're pushing a political agenda. Specifically pro-mass transit and anti-nuclear power.
https://www.latimes.com/archives/la-xpm-1992-10-02-vw-391-st...
What really opened my eyes, though, was this excellent article from LOGIC magazine about how Will Wright based the entire simulation on the work of Jay Wright Forrester. I don't know if it was a conscious choice to adopt Forrester's extremely conservative social policies, or if Will Wright just happened upon a bunch of ready-made algorithms he could use. But the result is the same. SimCity teaches us many fallacies about urban planning and finance that Republicans have historically used to justify certain policy choices.
https://logicmag.io/06-model-metropolis/
My point is just to be very conscious of the biases you're encoding into the logic of your game. What may just be a game to you may be someone's first lessons in politics.
I think he was trying to deflect criticism directed towards the game. Keep in mind that the media was presenting SimCity not as just a game, but as a clever teaching tool for children to understand finance and local government. Okay, great. Whatever sells the game, right?
Then actual economists and city planners start to comment about how the game isn't realistic at all and fudges the numbers in such a way to incentivize certain play styles without showing the trade-offs that are involved in real life. At that point, Braun has to admit to the biases in the game, but he can't say anything so extreme to lose the free advertising his product is getting from schools and teachers and parenting magazines that are telling parents to buy the game for their children.
And although I'm a proponent of mass transit, it's not perfect. I believe SimCity only represents the upfront cost of mass transit and discounts the recurring maintenance costs, while road maintenance costs are inflated. But now were debating specific mechanics of a game other than the one this thread is about.
I mentioned Magnasanti in another part of the thread. In Magnasanti, there is only mass transit. No roads at all. I don't think I'd like living in a place like that where government-owned transportation decides where and when I can travel.
But that's exactly my point. There are two sides to every coin and I think it's important to represent the pros and cons of the choices the player is presented. There's no such thing as a purely positive or negative decision when it comes to city planning.
That is hardly "a lot of conservative politics baked into the design of the game", nor would any such politics be "potentially damaging to the kids who played it".
If somebody gets a harmful lesson from the game, it is that you can have a viable modern city without any place to drive a truck.
Although I think many American cities could benefit from more mass transit choices, I agree that I certainly wouldn't want to live in a city where mass transit was the only option. It would mean a government-controlled entity would be dictating when and where I could travel. I don't like the sound of that.
And to me it was allways clear that this is just a legal disclaimer.
Of course games and videos reflect reality. Not 100% accurate, no, and some allmost 0% but btw. no scientific model does 100%, even though they are obviously more accurate and I would like more games to be based on scientific models.
But for example angry birds, very succesful, obviously fiction, but the core game mechanic is a physic simulation(Box2D) which works as realistic as a 2d computer can work in a game, so you can learn about kinetics with it.
But they repeat them.
And since you were the one who insulted someone with the assumption that they just realized that SimCity is just a game, it is a bit laughable to accuse me of pedantry, because I told you, that games do have a base in reality.
If you really want to know when I realized that the real world doesn't work like SimCity, it was when I was in college and I started actually paying attention to the news and what was going on in the cities and towns I lived in.
On another note, I'm really excited to see that A Pattern Language was an inspiration for this sim. That seems like a great start!
[0] https://www.nydailynews.com/pixel-gaiety-costs-job-article-1...
It's OSS so you can do that yourself if you think such a thing should exist.
If that topic interests you, I can recommend Weapons of Math Destruction by Cathy O'Neil, and Algorithms of Oppression by Safiya Noble.
I'm a programmer myself, so I understand if people are initially defensive about these topics. But it's important to me that I never write software that's harmful to people, so I try to check my biases as I create software to avoid these more insidious issues. It's easier to spot issues that may arise due to programming machinery that could crush a person, for example. Or software designed to estimate fuel usage for an airplane. It's much more difficult to spot inequity of minorities in software.
There's plenty of examples out there of biased AI in response to biased training sets.
If you're more interested in the dystopia that must be created in order to "win" SimCity, here's a couple of interesting articles. (I think they've been shared here before.) By taking the game to its absolute extremes, it becomes clearer what the simulation considers most important and valuable, thereby laying bare some of the biases inherent in the game's design.
https://rumorsontheinternets.org/2010/10/14/magnasanti-the-l...
https://www.vice.com/en_us/article/4w4kg3/the-totalitarian-b...
I personally see the evidence overwhelmingly support the "right wing" view that low taxes and an absence of restrictions on contract freedom bolster economic growth, and I think that is what most analyses by economists conclude, which is why leftists have had such a problem with the Economics field for such a long time, and why Economics has had held out so long among the social sciences in becoming dominated by those who hold left-wing views (though that's been changing in recent decades).
- networked simultaneous agent navigation for real-time traffic reporting etc
- rerouting after mistakes
- comparing multiple transit options from flexible (walking/driving) to fixed-line (public transit, flights, waterways)
- handling updates to the routes, addresses, and the map in general
It would be especially cool if it could handle any kinds of transit determined by general traits (ground/air/water, speed, flex/fixed-stop, fuel type, passenger count) so you could even use it for a fantasy town with a dragon-drawn carriage and a catbus.
Unrelated, I find it depressingly amusing that the simulation was built with automotive traffic being the default and only way people can live their lives, and public transit and pedestrianism is a "TODO", much like many major cities in the world (esp. outside EU/east Asia). Once those are implemented, I'd love a fork of this project that straight up doesn't have cars. I would like to see the emergent effects (or failures) of a city that is forced to grow around pedestrians and trains.
Relatively niche, but could be a fun gameplay element. Of course, speaking of the Netherlands, bicycle transportation is enormously interesting already.
It would be cool for Google to do that, if they open sourced it and didn't put any tracking software in...
Unless I was making a game focused on protecting the privacy of my virtual citizens...
I'm surprised that Cities: Skylines isn't listed as an inspiration because it's also based on individual agents moving around your city. Despite the name, Skylines is really a traffic management game more than anything else. Part of the fun of Skylines is just how cool your city looks. For all the emphasis on realism, I hope CityBound doesn't neglect appearances.
This looks really exciting! I just signed on as a Patron.
It's beautiful. Totally agree on the flat-shaded aesthetic. A nice stylized low-fi without giving into pixel-art.
I'm always suspicious about simulation-driven games because they can get lost in the wonkery of it in ways that don't actually provide gameplay to players - my understanding was that Master of Orion 3 was ruined by this kind of design. But it looks like your "simulation driven" thing is about the citizens, which is wonderful.
Your current vids are very rural. Are you planning on getting into transit and bike-lanes and the like, or is this primarily going to be about roadways?
Transit should be outrageously expensive to add. (see the recent subway expansion in New York and in San Francisco) It should be outrageously expensive to operate.
Transit should shut down often for floods, strikes, the "wrong type of snow", "leaves on the tracks", crowds of people (good job San Francisco, LOL), maintenance, terrorist attacks, and many other random reasons.
Transit should increase crime.
Transit should go to the wrong places. You ask for it to be installed where it is needed, but instead it ends up a mile away because that was where it is possible to build.
Similarly, pollution was unreasonable. Coal power may be dirty, but SimCity made it absurd. There was also the nuclear plant explosions that pretty much never happen in the real world. Both the failure rate and the failure consequences were way above normal.
I will think about becoming a patron... .
The developer, Colossal Order, is also responsible for "Cities In Motion" and "Cities in Motion 2", both of which task the player with improving public transit systems. I haven't played either of those, but having played Skylines, I can only assume that the developer's prior games heavily influenced the game mechanics of this one.
There's an insane amount of mods available for Skylines too, and the ones that expand the traffic management mechanics are very enjoyable.
I mean, after spending more than a thousand hours fixing traffic problems, I even briefly thought about changing my career to become a transport planner. If some other mod/game gives me even more precision and options, I'd probably be spending all my free time in it.
Skylines is a mediocre city simulation game but a great traffic management/simulation game.
I would think you would be highly disappointed with what you can actually accomplish considering bureaucracy/politics/budget and all that. In Cities you get to be dictator.
They reduce the tactile feel, depth perception, and ability to judge scale.
Low-poly, flat aesthetics are more interesting to play.
Unfortunately, traffic management is the only part of the game that really holds up as a simulator.
Public services and pollution, in particular, are basically skeletons without any real depth to them, and they have considerably less depth than SC4. Cities: Skylines is mostly good as a) a traffic and transit simulator, and b) a sandbox game for using mods to create beautiful urban artwork. If you go to /r/CitiesSkylines or look at a number of YouTubers (I strongly recommend Infrastructurist), you'll see lots of gorgeous cities that were created by using mods like RICO, Move It!, and various forms of Anarchy (among several others) to plop down assets in ways that resemble real cities. An infinite money mod is, of course, a given. There's no real simulation going on here: you have a bunch of very talented, creative individuals using the game as a specialized canvas.
But let's talk a bit about just how public services and pollution are skeletons.
Public services are very simple: citizens want a service, and you plop down buildings that provide that service. What little depth they have comes from the traffic management sim: the service needs to be accessible, so either citizens need to be able to get to the buildings in a timely fashion, or the buildings need to be able to send their vehicles out to various parts of town in a timely fashion. If traffic flow gets bad enough that this fails to happen, citizens get upset. All you need to have effective public services is enough capacity + traffic flow for your citizens to make use of them.
There is no concept of range. If you put a school down in a city, children from all over the city will go there to get educated. If you have multiple schools, there is no correlation between where your kids live and where they go to school. Of course, there are mods that can help a little: you can easily find a mod that limits use of public services to the district they're planted in. But that's it.
Compare SimCity 4, on the other hand, where every building has a range, and each service has two funding sliders: one that controls effectiveness, and one that controls range (and you can override these sliders on a per-building basis, too). With range, you have to be careful to not let your buildings overlap too much, because then you're throwing away money. And you can overfund your services, but that's a hard choice: overfunding has diminishing returns and, more interestingly, can cause negative externalities. For example, overfunding your police can create a situation where police officers harass the community and thus make your citizens unhappy. No such complexity exists in Cities: Skylines. Nothing has externalities in Cities: Skylines. There's no disadvantage to throwing in more of everything. Well, except for water. I'll get to that later. And if you underfund your services in SC4, you have a chance to wind up with an actual, honest-to-goodness strike on your hands. And money often gets tight enough that you will periodically have to underfund something just to stay in the black, so you have to choose which service you can most afford a strike at. No strikes are in Cities: Skylines.
Education, too, is way too easy. In SimCity 4, developing an educated workforce that can support high-tech industry takes several generations of cultivating your citizenry. No such problem in Cities: Skylines, just throw down enough elementary schools, high schools, and universities, and you've got an educated workforce in no time! And you really want your workforce to be educated, too, because having an uneducated population means you're stuck with dirty industry, which sucks. The pollution is awful, and the jobs don't pay well, so your sims stay poor and live in slums.
Oh yeah, and there's basically no class stratification in Cities: Skylines. SC4 divides properties into low-wealth, medium-wealth, and high-wealth, which is determined by property values, with visually-distinct buildings at each position. This is a completely separate axis from building level, which mostly has to do with the size of your buildings, bounded by the density of your zoning (low density is levels 1-3, medium is 4-6, high is 7+). So slums look like slums, nice parts of town look nice, etc. Cities: Skylines just has building level. So in CS, your buildings will become bigger and nicer as you grow, but there's no such thing as "a poor neighborhood", "a middle-class neighborhood", or "a rich neighborhood", unlike in SC4.
Before I get to pollution, let's talk garbage. There are a number of garbage facilities in Cities: Skylines, including a recycling center introduced with the Green Cities expansion. The recycling center is just a strictly-better landfill. It does everything a landfill does, only more so. There is no reason to build landfills if you own Green Cities. In SimCity 4, on the other hand, they serve different purposes. In SC4, landfill zoning provides a place for your sims' trash to go, and a recycling center reduces the amount of trash your sims produce in the first place. Thus, you can't deal with garbage on just recycling centers alone. You still need landfills, but a recycling center will let you get away with zoning less landfill than you'd normally need. So you really want both recycling centers and landfills, just like in real life. But Colossal Order wanted people to buy Green Cities, so they made everything in that expansion completely overpowered and strictly better than what's in vanilla.
Pollution is easily-avoidable in Cities: Skylines to the point where it might as well not exist unless you screw up dramatically. Air pollution isn't even a thing at all. You can have all the dirty, smoggy factories you want, and your citizens won't care. Let's just say that, in SimCity 4, air pollution is a huge thing, and you'll be spending a good chunk of your game trying to mitigate it. What you do have in Cities: Skylines, though, is ground pollution. Dirty buildings pollute the ground, and if people live on polluted ground, they get sick and die. But ground pollution has a teeny-tiny radius, so it might as well not exist. Just don't build right next door to dirty industry or coal plants, and certainly don't bulldoze your dirty industry and coal plants and build residential where they used to be, and you're fine. I wish pollution was that simple in real life.
Water pollution is even more avoidable. You only have water pollution at all if you have a water pump downstream from a sewage outlet. This is trivially avoidable. It's one of the first things the tutorial hammers into you. Unless you're going out of your way to screw up, you won't have water pollution. But what if you do screw up? Well, if even the slightest bit of sewage gets in your water supply, your whole city undergoes a massive die-off. That's right, if you ever have nonzero water pollution, you might as well start a new city. Is there a way to mitigate it? Sure, build a water treatment plant! But the water treatment plant just lowers your water pollution, it doesn't take it all the way down to zero. And any nonzero amount of water pollution will kill your city, so you might as well just save your money. Oh, and this is literally the only thing a water treatment plant does, so unless you've screwed the pooch and killed your city, you will never have any reason to build one.
AFAIR, public services in Skylines do indeed have range. It is indicated by green shading on the city roads. For example:
https://www.gameplayinside.com/wp-content/uploads/2015/03/ci...
This image shows the range that the medical facilities have in the city. The purple buildings are hospitals/clinics, and the green shading on the roads indicates the reach that those buildings have. Not sure where you got the above fact, unless I am misunderstanding something.
People who live close enough to services get an additional happiness bonus for living close to the service on top of getting their needs fulfilled. The service still operates citywide, and people will still get all the benefits of having that service no matter where they live, but living close to one gets them an additional bonus.
There is also a traffic flow element here: people who live past a certain distance from the building have to deal with longer than expected travel times, so their ability to make full use of the service starts to degrade outside of the green. They're still covered by it, but it's not as efficient.
I agree - and here is where things start getting indirectly complicated/irrealistic:
1) e.g. the ambulance or the garbage truck get deployed from the opposite part of the map and then they get into traffic and they needs ages until they reache the target location, which is when my citizen is already because of "natural" causes or was choked to death by garbage.
2) I honestly don't understand how living just next to a hospital should increase the property value. "Nearby", yes. "Next-to-it" no (noise & lights & people in weird situations targeting the hospital walking by all night long? Definitely not an area where I'd like to live, hehe...).
The "too close is bad" is done by noise pollution. I think hospitals do not emit noise in Skylines, but the cars going to and from do, and other buildings have that built in, especially monuments, malls and metro stations.
> the service needs to be accessible, so either citizens need to be able to get to the buildings in a timely fashion, or the buildings need to be able to send their vehicles out to various parts of town in a timely fashion. If traffic flow gets bad enough that this fails to happen, citizens get upset. All you need to have effective public services is enough capacity + traffic flow for your citizens to make use of them.
Water pollution generally only happens when a player starts sucking out too much water from a river and reverses its flow.
I do agree that the mass dieoffs from a single drop of polluted water are probably too much. A significant production drop as people are under a boil water advisory at first might be better, and only becoming a major die off if you neglect to fix the problem. The water treatment plant could be more interesting if people were always dying at a low/modest rate from even "clean" river water until you built it.
Also, is air pollution a huge problem in sc4? My experience is that you just put dirty industry in a faraway place, like you would do in c:sl. You can say that the air pollution generated by traffic in sc4 is simulated in c:sl as noise as well.
[1] https://www.wiki.sc4devotion.com/index.php?title=Elementary_...
I don't build Water Treatment plants because I'm worried about losing, I build them because I don't like looking at the gunk in the water.
Same with a landfill vs recycling center. I build a dump when I feel that it suits the city (young city, or new rural area) Later as that place builds up I will relocate the dump outside of city limits, plop a recycling center in the dense part of town, and build an incinerator somewhere else.
Change:
font-family: Worksans, sans-serif;
To: font-family: 'Work Sans', sans-serif;Setting "letter-spacing: -0.02em !important" fixes it (which is what the strong tags have, hence them not being affected).
It sucks up bandwidth if you're on mobile, and is generally not user-friendly. Why not have a play button for it when the user decides to watch instead?
Citybound v0.1.2-762-g7852f0a
This is the simulation server.
To connect and start playing, please open
this address in Chrome/Firefox/Safari:
╭───────────────────────────────────────────╮
│ http://localhost:1234 │
╰───────────────────────────────────────────╯
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 98, kind: AddrInUse, message: "Address already in use" }', src/libcore/result.rs:1009:5
(I don't have anything listening on port 1234)(This is a wild guess from skimming the sources, without any knowledge of Rust.)
I can't think of an inherent reason why running in the browser would be a performance suck. WebGL performs wonderfully, and Rust compiles to WASM. Rough edges right now to be sure, but looking ahead it seems like a great choice.
This sort of fine-grained simulation is expensive, whereas rendering of the fairly-simple sort the screenshots imply just isn't.
(I'm assuming that the backend Rust server is doing the expensive simulation stuff, and just sending the display data to the client.)
Honestly, sending deltas always seems like a bad idea to me as this allows subtle synchronization issues to derail simulations bit by bit before the divergence is big enough to be noticable.
Or how opengl/vulkan/etc would be better (I also dont see why they’d impact client syncing)
Unless webgl does something more than rendering..?
The same data is (eventually) required for any rendering engine, regardless of how you sync the simulation
However, more sophisticated APIs could allow more techniques for offloading more of the filtering and mapping steps of the visualization pipeline onto the GPU. Even some simulation could be accelerated, although it's often not worth it in practice.
https://github.com/citybound/citybound/wiki/Development-Hist...
It sure beats swapping SC4 files on file sharing services for “region play”.
https://www.youtube.com/watch?v=XkSXERxucPc
>Robust-first Computing: Distributed City Generation: A rough video demo of Trent R. Small's procedural city generation dynamics in the Movable Feast Machine simulator. See http://nm8.us/q for more information.
The link for more information is to the paper "Local Routing in a new Indefinitely Scalable Architecture" by Trent Small:
>Local routing is a problem which most of us face on a daily basis as we move around the cities we live in. This study proposes several routing methods based on road signs in a procedurally generated city which does not assume knowledge of global city structure and shows its overall efficiency in a variety of dense city environments. We show that techniques such as Intersection-Canalization allow for this method to be feasible for routing information arbitrarily on an architecture with limited resources.
In a nutshell, the route destinations send out a "smell" along channels in the sidewalk, and the intersections look at the different roads coming into them, and steer cars towards the direction with the strongest smell that they're looking for. (There are some more nuances, but routing information flows along sidewalks to intersections, and the city adaptively learns to route traffic, and can gracefully recover from failure and change.)
What's always bugged me about Transport Tycoon is that passengers just want to go somewhere. It'd be great if passengers wanted to go to specific places. There's loads of scope for a proper simulation to add more depth to that sort of game.
I watched the talk a couple of times and went through earlier versions of the code -- but I'm not fluent enough in Rust to separate idiomatic Rust code from actor model code.
Great job and great talk, theanzelm!
Certainly this has pricked my interest.
Like, think how non-square zoning would work.
Is that named after Alan Kay?
Thanks so much for making this open source. I'll be contributing on Patreon.