The International Simutrans Forum

 

Author Topic: Road with several lanes  (Read 11434 times)

0 Members and 1 Guest are viewing this topic.

Offline BudapestTRansport

  • Lounger
  • *
  • Posts: 59
Road with several lanes
« on: March 15, 2009, 12:25:08 AM »
is it possible to put a road like this on into the game?

modnote (by whoami): adjusted topic title
« Last Edit: March 17, 2009, 01:10:33 AM by whoami »

Offline vilvoh

  • One of the good guys
  • Administrator (Inactive)
  • *
  • Posts: 4504
  • I'm the constructor, the architect
    • Escala real
Re: City Road
« Reply #1 on: March 15, 2009, 12:31:31 AM »
I can't see the whole image. I get error 404 attachment not found.

It seems a three-ways road, doesn't it? In any case, have a look at the SVN (link)
« Last Edit: March 15, 2009, 12:35:41 AM by vilvoh »

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3659
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: City Road
« Reply #2 on: March 15, 2009, 05:44:23 AM »
is it possible to put a road like this on into the game?



Do you mean graphically, or with three lanes of traffic in each direction?

It's possible, of course, to paint three lanes like that; but it wouldn't effect the way vehicles travel...

If you are wanting six lanes of travel in each direction, this is definitely not currently possible. For several years, we had a list of common questions, one of which addressed this very issue - as being impossible.

I suppose it might be remotely possible that being open source now, someone might come up with a patch that would be accepted, but I view that as either extraordinarily unlikely, or effectively impossible. Not that many of us wouldn't love to see it, mind. :-)

So I guess the question is: How do you mean? And did either of my answers help?

Offline BudapestTRansport

  • Lounger
  • *
  • Posts: 59
Re: City Road
« Reply #3 on: March 16, 2009, 11:10:44 PM »
how this should be solvable bus lane?

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3659
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: City Road
« Reply #4 on: March 16, 2009, 11:21:05 PM »
The *only* way to do that would be to build extra road tiles. You can download signs for most paks that include "private road" signs -- example for pak64: http://addons.simutrans.com/?pak=64&cat=other&todo=search -- the "Combined Signs" (scroll down) include "private road" signs.

So an optimal solution would be to lay two roads side-by-side, and use private road signs on either side of each intersection (to mark each section of the road as private) and then run your busses there.

If traffic jams become a problem (i.e. your busses have to wait to cross intersections), then you may have to build your own road network.

Also, city can connect to your roads, although this should only be a problem for empty tiles by the roads that get filled -- if you're retrofitting the middle of a large city, everything is probably built out already...

I don't know if there are still available elevated roads, but if so, that's another alternative, although less pretty for sure.

So in other words, it's definitely not supported - it's not possible to do exactly what you want. But hopefully there's a good solution here you can choose... :-)

Offline BudapestTRansport

  • Lounger
  • *
  • Posts: 59
Re: City Road
« Reply #5 on: March 16, 2009, 11:35:00 PM »
The *only* way to do that would be to build extra road tiles. You can download signs for most paks that include "private road" signs -- example for pak64: http://addons.simutrans.com/?pak=64&cat=other&todo=search -- the "Combined Signs" (scroll down) include "private road" signs.

So an optimal solution would be to lay two roads side-by-side, and use private road signs on either side of each intersection (to mark each section of the road as private) and then run your busses there.

If traffic jams become a problem (i.e. your busses have to wait to cross intersections), then you may have to build your own road network.

Also, city can connect to your roads, although this should only be a problem for empty tiles by the roads that get filled -- if you're retrofitting the middle of a large city, everything is probably built out already...

I don't know if there are still available elevated roads, but if so, that's another alternative, although less pretty for sure.

So in other words, it's definitely not supported - it's not possible to do exactly what you want. But hopefully there's a good solution here you can choose... :-)
oh you do not understand i ugy I believed it that to draw than a road would not put a road down only but a private mark onto the road that a bus uses this only as this is on a picture likewise would be solvable?

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3659
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: City Road
« Reply #6 on: March 16, 2009, 11:57:12 PM »
The "private road" signs do not allow city cars to pass the sign. Thus the entire road (in both directions) blocks them at that point, while letting vehicles you own pass.

A sign vs. graphical mark on the road is a matter of painting graphics and doesn't change the underlying nature of the sign. :)

I'm assuming you understand that there can only be two lanes of traffic going opposite directions on one road tile... :)

Offline BudapestTRansport

  • Lounger
  • *
  • Posts: 59
Re: City Road
« Reply #7 on: March 17, 2009, 12:03:15 AM »
for me an other question that Simutrans into a game it is possible to draw only 2 striped roads? 2+2 striped ones or 3+3 striped ones could not be pl? this is


or this is

« Last Edit: March 17, 2009, 12:07:52 AM by BudapestTRansport »

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3659
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: City Road
« Reply #8 on: March 17, 2009, 12:13:48 AM »
There are two answers to that:

1. You can draw anything. Graphics.

2. However, it will always be only two lanes in the game.

Offline BudapestTRansport

  • Lounger
  • *
  • Posts: 59
Re: City Road
« Reply #9 on: March 17, 2009, 12:19:58 AM »
I write ideas maybe only somebody likes him and into the next version will be in him
so it is possible to put only 1+1 striped roads on to the game?

Offline whoami

  • Devotees (Inactive)
  • *
  • Posts: 693
Re: Road with several lanes
« Reply #10 on: March 17, 2009, 01:19:33 AM »
My opinion is to not make the situation on a single tile more complicated, but to rather change roads to have one lane per tile (same as tracks are now). This would save a lot of special case handling in program code and graphics. Roads could be built to use any combination of lanes, including ones which are reserved for turning, having matching traffic lights.

Problem: building proportions will fit surrounding roads (and vehicles on them) even less - city buildings would have to be changed to be able to cover more than one tile. The city builder would also have to build roads with two rows of tiles (at least for main roads), allowing two-way trams as a side-effect.

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3659
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Road with several lanes
« Reply #11 on: March 17, 2009, 02:15:45 AM »
I write ideas maybe only somebody likes him and into the next version will be in him
so it is possible to put only 1+1 striped roads on to the game?

Ideas are always welcome, although I will say: Don't get hopes up. Ideas along these lines have been desired for many years (literally), but it's not trivial to add the functionality.

My opinion is to not make the situation on a single tile more complicated, but to rather change roads to have one lane per tile (same as tracks are now).

I remember precisely this idea being discussed - well before Simutrans went open-source...

It seems like such a fundamental change as to be considered impossible, or at least effectively so...

(which is not to say I wouldn't dance with delight if it was done, because I totally would)

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Road with several lanes
« Reply #12 on: March 17, 2009, 09:35:56 AM »
My opinion is to not make the situation on a single tile more complicated, but to rather change roads to have one lane per tile (same as tracks are now). This would save a lot of special case handling in program code and graphics. Roads could be built to use any combination of lanes, including ones which are reserved for turning, having matching traffic lights.

Problem: building proportions will fit surrounding roads (and vehicles on them) even less - city buildings would have to be changed to be able to cover more than one tile. The city builder would also have to build roads with two rows of tiles (at least for main roads), allowing two-way trams as a side-effect.

This is something i longed for long time.
for instance, pak128 graphics should go on 64*64 tiles: 1 tile per lane/rail track, 2*2 tiles for houses, more for special buildings.
this would allow different lanes configurations and, finally, double tracks.
although this would require a big code rewriting, i think it would hugely simplify vehicles' handling.

Offline The Hood

  • Devotee
  • *
  • Posts: 2889
  • pak128.Britain developer
Re: Road with several lanes
« Reply #13 on: March 17, 2009, 09:39:33 AM »
I did suggest a long time back something along whoami's idea - where all tracks and road lanes were one tile.  For pak128 scale stuff at present, I suggested that all ways were re-done as 64x64 tiles (for one lane) but everything else remained at the same scale.  That would mean citybuildings taking up 4 of these 64x64 tiles, which isn't possible in current game and I'm told it would be a lot of work to allow citybuildings which aren't 1x1.  I still think it would be nice (if anyone has the appetite for that programming work now it's open source) but I've contented myself with the way things are - it is only a game after all!

edit: and fabio got there before me!

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Road with several lanes
« Reply #14 on: March 17, 2009, 10:28:17 AM »
I have an idea. At present, the coordinates are 3D (x,y,z). We could use the existing tiles for buildings, climates, etc...
WAYS, instead, could use different coords, splitting a tile in 4 (e.g. 12,16,1 could be split in 12.0,16.0,1 - 12.5,16.0,1 - 12.0,16.5,1 - 12.5,16.5,1).
To avoid real numbers, all the existing coords could be doubled and buildings could use  only odd (or even) numbers.

Offline Combuijs

  • Web Team
  • Devotee
  • *
  • Posts: 1392
  • Maintainer of maps.simutrans.com
    • Combuijs
  • Languages: EN, NL
Re: Road with several lanes
« Reply #15 on: March 17, 2009, 10:36:21 AM »
Quote
To avoid real numbers, all the existing coords could be doubled and buildings could use  only odd (or even) numbers.

Brilliant  :o . Only a complete rewrite of Simutrans is needed for that...

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Road with several lanes
« Reply #16 on: March 17, 2009, 11:27:13 AM »
Only a complete rewrite of Simutrans is needed for that...
you think?
this could be tested in advance, preventing the program from using every even number in coords for buildings (let's say, returning an invalid coord for coord with even numbers).
If this could work, next step would be to allow buildings on odd coords to draw also on the adjacent three coords with even numbers.
ok, not a walk in the park, but it doesn't seem so hard. for the biggest part of the code, the citybuildings would br only based on their odd coord.

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3659
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Road with several lanes
« Reply #17 on: March 17, 2009, 12:32:11 PM »
Brilliant  :o . Only a complete rewrite of Simutrans is needed for that...

So... only ten years or so then?

Sooner we get started, the sooner we'll get it done!




( ;-) )

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Road with several lanes
« Reply #18 on: March 17, 2009, 12:55:09 PM »
How would that work with other paks? The system must be flexible enough for all "users".

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Road with several lanes
« Reply #19 on: March 17, 2009, 01:39:30 PM »
well, pak64 would have 32*32 base tiles for lanes and tracks, pak96 would be based on 48*48 and so on...

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Road with several lanes
« Reply #20 on: March 17, 2009, 01:53:58 PM »
But what if they have different relative sizes? And what about tunnels... and so on.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Road with several lanes
« Reply #21 on: March 17, 2009, 02:21:45 PM »
But what if they have different relative sizes?
well, the proportion shouldn't change from now, since 2 lanes should correspond to a present time road.

And what about tunnels... and so on.
this would require a change i support also for roads, tracks, tunnels, and bridges right now. They should have 3 images for their relative position: right, left, and middle. thus a road tunnel with three lanes (two in a direction and one in the other) would have a left entrance (left wall and roof) on the left lane, a centre entrance (only roof) on the middle lane, and a right entrance (roof and right wall) on the right lane.

Offline whoami

  • Devotees (Inactive)
  • *
  • Posts: 693
Re: Road with several lanes
« Reply #22 on: March 17, 2009, 08:58:15 PM »
I don't see the necessity of extreme changes to Simutrans (like mixed tile sizes or offsets across tiles). Buildings that cover more than one tile are already possible with the display routines, it's just that larger city buildings don't exist yet (the citybuilder doesn't allow them). Taking buildings from 128x128 sets (once they are open source) would be a method to close the gap for 64x64 sets, be it temporary (due to different style) or permanent, but the existing ones still can be used.

Tunnels and bridges for several lanes would require code and graphics changes, that's true. The graphics for roads and crossings would need to be redone, building on the existing ones. Program logic for road crossings and traffic lights would need to be lifted to a new level. Having two lanes would also be the way to have ships behave realistically on canals/rivers, too.

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3659
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Road with several lanes
« Reply #23 on: March 17, 2009, 09:05:53 PM »
Perhaps it would be easier to have the citybuilder build multi-tile buildings and do things like convert pak64 down to essentially pak32... (a trivial task, sure! hehehehehe) -- that way, make paths centered in the middle of the roads...

BUT.. all roads would have to be one-way. AND they'd have to be able to switch lanes for this to have any real purpose.............

I suspect these issues are reasons why it's not been done so far. ;-)

Offline whoami

  • Devotees (Inactive)
  • *
  • Posts: 693
Re: Road with several lanes
« Reply #24 on: March 17, 2009, 09:50:51 PM »
Perhaps it would be easier to have the citybuilder build multi-tile buildings and do things like convert pak64 down to essentially pak32...
That isn't what I meant - the tile size would remain the same.

Quote
that way, make paths centered in the middle of the roads...
Yes, road vehicle graphics would have to be shifted to the middle of the tile (and larger ones can be added), and there would have to be a way of conditionally placing the median/separation strips between two lanes.

Quote
BUT.. all roads would have to be one-way.
Exactly, so the citybuilder needs to be able to combine two lanes to a working road.

Quote
AND they'd have to be able to switch lanes for this to have any real purpose.............
The concept of Traffic Giant for this is: allow lane changes only at crossings (choosing a lane is then possible in ST by waypoints), that doesn't require any changes to convoy pathfinding, as opposed to dynamic switching between lanes (which isn't so different from the overtaking code), which could be an additional exception mechanism to deal with a traffic jam.

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3659
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Road with several lanes
« Reply #25 on: March 17, 2009, 10:41:15 PM »
I think I wasn't expressing myself on the pak32 bit -- what I mean was that to keep the same scale, tiles could be divided into quarters. Thus a new single-lane road would take up half of a present-sized tile... This would take pak64 single-tile buildings and make them 2x2 at half the tile size, essentially.

Unless I misunderstood you - leaving pak64, but making the roads twice the size. :)

Maybe, in regard to overtaking.... if the game engine recognized that multiple lanes were connected (seems plausible), something like the overtaking code could work well... although perhaps instead of always moving back, perhaps there would be some random chance that the vehicles would stay in that lane (particularly useful to simulate once you get up towards three or four lanes wide traffic)...... And I guess some pathfinding for convois could even predict when they had to be in either left-most or right-most lane for a turn, and get back in the lane. If there's a traffic conflict - well, we have that now when vehicles reach crossings, sometimes two vehicles appear to enter the same tile, and they'll stop and move out one by one... this would even be a good thing, simulating traffic jams at busy exits...

If it sounds like I'm disagreeing with you, it may well be I'm expressing myself poorly and/or misunderstanding you... except perhaps I'm probably assuming it's less possible (but it sure would be awesome... hehe)

Offline whoami

  • Devotees (Inactive)
  • *
  • Posts: 693
Re: Road with several lanes
« Reply #26 on: March 17, 2009, 11:44:05 PM »
I think I wasn't expressing myself on the pak32 bit -- what I mean was that to keep the same scale, tiles could be divided into quarters.
That would be a alternative approach, but this would require shrinking trains and stations (EDIT: not to forget ships and airplanes) to a fraction of their current size - bad for any pak size.

Quote
Unless I misunderstood you - leaving pak64, but making the roads twice the size.
This is the thing that I mean - it allows to keep the largest amount of graphics, and requires reasonable efforts in coding.
« Last Edit: March 18, 2009, 03:44:38 PM by whoami »

Offline Isaac.Eiland-Hall us

  • Benevolent Dictator
  • Administrator
  • *
  • Posts: 3659
  • PanamaCityPC.com/support/
    • Facebook Profile
  • Languages: EN
Re: Road with several lanes
« Reply #27 on: March 17, 2009, 11:54:49 PM »
hrmm... hadn't considered trains. I'm a vehicle-user when I play... heh.

I'm still thinking that doubling the size of the roads compared to the buildings will look.... mmmm... less than optimal. Already, to me, the roads are too large in comparison to the buildings...

I guess, in a perfect theoretical world, there could be some sort of multi-tile way -- go ahead and shrink the tilesize, making roads 1/2 width (i.e. 1/4 current tile), but somehow code rails to stay at the same size and work across tiles... In fact, this would also make diagonals work better, especially if some new 1/4-tile buildings were made to fill in gaps...

Seems like it's impractical on so many levels, though...

(but again: I'd play it! :D )

Offline The Hood

  • Devotee
  • *
  • Posts: 2889
  • pak128.Britain developer
Re: Road with several lanes
« Reply #28 on: March 18, 2009, 09:10:16 AM »
That would be a alternative approach, but this would require shrinking trains and stations to a fraction of their current size - bad for any pak size.
This is the thing that I mean - it allows to keep the largest amount of graphics, and requires reasonable efforts in coding.
Most paksets look like the trains are too far apart on two parallel tracks at present (pak128.Japan is an exception here).  Certainly for pak128 you could use the same track and vehicle graphics re-aligned with closer spaced tracks.  Try comparing in-game parallel tracks with some photos on the internet of double tracks...

Offline Spartanis

  • *
  • Posts: 169
  • Aussie Simutrans addict!! :D
Re: Road with several lanes
« Reply #29 on: September 16, 2011, 10:18:51 PM »


Pak64, in pak128 size 'feel' test.

Road surface is plain square. Curbs and Sidewalk is "res" building.

Roads are two tiles width. (two strips)

Is Rotatable (meaning, works perfect in rotating views)

IT IS possible. However, There is alot of researching, and thinking outside the box to achieve this. The biggest challenge is to work out line markings (dash and solid lines on roads) that is rotatable. Using Way-obj as a method creates a rotatable issue (Having dash lines on one side of the tile, Solid on another looks great on North view, but in the south View it draws as if its the north view). The pain of having NS tile for both North and South alignment! *UGH!*

The even BIGGEST challenge is to create Traffic Lights at intersection.

One way signs are easy to create and place (although i havn't create one and test it yet)

And yes, to fully complete a pakset using this idea, does involve recreating buildings and vehicles to match the scale.

EDIT:

After much thought and experimenting, i come to realize the ultimate truth.

Because of the way they set the id for each tile (N,S,E,W,NS,EW,NSE,NSW etc etc), apart from N,S,E,W tiles, those tiles are bi-directional. In order to make a dual or more lane roads with curbs at each side, along with line markings, the tiles need to ne individualize. Meaning.. for a road that goes NORTH-SOUTH. It needs to be NORTH.and another tile SOUTH. making it separate tile.

Now this may seem simple enough, but after reading alot of other stuff regarding other issues. I begin to understand the cocept of how the coders coded the program.. (concerning RIBI's) so much so, that to make each tile unique in different directions, would ential a complete overhaul of the simutrans software. and that alone is a grand feat to accomplish.

of course, there is pak's to create along with it also. Making it a double whammer of a project as well.
« Last Edit: October 08, 2011, 11:12:06 AM by Spartanis »