Author Topic: Discussion on city mechanics  (Read 2060 times)

0 Members and 1 Guest are viewing this topic.

Offline Isaac.Eiland-Hall

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3393
  • Total likes: 262
  • Helpful: 90
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Discussion on city mechanics
« on: September 21, 2016, 03:26:21 AM »
mod note: splitted from the thread about swedish signals.
http://forum.simutrans.com/index.php?topic=14546.msg154655#msg154655
Quote
Incidentally, and slightly off-topic, a question to Isaac - you write that you would like Simutrans to have more "SimCity features"; can you elaborate? I ask because one of the planned major projects for Experimental is improving the town growth code, and I am considering options  to allow players to build city buildings much like real railway companies did in the 19th and early 20th centuries to stimulate demand for their own services, as well as earning rental income (based on demand, in turn based on transportation) from city buildings bought using the existing mechanism, so that transport networks can in part be funded by property rentals, as the privately run railways in Japan are. This may well be a few years off unless I can get some more developers on board, but I should be interested in your views all the same in light of your comment above.


"More SimCity features" is such a vague and wide-open thing. I have ideas from simple to complex; I'm surely not the only one with a ton of ideas. hehe. But some ideas I've had:

- On a more simple scale: Some sort of ability to protect road tiles in a city. Probably something only public_service could do. Having to protect a freeway using fencing means a minimum of a four-tile-wide freeway in the city, which is huge. Probably a tool like the bulldozer - or rather, dual tools, to mark or unmark tiles. Perhaps it could be justified as marking the tiles as state-maintained instead of city-maintained. Such road tiles would not count for city-building, either. They'd act like rails in that no houses would grow beside them.

- On a moderately complex scale: public_service could perhaps be more directly in charge of city growth, to the point of laying out zones for cities to grow. This could be optional if zoning tiles just created high demand - like you can tweak the scores so roads/rails will try to go around hills instead of up/down slopes, or tweak those scores for bridges; similarly, the map creator could perhaps determine how much weight to apply for a city to choose a zoned tile vs. unzoned tile when it wants to expand/upgrade. More complexity might happen if zoning could be changed - it would cost more to build a zone that allowed a higher density of building. So zoning would have to be, like in SimCity, a separate layer from the buildings. They'd not only be to designate empty land for purposes, but also as the city made money and could support higher densities, have to be upgraded for the higher densities to be built.

- It might be that cities must have power connected to them or they are very limited in growth. As in SC4k, power from a plant would have to be connected using powerlines; perhaps in this case a transformer built next to a tile in the city limits that had a building on it. That would represent bringing power to the entire city. Cities should have some sort of power usage dependent on size; larger cities need more power. Public_service should therefore be able to build power plants. The main conflict here is that public_service can't build more coal mines, for example; so I'm not sure how these power plants should be supplied. One possibility might be that a full power plant chain is built when a new powerplant is added.

I've actually got limited time. I'll try to see if I can find older discussions that might have other ideas upon which to draw or be inspired by :)
« Last Edit: September 21, 2016, 12:47:12 PM by Ves »

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15369
  • Total likes: 368
  • Helpful: 165
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Discussion on city mechanics
« Reply #1 on: September 21, 2016, 10:53:14 AM »
Should we split this discussion, do you think? It may be better not to hijack the discussion about Swedish signals. I will defer to you on this, but reply in the meantime in the expectation that this may well be split from the Swedish signals thread.

I will number the replies to the feature suggestions.

1. Protecting roads: This may well be quite straightforward to implement. It would make sense, would it not, for private roads also to be able to have this designation (which could be set by the player(s) owning the roads), too, as player companies often want to be able to do this?

2. Zoning: This is definitely more complex. I think that one would have to be very clear about exactly what one is simulating with this feature: actual zoning would occur in cities with modern planning laws which would forbid construction except in zones, whereas in older times, no such restrictions existed. There would have to be a way of simulating which cities had these restrictions and which do not, perhaps by a toggle for each city. One would then have to think about how that would fit in with player buildings: ought players be able to put, e.g., a railway station in a residential area? An airport? The complexities of deciding how edge cases work would potentially be very great in this situation. Also, this would not be very useful on very large multi-player games, where it would be too difficult to maintain, and in which organic growth is more useful. For those reasons, this is not something that I am likely to add to Experimental in the near future, but I will not entirely rule it out, as it is difficult to predict where future development might take one, and there is also, of course, the prospect, albeit theoretical, of other developers taking an interest in working on this feature.

3. Electricity: Even in the current versions of Experimental, and a number of previous versions, being connected to electricity affects city growth after electricity starts to become important, and electricity can be supplied to cities more or less in the way that you suggest. This effect on growth is similar to the way in which goods, mail and passenger transport affects growth, and is actually based on code left over from Standard where it was evidently planned to do the same thing and the plan abandoned as no mechanism for supplying cities with electricity was ever implemented there. I plan in any event, when I get to rewriting city growth, to make the effect on growth where electricity is not present in modern times much more significant.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Vladki

Re: Discussion on city mechanics
« Reply #2 on: September 21, 2016, 06:12:25 PM »
For protecting roads - I think there was somewhere a discussion about making a new special type of wayobject - similar to catenary - that will protect the road from city rebuilding it. And the graphics would usually display an anti-noise wall...

Offline Junna

Re: Discussion on city mechanics
« Reply #3 on: September 21, 2016, 06:30:06 PM »
For protecting roads - I think there was somewhere a discussion about making a new special type of wayobject - similar to catenary - that will protect the road from city rebuilding it. And the graphics would usually display an anti-noise wall...

There was. This was worked on some by the user Philippe, but he disappeared, and nothing more was made of the feature as yet.

Offline Ves

Re: Discussion on city mechanics
« Reply #4 on: September 21, 2016, 06:40:20 PM »
Regarding the zoning feature, would it not be possible use the land value? In reality (and i guess also in simutrans Ex) different segments of society would get attracted to different "land values". Meaning that residents wants a high value as possible, and industries as low as possible. To restrict players from building a train station in "high value areas" one could prohibit players to build on tiles above a certain value, or at least make it quite more expensive (as to reflect you have to pay the value decrease for the residents estates)

Offline Junna

Re: Discussion on city mechanics
« Reply #5 on: September 22, 2016, 12:21:26 PM »
Regarding the zoning feature, would it not be possible use the land value? In reality (and i guess also in simutrans Ex) different segments of society would get attracted to different "land values". Meaning that residents wants a high value as possible, and industries as low as possible. To restrict players from building a train station in "high value areas" one could prohibit players to build on tiles above a certain value, or at least make it quite more expensive (as to reflect you have to pay the value decrease for the residents estates)

The transport connectivity of an area would surely be a driving factor in the high value in the first place, would it not? The cost of compensation for compulsory purchase would no doubt be higher, indeed; I assume however, that this was always part of the intention with the land value mechanic, that demolishing buildings with high land value would be more costly.

(As an historical aside, a large part of the Kokutetsu debt was accumulated in a programme of quadrupling and giving dedicated tracks to commuter services in the large Japanese metropolitan areas. The cost of land acquisitions in the 1970's as land values were exploding made it cost almost as much as the construction of the new high speed lines.)

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15369
  • Total likes: 368
  • Helpful: 165
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Discussion on city mechanics
« Reply #6 on: September 28, 2016, 12:35:14 PM »
On the question of zoning, one thought that springs to mind that would be comparatively straightforward to implement at some stage (although I am not suggesting that this is likely to be done any time soon without significantly more in the way of developers) is the idea of tiles having, optionally, planning restrictions that could be imposed by the public authoirty. A tile might have a maximum density requirement, and/or a restriction allowing only commercial/residential/industrial buildings to be built on it. The town growth mechanism would work normally, save that buildings that do not conform to the planning restrictions would not be built on the tiles in question.

This is part of an idea to simulate town growth in layers: one layer simulating desirability and building occupancy (simulating the activities of the users of buildings), another layer dealing with where new buildings are built or buildings are upgraded (simulating the activities of property developers), and - possibly - a further layer simulating planning control in the way described. Each of the layers would function independently so that, for example, the player could build buildings, but they would only attract tenants in so far as they are desirable (and there are enough people who want to live there), and the rent would be based on the desirability. The building maintenance and construction costs, meanwhile, would be fixed.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline tubanonymous

Re: Discussion on city mechanics
« Reply #7 on: October 25, 2016, 10:24:44 PM »
Speaking of SimCity, one feature I thought was nice was terraforming multiple tiles at once. I can see how this contradicts a conservative style of gameplay, but it would be a great convenience when creating maps

I think the only other unmentioned features of simcity worth extracting are the public buildings concept. For instance, a town having a water waste treatment facility could stimulate city growth. In fact, sewer systems in general could operate on a similar basis to electricity. You could have some sort of "industry" that pumps water. Perhaps a desolation plant or similar. A fire department or a hospital would be more complicated. Perhaps they could work as tourist attractions, but have an unusual impact on city growth?

One other thought I had floating in my head...would it be possible to assign the same characteristics of signal boxes to power transformers, and then build smaller substations similar to signals next to them? Consider this: in real life, energy companies must "balance out" power across their grid to prevent fuses at substations or the power plant switchyard from blowing. In simutrans, for instance, factories could use most of their energy at a certain time interval--cities at another. A substation could control small transformers which would have timers similar to signals. This would also mean that in simutrans, you have to "step down" the power from high voltage lines.

A more realistic proposal would be to have different voltages of power lines, available on the timeline where appropriate

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15369
  • Total likes: 368
  • Helpful: 165
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Discussion on city mechanics
« Reply #8 on: October 26, 2016, 01:52:55 AM »
Those are some interesting ideas, but they do digress somewhat from a transport focussed simulation. Terraforming multiple tiles at once is probably useful, though.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline Vladki

Re: Discussion on city mechanics
« Reply #9 on: October 26, 2016, 06:50:21 AM »
IIRC openttd had two modes: map creator and the game itself. There was a special tool for multi tile terraform in map mode. Map creator mode is replaced by switching to public player in simutrans. However you can level multiple tiles by dragging the terraform up or down tool. I would add to that a tool that when clicked would not do anything, but when dragged would level other tiles to the level where started the drag.

I think adding a city-growth-boost option to curiosities might be not too complicated. It would also provide freedom to pakset makers. However using it in game would require switching to public player, allowing other players to build these, or some improved algorithm for curiosity builder.

Offline tubanonymous

Re: Discussion on city mechanics
« Reply #10 on: October 26, 2016, 10:23:23 PM »
The public player has sort of always been a question mark, hasn't it? But I think leaning on its functionality could be a good way to improve city mechanics. Has the simutrans community mostly decided that despite being in the red nearly always, the public player performs its function just fine?

I'd love to play with the terraforming features you described.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15369
  • Total likes: 368
  • Helpful: 165
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Discussion on city mechanics
« Reply #11 on: October 27, 2016, 12:13:19 AM »
I don't think that there is unanimity about the public player: its function is a little confused, but I think that there needs to be more focus on the core mechanics before considering this in detail. However, allowing terraforming by the public player or equivalent before the start of the game proper is a good idea in principle, although quite how to implement it is another matter.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline AP

Re: Discussion on city mechanics
« Reply #12 on: November 13, 2016, 09:19:38 AM »
It's worth noting that UK planning law doesn't operate on the basis of 'zoning'. That's more seen in the USA.

For realism if suggest some consideration be given to stopping cities developing on a square grid block model.  Very few pre c20th European cities do that, unless they had deliberate re-planning.

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15369
  • Total likes: 368
  • Helpful: 165
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Discussion on city mechanics
« Reply #13 on: November 13, 2016, 11:24:36 AM »
It's worth noting that UK planning law doesn't operate on the basis of 'zoning'. That's more seen in the USA.

The trouble is that the way that the way that the planning system actually works in the UK (based on having to obtain the state's permission to develop land, which permission is granted or refused on discretion, based on a complex amalgam of often changing policies) would be fantastically difficult to implement in the code.

Quote
For realism if suggest some consideration be given to stopping cities developing on a square grid block model.  Very few pre c20th European cities do that, unless they had deliberate re-planning.

The trouble is that this is very difficult to achieve mathematically with only orthogonal roads. You can even now (and in Standard, too) edit cityrules.tab to affect the shape in which cities grow - you might want to have a go at doing that to see whether you can get anything less grid like out of it.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline AP

Re: Discussion on city mechanics
« Reply #14 on: November 13, 2016, 05:04:42 PM »
I don't have any coding knowledge, but my field of work and study means I know a good amount about city forms and urban settlement. If someone does tackle the code, they might want to consider some of the below.

  • Some ancient UK cities have a very small gridded core, based on a roman layout (Bath, Winchester)
  • All villages, towns and cities (including the above), generally grow or grew along the arterial routes out from the centre. Each sector between radial roads gets infilled gradually, according to local geography and other influences (rivers, bridges, etc). Given that the game can handle diagonal roads, if you have the choice of 8 roads at 45° angles, I would suggest a town should have at least 3 and probably 4 or 5 roads heading for it, meeting either at a central crossroad or ' market square' or tiny ancient core. or possibly at a bridge or ferry. You will struggle to get a realistic city form if you presume a map with no intercity roads. I suggest generating the intercity roads first between town 'nodes', then growing the towns around the nodes.
  • Settlement growth direction follows activity i.e. along busy roads or rivers. A station outside of town in 1850 will "pull" the town centre towards it over the next 100 years, due to the influence of "passing trade" on the growth on the tiles adjacent to the road. Towns to not grow up hills when there is land along a flat valley, unless something prevents them from growing along the valley (e.g. see any map of south wales).
  • Prior to the advent of modern insulation, central heating and electric water pumps, nobody settled on hilltops. Preindustrial settlements relied on gravity to supply drinking water. They also couldn't grow beyond the water supply (hence Liverpool building infrastructure to take if from mid Wales). If you want to add a "simcity feature" this would be a logical one.
  • Market towns in the UK are evenly distributed so that every farmer could walk to market and back in a single day. Some have grown and others have fossilised, but they are all still there.
  • Mediaeval city walls can influence the balance between infilling and linear growth, but by 1750 that's mostly completed - and cities either had them or didn't, it just infiluenced how tightly formed and contained a settlement was. I know we have a "city wall" attraction object but it doesn't appear in a logical manner (i.e. as part of a set) which is worth reviewing. Look at towns like Wareham, which has walls surviving from the 9th century. Owing probably to the UK naval strength and unity, vs continental army strength and lack of natural borders, on the continent fortifications were more important later than generally in the UK after the castle age. Only a few UK places e.g. Portsmouth had major industrial revolution aged fortifications installed as part of their urban landscape (and they were redundant by the time they were finished).
  • Simutrans model of having a "city rectangle" which it fills up is very simplistic and false, unless you are dealing with zoned and planned settlements (in the new world) which use zoning. I suspect there may be a need for a setting that lets the players decide what types of city and growth they want - which possibly should be pakset specific not hard coded into the game as it will vary with nationality.
  • Some cities had "urban planning" imposed on them e.g. Paris. which means they have special and sometimes unique shapes and geometries. And quite remarkable intersections (e.g. Place de l'Étoile). This was rare in the UK due to the inability to overcome property ownership rights. E.g. see London after the great fire, buildings were rebuilt but changes to roads and plots were rarer.
Happy to discuss more if someone does take this topic up.
« Last Edit: November 13, 2016, 08:07:17 PM by AP »

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15369
  • Total likes: 368
  • Helpful: 165
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Discussion on city mechanics
« Reply #15 on: November 13, 2016, 05:44:38 PM »
There are a number of different issues here:

(1) town placement;
(2) town shape; and
(3) local town growth.

There are also subsidiary issues, such as city walls, which would require an entire new system of city wall simulation, no longer treating city walls as attractions (i.e. ruined fragments of city walls as are left in many places).

As to (1), there is already code for cities to prefer settling at lower altitude and near water (i.e. rivers or the sea). No. (2) is what I hope to work on eventually, but there are some economic balance things that will have to be done first, and those are likely to take a long time unless I get some assistance with coding. This should have the effect that a station can, in the right circumstances, move the centre of town, etc..

As to (3), that is a very complex subject (and will need to be considered alongside allowing city buildings to be more than 1x1 tiles - I have already dealt with about half, or perhaps more, of the things that formerly prevented this, but not the part of the code that actually places buildings, which is likely to be extremely difficult and complex). If any coders would like to work on a more realistic simulation of this, that would be most welcome.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Offline tubanonymous

Re: Discussion on city mechanics
« Reply #16 on: November 15, 2016, 12:53:54 AM »
Speaking of placement of buildings, I've noticed this. If you have a town with a population of 0, and build a 2+ track station adjacent to a city building, buildings will not spawn on the opposite side of the tracks nor will the city purchase that land. Am I being thick?

Offline jamespetts

  • Simitrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 15369
  • Total likes: 368
  • Helpful: 165
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Discussion on city mechanics
« Reply #17 on: November 15, 2016, 01:16:41 AM »
This is an issue with automatic bridge building, I think. I thought that I had fixed this in a recent commit - are you using the latest devel-new-2 builds or the old 11.35 release build?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.