News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

Fixing Pave-the-Planet Syndrome

Started by Philip, August 16, 2014, 11:41:10 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Philip

When cities grow along a diagonal road, many junctions (roundabouts, in Pak128.Britain) are being created, which I think is quite ugly. See the first attached screenshot for an example. I call that pave-the-planet syndrome because with a bit of bad luck, huge areas of four-way road intersections are being created.

We could remedy this, to some extent, by modifying the city rules, but I think a neater solution is to remove road tiles, straightening pieces of the diagonal road without creating such 2x2 squares of roads; we can't do that in the city rules because they only add roads, never remove them.

Another reason for pave-the-planet squares is the creation of monuments (denkmal buildings) (but not tourist attractions), which have roads surrounding them.

This patch eliminates both reasons, and results in roads as in the second attached screenshot: some stretches of the diagonal road remain, but overall the grid isn't disrupted anywhere near as badly as it is with the old code.

Pros:

  • looks better (I think)
  • should deal better with traffic jams (cars avoid going on three/four-way intersections if they can't clear their way out)

Cons:

  • increases travel time between cities (slightly)
  • there might be fewer monuments created, particularly large ones

Todo:

  • don't delete player-owned roads
  • check we do the right thing for bridges and tunnels
  • find better names for the methods
  • review for the possibility of endless loops

Note the code change in check_bau_spezial() is independent of the rest of the changes, and I believe fixes a bug.

jamespetts

Very interesting - thank you for this. The diagonal roads issue is one that I have wanted to see solved for some time. I am less sure about the monuments, however; they do look rather grander surrounded by roads. Perhaps some others have some input on the monuments issue? I should be interested to see others' views on this one.
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.

Junna

I do think having a loop around the monuments is rather pleasant in appearance and gives the impression of a square.

It should however ideally not build several redundant roads when building a monument next to an existing road, it appears it does not often recognise the fact that a road exists before hand (this is even more noticeable in standard with those monuments).

Philip

Quote from: jamespetts on August 17, 2014, 12:02:09 AM
Very interesting - thank you for this. The diagonal roads issue is one that I have wanted to see solved for some time. I am less sure about the monuments, however; they do look rather grander surrounded by roads. Perhaps some others have some input on the monuments issue? I should be interested to see others' views on this one.

Monuments should still be surrounded by roads with this patch (just not by double roads)! Sorry if I was unclear about that (and it's definitely a bug if you're seeing monuments neighbouring houses). What should happen is something like the second screenshot rather than the first.

I've attached a second  version of this patch that fixes a minor embarrassing bug.

jamespetts

Ahh, that seems more sensible. I will commit that. Thank you.
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.

Junna

That does look very good. It's been nagging me for ever how the city would ruin even diagonals I corrected for it; give it a month and it would be distorted again.

DrSuperGood

Although slightly off topic, it might be a good idea to look into allowing destructive placement of industries and monuments. Currently they seem to like being placed at the edges of towns and cities where there is free space. This works for small cities with huge spaces between them however in the case of many tightly packed cities (like in the multiplayer game) you can get industries being placed tightly in shrinking holes as the cities grow and encroach the area. Worse is you can end up with industry deserts as there is no space for new industries to be placed (island is wall to wall housing).

This is not entirely natural from an economic point of view or good looking as you will end up with huge areas of housing with the odd over packed hole of industry. Also the continuous borderline development makes connecting the industries difficult as they constantly move further out of the city and away from where your stations are. However in the case of small cities with no existing industry this is a natural thing to do so there needs to be some kind of decision cutoff. Ultimately you would want sort of industrial districts, where industry groups physically together like in real life (it appears to happen to some extent as seen on the server, but still gets pushed and mixed with a lot of housing).

There is also a problem with natural resource industries getting encroached upon by cities. The best example would be a grain farm that ends up surrounded by houses with a lot of field islands nearby. In real life such farms usually closed down and were sold (often forced to) due to the land value in cities. It looks very ugly to see a Cattle Ranch in the middle of a screen worth of housing with its pens randomly scattered.

Once an industrial district is defined, it should try and keep industry within it. It should prefer empty space but if none can be found (and the industrial district needs more industry) then it should be able to demolish housing and roads to place the industry. This could also apply to commercial districts so shops can be placed closer together for easier servicing (less spread required).

Once a farm is defined as being inside a city (the housing around it starts to reach high density) then it should be forcefully shut down and a replacement re-opened at some stage somewhere else in free land. Possibly a warning could be given a year before closure to allow people to prepare.

Some monuments should always try and be placed close to the city centre. If it cannot find free room it should make some, demolishing houses as required. A good example of this would be a cathedral, which would not make any sense if it was placed on the outskirts of a city. Also state buildings and expensive developments should all be placed near city centres destroying as appropriate.

jamespetts

Dr. Supergood - those are all valid points, but that comes rather under the redevelopment of town growth generally, which is a massive project under discussion here. The issue is that, currently, all multi-tile buildings can only be placed where there is already free space as there is no algorithm for working out which city buildings (let alone roads) can properly be deleted. When one considers this in the context of economic rules for realistic city development, it becomes fantastically complicated. It is actually this that is the last remaining impediment to having multi-tiled city buildings, as I have already solved the (easier) problems of passenger generation from and supply to these buildings on the way-improvements branch. Might I suggest that you take a look at the thread to which I refer above and perhaps suggest some ideas of specific algorithms for multi-tile building placement in cities there? Discussing it in the context of that discussion would be helpful, I think.
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.

Philip

Those are excellent suggestions, but I think to fully implement them would require a sophisticated land value system.  I've implemented destructive placement of monuments based on (the current, very rough idea of) land value, but that simply results in all monuments being placed around the town hall because land value does not vary across the city...

However, there's no reason not to write code now that will make use of a future land value system, since we have the stubs for that. It just won't work nicely yet.

My idea (and I believe James's, too) would be to assign land values based on transport connectivity, building type, and other nearby buildings, then make automatic construction attempt to maximize overall land value minus construction costs.

Quote from: DrSuperGood on August 17, 2014, 02:46:55 AM
Although slightly off topic, it might be a good idea to look into allowing destructive placement of industries and monuments. Currently they seem to like being placed at the edges of towns and cities where there is free space. This works for small cities with huge spaces between them however in the case of many tightly packed cities (like in the multiplayer game) you can get industries being placed tightly in shrinking holes as the cities grow and encroach the area. Worse is you can end up with industry deserts as there is no space for new industries to be placed (island is wall to wall housing).

As I understand the current code, it currently requires free space and simply fails to build anything if there is none (in the case of factories, this takes very long, and that's quite annoying).

Quote from: DrSuperGood on August 17, 2014, 02:46:55 AM
This is not entirely natural from an economic point of view or good looking as you will end up with huge areas of housing with the odd over packed hole of industry. Also the continuous borderline development makes connecting the industries difficult as they constantly move further out of the city and away from where your stations are. However in the case of small cities with no existing industry this is a natural thing to do so there needs to be some kind of decision cutoff. Ultimately you would want sort of industrial districts, where industry groups physically together like in real life (it appears to happen to some extent as seen on the server, but still gets pushed and mixed with a lot of housing).

I think land value works in this scenario: for a small city, connectivity is as good on the greenfield site as it is in the city, so there's no reason to demolish houses.  As the city grows, the greenfield sites become less desirable, and at some point the balance shifts in favour of demolishing low-density housing for your (small) factory.

Quote from: DrSuperGood on August 17, 2014, 02:46:55 AM
There is also a problem with natural resource industries getting encroached upon by cities. The best example would be a grain farm that ends up surrounded by houses with a lot of field islands nearby. In real life such farms usually closed down and were sold (often forced to) due to the land value in cities. It looks very ugly to see a Cattle Ranch in the middle of a screen worth of housing with its pens randomly scattered.

As potential land value rises, it becomes more attractive to demolish the (large) factory for low-density housing.

Quote from: DrSuperGood on August 17, 2014, 02:46:55 AM
Once an industrial district is defined, it should try and keep industry within it. It should prefer empty space but if none can be found (and the industrial district needs more industry) then it should be able to demolish housing and roads to place the industry. This could also apply to commercial districts so shops can be placed closer together for easier servicing (less spread required).

Industry would negatively affect residential land value, so there'd be an incentive to keep it lumped together, because the negative effect would count towards construction costs and discourage building in that nice residential area.

Quote from: DrSuperGood on August 17, 2014, 02:46:55 AM
Once a farm is defined as being inside a city (the housing around it starts to reach high density) then it should be forcefully shut down and a replacement re-opened at some stage somewhere else in free land. Possibly a warning could be given a year before closure to allow people to prepare.

I'm not sure about "forcefully": ideally, there wouldn't be a special case in the code but simply the consideration that demolishing that smelly farm would raise residential land value around it so much that it becomes a good idea.

Quote from: DrSuperGood on August 17, 2014, 02:46:55 AM
Some monuments should always try and be placed close to the city centre. If it cannot find free room it should make some, demolishing houses as required. A good example of this would be a cathedral, which would not make any sense if it was placed on the outskirts of a city. Also state buildings and expensive developments should all be placed near city centres destroying as appropriate.

I think those monuments should try to be placed on really valuable (well-connected) land regardless of whether that's where the city centre is or was; in fact monuments should be almost infinitely valuable, so they never get demolished to make room for other buildings.

Junna, I'm glad I'm not the only person to fix diagonal roads for my cities by hand.

I'm about to put my code up on github, though I've got to disentangle it from other changes first.

jamespetts

Philip is right - we do need a land value system (indeed, probably even a land value and multiple type desirability system) in order to do what Dr. Supergood suggests properly, but that is planned (once I finish the long queue of bug fixes and other things on which I shall be able to get started when I am more settled with my house move). I do encourage suggestions as to how it might work in detail on the thread that I linked in my previous post.

One specific comment:

Quote from: PhilipI'm not sure about "forcefully": ideally, there wouldn't be a special case in the code but simply the consideration that demolishing that smelly farm would raise residential land value around it so much that it becomes a good idea.

This is not quite how it worked in reality: what actually happened was that the town grew to such a point that, for a specific piece of farmland near the edge of the town, it became more profitable for the landlord to sell it (or rent it) to speculative house builders than to continue to let it to farmworkers, and so the land was built upon. This is what will need to be simulated.
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.

DrSuperGood

QuoteMy idea (and I believe James's, too) would be to assign land values based on transport connectivity, building type, and other nearby buildings, then make automatic construction attempt to maximize overall land value minus construction costs.
Problem with land value is often it is speculation based or depends on factors that are not simulated or viable to simulate. It would also make the simulation excessively complicated.

For this reason I would suggest "zones". These could be rects that modify land value around certain desirable features. A well run commuter and mail station would raise the land value in 2 tiers, a lot nearby and a bit in the rest of its pickup range. A city college or cathedral would raise land value a lot nearby. A coal power station would lower land value a lot nearby (no one wants to live next to one). Tracks lower land value directly nearby (noise/pollution). Although circles would be more natural, I would just go with rects since they are more easy to compute. To prevent excessive computation land value should be computed from 3 main factors.

1. The initial land value (based on geography? maybe random?). This is static and never really changes except maybe when you use the terraformation tools.
2. Nearby persistent modifiers. This is also static and never changes except when such modifiers are removed (which may or may not ever happen).
3. Nearby desirable factors. This is dynamic and computed based on results. Examples would be shops with good supply or a well serviced station nearby.

Although one really should base land value from nearby ways depending on how physically used they are (convoys per month, a dynamic value) this would probably not be viable. Instead I would advise just assigning static values based on way type (high speed rail makes more noise than low speed, a motorway more noise than a country road).

Dynamic factors need to be staggered over the entire month to avoid load. Monthly averages is probably sufficient for them.

Building placement then is dependant on areas that reach a minimum value threshold (at least £X) and not the max value. You can also define a maximum value threshold (less than £X) to avoid the situation where an ultra commercial district gets demolished for a monument.

QuoteI'm not sure about "forcefully": ideally, there wouldn't be a special case in the code but simply the consideration that demolishing that smelly farm would raise residential land value around it so much that it becomes a good idea.
Industries could require a minimum or maximum land value before they close. A butcher would require high land value as it needs a lot of paying customers. A farm would require low land value as they need a lot of land and cannot really afford to use expensive land.

A pollution factor would also help. Industries and cities raise pollution forcing out agriculture. This is the main real life reason since one cannot farm when surrounded by skyscrapers or toxic waste dumps.

QuoteI think those monuments should try to be placed on really valuable (well-connected) land regardless of whether that's where the city centre is or was; in fact monuments should be almost infinitely valuable, so they never get demolished to make room for other buildings.
A minimum threshold as otherwise you would get stupid placement situations like always next to the townhall. They should be marked as unmovable once placed.

Some monuments could be replaced as they were special at the time but eventually get destroyed. An example could be a great sports stadium where eventually it gets demolished to make way for something new. This would happen after the monuments stop appearing (they obsolete), where there is a chance that it will become historical (permanent, never destroyed) or eventually retired (replaced with a new monument). This could even happen with houses. This would mimic real life where by some structures were common sight when constructed (like a city wall) but eventually demolished leaving a few examples remaining (less than were built). Historical monuments would obviously raise land value even more than normally.

jamespetts

Might I strongly suggest that any detailed discussion about land value or anything of the sort be in this thread and respond to the specific and detailed plans already set out therein for a substantial part of a completely new town growth system?
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.

prissi

Forbidding diagonal road growth has been done in pak64 by tuning the city rules. It was not very difficult. The problem remains that straight roads are still favorite and fast growing directions, which can be only solved with the city density settings.

Still an interesting patch.

Philip

Quote from: prissi on August 18, 2014, 10:34:02 PM
Forbidding diagonal road growth has been done in pak64 by tuning the city rules. It was not very difficult. The problem remains that straight roads are still favorite and fast growing directions, which can be only solved with the city density settings.

Still an interesting patch.

Thank you! That's very interesting, and I hadn't been aware of it, but I think there's still merit in doing it my way. FWIW, the current code is in James's way-improvements branch at https://github.com/jamespetts/simutrans-experimental/compare/jamespetts:fa4db8f...7c4f . It's a bit more complicated to fully support monuments and the road loops surrounding them; I believe the approach of keeping a koordhashtable that registers what we plan to change, then either applying the whole table or nothing at all, might be generally useful for complicated destruction+construction operations, of which building a monument and the road around it is only one example. However, I understand the complication might be too expensive a price to pay for an ultimately cosmetic issue.

Investigating this, it seems that pak64 cities simply do not grow along diagonal roads at all, whereas my patch means that bits of the diagonal road will be straightened and then junctions created as usual.

I'm also still seeing quite a few excessive roads (2x2 squares of road tiles) still created with the version of pak64 I tested (120.0, though there appear to be two files with that version number on sourceforge), so I suspect the road rules do not generally ban such roads.

May I take the opportunity to ask about these lines from my patch specifically:


diff --git a/simcity.cc b/simcity.cc
index 91127dc..3effa1f 100644
--- a/simcity.cc
+++ b/simcity.cc
@@ -3063,4 +3063,4 @@ void stadt_t::check_bau_spezial(bool new_town)
ok = ok ||
- welt->access(best_pos + koord(i, -1))->get_kartenboden()->hat_weg(road_wt) ||
- welt->access(best_pos + koord(i, total_size.y))->get_kartenboden()->hat_weg(road_wt);
+ welt->access(best_pos + koord(i, 0))->get_kartenboden()->hat_weg(road_wt) ||
+ welt->access(best_pos + koord(i, total_size.y-1))->get_kartenboden()->hat_weg(road_wt);
}
@@ -3068,4 +3068,4 @@ void stadt_t::check_bau_spezial(bool new_town)
ok = ok ||
- welt->access(best_pos + koord(total_size.x, i))->get_kartenboden()->hat_weg(road_wt) ||
- welt->access(best_pos + koord(-1, i))->get_kartenboden()->hat_weg(road_wt);
+ welt->access(best_pos + koord(total_size.x-1, i))->get_kartenboden()->hat_weg(road_wt) ||
+ welt->access(best_pos + koord(0, i))->get_kartenboden()->hat_weg(road_wt);
}



I believe that fixes an off-by-one error that resulted in excessive roads around monuments, but it's possible I simply did not understand how this code was supposed to work in the first place. If so, it should probably be applied to Standard.

Thank you again,
Philip

Isaac Eiland-Hall

Wow. Just saw this thread. I scanned it; apologies for not reading it in detail, but it did go a bit offtopic.

Just wanted to say - looking at the screenshots of the fixed diagonals - that is GREAT looking! Nice work!!!

prissi

I think there is some furhter work needed to avoid to remove intentionally build parallel routes. Currently Simutrans will never touch the second tile of a road through a city, which enables to protect highways by having a slow road next to it. But this patch may  affect it at all intersections.

Philip

Quote from: prissi on August 21, 2014, 10:07:50 PM
I think there is some furhter work needed to avoid to remove intentionally build parallel routes. Currently Simutrans will never touch the second tile of a road through a city, which enables to protect highways by having a slow road next to it. But this patch may  affect it at all intersections.

Thanks for pointing out that feature, I hadn't been aware of it! However, if I understood the problem you describe correctly, I cannot actually reproduce the bug—the code seems to leave such roads alone, at least in Pak128.Britain Experimental (it might depend on the city rules).

Did I understand correctly that what you meant was that a protected road is entirely surrounded by tiles that either contain roads themselves (as in the screenshot) or present an obstacle against building a city building on them? That it should be possible to test for, but maybe I've misunderstood.

Thank you again,
Philip

DrSuperGood

Frankly triple roads for "highways" is kind of a messy hack anyway. If proper public ownership of roads was introduced (allow all players to build public roads) then you could make cities ignore private roads (motor ways) and simple convert all public roads in city area to city roads. You pay for using these public roads via toll (in real life it is road tax and other such taxes and charges that are meant to cover road maintenance).

Isaac Eiland-Hall

I've wished for private roads (or protected roads) in cities for years :)

For paks that have elevated roads, this is a sort of work-around, although the slopes required to connect to elevated ways means routing doesn't happen like I'd like it to happen. :/

Aquin

Quote from: DrSuperGood on August 22, 2014, 03:35:28 PM
Frankly triple roads for "highways" is kind of a messy hack anyway. If proper public ownership of roads was introduced (allow all players to build public roads) then you could make cities ignore private roads (motor ways) and simple convert all public roads in city area to city roads. You pay for using these public roads via toll (in real life it is road tax and other such taxes and charges that are meant to cover road maintenance).

I would take this tough even one step further.
All roads, bridges and tunnels within city limits are automatically public property, but not necessarily city roads. The city growth algorithm should never downgrade a road, so if you build a fast road in(to) a city it will stay a fast road, even if the city grows around it. An toll paid to the public player could substitute the maintenance.
The same could hold for intercity roads, if you upgrade such a road, you escape maintenance (but pay tolls).

Leartin

No, the downgrading of roads in cities is an important feature.
City roads are not slow because the road itself is not capable of higher speeds, but because of laws. It's about people who live there. Sometimes there are streets which allow for faster travelling even through cities, but you can be quite sure that there won't be an access road to a house on those streets.
Simutrans does not simulate where the access to the house is, therefore each street tile next to a house might have the access, in turn those have to be slow city streets rather than fast streets.

How about this approach: Cities can't downgrade any streets, only upgrade them. Cityrules can differentiate between slow/city streets and fast streets and only place buildings next to slow streets, a fast street just isn't enough. You could still have buildings next to the fast street, but only if they have access to a slow/city street as well.

Sarlock

From a scale perspective, it's important to remember that a city block represents not only a single house/apartment/office tower, but an entire area of these such buildings, including access roads, etc.  At a 1km2/tile scale, a single house tile has an entire subdivision inside it... and even at Experimental's 125m2/tile scale this still applies.  With this in mind, it is certainly sensible to have a housing tile beside a major highway.  I like the idea of not having a city downgrade roads (just take them over as public player as the city grows out to it), it would solve many issues.
Current projects: Pak128 Trees, blender graphics

DrSuperGood

QuoteI would take this tough even one step further.
All roads, bridges and tunnels within city limits are automatically public property, but not necessarily city roads. The city growth algorithm should never downgrade a road, so if you build a fast road in(to) a city it will stay a fast road, even if the city grows around it. An toll paid to the public player could substitute the maintenance.
The same could hold for intercity roads, if you upgrade such a road, you escape maintenance (but pay tolls).
Not realistic. You cannot have fast roads in built up areas as it is just not safe. There is a reason it is illegal to cross motor ways in most countries (the police will be very cross at you).

Every house needs access to a built up road. However if one is present I guess there is no need to downgrade faster roads.

Motor ways through cities do not count as a built up road. There is no direct exit from industries and houses onto them and pedestrians are not supported.

QuoteHow about this approach: Cities can't downgrade any streets, only upgrade them. Cityrules can differentiate between slow/city streets and fast streets and only place buildings next to slow streets, a fast street just isn't enough. You could still have buildings next to the fast street, but only if they have access to a slow/city street as well.
Also good but I would like it to feature public roads as more a standard. Private roads should be an a choice not mandatory.

One idea would be to give city roads speed limit exception. Reality is getting goods inside a city is more expensive than a less dense area. As such you could get paid as if the goods are moved faster through the city even though you are going at a slow speed. This represents the cost of living inflation inside cities. Obviously it only applies on city roads (unlimited roads do not give you the bonus even if owned by the city). The amount of bonus you receive could be based on the city size, with huge cities that cover several screens giving much higher bonuses than small towns with huge areas of nothing between where average speed will mostly not be affected.

Leartin

Quote from: Sarlock on August 25, 2014, 10:42:52 PM
From a scale perspective, it's important to remember that a city block represents not only a single house/apartment/office tower, but an entire area of these such buildings, including access roads, etc.  At a 1km2/tile scale, a single house tile has an entire subdivision inside it...

That's not entirely true. There is no indication for the player how long a tile is, as such, it's as long as he wants it to be, depending on whether it's a map of a city or a continent he is playing.
For the sake of argument, what if it really was one kilometer: Linz is about 100 square kilometers = tiles big. The main train station alone would be more then half of this size, but you could represent it with only one track and station if you want. As well, all the bus lines would be only one line, and given that each bus stop can cover 25 tiles, you only need four of them - one bus. I guess the tram system just isn't important enough. Furthermore, I guess you'd have to 'represent' the ICE going through the city with some kind of slow regional train, unless you represent successful business with large debts...

Sarlock

My point was merely to highlight that we don't have to take the images as literal and only as a visual representation of a gameplay concept (population to service)...

It certainly makes a lot of sense to not have the simulation continually paving over the players' high speed roads as I believe that many players find it a frustrating battle (I do).

Whether or not it's "right" to have a house beside a 90km/h and whether the scale is visually representative or not seems superfluous.
Current projects: Pak128 Trees, blender graphics

Leartin

Quote from: Sarlock on August 26, 2014, 08:32:39 AM
It certainly makes a lot of sense to not have the simulation continually paving over the players' high speed roads as I believe that many players find it a frustrating battle (I do).
Sure, but that's only half the truth. I think about the difference between a city bus and an overland bus: Since the city bus only drives in cities, it does not need to go faster then 50, so it has a weaker engine and is cheaper, while the overland bus has a better, more expensive engine that allows it to go faster. Once you completely remove the limitation of city road speed, city busses are no longer viable. This hurts simulation and gameplay alike (unless you want "that one vehicle" that can be used in any occasion).
That's why I don't think just not allowing the city to downgrade player streets is an option. You could as well just use a faster city street for the same effect.

jamespetts

Of course, the position is different in Experimental, which has an explicit scale; by default in Pak128.Britain-Ex, it is 125m per tile.
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.

Philip

Quote from: Isaac.Eiland-Hall on August 25, 2014, 05:00:08 PM
I've wished for private roads (or protected roads) in cities for years :)

For paks that have elevated roads, this is a sort of work-around, although the slopes required to connect to elevated ways means routing doesn't happen like I'd like it to happen. :/

This is just an idea, but maybe it would work to use private road barriers for this purpose? That would be clearly visible and wouldn't require new data. It might be a bit annoying to have to have two of those for every intersection, so I'd appreciate it if people commented on that (and it's definitely less annoying than building a trench and putting an elevated way in it to get a private road at the same height as the rest of the city road network...) The attached patch (against Experimental, because it uses the "public right of way" bit) doesn't quite do the right thing for bridges yet, they're not marked as public right of way roads, but it should illustrate the idea. It's not quite clear what the right thing to do is wrt city rules, but my first guess was to make "s" match only public right of ways, and "S" match only when there is no road at all, not even a private one.

Of course the easiest fix would be to introduce new road types that never turn into public roads—I've got a half-finished hack here that, among other things, includes support for three-lane roads, and those would never be downgraded to city roads.

Vladki

I think that the current system is OK. The law in most countries limits the speed in city to 50-60 km/h. Yes there are motorways leading through the city, but they also have limited speed (80 km/h in CZ), and they are quite often separated somehow from the houses - either elevated, or below, or in tunnel, or separated by park, anti-noise wall, or another paralell access (slow) road. So I think that the requirement to build an elevated way to keep it high-speed, or to protect it by parallel wall/rail/road is justified. Perhaps one modification could be done - that the road is turned to city road only if the new building is at the same height-level as the road. Thus a road on a ridge or in a walley between houses will be protected.

jamespetts

Quote from: Philip on August 26, 2014, 02:21:01 PM
This is just an idea, but maybe it would work to use private road barriers for this purpose? That would be clearly visible and wouldn't require new data. It might be a bit annoying to have to have two of those for every intersection, so I'd appreciate it if people commented on that (and it's definitely less annoying than building a trench and putting an elevated way in it to get a private road at the same height as the rest of the city road network...) The attached patch (against Experimental, because it uses the "public right of way" bit) doesn't quite do the right thing for bridges yet, they're not marked as public right of way roads, but it should illustrate the idea. It's not quite clear what the right thing to do is wrt city rules, but my first guess was to make "s" match only public right of ways, and "S" match only when there is no road at all, not even a private one.

Of course the easiest fix would be to introduce new road types that never turn into public roads—I've got a half-finished hack here that, among other things, includes support for three-lane roads, and those would never be downgraded to city roads.

Those are some very interesting ideas. What might work well is a system that marks a road of a certain type as a "trunk road" (or similar: I am not sure that that is quite the right nomenclature, since trunk roads can also be normal town roads) which would (1) not have the city speed limit applied to them; (2) not be adopted by the town council when the town spreads to them; and (3) not have city buildings built alongside them (and not be treated as roads for the purposes of city rules). These could perhaps be introduced only in later times (1950s? 1930s? It would be pakset dependant, of course) and would potentially deal with various issues, although this would only work properly if city roads could either bridge them automatically or connect with them. (I suggest that city roads not be allowed to connect with them automatically so as not to create undesirable intersections).
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.

Philip

Quote from: jamespetts on August 26, 2014, 08:08:38 PM
Those are some very interesting ideas. What might work well is a system that marks a road of a certain type as a "trunk road" (or similar: I am not sure that that is quite the right nomenclature, since trunk roads can also be normal town roads) which would (1) not have the city speed limit applied to them; (2) not be adopted by the town council when the town spreads to them; and (3) not have city buildings built alongside them (and not be treated as roads for the purposes of city rules).

To clarify, my suggestion is that you can still build houses next to a protected road, but they need another road to connect to as well.

I'd add (4) not have sidewalks built for them and (5) not support trams for very fast roads.

Quote from: jamespetts on August 26, 2014, 08:08:38 PM
These could perhaps be introduced only in later times (1950s? 1930s? It would be pakset dependant, of course) and would potentially deal with various issues, although this would only work properly if city roads could either bridge them automatically or connect with them. (I suggest that city roads not be allowed to connect with them automatically so as not to create undesirable intersections).

I'm not sure it would be consistent to make cities bridge non-public-right-of-way roads—we don't allow it for rail lines, though we do allow it for canals. However, thinking about this some more, the main reason for not bridging rail lines might be that you can build crossings over them instead.

I agree with you about not letting city roads connect to protected roads (and my patch does that, though it doesn't enable bridging); in particular, the motorway road type in Pak128.Britain-Experimental lacks an "all" image, presumably because motorways don't have four-way intersections, so intersections created automatically might become very ugly.

So my suggestions for now would be: (1) no trunk roads yet (2) protect roads with private road barriers (3) allow bridging of protected roads (4) no automatic connections to protected roads (5) treat protected roads as unbuildable tiles for city rules purposes.

The main problem with (2) is that private road barriers need an extra straight tile to build them on; it might be better for gameplay to allow intersection squares to have barriers, but that would need graphics work. Speaking of which, I'd love some noise protection walls! They could pop up automatically around fast roads in towns, or maybe you'd have to build them to avoid the speed limit being lowered when a new building appears next to your motorway.

jamespetts

I agree re: pavements ("sidewalks") and trams: that seems sensible.

As for bridging railways, this might be worth considering: perhaps railways should be bridged automatically rather than have level crossings where the number of vehciles passing in the last month is > X where X is a value set in simuconf.tab? That would at least make the behaviour more consistent (and more desirable, as crossings being built automatically over busy railways by city roads can be a problem).
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.

DrSuperGood

It would be nice if things like road bridges could be given to towns. In the server the use case has come up that large sections of residential zones are demolished to make room for trains or canals. To prevent islanding the city bridges are constructed over the affected area. These bridges end up being owned and maintained by whoever created the route (which is not necessarily a bad thing) however it does mean that other players cannot modify them at all.

The case of where this is a problem already occurred. As a test I set up a tram line around a city island. All worked fine until some larger coaches were introduced. My tram line then broke because blue, who made water level canals in the city, owned bridges which were now incapable of taking the weight of the new trams. Fortunately I have access to blue so could fix the problem with some nice strong brick bridges (which I now own for future use) but if I did not I would have been pretty helpless and probably had to shut the line down.

Orange player gets around this with a dummy company he bankrupts that owned the bridges so they end up neutral.

There is also a problem that publically owned roads (not sure how they came to exist) end up owned by the public service provider or whatever you call it. As such they cannot be modified at all although they can still be used which turns them into annoying hazards.

isidoro

IMHO, I prefer a special type of road over barriers to mark high-speed protected roads.  They could be marked with sound walls or whatever the pak authors find suitable, similar to sidewalks now.

The reason is that the information about whether a road tile is protected or not would be in the very tile data vs. has to be calculated.

Otherwise, what happens when you modify that piece of road?  Do you have to remember to add the barriers all the time?

Aquin

Quote from: Philip on August 26, 2014, 10:05:43 PM
I'd add (4) not have sidewalks built for them and (5) not support trams for very fast roads.

...

So my suggestions for now would be: (1) no trunk roads yet (2) protect roads with private road barriers (3) allow bridging of protected roads (4) no automatic connections to protected roads (5) treat protected roads as unbuildable tiles for city rules purposes.

I'd add (6) no bus stops or mailboxes.
Though I would allow the city to connect to them.
Noise protection walls would be nice for them, to immedeately see their special status.