Rail on/in road [WIP]

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

Post Reply
User avatar
SwissFan91
Tycoon
Tycoon
Posts: 2395
Joined: 08 Feb 2009 18:36
Location: Alberta, Canada

Rail on/in road [WIP]

Post by SwissFan91 »

Basically, I am after this (and this and this) as a railtype. I have talked about it before, many moons ago, but cannot find where for my life after searching so don't get on my back about that! Obviously, the road underneath the rail will not be traversable by cars. It is eyecandy. Possible playing around with level crossing sprites will allow this in some areas, I suppose.

The way I see it - it should be possible. Attached are my thoughts aloud - using Narrow Gauge on roads as an example. The main problems I envisage are when track remains in the same direction but the 'road' needs to be different. See the green tile in Image 1. Clearly, this would be impossible without a work-around - and I propose using waypoints. Whilst not ideal (I don't know how many waypoint slots exist?) it still beats using station tiles. Having waypoints with various graphics for the T-junction and corner combinations it would be possible, I hope.

Now, problems exist with the combination in Image 2. Clearly, trying to branch track off in that direction will mean the game places the tile with the road in the wrong direction. Unless somebody else has a better way around it, I guess this would again have to be solved through using waypoints (Image 3). You may think all of these waypoints will be too much - perhaps they would - but hopefully this rail on/in road will be used sporadically.

Obviously, I propose drawing all of these graphics myself. I would like some of the more cleverererer people to tell me how crazy I am before I draw any sprites! Is any of this possible? :P
Attachments
rail flat.png
rail flat.png (7.86 KiB) Viewed 3468 times
Total Alpine Replacement Set: Industry, Town, Objects
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Rail on/in road [WIP]

Post by wallyweb »

What you are proposing should be doable with nutracks(?). However, much of what you are proposing already exists in the form of tram tracks with the added benefit that the roads are functional. Tram tracks can even be built off road and the drive through road stops fulfill the function of your proposed waypoints.

The only exception that I can see is that in TTDX and OpenTTD, the tram tracks are built in pairs, one on each side of the road.
A question for the developers: Would it be possible to have a single tram track on and off road?
User avatar
SwissFan91
Tycoon
Tycoon
Posts: 2395
Joined: 08 Feb 2009 18:36
Location: Alberta, Canada

Re: Rail on/in road [WIP]

Post by SwissFan91 »

The difference between this and tram tracks is that this would allow trains instead of trams on the streets. So, normal trains can come from the blue narrow gauge rails in my diagram on to the roads and off again. Yes, you may think it is a very rare occurrence IRL, but it does happen.
Total Alpine Replacement Set: Industry, Town, Objects
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Rail on/in road [WIP]

Post by wallyweb »

SwissFan91 wrote:The difference between this and tram tracks is that this would allow trains instead of trams on the streets. So, normal trains can come from the blue narrow gauge rails in my diagram on to the roads and off again. Yes, you may think it is a very rare occurrence IRL, but it does happen.
Indeed it does happen and there are many examples cited right in these very forums. It's not a question of frequency of occurrence but rather of game code implementation. My suggestion would code as tram but draw as train. The hope would be to have the ability to build single tram tracks. For your suggestion it is a simple matter of drawing your tracks but using a road as the railbed. This is already possible with nutracks but you must sacrifice RV access to those roads and for off-road routing, afaik you would have to live with the "roads" roadbed. I don't think a railtype can have more than one roadbed style.
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: Rail on/in road [WIP]

Post by Eddi »

two things about doing this as a newgrf-railtype:

1) you cannot run road vehicles on such a "rail on road"
2) you (currently) cannot vary the road based on what road is adjacent (although there may be a solution coming similar to what is discussed here) so you need a separate railtype for each road combination
User avatar
SwissFan91
Tycoon
Tycoon
Posts: 2395
Joined: 08 Feb 2009 18:36
Location: Alberta, Canada

Re: Rail on/in road [WIP]

Post by SwissFan91 »

Eddi wrote:two things about doing this as a newgrf-railtype:

1) you cannot run road vehicles on such a "rail on road"
2) you (currently) cannot vary the road based on what road is adjacent (although there may be a solution coming similar to what is discussed here) so you need a separate railtype for each road combination
1) Yes, I know. As stated, it would have to be eye candy for now.
2) I thought maybe as rail can detect the road for level crossing sprites it could work like that?
Total Alpine Replacement Set: Industry, Town, Objects
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: Rail on/in road [WIP]

Post by Eddi »

SwissFan91 wrote: 2) I thought maybe as rail can detect the road for level crossing sprites it could work like that?
i think it probably works differently than you think it does.

level crossings are actually road tiles, which draw a special rail sprite, not the other way around.
User avatar
SwissFan91
Tycoon
Tycoon
Posts: 2395
Joined: 08 Feb 2009 18:36
Location: Alberta, Canada

Re: Rail on/in road [WIP]

Post by SwissFan91 »

Eddi wrote:
SwissFan91 wrote: 2) I thought maybe as rail can detect the road for level crossing sprites it could work like that?
i think it probably works differently than you think it does.

level crossings are actually road tiles, which draw a special rail sprite, not the other way around.
Bugger :P

That poses a bit of an issue then. I suppose a long-winded way of doing it would be to just have different grfs for each road type - so have 'Rail on Road - NA roads extension' as a grf. It's not ideal by any means, but we have it for bridge sets and such like.
Total Alpine Replacement Set: Industry, Town, Objects
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: Rail on/in road [WIP]

Post by Eddi »

i mean you don't only need a different railtype for each roadtype, but also for whether the road runs NE/SW or NW/SE or any crossing.
User avatar
SwissFan91
Tycoon
Tycoon
Posts: 2395
Joined: 08 Feb 2009 18:36
Location: Alberta, Canada

Re: Rail on/in road [WIP]

Post by SwissFan91 »

I'm not exactly sure what you mean here. Is it not something that could be solved by waypoints? Maybe you could show me graphically?

I'll try and produce a better graphical representation tonight.
Total Alpine Replacement Set: Industry, Town, Objects
User avatar
Quast65
Tycoon
Tycoon
Posts: 2665
Joined: 09 Oct 2011 13:51
Location: The Netherlands

Re: Rail on/in road [WIP]

Post by Quast65 »

I'm not sure if waypoints or stationtiles can be built with a corner (45 degree) track. So I don't think that image 3 as you suggested is even possible.
You could mimic this using overlapping object tiles where you leave the place where you want tracks "invisible". That way you can also have multiple roadtypes as basetile and it can be custom made for different rail widths.
But that has 2 disadvantages, you need to have space for the actual objecttile (and have to decide what graphics those will have) and off course the glitching.
Projects: http://www.tt-forums.net/viewtopic.php?f=26&t=57266
Screenshots: http://www.tt-forums.net/viewtopic.php?f=47&t=56959
Scenario of The Netherlands: viewtopic.php?f=60&t=87604

Winner of the following screenshot competitions:
sep 2012, jan 2013, apr 2013, aug 2013, mar 2014, mar 2016, oct 2020
All my work is released under GPL-license (either V2 or V3), if not clearly stated otherwise.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Rail on/in road [WIP]

Post by wallyweb »

Did I read Action 0 - Properties for rail types correctly? Several rail types can be made compatible with the same train (or a train can be made compatible with several rail types)?

If this is so, then all SwissFan91 has to do is select a basic rail type (I think he suggested narrow gauge) and then draw his rail-on-road sprites as a new rail type such that the rails match those of his choice of basic rail type.

The only question then would be will the train transition seamlessly from one compatible rail type to the next compatible rail type?
User avatar
SwissFan91
Tycoon
Tycoon
Posts: 2395
Joined: 08 Feb 2009 18:36
Location: Alberta, Canada

Re: Rail on/in road [WIP]

Post by SwissFan91 »

wallyweb wrote:Did I read Action 0 - Properties for rail types correctly? Several rail types can be made compatible with the same train (or a train can be made compatible with several rail types)?

If this is so, then all SwissFan91 has to do is select a basic rail type (I think he suggested narrow gauge) and then draw his rail-on-road sprites as a new rail type such that the rails match those of his choice of basic rail type.

The only question then would be will the train transition seamlessly from one compatible rail type to the next compatible rail type?
These were my exact thoughts! Of course trains can be compatible with several railtypes.. or else none of the nutracks that have railtypes for different speeds would function properly!

Your example with NG are my exact ideas. The main hinderance seems to be the road sprites underneath now...
Total Alpine Replacement Set: Industry, Town, Objects
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: Rail on/in road [WIP]

Post by Eddi »

SwissFan91 wrote:I'm not exactly sure what you mean here. Is it not something that could be solved by waypoints? Maybe you could show me graphically?

I'll try and produce a better graphical representation tonight.
Quast65 is right, you cannot place waypoints on diagonal rail tiles, so you cannot differentiate picture 2 and 3 of your image, so you would need to either introduce two railtypes, or dynamically decide the status based on the adjacent tiles (which you currently cannot access during drawing)

there is another option, btw.: there is an ancient "diagonal crossings" patch, which i have updated about half a year ago, but it is missing the drawing part which i couldn't write, and the old version wasn't compatible with railtypes and stuff, so it couldn't be updated.

i could publish the patch as-is, and someone needs to write the drawing part, then you can make picture 2 and 3 by just placing a road. in theory this might even be extended to full rail-on-(straight)-road, but road vehicles might not have a way to "escape" an incoming train.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Rail on/in road [WIP]

Post by wallyweb »

SwissFan91 wrote:
wallyweb wrote:The main hinderance seems to be the road sprites underneath now...
Is it not possible to draw the rail bed as road instead of gravel or whatever?
User avatar
YNM
Tycoon
Tycoon
Posts: 3574
Joined: 22 Mar 2012 11:10
Location: West Java

Re: Rail on/in road [WIP]

Post by YNM »

wallyweb wrote:
SwissFan91 wrote:
wallyweb wrote:The main hinderance seems to be the road sprites underneath now...
Is it not possible to draw the rail bed as road instead of gravel or whatever?
I thinks that is hardly possible... As rails don't have any bounding boxes, so its OK I think.

Just some questions : How would it be look if I cross a normal track with the "on road" track ? Which one will revert to the other tracktype ? Also junctions... and leaving / entering of track to road graphics.
YNM = yoursNotMine - Don't get it ?
「ヨーッスノットマイン」もと申します。
User avatar
Pilot
General Forums Moderator
General Forums Moderator
Posts: 7629
Joined: 04 Aug 2010 15:48

Re: Rail on/in road [WIP]

Post by Pilot »

What about a standard gauge version too? Such as this:
Image
User avatar
jor[D]1
Director
Director
Posts: 611
Joined: 17 Aug 2010 10:36
Location: Netherlands

Re: Rail on/in road [WIP]

Post by jor[D]1 »

Standard gauge would be nice:
Image
08437022-589 Leek 27 april 1985 by peter_schoeber, on Flickr

But also Iberian broad gauge lol:
Image
1802 by Cllins, on Flickr
View my (train)pictures on Flickr
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Google [Bot], Semrush [Bot] and 17 guests