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
stevenh
TTDPatch Developer
TTDPatch Developer
Posts: 759
Joined: 24 Jul 2005 05:07
Location: Canberra, Australia
Contact:

Post by stevenh »

Uh oh...
Had been considering checking-out the OTTD source and seeing what would've been involved to reproduce my Trams code from TTDP into OTTD.

Looks like I don't have to anymore :P

Next you'll have aRVs done and ... then you can help me in TTDP :P
Psistorm
Traffic Manager
Traffic Manager
Posts: 173
Joined: 05 Jun 2004 12:22

Post by Psistorm »

this is really impressive work, getting trams to work so damn quickly :D
I cant wait to play with this in trunk, honestly, as trams are something Ive been envying TTDP for longtime, so Im overjoyed to see them in OTTD now :)
DeletedUser21
Tycoon
Tycoon
Posts: 11501
Joined: 20 Sep 2004 22:45

Post by DeletedUser21 »

I wonder (and hope ofcourse) if it will be adopted in the trunk if the code is clean and integratable within the original code. :)
User avatar
brupje
Transport Coordinator
Transport Coordinator
Posts: 288
Joined: 03 Oct 2006 07:17
Location: The hague, Netherlands

Post by brupje »

It looks cool, but what's the advantage over buses? If there where 3 or 4 wagons in a tram it can be something between a bus and a train. More capacity then a bus, less then a train. Less flexible to build then a bus, more flexible then a train.
User avatar
Brianetta
Tycoon
Tycoon
Posts: 2567
Joined: 15 Oct 2003 22:00
Location: Jarrow, UK
Contact:

Post by Brianetta »

brupje wrote:It looks cool, but what's the advantage over buses? If there where 3 or 4 wagons in a tram it can be something between a bus and a train. More capacity then a bus, less then a train. Less flexible to build then a bus, more flexible then a train.
Different running costs, and also the ability to run stretches of track that aren't on roads, which can give an advantage against competing road vehicles and also help when roads are being reconstructed.
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
fabca2
Transport Coordinator
Transport Coordinator
Posts: 312
Joined: 14 Apr 2004 15:18
Location: Fr

Post by fabca2 »

brupje wrote:It looks cool, but what's the advantage over buses? If there where 3 or 4 wagons in a tram it can be something between a bus and a train. More capacity then a bus, less then a train. Less flexible to build then a bus, more flexible then a train.
* it's beatifull !
* it can delivery more passenger (you can expect less traffic jam, like in real life ;) )

today news : Drive-Through Patch have been merged into trunk, now you can remove a part of your patch ! cool....

note : I would like to have a 0.6.0 quickly ;)
quba
Engineer
Engineer
Posts: 11
Joined: 22 Jul 2004 20:39
Location: Poland

Post by quba »

I think I found small bug, whenever I try to use LongVehicles 4 with German trams it doesn't work:

Code: Select all

dbg: [grf] [4LVw.grf:46] Error: To use both this set and German trams put this set before German trams set in the newgrf.cfg.
Changing an order doesn't solve this error, without german trams it works good, with serbian trams is also working.

BTW Great job! :D

Also I have tried to use it with newhouses branch wasn't playing long but patching was without any troubles and whole game worked good with Total Town Replacement Set version 3 and German trams
User avatar
Valance
Engineer
Engineer
Posts: 28
Joined: 06 Feb 2007 07:17

Post by Valance »

Uh oh...
Had been considering checking-out the OTTD source and seeing what would've been involved to reproduce my Trams code from TTDP into OTTD.

Looks like I don't have to anymore

Next you'll have aRVs done and ... then you can help me in TTDP
You've done an awesome work coding them for ttdpatch :) I took a look into your assembler sources and the only things I was able to understand were your comments (some of them gave me me a good imagination how to code it for ottd). It must have been hard to do it the assembler way. I wouldn't be able to code a simple "Hello World" in assembler^^

To be honest, all the credit is due to you and mart3p. (Not to forget all those great artists out there providing grfs (especially those cute tram sprites :) but I'm really waiting for those old fashioned looking trams from San Francisco I've seen on TV), or all other devs improving ottd day for day).
today news : Drive-Through Patch have been merged into trunk, now you can remove a part of your patch ! cool....
Yeah :) I read it some minutes ago, and I really should have been waiting with updating my working copy (when I got up it wasn't in trunk, but there was an assert thingy that got me to update with newest drive through patch) *lol* Now, I can do it a second time today.
I think I found small bug, whenever I try to use LongVehicles 4 with German trams it doesn't work:
Code:
dbg: [grf] [4LVw.grf:46] Error: To use both this set and German trams put this set before German trams set in the newgrf.cfg.

Changing an order doesn't solve this error, without german trams it works good, with serbian trams is also working.
Hm, haven't tried to use LV4. But placing LV4 grf before german trams grf should have done the trick. I'll note it on my todo list. Thanks :)
BTW Great job!

Also I have tried to use it with newhouses branch wasn't playing long but patching was without any troubles and whole game worked good with Total Town Replacement Set version 3 and German trams
Hehe, good to hear :) But I haven't released a playable diff, yet. There is still to much to do (gui, bridges, proper pathfinding for trams, crossings, generell tram behavior like no overtaking or turning around when there are just straight rails, ...)

Could you post a link to the thread with the serbian ones, please? So far, I only found german ones and hiroshima ones while searching the forum. Would be nice to have a collection of available tram vehicle/track grfs in this thread :)

Oh, I told you already that roadstops (and now tunnels, too. I plan to do it the same way for bridges) aren't different ones for roads with tramrails and/or lightrails in my diff at the moment. They'll only change their appearence when they're connected to tramrails. My question still is: Is this ok for you, or would you like to have them split up in road/tram ones (with different prices, need to pay money for up/downgrading rails on them, ...)?

Before I'm going back to coding, here is another little screenshot:
Attachments
Kennpool Transport, 24. Jun 1956.png
Kennpool Transport, 24. Jun 1956.png (143.57 KiB) Viewed 6579 times
DonRazzi
Traffic Manager
Traffic Manager
Posts: 216
Joined: 07 Sep 2006 21:44
Location: Western Germany, KBS 395

Post by DonRazzi »

Hmm, I'd say, keep your eyes on the track first. If that thing works properly, you might do that depot-thing later. It's not that important how the depots look, if only the trams are on track soon...

By the way, great work until now! Keep it movin'!
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5631
Joined: 13 Sep 2004 13:21
Location: The Moon

Post by PikkaBird »

Valance wrote:but I'm really waiting for those old fashioned looking trams from San Francisco I've seen on TV
You'll be waiting a while, since the vehicles in SF aren't trams, they're cable cars. ;)
User avatar
stevenh
TTDPatch Developer
TTDPatch Developer
Posts: 759
Joined: 24 Jul 2005 05:07
Location: Canberra, Australia
Contact:

Post by stevenh »

Valance wrote:Before I'm going back to coding, here is another little screenshot:
Heh heh... is that my GRF? It looks like the little Hiroshima/Hannover Tram is driving between the tracks :P... blame my offsets... I never really did finish building that GRF.

As for the Depots, do you mean only having trams listed in one depot and standard RVs in the normal depots? It was pretty straight forward, you just check, as you're iterating through the vehicle list, if the current vehicle is a tram (some GRF flag :) ) and then choose to draw it or not based on whether the current depot is Tram/RV. I just used a spare single bit in the landscape array to store that.

Anyway, again, fantastic work. That Mars(?) shot looks quite strange :P
quba
Engineer
Engineer
Posts: 11
Joined: 22 Jul 2004 20:39
Location: Poland

Post by quba »

Valance wrote: Hm, haven't tried to use LV4. But placing LV4 grf before german trams grf should have done the trick. I'll note it on my todo list. Thanks :)
It was a pleasure to try it :D
Valance wrote: Could you post a link to the thread with the serbian ones, please? So far, I only found german ones and hiroshima ones while searching the forum. Would be nice to have a collection of available tram vehicle/track grfs in this thread :)
They are on grfcrawler, here is the link to the thread
Valance wrote: Oh, I told you already that roadstops (and now tunnels, too. I plan to do it the same way for bridges) aren't different ones for roads with tramrails and/or lightrails in my diff at the moment. They'll only change their appearence when they're connected to tramrails. My question still is: Is this ok for you, or would you like to have them split up in road/tram ones (with different prices, need to pay money for up/downgrading rails on them, ...)?
I would rather vote for up/downgrading I think it would be more "professional" :)
User avatar
Octopussy
Engineer
Engineer
Posts: 122
Joined: 01 May 2006 21:57

Post by Octopussy »

What 's new for Tramsroads in OpenTTD ?

Is it possible to adapt "Drive-through road stops" which was developped by mart3p and is currently in the trunc for this feature ?

:)
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Post by mart3p »

Octopussy: If you read the thread, you will see that Valance’s Tramroads already use drive-through road stops.
Valance wrote:
3) Maybe the code shouldn't be mixed with the drive-through-roadstops, but then again, maybe it is crucial. I haven't had a time to look at the diff in detail.
In my 24 years on earth (no, I'm not from mars *lol*) I've never seen a tram live :( Just in tv. But I can't imagine they will drive into a normal roadstop. Therefore (and because it's handled the same in ttdpatch) I think I'll let them only use drive-through-roadstops. It's my current goal to let trams drive into them, after three days coding I'd like to see the trams transporting passengers before I'll go to bed ;) But somehow they're ignoring them at the moment...
Image
User avatar
CMircea
Chairman
Chairman
Posts: 887
Joined: 29 Dec 2006 14:05

Post by CMircea »

But somehow they're ignoring them at the moment..
They are scared of the vehicle, since vehicles on mars look different!

Anyway, good job, trams in OTTD, can't wait to test them :)
RK
Transport Coordinator
Transport Coordinator
Posts: 264
Joined: 13 Oct 2003 10:43
Location: Dortmund, Germany

Post by RK »

Very nice, even the stations on non-streets are displayed properly. :)
User avatar
dtb1322
Traffic Manager
Traffic Manager
Posts: 132
Joined: 16 Jan 2007 13:01
Location: New Jersey, USA

Post by dtb1322 »

I cannot wait until this is in trunk because I hate using buses. Any idea of when this might be added? :D
That's not me, that's my dog. -dtb
User avatar
Valance
Engineer
Engineer
Posts: 28
Joined: 06 Feb 2007 07:17

Post by Valance »

As for the Depots, do you mean only having trams listed in one depot and standard RVs in the normal depots? It was pretty straight forward, you just check, as you're iterating through the vehicle list, if the current vehicle is a tram (some GRF flag Smile ) and then choose to draw it or not based on whether the current depot is Tram/RV. I just used a spare single bit in the landscape array to store that.
Oh, thats already working. My question was regarding roadstops, tunnels and bridges. But I'll do it the more professionel way ;)

Here is the actual diff, as I promised RK (sorry, a bit late, but updating my gentoo took longer than I thought):
Attachments
tramroads_2102_2.diff
Warning: don't play to much with removing tramroads, I didn't finish coding there.
(86.8 KiB) Downloaded 271 times
User avatar
Octopussy
Engineer
Engineer
Posts: 122
Joined: 01 May 2006 21:57

Post by Octopussy »

Thanks for the diff. I will try it..

But what GRF we need ?

Is it this one on GRF Crawler : German Tram Set ?
http://grfcrawler.tt-forums.net/details ... ails&id=77
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 »

I've found a few GRFs that contain trams:

-Hiroshima Tram set (including Iyo-Dentetsu trams drawn by me);
-German Tram set;
-Serbian tram set;
-Czech tram set;

All but the Hiroshima Tram set seem to work fine in OTTD without the tramroads.diff file (I can't compile, so there).

Using the search option will help you find the GRFs. (Yes, I'm a bit too lazy/busy to post the links :( , I'm sorry about that...)
Retired JapanSet developer and creator of TIAS.
Locked

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 9 guests