Tramroads for OTTD

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

User avatar
athanasios
Tycoon
Tycoon
Posts: 3138
Joined: 23 Jun 2005 00:09
Contact:

Post by athanasios »

Tram is light rail train. Only difference from train is its tracks. So cargo is acceptable.

From Wikipedia for Athens metro (I translated and made a summary):
In 1911 were bought from "Gοοssens" 2 "SteepΙe-cab" type hybrid trains that could be supplied both from third rail and tram cable, to carry cargo from the port!

So it is not something new :wink:

:!: Trams should be under train menu, not road vehicle menu, it is wrong!!!
Thanks OczeQ. And nice graphics almost ready to be coded there.
Attachments
tram_Glyfada.JPG
tram_Glyfada.JPG (37.07 KiB) Viewed 7540 times
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.
Quark
Transport Coordinator
Transport Coordinator
Posts: 325
Joined: 20 Sep 2006 11:36
Location: Russia, Moscow

Post by Quark »

athanasios wrote::!: Trams should be under train menu, not road vehicle menu, it is wrong!!!
Trams is under road menu because of the way they can be builded. You can't place diagonal tramroads for example and they share road with road vehicles.
Image
charlymorton
Engineer
Engineer
Posts: 45
Joined: 08 Nov 2005 12:33
Location: Bergen
Contact:

Post by charlymorton »

athanasios wrote:Tram is light rail train. Only difference from train is its tracks. So cargo is acceptable.
The Manchester trams run on standard gauge rails and is actually connected to the National Rail network, so at least in theory the trams could "escape" the tramlines and run on the normal rail network.
A mate of mine who's a tram driver has confirmed this.
User avatar
Brianetta
Tycoon
Tycoon
Posts: 2567
Joined: 15 Oct 2003 22:00
Location: Jarrow, UK
Contact:

Post by Brianetta »

charlymorton wrote:
athanasios wrote:Tram is light rail train. Only difference from train is its tracks. So cargo is acceptable.
The Manchester trams run on standard gauge rails and is actually connected to the National Rail network, so at least in theory the trams could "escape" the tramlines and run on the normal rail network.
A mate of mine who's a tram driver has confirmed this.
Same goes for the Croydon Tramlink.
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
Psistorm
Traffic Manager
Traffic Manager
Posts: 173
Joined: 05 Jun 2004 12:22

Post by Psistorm »

this is confirmed for the trams in my hometown. standard gauge and - whats special about them - run on both AC and DC current. they do drive on mainlines, connecting the towns here, then divert to the inner city tramways at the end of the journey.

running trams on a mainline would be interesting, but a way needs to be coded to allow trams to drive on these tramrails, but prevent regular trains from it (imagine an ICE driving through a downtown area xD)
also it needs to be considered if it is a worthy choice, gameplay-wise. it would definitely make for some very interesting options, but it would also need a special piece of track to convert standard-gauge tramroads to normal railway.

one could, for example, connect the inner-city tram network of two towns by using a piece of already existing mainline. to make this easier, there should be speed limits for trams (aka no more than 50 km/h on tramroads, but about 100km/h on mainline rail, as for example, the aforementioned "Karlsruhe" trams do it)
Last edited by Psistorm on 27 Feb 2007 17:23, edited 1 time in total.
User avatar
Ameecher
Tycoon
Tycoon
Posts: 11919
Joined: 12 Aug 2006 15:39
Contact:

Post by Ameecher »

I suppose at some point, we (the british tram set) ought to look into trying out our aRVs in OTTD. Keep up the good work.
Image
User avatar
athanasios
Tycoon
Tycoon
Posts: 3138
Joined: 23 Jun 2005 00:09
Contact:

Post by athanasios »

Quark wrote:
athanasios wrote::!: Trams should be under train menu, not road vehicle menu, it is wrong!!!
Trams is under road menu because of the way they can be builded. You can't place diagonal tramroads for example and they share road with road vehicles.
From resent posts seems that we 'll have trams go on ng rails too. At least 3 new types of vehicles are needed:
1. Hybrid third-rail and overhead tram-line wire vehicle.
2. Hybrid third-rail and overhead train-line (electrified) wires vehicle.
3. Hybrid overhead tram-line wire and overhead train-line (electrified) wires vehicle.

A lot of coding I suppose will be needed to fix it...

Anyone willing to to it? Quark is already doing to much with "MiniIn" revival, and we thank 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.
Quark
Transport Coordinator
Transport Coordinator
Posts: 325
Joined: 20 Sep 2006 11:36
Location: Russia, Moscow

Post by Quark »

athanasios wrote:Quark is already doing to much with "MiniIn" revival, and we thank him.
O, thanks :)

By topic: I think that it's not necessary to have possibility to run tram on normal rails. Firstly, tram rail have different scale, secondly, you can build tramroads out of town, and thirdly, to much effort needed to code that feature.

P.S. Did you think about double rails on one tile?
Image
User avatar
Celestar
Director
Director
Posts: 574
Joined: 02 Jul 2004 10:56
Contact:

Post by Celestar »

Hi Valence,

i've done a code-level review, here are my findings. Feel free to discuss.

Celestar
Attachments
tramdiff.txt
(1.53 KiB) Downloaded 376 times
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post by Darkvater »

Celestar wrote:Hi Valence,

i've done a code-level review, here are my findings. Feel free to discuss.

Celestar
Just a single addition to the NOT_REACHED() suggestion. You usually use it as "default: NOT_REACHED();". If the switch's cases initialize some variable, put the default on top without a break so it will cascade down. Since asserts are only used for programming errors and NOT for validating user-input all problems will (hopefully) be noticed in time for the next major release.
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
User avatar
Digitalfox
Chief Executive
Chief Executive
Posts: 710
Joined: 28 Oct 2004 04:42
Location: Catch the Fox if you can...

Post by Digitalfox »

So Valence how's work on Trams going ??

Any more screenshots for us?? :D
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1794
Joined: 30 Mar 2005 09:43

Post by peter1138 »

Celestar wrote:Trambits should be in the same place as roadbits and then just use the already-existing RoadType.
Store the RoadType in the map (whereever you want)
The bits have to be stored separately if you want mixed road and tram tiles...
He's like, some kind of OpenTTD developer.
User avatar
athanasios
Tycoon
Tycoon
Posts: 3138
Joined: 23 Jun 2005 00:09
Contact:

Post by athanasios »

Quark wrote:By topic: I think that it's not necessary to have possibility to run tram on normal rails. Firstly, tram rail have different scale, secondly, you can build tramroads out of town, and thirdly, to much effort needed to code that feature.

P.S. Did you think about double rails on one tile?
If I wasn't clear I am sorry. I was referring to third rail tracks or narrow gauge. Not standard truck which is wider. Nevertheless is to much work as you said. For the very distant future if ever.
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.
User avatar
Celestar
Director
Director
Posts: 574
Joined: 02 Jul 2004 10:56
Contact:

Post by Celestar »

peter1138 wrote:
Celestar wrote:Trambits should be in the same place as roadbits and then just use the already-existing RoadType.
Store the RoadType in the map (whereever you want)
The bits have to be stored separately if you want mixed road and tram tiles...
Ok you're right and I stand corrected, but then we need two different GetTileTrackStatus functions.

Celestar
Dragon
Engineer
Engineer
Posts: 62
Joined: 05 Aug 2006 11:13
Location: Openttd heaven

Post by Dragon »

athanasios wrote:Tram is light rail train. Only difference from train is its tracks. So cargo is acceptable.

From Wikipedia for Athens metro (I translated and made a summary):
In 1911 were bought from "Gοοssens" 2 "SteepΙe-cab" type hybrid trains that could be supplied both from third rail and tram cable, to carry cargo from the port!

So it is not something new :wink:
Today ( 7 of march) Amsterdam started with a test to see if cargo with trams profitable. They want to reduce the number of trucks in the old city centre by replacing them with special trams. (they mainly transport goods)
User avatar
Toni Babelony
Tycoon
Tycoon
Posts: 1389
Joined: 07 Jul 2006 09:34
Skype: toni_babelony
Location: Sagamihara-shi, Japan
Contact:

Post by Toni Babelony »

How's the development going? Is there actually support for Articulated Road Vehicles in OTTD? If not it will be difficult to use the Hiroshima Tram Set in OTTD...
Retired JapanSet developer and creator of TIAS.
Johnny B Goode
Director
Director
Posts: 534
Joined: 17 Mar 2007 16:36

Post by Johnny B Goode »

This extension is beautiful. People need to build more tram grfs, and hopefully the devs will incorporate this into trunk. Just a nitpick. Could you make it say tramways instead of tramroads? And the celebration newspaper and the windows call it a bus instead of a tram.
User avatar
Octopussy
Engineer
Engineer
Posts: 122
Joined: 01 May 2006 21:57

Post by Octopussy »

Valance, Wake Up ! :)
Dragon
Engineer
Engineer
Posts: 62
Joined: 05 Aug 2006 11:13
Location: Openttd heaven

Post by Dragon »

Follow the white rabbit :P

sorry, i've seen the matrix to many times
User avatar
Octopussy
Engineer
Engineer
Posts: 122
Joined: 01 May 2006 21:57

Post by Octopussy »

peter1138 wrote:
Celestar wrote:Trambits should be in the same place as roadbits and then just use the already-existing RoadType.
Store the RoadType in the map (whereever you want)
The bits have to be stored separately if you want mixed road and tram tiles...
I am trying to clear the code.
The problem is there is already a RoadType Structure... :

Code: Select all

typedef enum RoadTypes {
	ROAD_TYPE_NONE,
	ROAD_TYPE_NORMAL,
	ROAD_TYPE_LIGHTRAIL,
	ROAD_TYPE_ALL
} RoadType;
And we need to create another one for tram.. :

Code: Select all

typedef enum RoadTypes {
	ROADTYPE_ROAD = 0,
	ROADTYPE_TRAM = 1
} RoadType;
Is it possible to mix them ?
Locked

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Ahrefs [Bot] and 12 guests