Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Mon Nov 19, 2018 4:41 pm

All times are UTC




Post new topic  Reply to topic  [ 33 posts ]  Go to page Previous 1 2
Author Message
 Post subject: Re: Suspended Monorail
PostPosted: Thu Aug 16, 2018 1:23 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Nov 27, 2004 3:05 pm
Posts: 5364
Location: Canada
acs121 wrote:
Maybe we should make a higher depot for the Suspended Monorail...
A revised depot is in my plans, but not yet. The bugs come first.

_________________
wallyweb on tt-forums: Screenshots - Projects - Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018


Top
   
 Post subject: Re: Suspended Monorail
PostPosted: Thu Aug 16, 2018 6:25 pm 
Offline
Engineer
Engineer

Joined: Mon Aug 13, 2018 7:11 pm
Posts: 19
U.N.Owen wrote:
I hope to write required adapter (and explain details) before today evening.
…it's not evening yet, right? ^_^

Is't not a susmon problem. It's a problem of NRT itself. If road/tramtrack has transparency at underlayer level, we can see default road through it. Because compatibility with non-NRT GRF.
Fixe it in each NRT-aware GRF is wrong solution. For each landscape we need to replace bad sprites only once. Therefore we need one global adapter for 4 default landscapes and some specific adapters for additional landscapes.

For defaults Ratt Roads already do it.
For japanese…simplest solution here: ratt-jp.grf in attach. It just replace 19 sprites. This action fixed our problem. And same problem with Ratt Roads in Japanese landscape was fixed too.
However, this also disable default roads. Therefore we need to use here some GRF that provide new NRT roads (yes its Ratt Roads. Also it provide adapter for snow. My quickfix not yet).
Maybe later it will be work without Ratt Roads (we need just replace snowed roads too and provide our own road instead). But now its just "proof of concept".

Valid GRFs order:
  1. Japanese landscape
  2. Ratt Roads
  3. ratt.jp
Also attachment, of course, has susmon-ratt version with transparent underlayer, what works with them all.

acs121 wrote:
Maybe we should make a higher depot for the Suspended Monorail...
Maybe.
That about haul road depot from Road Hog? (you can see it at screenshot with "lawn")

wallyweb wrote:
How do railtypes and NRT code for layering?
Eh? You asked this from me? But I have only little basic knowledge about this… I can only tell how I added it to this project. Here it's explained better, I think…


Attachments:
File comment: Transparent underlayer + ratt-jp.grf
susmon-ratt.zip [115.52 KiB]
Downloaded 19 times
Top
   
 Post subject: Re: Suspended Monorail
PostPosted: Thu Aug 16, 2018 6:46 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Nov 27, 2004 3:05 pm
Posts: 5364
Location: Canada
U.N.Owen wrote:
...
I will look at the contents of your zip later tonight. I will then comment sometime tomorrow. 8)

_________________
wallyweb on tt-forums: Screenshots - Projects - Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018


Top
   
 Post subject: Re: Suspended Monorail
PostPosted: Fri Aug 17, 2018 12:46 am 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Mon Dec 19, 2011 7:54 am
Posts: 432
Location: Washington State, USA
Haven't looked at the zip file yet so I'm sorry if I'm repeating something, but maybe I can help explain how this works.

The way RattRoads "fixes" the grass mismatch is basically just a copy-over from the way I did it in ARRS. Essentially all it is doing is replacing the road sprites in the base set with a set of "blank" landscape tiles via Action A replacement, using a series of conditional checks to determine the current climate, tiletype, and, in the case of OpenGFX+ Landscape, gridline setting. This is why placing RattRoads in the active NewGRF list works even for this set; it is overwriting the base set sprites that are showing through. :)

The thing is, since this method is simply copied straight from ARRS, the result is that those replacement sprites are "hardcoded" into the NewGRF, which is why currently RattRoads is only compatible with OpenGFX, because those are the sprites I used. With NRT however, it MAY be possible, although I haven't actually checked yet, to simply reference the TTD sprite numbers directly instead of having to hardcode a specific set of sprites into the NewGRF, which would eliminate any such compatibility problems. Again, I haven't checked if it works (there may possibly be issues with slopes) but maybe something to look into.

In any case, it isn't a huge deal to fix this little quirk of NRT on a per-GRF basis, it just requires a little bit of extra logic and perhaps a few sprites. And besides, the same issue already exists in vanilla OTTD with tram track sprites, and nobody besides me seemed to notice or even care :mrgreen: Ultimately, each GRF author can choose to deal with it (or not) as they see fit.

_________________
WSF Ferry Set [WIP] || American Road Replacement Set || NightGFX Base Graphics Set || Wasteland [WIP] || RattRoads (NRT Only) || American Bridge Replacement Set [WIP]


Top
   
 Post subject: Re: Suspended Monorail
PostPosted: Sat Aug 18, 2018 8:11 pm 
Offline
Engineer
Engineer

Joined: Mon Aug 13, 2018 7:11 pm
Posts: 19
I have made new version of ratt-jp adapter.
Now it support snow and, as options, provide basic jp roads. In other words, RattRoads is no more required for it (but RattRoads require it for jp landscape).

Andrew350 wrote:
The thing is, since this method is simply copied straight from ARRS, the result is that those replacement sprites are "hardcoded" into the NewGRF, which why currently RattRoads is only compatible with OpenGFX, because those are the sprites I used.
Maybe would be better if you split RattRoads. Now it solves two completely orthogonal tasks.
Sprite adapter don't need to provide 6 different road types (only basics roads as option).
Roads itself require sprite adapter, but in unsupported landscapes/sets it need another adapter anyway (my ratt-jp for japanese for example).
If you move your adapter into separate GRF it will be more flexible.

Andrew350 wrote:
With NRT however, it MAY be possible, although I haven't actually checked yet, to simply reference the TTD sprite numbers directly instead of having to hardcode a specific set of sprites into the NewGRF, which would eliminate any such compatibility problems.
If it real possible it will be great. With this we can make one universal adapter for all and forget about problem.

Andrew350 wrote:
And besides, the same issue already exists in vanilla OTTD with tram track sprites, and nobody besides me seemed to notice or even care
In vanilla, not so much GRF that replace tramstracks. I would not be surprised if only susmon was dealing with this problem before NRT.


Attachments:
ratt-jp.zip [37.68 KiB]
Downloaded 17 times
Top
   
 Post subject: Re: Suspended Monorail
PostPosted: Sun Aug 19, 2018 3:21 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Nov 27, 2004 3:05 pm
Posts: 5364
Location: Canada
U.N.Owen wrote:
wallyweb wrote:
If you see any issues with the file posted in the first post and provided that you have not altered it, then, by all means, post a screenshot and written description here and I will take a look at it.
All versions (original susmon1.1, your susmon2.0, my susmon-ratt) has it. Only your bridge hasn't.
Here:
mono-fail.pngLook like we need to move something from catenary_front to catenary_back.
I just tried this with OpenGFX base set and eGRVTS (for trams) as the only GRF and then I tried grvts in TTDPatch, and saw the same problem. This is not a GRF issue.
Attachment:
Tram Test 1.sav [12.79 KiB]
Downloaded 9 times

Attachment:
Tram Test Bounding Boxes.png
Tram Test Bounding Boxes.png [ 72.19 KiB | Viewed 409 times ]

_________________
wallyweb on tt-forums: Screenshots - Projects - Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018


Top
   
 Post subject: Re: Suspended Monorail
PostPosted: Sun Aug 19, 2018 4:45 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Nov 27, 2004 3:05 pm
Posts: 5364
Location: Canada
Pylon problem solved! :mrgreen:

_________________
wallyweb on tt-forums: Screenshots - Projects - Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018


Top
   
 Post subject: Re: Suspended Monorail
PostPosted: Sun Aug 19, 2018 7:47 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Nov 27, 2004 3:05 pm
Posts: 5364
Location: Canada
U.N.Owen wrote:
wallyweb wrote:
So, I moved the back pylons over to the track sprite.
This hack probably works, but not looks as very good solution. Rails and pylons is complete different things, it would be better to keep them separately.
Actually it is not a hack. It is a solution to a bug that has existed for many years and it is based on a working solution for bridges.

Quote:
For example, if we have this and decide to change track sprites, we cannot just get good sprites from another set but should to add pylons to them too. Situation get worse if they also use this solution and have they own pylons/pillar at the track sprites…
See my notes below. This is a unique project. With NRT we do not have to accommodate other authors' work. Their own NRT will appear as overlays where necessary.

Quote:
wallyweb wrote:
Now if y'all will excuse me, I have a big bunch of sprites to redraw.
…And we will have this problem right now because I changing rails in NRT version.
See my notes below.

Quote:
Eddi wrote:
the "correct" solution here would be to have only one pillar per sprite.
This variant looks much better (if it will work). We should try, I guess.
It will work because I did try it, but for only one sprite. There remains much work to do.

This is about suspended monorails.
Suspended monorails do not have tracks.
I have included the default OpenGFX tracks as a courtesy to those who need the tracks for trams.
This is not an NRT version.

For NRT, I suggest very strongly that there be no tracks included.
If a player wants tracks, they should use a tram type that does have tracks ... and proper tram catenary as well.
NRT supports many tram types and they do not have to be all in one GRF.
Also, for NRT I am thinking about having taller monorail pylons so that the monorail can pass above the rv traffic below.

I realize that you are anxious to get the NRT version completed and I do thank you for that, :bow: but the non-NRT version is far from complete. What I am working on will take several days to complete and test.

_________________
wallyweb on tt-forums: Screenshots - Projects - Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018


Top
   
 Post subject: Re: Suspended Monorail
PostPosted: Sun Aug 19, 2018 11:30 pm 
Offline
Engineer
Engineer

Joined: Mon Aug 13, 2018 7:11 pm
Posts: 19
wallyweb wrote:
For NRT, I suggest very strongly that there be no tracks included.
If a player wants tracks, they should use a tram type that does have tracks ... and proper tram catenary as well.
Tram can pass under monorail. Therefore, I guess, it would be better if we provide two tramtypes: monorail itself and monorail+tram dual. For second type we need tracks.
[+] Spoiler
And now I have a problem with this second type: it's don't want to activate if hasn't vehicles. Props 18/19 has no effect. I'm still not good at GRF coding…


For the rest I will answer tomorrow, now I'm very sleepy.


Top
   
 Post subject: Re: Suspended Monorail
PostPosted: Mon Aug 20, 2018 3:37 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Apr 24, 2004 10:43 am
Posts: 2007
Location: Venezia - Italia
U.N.Owen wrote:
[+] Spoiler
And now I have a problem with this second type: it's don't want to activate if hasn't vehicles. Props 18/19 has no effect. I'm still not good at GRF coding…

And that might be an actual bug with NRT, I was trying to get it right, but I might have skipped some cases.
Also I don't think you can disable a tramtype with 2 compatibilities if one of the 2 vehicle isn't available...

_________________
ImageImage
ImageImage
ImageImage
newgrf tests, see: newgrf test topic, my patches: Wolf01's Hire Point
Italian TTD Forum
Wiki Page


Top
   
 Post subject: Re: Suspended Monorail
PostPosted: Mon Aug 20, 2018 4:21 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Nov 27, 2004 3:05 pm
Posts: 5364
Location: Canada
Wolf01 wrote:
U.N.Owen wrote:
[+] Spoiler
And now I have a problem with this second type: it's don't want to activate if hasn't vehicles. Props 18/19 has no effect. I'm still not good at GRF coding…

And that might be an actual bug with NRT, I was trying to get it right, but I might have skipped some cases.
Also I don't think you can disable a tramtype with 2 compatibilities if one of the 2 vehicle isn't available...

This sounds familiar. In trunk the road GUI will be greyed out until an RV is available. The same for trams. The GRF could be loaded but the GUI will remain greyed out until the first vehicle's available date.
@U.N.Owen ... The first Suspended Monorail vehicle is not available until 1983. What year does your game show?

_________________
wallyweb on tt-forums: Screenshots - Projects - Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018


Top
   
 Post subject: Re: Suspended Monorail
PostPosted: Mon Aug 20, 2018 4:54 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Nov 27, 2004 3:05 pm
Posts: 5364
Location: Canada
U.N.Owen wrote:
wallyweb wrote:
For NRT, I suggest very strongly that there be no tracks included.
If a player wants tracks, they should use a tram type that does have tracks ... and proper tram catenary as well.
Tram can pass under monorail. Therefore, I guess, it would be better if we provide two tramtypes: monorail itself and monorail+tram dual. For second type we need tracks.
In OpenTTD trunk there are no road/tram types. The tram tracks are made available for a player who wants to use trams at the same time as using the suspended monorail. This is done as a courtesy to the player.

NRT makes multiple road/tram types possible so we do not have to offer the courtesy of making trams and tracks available in NRT. The player will find that trams and tracks already exist in other NRT sets. Also, monorail+tram dual does not exist in reality.

Note that NRT makes both trams and trolley buses possible and both can run on the same road, but the trolley bus does not use tracks. It is possible to create a trolley bus set with no trams or tracks and then the player can add a second set that has only trams and that does provide tracks.

_________________
wallyweb on tt-forums: Screenshots - Projects - Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018


Top
   
 Post subject: Re: Suspended Monorail
PostPosted: Thu Sep 20, 2018 4:06 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Nov 27, 2004 3:05 pm
Posts: 5364
Location: Canada
An update:
1. on the back pillar/pylon clipping problem ...
ttdpbase.grf and ttdpbasew.grf introduced tram tracks and catenary as overlays for TTDPatch roads.
Back pillar clipping was there but was never really properly fixed.
When ogfxe_extra.grf introduced the feature to OpenTTD, the problem followed.
A proper fix would be a patch to the source code.
A workaround fix is to move the back pillars over to the tram track overlay sprites.
This has been tested and it works.

2. on the adjacent tile front pillar/pylon clipping problem ...
Eddi wrote:
U.N.Owen wrote:
Here is another example of this bug.
i think what's happening here is that the pillar sprite has two pillars at the beginning and end of tile, so each pillar actually gets drawn twice. once as second pillar of the first tile, and once as first pillar of the second tile.

the "correct" solution here would be to have only one pillar per sprite, and then draw pillars more like rail catenary pillars.

This is indeed the correct solution, however it introduces another problem.
There are four u-turn track tiles to be used at the end of a tram line.
They share the same pillar+catenary sprites as the through track tiles.
With a single pillar, two of the u-turn tiles would have one end with unsupported catenaries.
Zephyris' workaround seems to have been to have the far end pillars drawn so as to overlap the near end pillars of the adjacent tile.
This has been tested and works.
Sorry Eddi. Your suggestion was worth a try and I did it, but those floating u-turn catenaries looked rather strange. Perhaps someday somebody will do a patch so that the u-turns can have their own catenaries instead of sharing with the through tracks.

_________________
wallyweb on tt-forums: Screenshots - Projects - Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 33 posts ]  Go to page Previous 1 2

All times are UTC


Who is online

Users browsing this forum: Google Adsense [Bot] and 7 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

Search for:
Jump to:  
Powered by phpBB © 2000-2018 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2018.
Hosted by Zernebok Hosting.