Patch: Grass growth on unused tracks
Moderator: OpenTTD Developers
Re: Patch: Grass growth on unused tracks
The grass seems to clear ahead of a locomotive. Wouldn't it be more logical if the grass would disappear behind a locomotive/train?
-
- Transport Coordinator
- Posts: 333
- Joined: 25 Aug 2005 09:44
- Location: Eindhoven, Netherlands
Re: Patch: Grass growth on unused tracks
Yes, but there is no 'Vehicle Leave Tile' callback where I can do thatMJS wrote:The grass seems to clear ahead of a locomotive. Wouldn't it be more logical if the grass would disappear behind a locomotive/train?
- White Rabbit
- Tycoon
- Posts: 1734
- Joined: 22 Jun 2005 19:15
Re: Patch: Grass growth on unused tracks
If you know the speed of the train, you could calculate the 'when', I guess.
Something completely different: overhead wires now go only straight ahead at a junction if the next tile on the diverging line is non-electrified. However, grass does not grow on the first bit of a side track if the main track is without grass. That's a pity, actually, isn't it? Do you think the same method could be implemented here as for the overhead wires?
Something completely different: overhead wires now go only straight ahead at a junction if the next tile on the diverging line is non-electrified. However, grass does not grow on the first bit of a side track if the main track is without grass. That's a pity, actually, isn't it? Do you think the same method could be implemented here as for the overhead wires?
-
- Transport Coordinator
- Posts: 333
- Joined: 25 Aug 2005 09:44
- Location: Eindhoven, Netherlands
Re: Patch: Grass growth on unused tracks
Not a bad idea at all my friend, not bad at all...MJS wrote:Do you think the same method could be implemented here as for the overhead wires?
Re: Patch: Grass growth on unused tracks
Thank you And while you're on the case: you've surely noticed tunnels are also without grass.
Re: Patch: Grass growth on unused tracks
Yeah, I only did basic sprites for the initial coding. I havent done tunnels etc. yet. Obviously if people like the grass Ive done I can do more for the rest of the tiles. One thing that is a shame is that its done by tile and not by track piece so crossing tracks will be clean and so will vertical ones, like in your picture. Im sure its possible eventually though.
Edit: In fact, I think you may be able to use the standard overlays on the tunnel tiles too. Boekabart might be able to advise us on this.
Edit: In fact, I think you may be able to use the standard overlays on the tunnel tiles too. Boekabart might be able to advise us on this.
-
- Transport Coordinator
- Posts: 333
- Joined: 25 Aug 2005 09:44
- Location: Eindhoven, Netherlands
Re: Patch: Grass growth on unused tracks
I think we can - did not do this yet, though.Ben_K wrote:In fact, I think you may be able to use the standard overlays on the tunnel tiles too. Boekabart might be able to advise us on this.
I've implemented the idea mentioned above. Now, a track piece (per piece!) will not show 'less growth' than the amount of growth 'stored' in its neighboring tracks. This will usually not effect the main line, but that switch track to the not-so-often used sideline will get the maximum of the main track and the first tile of the sideline, which will be the amount of growth on the sideline.
Positive side effects:
* Vehicle 'seems to' no longer clear the track in front of it, but under it (in fact it DOES, it just doesn't show
* Parallel 'diagonal' tracks are no longer a dotted line of growth and not.
Cost in map-bits: 0. Just a little more complicated drawing code!
Enjoy!
- Attachments
-
- Positive effects shown here!
(Please ignore the spaces between the cars - it's another experiment I'm doing) - bb_OldTracks_v9_FancySwitches.png (92.6 KiB) Viewed 4907 times
- Positive effects shown here!
-
- bb_oldtracks_v9_r11226.diff
- (9.75 KiB) Downloaded 133 times
-
- Route Supervisor
- Posts: 415
- Joined: 07 Oct 2004 10:05
Re: Patch: Grass growth on unused tracks
Nice update, I'll also update the code used in ChrisIN. Also another question as I got it from a ChrisIN user. Is it possible to make this patch optionable, i.e. disable/enable it with a patch option so if you don't like the grass or eventually have an ultra slow computer which needs every bit of performance you can turn it off?
-
- Transport Coordinator
- Posts: 333
- Joined: 25 Aug 2005 09:44
- Location: Eindhoven, Netherlands
Re: Patch: Grass growth on unused tracks
I'll think about it, I wouldn't know why not, and agree that it should be an optional thing.chrissicom wrote:NIs it possible to make this patch optionable, i.e. disable/enable it with a patch option so if you don't like the grass or eventually have an ultra slow computer which needs every bit of performance you can turn it off?
Re: Patch: Grass growth on unused tracks
i like the idea but its not complete, so a setting to turn it off would be nice
look at the station and the tunnels and you see what i mean
look at the station and the tunnels and you see what i mean
- Attachments
-
- Confuse a Cat Ltd., 13th Dec 1955.png (178.9 KiB) Viewed 1224 times
-
- Transport Coordinator
- Posts: 333
- Joined: 25 Aug 2005 09:44
- Location: Eindhoven, Netherlands
Re: Patch: Grass growth on unused tracks
I see that you constructed a lot for nothing!zooks wrote:look at the station and the tunnels and you see what i mean
But seriously - I doubt that I'll be able to get it to work for stations, probably there won't be space in the map array for this (anyway they do keep stations clean ). Tunnels can be expected to be done tomorrows, just like the patch setting (or transparency option in fact - since the patch doesn't change any behavior at all).
I also notice another bug in your screen shot: for some tracks on slopes, the offset isn't calculated correct. I'll take a look at that too.
Re: Patch: Grass growth on unused tracks
i love doing thatI see that you constructed a lot for nothing!
thats where most of my hours go..
Re: Patch: Grass growth on unused tracks
With regard to stations, I know my overlays will look daft. They are wider than the track gap and would overlap the platforms! I suppose that may be justification to use just rusty tiles for the 1st stage and then limit the station to only stage 1 of growth? What do you think Boekabart? If you like it, I'll do some rusty track overlays.
I think it has to be an on/off patch option. Especially if we want it in trunk one day (Which I do!). I would also like to see each stage configurable so that I can change how soon the tracks get overgrown. Im guessing its possible with some work?
I think it has to be an on/off patch option. Especially if we want it in trunk one day (Which I do!). I would also like to see each stage configurable so that I can change how soon the tracks get overgrown. Im guessing its possible with some work?
-
- Transport Coordinator
- Posts: 333
- Joined: 25 Aug 2005 09:44
- Location: Eindhoven, Netherlands
Re: Patch: Grass growth on unused tracks
The problem is that I'm not sure whether station tiles have the 8 bits that it requires to keep track of the track usage. If not, I would have to take the track usage from both ends of the station -> might be a bit slow for a drawing function.Ben_K wrote:What do you think Boekabart? If you like it, I'll do some rusty track overlays.
On/off: I agree completely.Ben_K wrote:I think it has to be an on/off patch option. Especially if we want it in trunk one day (Which I do!). I would also like to see each stage configurable so that I can change how soon the tracks get overgrown. Im guessing its possible with some work?
Configurable: At this moment, I don't think it's very useful configuring the formula used to calculate the 'track usage number', which ranges from 0 to 255, 0 being 'used often and recent', since it's quite well balanced already, I think.
This number currently is divided by 64, resulting in the 4 growth stages (0..63 being no growth). Those threshold, currently at 64,128 and 192, could be configurable, I suppose - at a slight performance cost.
Re: Patch: Grass growth on unused tracks
Hmmm... I just have the feeling that different people would probably like different levels of grass. If it affects the patches usability then leave it.
-
- Transport Coordinator
- Posts: 333
- Joined: 25 Aug 2005 09:44
- Location: Eindhoven, Netherlands
Re: Patch: Grass growth on unused tracks
I'm not sure I understand what you mean by 'different levels of grass'.Ben_K wrote:Hmmm... I just have the feeling that different people would probably like different levels of grass. If it affects the patches usability then leave it.
Re: Patch: Grass growth on unused tracks
I think he means:boekabart wrote:I'm not sure I understand what you mean by 'different levels of grass'.
No grass
A little grass
More grass
Lots of grass
- athanasios
- Tycoon
- Posts: 3138
- Joined: 23 Jun 2005 00:09
- Contact:
Re: Patch: Grass growth on unused tracks
I personally think that the last stage is too much. I would like to have the option (in grf config. window) to exclude it.
Since Dave Worley has already done a rusty grf maybe you cooperate with him?
Since Dave Worley has already done a rusty grf maybe you cooperate with him?
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
"If no one is a fool I am also a fool." -The TTD maniac.
I prefer to be contacted through PMs. Thanks.
Re: Patch: Grass growth on unused tracks
Grass in the desert also looks a bit silly, haven't tested snow yet. Any chance you can adjust the colour of the 'grass' to the colour of the tile it is on?
Who is online
Users browsing this forum: No registered users and 41 guests