Patch: Grass growth on unused tracks

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
boekabart
Transport Coordinator
Transport Coordinator
Posts: 333
Joined: 25 Aug 2005 09:44
Location: Eindhoven, Netherlands

Patch: Grass growth on unused tracks

Post by boekabart »

After the discussion on Suggestions, http://www.tt-forums.net/viewtopic.php?t=32233, I decided to go ahead and try something.

Ben_K supplied me with a makeshift png of which I was able to make the attached grf file, with 3 levels of growth on X and Y tracks. The code is in place for all track pieces though, as soon as someone finishes all the sprites! (the grf has placeholders for them, the code has the drawing of them commented)

I decided to use 8 bits total, currently _me.m7 but that can be replaced with the high 8 bits of _m.m2 I guess. (code commented)

Let me know what you all think!

[Edit: attached lasted version]
[Edit: attached lasted version r17778]
Attachments
Shows 3 levels of overgrowth, I think. The track where the train goes stays clear.
Shows 3 levels of overgrowth, I think. The track where the train goes stays clear.
bb_oldtracks_v1_shot1.png (77.24 KiB) Viewed 54862 times
oldtracks_grf.zip
Updated, with growth for all rail directions for normal rails. 1 type for all climates...
(11.15 KiB) Downloaded 2016 times
boekabart_grassOnTracks_r17778.diff
Latest Diff
(10.51 KiB) Downloaded 751 times
Last edited by boekabart on 16 Oct 2009 12:05, edited 5 times in total.
DeletedUser21
Tycoon
Tycoon
Posts: 11501
Joined: 20 Sep 2004 22:45

Post by DeletedUser21 »

Is it me or is this odd? :P

Same goes for the piece of track at the first depot.

But that would be hard to make I guess. :wink:
boekabart
Transport Coordinator
Transport Coordinator
Posts: 333
Joined: 25 Aug 2005 09:44
Location: Eindhoven, Netherlands

Post by boekabart »

Mr. X wrote:But that would be hard to make I guess. :wink:
It would mean a big load on the free space in the map array; the question is whether it'd be worth it.
User avatar
Sionide
Director
Director
Posts: 523
Joined: 10 Oct 2004 10:54
Location: England
Contact:

Post by Sionide »

I like that... What happens when a train goes over old tracks that have grass on them??
a big load on the free space in the map array
Same as elrails does? (or does it? I don't know...) That's pretty much eye-candy too..
Last edited by Sionide on 31 May 2007 13:45, edited 1 time in total.
...Synthetic Intelligent Organism Normally for Infiltration and Dangerous Exploration...
...sionide.net...
boekabart
Transport Coordinator
Transport Coordinator
Posts: 333
Joined: 25 Aug 2005 09:44
Location: Eindhoven, Netherlands

Post by boekabart »

Sionide wrote:I like that... What happens when a train goes over old tracks that have grass on them??
It cleans the track up a bit. Enough trains will clean it up completely. ToDo: slow down trains on heavily overgrown tracks, until cleared.
User avatar
Sionide
Director
Director
Posts: 523
Joined: 10 Oct 2004 10:54
Location: England
Contact:

Post by Sionide »

Also, does the grass appear slowly over time - or does the grf just suddenly change... obviously only affecting tracks in the current viewport...?

Nice though, I'll get the patch on my SVN build later.
...Synthetic Intelligent Organism Normally for Infiltration and Dangerous Exploration...
...sionide.net...
Chicago Rail Authority
Traffic Manager
Traffic Manager
Posts: 134
Joined: 09 Nov 2006 23:38

Post by Chicago Rail Authority »

boekabart wrote:ToDo: slow down trains on heavily overgrown tracks, until cleared.
Cool. Perhaps a similar concept could work with snow? :)
Many thanks to those who make OTTD and TTDP possible.
User avatar
Sionide
Director
Director
Posts: 523
Joined: 10 Oct 2004 10:54
Location: England
Contact:

Post by Sionide »

rename the patch "Mother Nature" :p
...Synthetic Intelligent Organism Normally for Infiltration and Dangerous Exploration...
...sionide.net...
boekabart
Transport Coordinator
Transport Coordinator
Posts: 333
Joined: 25 Aug 2005 09:44
Location: Eindhoven, Netherlands

Post by boekabart »

Sionide wrote:Also, does the grass appear slowly over time - or does the grf just suddenly change... obviously only affecting tracks in the current viewport...?
There are 3 phases with only slight differences between each of them. When it changes, it gets redrawn immediately.
boekabart
Transport Coordinator
Transport Coordinator
Posts: 333
Joined: 25 Aug 2005 09:44
Location: Eindhoven, Netherlands

Post by boekabart »

Updated Map Accessors to match standards (better, at least).
Attachments
bb_oldtracks_v2_r9996.diff
Updated Map Accessors to match standards (better, at least).
(6.96 KiB) Downloaded 513 times
boekabart
Transport Coordinator
Transport Coordinator
Posts: 333
Joined: 25 Aug 2005 09:44
Location: Eindhoven, Netherlands

Post by boekabart »

Another update, changed some comments. And found out that it works perfectly for monorail and maglev too :)
Attachments
Still waiting for the 45 degree and slope gfx, obviously.
Still waiting for the 45 degree and slope gfx, obviously.
bb_oldtracks_v3_shot2.png (71.15 KiB) Viewed 53097 times
bb_oldtracks_v3_r9998.diff
(6.89 KiB) Downloaded 674 times
Red.xiii
Engineer
Engineer
Posts: 93
Joined: 11 Jan 2005 13:33

Post by Red.xiii »

ha ha cool, well done :)
Image
boekabart
Transport Coordinator
Transport Coordinator
Posts: 333
Joined: 25 Aug 2005 09:44
Location: Eindhoven, Netherlands

Post by boekabart »

Updated to r10001 since it cannot be merged automatically.
Attachments
bb_oldtracks_v3_r10001.diff
(6.84 KiB) Downloaded 659 times
User avatar
Ben_K
Tycoon
Tycoon
Posts: 1166
Joined: 01 Jun 2006 15:15
Location: Sydney, AUS

Re: Patch: Grass growth on unused tracks

Post by Ben_K »

boekabart wrote:The code is in place for all track pieces though, as soon as someone finishes all the sprites!
Ok ok... I'll do them as soon as possible!! :roll:

Patch looks good though! ;)
And those sprites weren't designed for monorail or maglev. Excellent!
knedle
Traffic Manager
Traffic Manager
Posts: 158
Joined: 13 Apr 2007 17:07

Post by knedle »

Unfortunately it doesn't work for me. I've applied diff, downloaded and copied grf, and nothing. How long does it take for tracks to age?
User avatar
Ameecher
Tycoon
Tycoon
Posts: 11919
Joined: 12 Aug 2006 15:39
Contact:

Post by Ameecher »

Having overgrown Maglev strikes me as very odd, I just can't see it myself... not sure why. Otherwise nice.

One thing I would say is the track is a bit *too* overgrown. at first glance it can't be seen at all (well with a fleeting look anyway) perhaps make the rails a bit more visible?
Image
User avatar
PouncingAnt
Transport Coordinator
Transport Coordinator
Posts: 357
Joined: 09 Nov 2004 22:33

Post by PouncingAnt »

Ameecher wrote:Having overgrown Maglev strikes me as very odd, I just can't see it myself... not sure why. Otherwise nice.

One thing I would say is the track is a bit *too* overgrown. at first glance it can't be seen at all (well with a fleeting look anyway) perhaps make the rails a bit more visible?
Indeed, since maglev shows a fully concreted (I assume) area, it would take much longer to overgrow. (however osmotic pressure generated by plants growing under constructions is easily enough to break through concrete if left long enough in the correct conditions)
NB: the below challenges are still open for submission, so feel free to perform necromancy on them!
Try the PouncingAnt National Monopoly Challenge
Or even better, the PouncingAnt National Monopoly Challenge 2
Or better still, the PouncingAnt National Monopoly Challenge 3
Or, the PouncingAnt National Monopoly Challenge 4

Or try my scenario instead!

-(A lazy) OpenTTD Japanese Translator-
-(A lazy) PNGcodec user-
"You get what you pay for, so pay attention!"

Patches:
Company Station Stats
Psistorm
Traffic Manager
Traffic Manager
Posts: 173
Joined: 05 Jun 2004 12:22

Post by Psistorm »

I agree with the maglev looking odd - maybe it should just get rusty and accumulate some dirt and only a little grass? same for the monorail, really, since it also seems to sit on a concrete foundation of sorts
User avatar
Ben_K
Tycoon
Tycoon
Posts: 1166
Joined: 01 Jun 2006 15:15
Location: Sydney, AUS

Post by Ben_K »

Ameecher wrote:One thing I would say is the track is a bit *too* overgrown. at first glance it can't be seen at all (well with a fleeting look anyway) perhaps make the rails a bit more visible?
Are you talking about the full disused stage? Check his first screenshot. It shows the 3 stages there and the 1st stage isnt too bad. Sadly, there is only one tile in the shot though. Personally, I drew the one he has used most to be a 'final' stage where you pretty much never use the track.
Have a look back at the shot and let me know what you think needs doing. If you want, I can send you a sprite sheet to look at.

As for Maglev/monorail - as stated, these sprites weren't designed with those tracks in mind. That is Boekabart playing around. If he did decide to go ahead with it, I think that they would need different overlays.
User avatar
SuperVGA
Engineer
Engineer
Posts: 66
Joined: 17 Apr 2007 09:09
Location: Denmark

Post by SuperVGA »

A sprite sheet would be nice to see in here.
Anyone planning on painting the rest of the grass sprites for the other directions?

I can easily imagine everything overgrown but i agree that the maglevs
should be rust/scratchy with grass pixels in between the mag's elements, where there'd usually be a black line. To show that mother nature
is peeking up. Better let Boekabart through with his ideas.

I think generally, this is a great idea... definately worth the CPU
time to sacrifice...
"Easy Driver"

-I want to paint like Simon Foster.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 2 guests