Rail Type Question

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
User avatar
Railwaymodeler
Tycoon
Tycoon
Posts: 2111
Joined: 23 Dec 2004 18:31
Location: Wisconsin, USA

Rail Type Question

Post by Railwaymodeler »

With the new Docklands GRF and New Road Types, a big step in good looking industrial areas has been made. But there is still one big issue, at least for me.

Tracks leading into industrial areas have to be straight. No curves after entering the paved areas, otherwise there's this big, unexplained, grassy area under the curve. Now granted a well placed large shed can hide it, but that does not always work out. And frankly, I would like to have just two tracks coming in and out of the area, with ladder switches within the industrial zone, not outside. My zones tend to be fully paved, with a security fence around the edge, and having switches and siding outside of that fence is a bit illogical.

Is it possible for a new track type to cover an entire tile around the track? My idea is an ISR track type, so switches and curves would have pavement under them. I could probably draw it, but I am curious if it is even possible or would work?
Without Trains America Stops

Image
Image
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 988
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: Rail Type Question

Post by frosch »

For drawing track on flat tiles, these sprites are used:
https://newgrf-specs.tt-wiki.net/wiki/N ... s#underlay

This kind of means that as long as you only build one horizontal/vertical track on a tile, you can fill the rest with whatever ground.
But if you build two parallel track pieces, two of the sprites 2-5 are drawn and one will overdraw/hide the track of the other one.

So, no, it is not really possible.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
oberhümer
Tycoon
Tycoon
Posts: 1283
Joined: 23 Oct 2009 19:35
Location: Here and there, sometime or another

Re: Rail Type Question

Post by oberhümer »

I think this is as good as it gets (Japan Set 3 "urban" tracks). You could use overlapping object/station tiles to cover the tile halves that remain grassy, but I'm not aware of any that fit.
Attachments
jset3.png
jset3.png (33.8 KiB) Viewed 2198 times
--- Licenses: GNU LGPL, version 2 or newer, code and graphics. CC-By-SA, graphics, alternatively. If you're using any, I'd like to hear about it --- Call them "track types" ---
--- Mostly inactive developer for: NuTracks - Central European Train Set --- Running/compiling for: Linux (x86) - Android - Windows (32/64 bit) ---

--- Need a file packer? 7-Zip --- BOINC - use your computing power to benefit science --- Block trackers, not ads --- Unix in dispersible pellets, the formula for the future. ---
User avatar
Railwaymodeler
Tycoon
Tycoon
Posts: 2111
Joined: 23 Dec 2004 18:31
Location: Wisconsin, USA

Re: Rail Type Question

Post by Railwaymodeler »

Well, since my idea, as it stands, is pretty much not possible, the next question I would have then, is it possible to have track tiles that are aware of what they are next to? For example, when you build a depot next to a piece of track running perpendicular to the depot entrance/exit, it also places two corner pieces of track to connect the existing line to the depot, so that depot must be aware that track exists in the square in front of it, and if you place it in front if a diagonal piece of track, it places the appropriate entry tracks then too. So since that is possible and has existed since the days of regular Transport Tycoon (Pre-Deluxe or World Edior days), then in theory, it might be possible to control background sprites based on what is nearby. This would mean separate sprites for tiles containing one vertical track and tiles containing two vertical tracks.

My other idea would be to have ground types. Obviously OpenTTD can handle different types of ground in game, as Tropic and Arctic climates feature it. Is there anything in the works, any fork builds that feature customizable types of ground? Replace grass around industries with a different type of ground. We have rail types, road types, to an extent, water types (Depending how you look at it - FISH can tell the difference between regular water and canal and adjust ship speed accordingly. Not sure if that counts or not). Ground types would be interesting. If, for example, on a very large map I wanted to mark an industry for inclusuion in a future expansion of my transport network, I might add some mud/dirt around it, convert that ground to concrete when I actually build.

I know some of this might sound a bit "Pie in the sky" but I can remember the time when people thought higher bridges were impossible. And well, look what we have now.
Without Trains America Stops

Image
Image
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Rail Type Question

Post by wallyweb »

This sounds like that perennial question: Why can't we have diagonal station platforms? I would suggest that the problem is similar to why we can't have diagonal bridges and tunnels. Accommodating parallel structures for double tracking would be very difficult to code, but then custom bridgeheads and enhanced tunnels were once considered impossible as well.
User avatar
Railwaymodeler
Tycoon
Tycoon
Posts: 2111
Joined: 23 Dec 2004 18:31
Location: Wisconsin, USA

Re: Rail Type Question

Post by Railwaymodeler »

Well, what about new types of ground that are user-buildable, but like any other clear ground in game, can be built on?

Yeah, I never thought much about diagonal platforms, but that would be kind of nice, diagonal bridges especially so, but the other big issue with eithr of those is that bridge and station sets would require new graphics. And God knows if the authors of the popular sets of them that are often used, would do it?
Without Trains America Stops

Image
Image
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 26 guests