News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

Road with several lanes

Started by BudapestTRansport, March 15, 2009, 12:25:08 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

BudapestTRansport

is it possible to put a road like this on into the game?

modnote (by whoami): adjusted topic title

vilvoh

#1
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)

Escala Real...a blog about Simutrans in Spanish...

Isaac Eiland-Hall

Quote from: BudapestTRansport on March 15, 2009, 12:25:08 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?

BudapestTRansport

how this should be solvable bus lane?

Isaac Eiland-Hall

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... :-)

BudapestTRansport

Quote from: Isaac.Eiland-Hall 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... :-)
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?

Isaac Eiland-Hall

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... :)

BudapestTRansport

#7
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


Isaac Eiland-Hall

There are two answers to that:

1. You can draw anything. Graphics.

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

BudapestTRansport

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?

whoami

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.

Isaac Eiland-Hall

Quote from: BudapestTRansport 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?

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.

Quote from: whoami 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).

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)

Fabio

Quote from: whoami 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.

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.

The Hood

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!

Fabio

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.

Combuijs

QuoteTo 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...
Bob Marley: No woman, no cry

Programmer: No user, no bugs



Fabio

Quote from: Combuijs on March 17, 2009, 10:36:21 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.

Isaac Eiland-Hall

Quote from: Combuijs on March 17, 2009, 10:36:21 AM
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!




( ;-) )

VS

How would that work with other paks? The system must be flexible enough for all "users".

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Fabio

well, pak64 would have 32*32 base tiles for lanes and tracks, pak96 would be based on 48*48 and so on...

VS

But what if they have different relative sizes? And what about tunnels... and so on.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Fabio

Quote from: VS on March 17, 2009, 01:53:58 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.

Quote from: VS on March 17, 2009, 01:53:58 PM
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.

whoami

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.

Isaac Eiland-Hall

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. ;-)

whoami

Quote from: Isaac.Eiland-Hall 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...
That isn't what I meant - the tile size would remain the same.

Quotethat 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.

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

QuoteAND 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.

Isaac Eiland-Hall

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)

whoami

#26
Quote from: Isaac.Eiland-Hall 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.
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.

QuoteUnless 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.

Isaac Eiland-Hall

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 )

The Hood

Quote from: whoami on March 17, 2009, 11:44:05 PM
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...

Spartanis

#29


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.