Rusty tracks
Moderator: OpenTTD Developers
This sounds like a more feasible idea than the first thought I had, which was to make a new stats screen (like Railroad Tycoon) that would show how used the tracks are from green to red depending on their usage, but I like the new visual of rust and grass over the tracks. I would add this new feature to my saved games.
READY!
I'm ready with the graphics, but I can't program in C, so I'm waiting for a generous OpenTTD author to put that feauture in the next version!
Everything is in the following zip package: (new graphics are in PNG format)
See readme.txt in the zip!
http://www.geva.hu/rusty.zip (693k)
Sorry for not posting it into the forum, but my Internet Explorer always said after posting: "The page can't be viewed"
Everything is in the following zip package: (new graphics are in PNG format)
See readme.txt in the zip!
http://www.geva.hu/rusty.zip (693k)
Sorry for not posting it into the forum, but my Internet Explorer always said after posting: "The page can't be viewed"
- lucaspiller
- Tycoon
- Posts: 1228
- Joined: 18 Apr 2004 20:27
Wow, that must have taken you ages!
Congratulations, it looks good too.
All you have to do now is wait for the new landscape array (hurry up developers!) and for someone to put it in, which shouldn't be too hard. Congrats.

All you have to do now is wait for the new landscape array (hurry up developers!) and for someone to put it in, which shouldn't be too hard. Congrats.

No longer active here, but you can still reach me via email: luca[at]stackednotion[dot]com
Re: READY!
Hey i started with some scouting of the code, to see if it is doable (for me)bociusz wrote:I'm ready with the graphics, but I can't program in C, so I'm waiting for a generous OpenTTD author to put that feauture in the next version!
Everything is in the following zip package: (new graphics are in PNG format)
See readme.txt in the zip!
http://www.geva.hu/rusty.zip (693k)
Sorry for not posting it into the forum, but my Internet Explorer always said after posting: "The page can't be viewed"
Nice to see the grapichs ready. Some one has to help me with the GRF stuff. that is still magic/mambo-Jambo/jibbersh to me.
What i got for now is that track is marked by a white box if it is once (in one game run, storing this in savegames is an other story). If it is used twice is becomes red box. Wagons of a train do count, so rail becomes red after just one train

A Final remark: All my work will become useless when the new (dynamic) MapArray structure is ready, that will make this kind of stuff lots easier. For now i'll try with out it, this is great for getting into the code

Programmeren is makkelijker als je denkt - Dutch pun
[url=callto://zoekdribbel]
[/url]
[url=callto://zoekdribbel]
- Born Acorn
- Tycoon
- Posts: 7596
- Joined: 10 Dec 2002 20:36
- Skype: bornacorn
- Location: Wrexham, Wales
- Contact:
- lucaspiller
- Tycoon
- Posts: 1228
- Joined: 18 Apr 2004 20:27
Why not? It is not going to affect gameplay. Instead of saying you don't want something can you give reasons.Akalamanaia wrote:I hope this gona be optional, i dont wanna see rusty tracks just cause i dont use something so often.
No longer active here, but you can still reach me via email: luca[at]stackednotion[dot]com
Maybe their could be an addition in the mini-map. There you can see your traffic in the tracks with a wide range of color... green - no traffic... yellow... medium traffic... red heavy traffic... and maybe 5-10 modes from green to red.... so you have a total view over your network in the mini-map and you don't need to scroll manually to every part of your tracks to see the "shiney tracks"
Cepto
Cepto
Last edited by Ceptorian on 10 Aug 2004 00:34, edited 1 time in total.
Authors (dominik81, darkvater etc.), any comments on this feature?
Dribbel, what are you talking about?
Akalamanaia, please give a reason, why you don't want to see that in the game!
Captorian: that's a good idea!
If you haven't got the rusty tracks graphics, download it now:
http://www.geva.hu/rusty.zip (693k)
Dribbel, what are you talking about?
Akalamanaia, please give a reason, why you don't want to see that in the game!
Captorian: that's a good idea!
If you haven't got the rusty tracks graphics, download it now:
http://www.geva.hu/rusty.zip (693k)
When the hell people get it that I dont want to see rusty tracks cause i dont use them so often it is a reason. Also many of the new stuff in OTTD is optional, so im thinking this should be to imo. Some people don't just want to see rusted tracks cause they aren't used so often. if this would be optional it would be good.lucaspiller wrote:Why not? It is not going to affect gameplay. Instead of saying you don't want something can you give reasons.Akalamanaia wrote:I hope this gona be optional, i dont wanna see rusty tracks just cause i dont use something so often.
- lucaspiller
- Tycoon
- Posts: 1228
- Joined: 18 Apr 2004 20:27
That didn't make much sense to me but this is what I got:
You don't want to use rusty tracks because you don't see them very often - which you won't, because it isn't in the game yet.
Thats about it, I am afraid.
You don't want to use rusty tracks because you don't see them very often - which you won't, because it isn't in the game yet.

No longer active here, but you can still reach me via email: luca[at]stackednotion[dot]com
I'm talking about the implemetation of this feature. At the moment it is quite hard to do (but it's doable). But the devolpers are working on a new way of storing the map (that is how the map is represented in the memory of your little pc). With the new method, implementing a feature like this is a piece of cake, with the current method: it's is a hell of a job.bociusz wrote:...
Dribbel, what are you talking about?
...
What i described above was the result of a quick test. In that test I managed to store a little bit of extra info (regarding rail usage) in the map. However that space is very limited. Making this feature work, i need far more storage room, which will be easily avaible if the new map storing method is done. I can do it now, but it will be hard and for nothing because when the new map describtion is ready it has to be recoded.
@bociusz: Do u now know what i'm talking about?
Programmeren is makkelijker als je denkt - Dutch pun
[url=callto://zoekdribbel]
[/url]
[url=callto://zoekdribbel]
i think that switching beetwen 2 types of tracks at a certain year would be cool
this is already in the Patch, when you start you have semaphores and in 1975 (i think, i don't remember) the semaphores become obsolete and you place signals
this can be done also for OTTD, but extended for tracks, before 1975 you place tracks with wooden sleepers and semaphores, after 1975 you place tracks with concrete sleepers and signals
and with a tool you can convert or renew the tracks and signals with drag&drop like convert tracks (convert track can be used as well)
this is already in the Patch, when you start you have semaphores and in 1975 (i think, i don't remember) the semaphores become obsolete and you place signals
this can be done also for OTTD, but extended for tracks, before 1975 you place tracks with wooden sleepers and semaphores, after 1975 you place tracks with concrete sleepers and signals
and with a tool you can convert or renew the tracks and signals with drag&drop like convert tracks (convert track can be used as well)
Not sure it is like that. How you decide to change from one state to another?bociusz wrote: There can be two seeable tracks on each other
(normal + bridege) -- tunnel doesn't matter
There are four state (often, normal, rarely, never)
it can be stored in 2 bits
That means it has to reserve only 2 kbytes maximum!
You have to keep some kind of history of usage to be able to advance from often to
normal for example...
It could be some counter increased with every train going through, and decreased in time, but this needs more than 2 bits. 8 is not much...
Not to mention glitches on junctions that are used only in one of directions...
BTW
How did you get 2 kbytes?
For me: 256*256 tiles * 2 tracks/tile * 2 bits / 8 bits/byte / 1024 bytes/kB = 32 kB
You got it Follow. It involves many more space than just 2 bits 
As for the bridges: They can be treated a s single piece (there are no junctions) just look up the usage of the end of the bridge.
But there can be two seeable pieces of track in one tile (eg horizontal tracks) These layout should be handeld like junctions.
It's easy to let every vehicle (= every loc AND wagon) update a tile, so long train have more impact than short trains.
==Needed:
- a data structure to measure traffic on a piece
- support for junctions and horizontal/vertical layouts (multiple tracks in one tile)

As for the bridges: They can be treated a s single piece (there are no junctions) just look up the usage of the end of the bridge.
But there can be two seeable pieces of track in one tile (eg horizontal tracks) These layout should be handeld like junctions.
It's easy to let every vehicle (= every loc AND wagon) update a tile, so long train have more impact than short trains.
==Needed:
- a data structure to measure traffic on a piece
- support for junctions and horizontal/vertical layouts (multiple tracks in one tile)
Programmeren is makkelijker als je denkt - Dutch pun
[url=callto://zoekdribbel]
[/url]
[url=callto://zoekdribbel]
Some thing you could do with minimal data-requirements: every train/waggon has a chance of upgrading a certain piece of rail, depending on next/previous tracks. Rusting might happen by choosing a random patch of land once every X ms, and downgrading the rail on it (or also with a certain chance/dependency on neighbouring tracks).
With this you only need the 2 bits, and the result will match the usage quit closely. Of course, we need some trials with chance-functions to get realistic behaviour. At least with randomness, you wont get problems with a 'ghost'train going over the tracks when the rust first appears exactly 3 months after the last train has gone over the tracks.
With this you only need the 2 bits, and the result will match the usage quit closely. Of course, we need some trials with chance-functions to get realistic behaviour. At least with randomness, you wont get problems with a 'ghost'train going over the tracks when the rust first appears exactly 3 months after the last train has gone over the tracks.
But how trains crossing will renew the track? Randomly, or every train will take one level up?
Also, I don't understand what you mean by ghost train, and what problems does it involve...
BTW my objections above may not apply, if your understanding of the feature is other than mine.
What n your opinion should happen if train crossed through 100% rusted track?
Does it a) start to 100% shine, b) renew of one level, c) renew a bit (probaby you can't even notice this).
My vision was that if track wasn't used (let's say) for 10 years and is compleatly rusted, four trains does not make it shine... Rather ten trains makes it renew of one level...
In fact nobody yet discussed how track become rust/shine...
Probably we should agree on some approach before counting bits in array...
Also, I don't understand what you mean by ghost train, and what problems does it involve...
BTW my objections above may not apply, if your understanding of the feature is other than mine.
What n your opinion should happen if train crossed through 100% rusted track?
Does it a) start to 100% shine, b) renew of one level, c) renew a bit (probaby you can't even notice this).
My vision was that if track wasn't used (let's say) for 10 years and is compleatly rusted, four trains does not make it shine... Rather ten trains makes it renew of one level...
In fact nobody yet discussed how track become rust/shine...
Probably we should agree on some approach before counting bits in array...
I see it like this (approach #1):
Track is constantly rusting. But every train going through wipe some rust
from it. There is some maximal value of rust on track as well, as maximal
level of shine of course.
So if track is rusting for some years, it becomes _very_ rusted.
Then if track starts being used, it slowly wipe rust, and slowly start
to shine.
Of course visually there would be only few levels.
So it could be:
- track shines if at least 8 trains (or 80 wagons, or 4000 tons)
cruise over it every month
- track is little rusty if more than 3 trains/month
- track is more rusty if 1 train/month
- train is completely rusty for less then 1 train/month
Of course numbers here are subject to adjust.
approach #2:
Level of rust depends on average trains/period. So if in one month
there are no trains, track is completely rusted, if in next month truck
is intensely used - it shines, and if in next month no traffic,
it is becomes completely rusted again.
This can use similar rates as above, but will more rapidly reflect
changes in track usage.
approach #3:
Any train passing by leaves track shiny. Than it is rusting over time, until
next train makes it shine.
This would show how much time ago last train used this track, rather then
how intensely this track is used in general.
I think only this approach that can be implemented with 2bits/tile.
Track is constantly rusting. But every train going through wipe some rust
from it. There is some maximal value of rust on track as well, as maximal
level of shine of course.
So if track is rusting for some years, it becomes _very_ rusted.
Then if track starts being used, it slowly wipe rust, and slowly start
to shine.
Of course visually there would be only few levels.
So it could be:
- track shines if at least 8 trains (or 80 wagons, or 4000 tons)
cruise over it every month
- track is little rusty if more than 3 trains/month
- track is more rusty if 1 train/month
- train is completely rusty for less then 1 train/month
Of course numbers here are subject to adjust.
approach #2:
Level of rust depends on average trains/period. So if in one month
there are no trains, track is completely rusted, if in next month truck
is intensely used - it shines, and if in next month no traffic,
it is becomes completely rusted again.
This can use similar rates as above, but will more rapidly reflect
changes in track usage.
approach #3:
Any train passing by leaves track shiny. Than it is rusting over time, until
next train makes it shine.
This would show how much time ago last train used this track, rather then
how intensely this track is used in general.
I think only this approach that can be implemented with 2bits/tile.
Who is online
Users browsing this forum: No registered users and 19 guests