News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

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.

Vladki

There are some wall (fence) addons that can be used to protect roads but they are implemented as rail type. So you have 3 tiles wide trunk. But if they are implemented as wayobj (electrification), then it could work nicely. Every tile would be defined if it is city or trunk road. But it would require new dat option to tell that this is the wayobj that makes the road into a trunk road. And a change in the cityrules code to distinguish between trunk and city road.

Sent using recycled electrons.


Isaac Eiland-Hall

As long as opinions are being expressed, I'd like to suggest some way of ensuring the city can't connect to these. Or at least make it optional somehow (either in the road data itself, or an option somewhere).

I definitely support the lack of allowed stops on such roads.

As far as speeds go - speaking from the US perspective - you may know that for many years, our national speed limit was 55mph (~85kph, iirc). But in recent years, that's been lifted, such that some states (like my beloved Texas) have some rural stretches of 80mph (135kph), and even 85mph now.

In cities, it's typically 60mph (~90kph) - these are interstates/freeways with limited access.

Thing is, with the Simutrans multiple scales... there ought to be a way to have some freeways/limited-access-roads with higher speeds, while of course the other city streets  tend to simulate the major arteries and such, which the scale doesn't really support smaller streets or neighborhood streets...

isidoro

Those high speed roads should also be ignored by cityrules, i.e. like occupied tiles (not building, not road).  That way, the city can extend and although there may exist buildings next to these roads, those buildings will be always connected by the regular type of roads.


Isaac Eiland-Hall

If this ends up working out and being added.... I will be excited. :D

And this thread may have some relevance for this project: http://forum.simutrans.com/index.php?topic=13913.msg137988;topicseen#new

:D

Philip

Quote from: Philip on August 26, 2014, 10:05:43 PM
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 think there's a pretty far-reaching consensus here, but with slightly different results:

(1) protected roads are marked by a noise protection wall, which is a way object (2) for purposes of city growth, protected roads do not count as roads (3) cities will bridge protected roads if they can (4) cities won't connect to protected roads (5) no trams on protected roads (6) no halts on protected roads.

Implementing all of this isn't very hard at all (I've got (1) through (4) working), except for the art. I've attached a screenshot that abuses the standard fences as noise barriers, which obviously isn't a very good choice; but I think it's important to get the placement right: note that the protected motorway doesn't have a fence on the central reservation, where it wouldn't be appropriate, but that there is a fence between the unprotected asphalt road and the protected motorway.

About the art:
So far the closest thing to a noise protection wall would be the fences at http://www.simutrans-france.fr.nf/doku.php?id=en:fences , but I'd have to convert that to the proper alignment for a way object.

Quote from: Vladki on August 27, 2014, 06:47:46 AM
There are some wall (fence) addons that can be used to protect roads but they are implemented as rail type. So you have 3 tiles wide trunk. But if they are implemented as wayobj (electrification), then it could work nicely. Every tile would be defined if it is city or trunk road. But it would require new dat option to tell that this is the wayobj that makes the road into a trunk road. And a change in the cityrules code to distinguish between trunk and city road.

Do you have any pointers to more fence add-ons? So far I've found gauthier's work and a rar file called Player_Colour_Fence.rar.

Junna

Quote from: Philip on August 29, 2014, 06:54:33 PM
Do you have any pointers to more fence add-ons? So far I've found gauthier's work and a rar file called Player_Colour_Fence.rar.

Player colour fence was AEO's modification of a open-source Japanese add-on (the original is at the bottom of this page, with sources available, etc: http://japanese.simutrans.com/index.php?Addon128%2FOthers).

Vladki

There is an addon for berlin wall somewhere. But it may be too thick for this purpose.

Sent using recycled electrons.


Fabio

You could also use/adapt the crash barriers I made for motor ways, in pak128 repository.


Sent from my iPhone using Tapatalk

Philip

I couldn't decide on one noise barrier, so I've adapted three of them: gauthier's plexi.png, gauthier's palissade.png, and MMSomething's blockwall.png. The latter two work as required (I added half-height slope images using a shearing transformation, which isn't perfect but works), but the plexiglass walls need some work to fit into a single tile. If you dislike these, it's most likely due to my editing, not the original author's work.

It turns out, unsurprisingly if I'd thought about it before, that fences need different sets of images than the old way objects: with a fence possible on each edge of the tile, there are 15 possibilities for flat tiles, but there are eight more possible slopes, so a naive approach (which I'm currently using) requires 135 front and back images each. I think by sharing back and front images we can get that down to a much more manageable number (19, if I'm right), but the translation between those and the existing images is a bit tricky.

So the code needs a bit more work, both because of the image issues and for general cleanup. However, it's available at https://github.com/pipcet/simutrans-experimental/compare/jamespetts:way-improvements...protected-roads?expand=1, based on James Petts's way-improvements branch (this also includes the fixed diagonals code described in the OP).

In particular, diagonals for the noise barriers are still missing entirely.

Thank you for the comments and hints, they're much appreciated.

Junna

That does look very pretty, at least!

prissi

I do not get why the wayobj is not enough? It has also for and back graphics for slopes?

Vladki

I like the glass wall. I think the dead-end walls are not necessary.

Philip

Quote from: Vladki on September 01, 2014, 04:08:58 PM
I like the glass wall. I think the dead-end walls are not necessary.

Quote from: prissi on September 01, 2014, 03:37:48 PM
I do not get why the wayobj is not enough? It has also for and back graphics for slopes?

You're both right. I was making things way too complex to keep track of dead ends (which do not even make sense if you cannot build stops on them) and parallel roads. Will push a fixed/simplified version soon.

Thank you, I couldn't see the forest for the trees.

Philip

Okay, I've pushed a fixed version now, available at https://github.com/pipcet/simutrans-experimental/compare/jamespetts:way-improvements...protected-roads; the required PAK (one version of it) is at https://github.com/pipcet/simutrans-pak128.britain/compare/jamespetts:half-heights...noise-barrier?expand=1, including a prepacked version (the artwork is not mine, but gauthnier's, though I adapted it somewhat).

The patch adds a waytype for noise barriers, since they don't really fit any of the existing ones. It might be better to make that a general "fence" waytype, which might be shared with standalone full-tile fences/walls.

I'd be interested to know whether this patch works. It still needs a few minor tweaks (you can still build halts on protected roads, you can build noise barriers on bridges and elevated roads, and there is no support for omitting noise barriers between parallel protected roads, yet), but it's possible there are real bugs as well.

jamespetts

Philip's helpful patch is now incorporated into the way-improvements branch of the Experimental Github repository. This is very helpful; 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.

jamespetts

Looking into this again after some delay, I am afraid that I cannot get noise barriers to compile, as makeobj complains of an invalid waytype. Has something been missed in the makeobj code here, or have I done something wrong?
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.