It is currently 28 Mar 2024, 14:14

WELCOME TO SIMUSCAPE!


Please Sign in or Register to enable all features, remove restrictions and gain additional access!
For information on how to bypass the CAPTCHA or to contact Team Simuscape, Continue Here!


Post a new topicPost a reply Page 1 of 1   [ 20 posts ]
Author Message
PostPosted: 19 Jun 2012, 23:24 
Player
Player
User avatar

Joined: 06 Mar 2012, 21:55
Posts: 480
Location: The Netherlands
After seeing a screenshot by OZtrans I got an idea and a question.

Is it possible to have multiple sorts of tunnels in OTTD, for example depending on tracktypes?

I'm wondering because now I have found out how to compile the game myself I have found a way to eliminate the (un)loading time penalty that you get when a train is longer than the platform in OTTD. (in OTTD trains unload a lot slower when the platforms are too short, TTDLX doesn't have this feature) And so it is possible to have trains stop in a tunnel with just a couple of stationtiles at the end, which could be used to mimic underground trainstations. Like this:
Attachment:
tunnelstation01.png
tunnelstation01.png [ 194.32 KiB | Viewed 17652 times ]


But I would like the tunnels to match the platforms a bit, so they look like an integrated part of the station and would also like to have different styles of tunnels in the non urban areas. Is this possible in OTTD?


Top
 Offline Profile  
 
PostPosted: 20 Jun 2012, 07:47 
Master Mentor
User avatar

Joined: 27 Feb 2012, 22:45
Posts: 1880
Location: Canada
Quast65 wrote:
... Is it possible to have multiple sorts of tunnels in OTTD, for example depending on tracktypes?

...

But I would like the tunnels to match the platforms a bit, so they look like an integrated part of the station and would also like to have different styles of tunnels in the non urban areas. Is this possible in OTTD?
An interesting question. Have you poked about any of the tt-forums topics such as [OpenTTD] NuTracks - Dev Thread?

_________________
Visit SimuSchool - Tutorials, Questions and Answers
TTDPatch Nightlies Downloads are back
Thrive


Top
 Offline Profile  
 
PostPosted: 20 Jun 2012, 07:49 
Player
Player

Joined: 12 Mar 2012, 02:39
Posts: 469
Each rail type can have one style of tunnel portals only. There is no information available, whether the tunnel is near a city or in an urban area.

You could, however, have a special rail type "Underground Station", that looks and feels the same as a normal rail type, but with different tunnel portals.


Top
 Offline Profile  
 
PostPosted: 20 Jun 2012, 08:40 
Simuscape Admin
User avatar

Joined: 15 Sep 2011, 09:25
Posts: 3033
Location: Sweden
...or do as I do... simply "hide" the tunnels with appropriate "station buildings"! Here's an image from Olympia Centralstation where all main railroad lines are meeting up, including the local metro system;

Attachment:
INFRA700.png
INFRA700.png [ 533.24 KiB | Viewed 17641 times ]

As you can see there are three levels of railroads in this station, hence being the main connection of all main railroad lines in this "nation". One level for intercity trains with only three tiles in length, (hidden behind that large building), another level for local commuter trains, (the large station hall building), and a third one for the metro system on the highest level. Not visible here are the railroads for freight trains, using the lowest level - all of it to avoid different train types to create bottle necks or other issues...

Anyway, having 10 platforms for all these different railroad systems fully visual would not look very nice - and take up way to much space for a realistic approach - hence the idea to "hide" some of it in tunnels with only a few tiles visible on the surface... :P

_________________
Image

Simuscape - A world of its own;
SimuTalk | Visual Studio | INFRA Diary

INFRA - Chose Your Destination;
INFRA Projects | INFRA Downloads


Top
 Offline Profile  
 
PostPosted: 20 Jun 2012, 10:40 
Player
Player
User avatar

Joined: 06 Mar 2012, 21:55
Posts: 480
Location: The Netherlands
@OzTrans: That was indeed the idea to get a tracktype called underground station. I have however not found a trackset yet that uses different styles of tunnels for each tracktype. Not even NU-tracks does that. Thats why I was wondering if it is already possible. But it doesn't look like any of the railtypedevelopers are working on that, too bad in my opinion. Ahh well, guess I'll draw a tunnel that looks best for both rural and urban.

@SAC: That is indeed a good way to hide the tunnels. But in my case the tunnelentrances wouldn't neccessarily have to be hidden, just more visually connected to the platforms. I'll see what I can draw up.

By the way, for the people who are wondering how I got rid of the (un)loading time penalty for trains that are longer than the stationplatforms:

I searched around a bit on the OTTD-forum and found that this feature is in the economy.cpp file that can be found in the SRC folder of an uncompiled OTTD source. I opened that file with a texteditor and searched for "overhang". And then deleted the lines marked in blue:
Attachment:
03.png
03.png [ 76.16 KiB | Viewed 17639 times ]

After that I apllied a patch I wanted (the signals in tunnels patch) and compiled, which worked fine for me (with release version 24031, might not work with other versions)


Top
 Offline Profile  
 
PostPosted: 20 Jun 2012, 13:50 
Master Mentor
User avatar

Joined: 27 Feb 2012, 22:45
Posts: 1880
Location: Canada
OzTrans wrote:
Each rail type can have one style of tunnel portals only. There is no information available, whether the tunnel is near a city or in an urban area.

You could, however, have a special rail type "Underground Station", that looks and feels the same as a normal rail type, but with different tunnel portals.
Here's a thought ... Perhaps the NU-tracks team never thought to try varying the tunnels according to rail type. Determine one of their rail types that you would never use, rename it "rural" but use the same tracks as for standard and then redraw some tunnels for the "rural" tracks.

_________________
Visit SimuSchool - Tutorials, Questions and Answers
TTDPatch Nightlies Downloads are back
Thrive


Top
 Offline Profile  
 
PostPosted: 20 Jun 2012, 15:59 
Player
Player
User avatar

Joined: 06 Mar 2012, 21:55
Posts: 480
Location: The Netherlands
Sadly there aren't any tunnelgraphics in the NU-tracks GRF to redraw/replace, I guess they use the standard tunnel from the basic graphics.

But I have been (re)drawing a bit and made a tunnel that looks great in urban environments and not too bad in rural environments. So that can satisfy my needs for now ;-)

I have not drawn all the sprites myself, used the tunnel from Japan set as base and added the road from the UK-roadset (the roadset I standard use in my games) and used a platform from the Modern Stations Set (so that I can use the MSS-tiles at the ends of the tunnel), but did recolor a lot and got rid of some minor graphic glitches.

I have checked the licences of those sets and they should be ok to use, but I did send the artists PM's requesting permission to use their graphics. If that all clears, I'll make a GRF public.

But here is a taste:

In urban environment
Attachment:
RailtunnelwithUKroad02.png
RailtunnelwithUKroad02.png [ 155.48 KiB | Viewed 17632 times ]


In rural environment
Attachment:
RailtunnelwithUKroad03.png
RailtunnelwithUKroad03.png [ 125.23 KiB | Viewed 17632 times ]


NOTE: the road on top of the tunnel is pure eyecandy, can not be used by vehicles to drive over.


Top
 Offline Profile  
 
PostPosted: 20 Jun 2012, 17:43 
Simuscape Admin
User avatar

Joined: 01 May 2012, 11:38
Posts: 580
SAC wrote:
Here's an image from Olympia Centralstation where all main railroad lines are meeting up, including the local metro system;
:o Wow, just wow. My jaw is at my feet now with drool all over the floor. Very nice graphics!

Quast65 wrote:
But here is a taste:
Looks really nice. However, there is an blue border on either side of the road across the tunnel-entrances. How about you make them similar to the pavement by the roads?

_________________
Image

Simuscape
Site Admin & Developer


Top
 Offline Profile  
 
PostPosted: 20 Jun 2012, 18:29 
Master Mentor
User avatar

Joined: 27 Feb 2012, 22:45
Posts: 1880
Location: Canada
Quast65 wrote:
NOTE: the road on top of the tunnel is pure eyecandy, can not be used by vehicles to drive over.
Now that you can compile and use OTTD patches you might want to check out cirdan's New map features patch:
cirdan wrote:
So far, these are the main new features provided by the patch:

Parallel tracks of different railtypes on the same tile
Custom road bridgeheads
Custom rail bridgeheads, including signals

;)

_________________
Visit SimuSchool - Tutorials, Questions and Answers
TTDPatch Nightlies Downloads are back
Thrive


Top
 Offline Profile  
 
PostPosted: 20 Jun 2012, 18:37 
Player
Player
User avatar

Joined: 06 Mar 2012, 21:55
Posts: 480
Location: The Netherlands
Quote:
However, there is an blue border on either side of the road across the tunnel-entrances. How about you make them similar to the pavement by the roads?


Already done ;-) Wanted to see how it would look with the blue borders (those were from the original Japan set tunnel), but didn't like it.

Quote:
Now that you can compile and use OTTD patches you might want to check out cirdan's New map features patch:


Will do!! Thnx for the tip!


Top
 Offline Profile  
 
PostPosted: 20 Jun 2012, 18:43 
Master Mentor
User avatar

Joined: 27 Feb 2012, 22:45
Posts: 1880
Location: Canada
Quast65 wrote:
Will do!! Thnx for the tip!
:W
Beware of the patch version. It might be earlier than the one you used to adjust the unloading.

_________________
Visit SimuSchool - Tutorials, Questions and Answers
TTDPatch Nightlies Downloads are back
Thrive


Top
 Offline Profile  
 
PostPosted: 20 Jun 2012, 19:47 
Player
Player

Joined: 12 Mar 2012, 02:39
Posts: 469
Quast65 wrote:
... I have however not found a trackset yet that uses different styles of tunnels for each tracktype. Not even NU-tracks does that. Thats why I was wondering if it is already possible.
I haven't seen anything either, but it is possible, although you've got to create the rail type set yourself.

You would only need a small universal rail type set, that just covers the 'tunnel portals' for the underground station.


Top
 Offline Profile  
 
PostPosted: 22 Jun 2012, 00:13 
Lurker
Lurker
User avatar

Joined: 21 Jun 2012, 20:22
Posts: 61
OzTrans wrote:
Quast65 wrote:
... I have however not found a trackset yet that uses different styles of tunnels for each tracktype. Not even NU-tracks does that. Thats why I was wondering if it is already possible.
I haven't seen anything either, but it is possible, although you've got to create the rail type set yourself.

Indeed its possible... I have seen it!


Top
 Offline Profile  
 
PostPosted: 28 Jun 2012, 14:58 
Player
Player
User avatar

Joined: 06 Mar 2012, 21:55
Posts: 480
Location: The Netherlands
The artists of the graphics I have used to make this tunnel have all given their kind permission to use their work, so the tunnel GRF is public and can be found here: http://www.tt-forums.net/viewtopic.php? ... 0#p1031128

Looks like this ingame:
Attachment:
Traintunnel with UK-road02.png
Traintunnel with UK-road02.png [ 63.87 KiB | Viewed 17585 times ]


Top
 Offline Profile  
 
PostPosted: 29 Jun 2012, 00:07 
Player
Player

Joined: 12 Mar 2012, 02:39
Posts: 469
Are you sure your nice tunnels work without graphical glitches ?

You should remove the road from sprites 3 + 9; and remove the rear platform and rear wall from sprites 4 + 10.

The sprites should look similar to the ones below. You should also supply (update) sprites 74 + 76.
Attachment:
Tunnel Sample.png


Top
 Offline Profile  
 
PostPosted: 29 Jun 2012, 14:14 
Player
Player
User avatar

Joined: 06 Mar 2012, 21:55
Posts: 480
Location: The Netherlands
Except for one minor graphical issue (I'll come to that later), there are no major glitches (At least not in OTTD, if there is a problem in TTDX I'd like to hear that)

- Remove road sprite 3 and 9: I have used the tunnelgraphics from the Japan Set as a base, they had a sort of road drawn there, so thats why I also have a road there. This makes no glitches in an OTTD game (it's just an extra layer, with the same graphic that has already been provided by another sprite. So it is double, but has no consequences). I think it would only be a problem if RV's could drive over that (but that is not possible yet in OTTD)

- Rear wall and platform sprite 4 and 10: Those are there to fix a graphical glitch, but also made a small graphical glitch ;-) . The fix: When roads are drawn next to the tunnel, the foundations of that roadtile could be seen in the rear tunnelwall (I think the Japan set tunnel is just a bit too wide). The easiest fix was to draw the rear wall into sprite 4 and 10. The glitch: The platform cuts of a tiny bit of the train passing through (1 or 2 pixels), I will remove that platform, so the train doesn't get cut off. But keep the wall, so you still won't have the problem with the foundations of the next tile being shown.

- Providing sprite 74 and 76: Not really necessary, In the code (I code in NFO, using Action 0A) I have 3 replacementlines. One for replacing sprite 72 and 73, one for replacing 75 and one for replacing 77, 78 and 79. As this tunnel is so big, the basegraphics that are in 74 and 76 are overlapped by the new graphics and therefore not visible anymore and don't have to be replaced. Allright, it is a nicer way of coding/drawing to replace them with small dots to keep it clear for others looking at the code and the graphics, what graphics are replaced. I think I'll do that in the version that I have to make to fix the graphic error from the platform (and some greens in the road that I forgot to recolor, as pointed out by someone in the TT-forums).

Thanks for your comments though, they will only make this a better GRF!


Top
 Offline Profile  
 
PostPosted: 29 Jun 2012, 22:53 
Player
Player

Joined: 12 Mar 2012, 02:39
Posts: 469
No graphical glitches ! Well, I see them very easily ...
Attachment:
Graphical Glitches.png

Platform 4 : the rear platform in the tunnel is drawn over my station tile in front of it. Or, is it misaligned ?
Platform 3 and 2 : the white safety line on the rear platform half is drawn over my trains and it blinks on and off while the train is moving.

Reason, the rear wall and rear platform half are part of the roof and not the track sprite.

You should not draw overlapping parts. I hear a lot about performance problems; why draw (in game) things twice if once is sufficient. These tiny little things do count even on fast PCs.

Attachment:
Tunnel Sample.png

This tunnel fits nicely together, nothing overlaps. Also, sprite 74 (a single transparent dot) is there to eliminate the never visible track for performance reasons and have that tunnel replacement complete as it should be.

I have modified one of your tunnels to fit nicely by simply removing exess parts; however they do not really fit. I believe the track sprite should be a touch longer.
Attachment:
Tunnel Sprites.png

You said quite correctly, that you need that rear wall to cover the foundations of nearby tiles. But, that rear wall and platform half should go with sprite 9 and not 10.

quast65 wrote:
I have to make to fix the graphic error from the platform (and some greens in the road that I forgot to recolor, as pointed out by someone in the TT-forums). ...
Isn't the fence on the mountain side of the tunnel in the wrong location ? It is between road and footpath. I believe it should be between footpath and grass.


Top
 Offline Profile  
 
PostPosted: 01 Jul 2012, 20:03 
Player
Player
User avatar

Joined: 06 Mar 2012, 21:55
Posts: 480
Location: The Netherlands
Thnx for taking the time to look so closely at my sprites!

Regarding the issues you found:

* The rear platform is drawn and alligned correctly, the front platform was wrong actually (was too long). The glitch you described is caused by the stationtiles that are lower than the platforms that I used. Because of the front platform being too long, it looked like that platform is the same hight as the stationtiles, which is not correct. See attached pic how it looks now with high and low stationtiles next to it.

* Cutting of pixels of the passing trains should be fixed now.

* I have coded it now that it also replaces the two sprites you mentioned with blue dots.

* Removed most of the overlapping pixels.

And I also changed some other things after constructive comments at the TT-forums (no more green pixels on the road and pavement, fence only at entrance/exit tunnel)
Furthermore, there was a member at the TT-forums so kind to code it into a railtype! So it doesn't change all the tunnels anymore! He is also working on a code that makes the tunnel roadtype aware, so it will match other roadtypes too. My new sprites will be there soon.

This is how it looks now:
Attachment:
Traintunnel with UK-road03.png
Traintunnel with UK-road03.png [ 81.65 KiB | Viewed 17537 times ]


Top
 Offline Profile  
 
PostPosted: 02 Jul 2012, 02:32 
Moderator
User avatar

Joined: 29 Feb 2012, 00:55
Posts: 1770
Location: Hellas
It is very nice. I guess soon we will need even more railtypes for all that nice stuff developed.


Top
 Offline Profile  
 
PostPosted: 02 Jul 2012, 20:51 
Artists Guild Team

Joined: 02 Mar 2012, 12:10
Posts: 75
It is only possible to use different tunnel portals per track type. Something like this is done in Snails French narrow-gauge track set.

The only track type elements which might be modifed by age/year or town zone are depots resp level crossings.

regards
Michael


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 20 posts ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


Status SimuscapeTerms of UseAbout Simuscape

Design by SAC © 2012-2015, Sweden • Powered by phpBB • Based on twilightBB by Daniel St. Jules