Page 1 of 14

Tram and Trolleybus Discussion

Posted: 24 Feb 2005 14:11
by Wile E. Coyote
Split from George's Long vehicles

Is it possible to add electrified roads? Then we can add trolleybuses to game...

Edited by Owen: please, please, please do not use red text when editing/splitting, it really is not easy to read on the TT theme!

Posted: 24 Feb 2005 14:42
by krtaylor
Wile E. Coyote wrote:Is it possible to add electrified roads? Then we can add trolleybuses to game...
No. That's been wanted for a looooong time, and it simply can't be done.

Posted: 24 Feb 2005 14:58
by eis_os
The problem would be to support the drive-thru stations...

Posted: 24 Feb 2005 15:20
by krtaylor
Really? You mean it would be possible to electrify streets, and the trolley-busses would know which streets they could go on; but the drive-through stations would be the problem? Huh. I thought once upon a time someone had found the internal station pathfinding, and it could theoretically be changed if someone wanted to go to the trouble of understanding it.

Posted: 24 Feb 2005 15:47
by eis_os
Well I touched TTD stations / bus stations, the airport node system already, that was me :D But sure it would be possible to allow trackmods with a new landscape array... the question would be how to make it graphic wise, interface wise...

Posted: 24 Feb 2005 16:33
by krtaylor
Design-wise it would be easy enough. There's be a new listing under the busses, like there are three track types under Trains - the busses would have "Roads" and "Trams." The Trams construction tab would be basically the same as the Roads one, except that it would display caternary wires instead of roads, and one inline station rather than the separate bus/cargo stations. I figure it would work bascially like it does in LoMo - you can build the tracks/caternary on the roads, or off of the roads if you prefer. Really, the interface would be just like the Roads one. The only really new thing would be the run-through stations, which would work also like the ones in LoMo. If that could be coded, and there was an extra bit for a square which could hold tram-track directions, then it should work. Do you really think it can be coded?

Posted: 24 Feb 2005 20:11
by Wile E. Coyote
Is it necessarry to be drive-thru station? But, this is reaaaaaally good idea! I think this is more realistic, especially in cities.

Posted: 24 Feb 2005 20:21
by krtaylor
For trams to work, yes, it is necessary to have a drive-through station. There's really no other way to make trams work. If you've played LoMo or the free demo, you'll see why. I had assumed that the reason we couldn't have trams, is that there wasn't enough room in the map data structures to store the presence/direction of tram tracks in a square. As eis_os says, it would require a new landscape array. But it sounds like he thinks that's possible, and he certainly would know.

George, I am sorry for interrupting this thread to talk about trams. eis_os, if you think it's worthwhile discussing this further, I can start a separate thread to talk about trams, or you can and I'll join it. I have a pretty good idea of how it **ought** to work, based largely on LoMo, and using major pieces of other things in TTD. I just never thought it could be done. If it could, that would be very cool indeed.

Posted: 24 Feb 2005 20:34
by eis_os
I have splitted the topic and will move it the next days into suggestion section, the real problem is the station stuff, while I have spend today A LOT of my free time to understand the code for it, I have A LOT :?: :?: :?:

Posted: 24 Feb 2005 20:54
by krtaylor
OK. Bearing in mind that I personally don't do Patch coding, let me try to write a list of the various aspects of TTD that need to be changed to accomodate Trams.

1. New attribute of busses. Kind of like attributes of trains, e.g. electrified or not, which determines what sort of track it can run on. Should be possible, maybe needs a larger road-vehicle array?

2. New attribute of roads. We need to store the presence/direction of tram-tracks on a square, just like it does with roads. This requires a new, larger terrain array. (BTW, there are some other things that would like to have space in a new, larger terrain array, under discussion currently in some other current threads under Suggestions. If it's possible to do a larger terrain array, better to take care of that all at once.)

3. New GUI. Probably the build-road button would get a dropdown like the build-track button has, letting you choose "Roads" and "Trams." Choosing "Roads" would give what you already get. Choosing "Trams" would give basically an identical interface to the roads, except of course it would be tram-tracks not roads, run-through passenger stations instead of separate passenger and freight sheds (no freight on trams), and a tram depot. Tram-tracks would be built just like roads, either on top of roads or in clear space. I don't know if you could build tram bridges, maybe you'd have to build a road bridge first then build tram tracks across it? Allowing a tram-only bridge would be nicer.

4. Run-through stations that work like the ones in LoMo. Thought to be the most difficult part. Research required into the station routing code.

Have I missed anything, or made any major mistakes?

Posted: 24 Feb 2005 21:45
by cornelius
krtaylor wrote:it would be tram-tracks not roads, run-through passenger stations instead of separate passenger and freight sheds (no freight on trams)
If this does turn out to be possible then cargo trams to carry mail, goods and valuables around cities could be fun.

Posted: 24 Feb 2005 21:52
by krtaylor
But not realistic. The only tram company that did that, that I know of, was Pacific Electric in Los Angeles. And they were kind of a hybrid arrangement - they had what you'd see as a normal tram service, yes, but also they had what more resembled an electrified intercity mainline. They ran tramcars during the day, longer-distance electric expresses with baggage and REA cars, and at night they had steeplecab motors hauling normal boxcars doing freight deliveries. I think that might be a bit much to deal with in TTD. Better to stick with passengers only, sez I.

Posted: 24 Feb 2005 22:46
by wallyweb
If you folks are considering some serious coding to accomodate trams ( I'm not a coder ... yet ) hopefully there will be room for additional features. My thought is one-way roads, as one sees in many cities. An added benefit would then be the ability to build realistic autoroutes/autobahns/freeways. Just a thought and maybe it should go in the suggestion thread but the underlying principals would seem to be related to your proposals. I'm going to watch this thread with interest. Mensa needs to create a TTDX category for you folks. :)

PS - On the subject of drive through stations/depots ( Did I get this right? ) could this be adapted to accomodate roadside bus stops for local city buses :?:

Posted: 24 Feb 2005 23:07
by krtaylor
If eis_os does actually code a larger terrain array, no doubt he will make sure there are plenty of extra fields.

One-way roads were researched before. Actually they are perfectly possible and I saw them working once. The trouble isn't the roads themselves, it's the pathfinding that controls where the vehicles go. It doesn't understand one-way roads. We've wanted pathfinding improved for a long time but that's way way harder to understand than anything else. Kind of the same reason the AI has never been improved.

I would guess that, if drive-through stations are possible for trams, they would also be possible for busses. I could be wrong though.

Posted: 24 Feb 2005 23:29
by cornelius
krtaylor wrote:But not realistic.
Never mind realism ;)

If the patch could support it it would be up to grf authors to supply unprototypical mail trams etc. Sure it wouldn't be realistic, and utterly impractical, but a nice quirk for the rail obsessed universe that TTD already inhabits.

Posted: 24 Feb 2005 23:43
by Hyronymus
I can understand the enthousiasm but shouldn't we first see if Oskar can replace RV-bays with drive-through stops? I do wonder one thing btw. If it's possible to add trams + tramtrack in a new landscape array why isn't it possible to add narrow gauge, cog wheel rails and high speed track in a new landscape array?

Posted: 25 Feb 2005 00:26
by krtaylor
Hey, hey! Don't overwhelm eis_os. One thing at a time.

Posted: 25 Feb 2005 00:27
by Colonel32
we (czech sets development team) are already working on trams... they will be using 3rd rail type, and will go thru cities. Doesn't require any aditional coding (for now) so we can concentrate one the track and tram graphics. I think that's the best solution for now... (unless you are already using the 3rd rail system ;-)

Posted: 25 Feb 2005 00:41
by krtaylor
No, we're talking about making them work like real trams, i.e. on roads like busses, but with overhead caternary.

Posted: 25 Feb 2005 01:39
by Patchman
We actually already have two new terrain arrays, that's no problem.

The difficulty and largest amount of work here is the pathfinding, making sure trams stay on the valid tracks, and in fact the gui and internal infrastructure to support building road mods.