Page 2 of 6
Posted: 12 Feb 2007 14:44
by Valance
How will you prevent crashes between trams and buses? Having signals all over the track will look bad and be quite annoying... Is it possible to let busses and trams just take care on each other, like it is in reallife when busses and trams are on the same track?
From the engines point of view, trams and busses are the same (they only differ in engine_type->misc_flag where bit 0 is set if it's a tram, like in ttdpatch). Roads/roads with tram rails/lightrails are handled like normal roads, too. The only problem I found so far is, that trams are still able to overtake busses *lol* Shouldn't be that hard to disable this behavior, so only busses (better to say, non-tram road vehicles) will be able to overtook other busses or trams.
As in cities with tramroads all catanery is fixed on the buildings walls they passes, there are only a few poles when there is needet. So I think it would be better the poles would disappear when buildings are near the tramroad.
Yes, the poles look ugly most of the time. And I would really prefer to disable drawing them when there are houses next to them. But (apart from the problem I'm still trying to understand how to draw the wires over the vehicles but not over the houses *lol*) to stay compatible with tramset grfs from (and for) ttdpatch, I can't just draw the wires, because their sprites are divided in front wires (with some sprites containing poles) and backpoles.
I began thinking about another solution for this optical issue. How about providing a grf where there are only poles at curves and junctions? Than we wouldn't have such an optical overhead.
Now, if we could just get mainline trains running on them...
You mean normal trains? Or articulated trams? (Articulated trams would be nice, but first all the tram stuff should work)
Do we have some diff for this?
After I cleaned up the code a bit (combining functions again I split up for tram/road issues, realizing that a simple "bool tram" would have been better *lol*) I'll post a new diff and the needed grf. But it isn't playable, yet. (No working tram stations, bridges, tunnels, ...)
Some minutes ago, I got busses and trams to decide correctly whether to enter a depot (normal road vehicles entering only road depot, trams only tram depots), but they still can be build in both depots.
Posted: 12 Feb 2007 14:46
by fabca2
Very very nice work,
Congratulation,
But I did no't understood why you posted two screenshots, they are so different :
second one has rounded corner, ugly poles (sorry), and more spaces between tracks.
does that means you took two different GRF ?
what picture will be the defintifive one ?
Posted: 12 Feb 2007 14:54
by Valance
The second screenshot shows the sprites I separeted from the ttdpatch ones, they will (I think) be the standard ones. The first screenshot shows the standard gauge ones, you can simple load them as an additional grf and they will replace the standard ones.
So far loading grfs (whose are for ttdpatch) with tram sprites (tram rails, icons...) and grfs with tram vehicles works

Posted: 12 Feb 2007 15:01
by fabca2
Thank you for your answer,
good luck for the reminding part

as you see, many people are waiting for you...
My wish is to see this feature to be merged into trunk soon... it's so cute ! (don't forget to makes tram a little bit faster and with a better capacity btw)
regards.
Re: Tramroads for OTTD
Posted: 12 Feb 2007 15:22
by BeSt-Com
Valance wrote:P.S.: If I'm able to get the whole tram stuff working, are I allowed to use the sprites from ttdpatch and release them as a grf for ottd (I don't want to add all the sprites from ttdpbase, just the ones for tramroads)?
yes, you are allowed! The TTPatch Trams are drawn and codet by RK and me(Bernhard) ... i'm sure RK will give his permission too.
You can easily meet him
here at TTDLXHQ
Posted: 12 Feb 2007 15:48
by Celestar
you should really really use the "svn diff" command instead of diffing yourself
Celestar
Re: Tramroads for OTTD
Posted: 12 Feb 2007 17:40
by Born Acorn
BeSt-Com wrote:Valance wrote:P.S.: If I'm able to get the whole tram stuff working, are I allowed to use the sprites from ttdpatch and release them as a grf for ottd (I don't want to add all the sprites from ttdpbase, just the ones for tramroads)?
yes, you are allowed! The TTPatch Trams are drawn and codet by RK and me(Bernhard) ... i'm sure RK will give his permission too.
You can easily meet him
here at TTDLXHQ
He was on about the track, not the trams themselves.
For the actual vehicles, we'd need fictional (if desired, naming scheme similar to current default vehicles. eg: "Ginzu Tram" or "Foster SuperTram MKII") Company colour trams, or only enable trams when there's a Tram GRF file instead.
Otherwise we'd get "why aren't the trams I ride on not in OpenTTD?" all the time.
Posted: 12 Feb 2007 18:10
by Valance
He was on about the track, not the trams themselves.
That's right. In ttdpatch the sprites are in the ttdpbase.grf, but for ottd we need the 113 tramtrack (tracks, poles, wires, icons, depots...) sprites in an extra grf.
For the actual vehicles, we'd need fictional (if desired, naming scheme similar to current default vehicles. eg: "Ginzu Tram" or "Foster SuperTram MKII") Company colour trams, or only enable trams when there's a Tram GRF file instead.
Otherwise we'd get "why aren't the trams I ride on not in OpenTTD?" all the time.
If somebody would provide a grf (sprites, names, sounds) for standard fictional trams to include with a tram supporting ottd, it wouldn't be that bad
My idea is, at the moment: the menu for building tramtracks will be disabled when there are a) no tram vehicles at all available or b) no tram vehicles available in the current game year.
Someone installing the patched ottd will only get tram vehicles (and the possibility to build tramtracks) when he/she installs a grf with trams in it. Not like in ttdpatch, where I'm able to build tramtracks but haven't trams at all, because I didn't install a grf with trams. (Or are there tram vehicles and I didn't play long enough to get them?)
The trams in my screenshots are from the german tramset, as it would be hard to test all the tram stuff without having tram vehicles *lol* Haven't tested other tram vehicle grfs, but they should all work as long as they aren't coded to check for ttdpatch.
Posted: 12 Feb 2007 18:14
by Quark
The logic with menu item must be same as for monorail and maglev tracks.
Posted: 12 Feb 2007 18:52
by Born Acorn
The best people to go to on Company Coloured vehicles are PikkaBird, DanMacK and uzurpator.
Posted: 12 Feb 2007 18:54
by Valance
Ok, before my further experimenting will break something

here is a diff of current development state. The drive-thru-roadstop patch is included in this diff, later I'll try to not include it with my diffs, as it's not my code. But as for now, it should be ok, I hope.
tramroads.grf is NOT a NewGRF file, just copy it in your data directory.
For tram vehicles: e.g.
http://www.tt-forums.net/viewtopic.php?t=15496
For standard gauge tracks:
http://grfcrawler.tt-forums.net/details ... ils&id=151
Be warned, my coding style is very chaotic and unorganized *lol*
Edit: You'll need the grf from
http://www.tt-forums.net/viewtopic.php?t=26252
Posted: 12 Feb 2007 21:38
by Celestar
I've tried kwrite, kdevelop, eclipse and all that stuff, and ended up wth vim
some things that might need consideration:
1) Maybe depots should/might want to be tram only and bus/truck only.
2) I cannot remove trams using the normal clear command for some reason?
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.
Nice job, keep up the good work

Celestar
Posted: 12 Feb 2007 22:06
by Valance
1) Maybe depots should/might want to be tram only and bus/truck only.
Worked the last 30 minutes on this issue, and now it seems to work

Was easier than I thought. Busses and trucks only buildable in road depot, trams only in tram depot.
2) I cannot remove trams using the normal clear command for some reason?
It's on my todo list for further investigation. The road-only functions seem to handle single-roadbit and whole road removing. Now I must check, if to remove roadbits, trambits or whole roadtiles. It's a bit confusing right now, but I'll find it out
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...
Oh, there comes another question into my mind... how about drive-through-truckstops? Should I let trams use them? (hm, funny imagination trams transporting iron ore *lol*) But if I let them only transport passengers, I would loose compatibility to ttdpatch grfs providing trams for cargo like post, goods, ...
Posted: 12 Feb 2007 22:20
by fabca2
Valance wrote:In my 24 years on earth (....) I've never seen a tram live
it won't help you, but
http://www.youtube.com/watch?v=zMBYxlRnYXY
by the way, can you post a bin file (win32) ?
I hope drive-through-roadstops patch will be merged into trunk soon, then you won't need to mixt you patchs with...
Posted: 12 Feb 2007 23:02
by mart3p
Valance wrote:... Therefore (and because it's handled the same in ttdpatch) I think I'll let them only use drive-through-roadstops...
It’s good to see you're making good use of my drive-through road stops.
Valance wrote:Oh, there comes another question into my mind... how about drive-through-truckstops? Should I let trams use them? (hm, funny imagination trams transporting iron ore *lol*) But if I let them only transport passengers, I would loose compatibility to ttdpatch grfs providing trams for cargo like post, goods, ...
IMO you should allow trams to carry other cargos if the grfs already exist. The code is already there to ensure vehicles will only stop at the correct type of stop.
Posted: 12 Feb 2007 23:51
by Valance
Good news
Trams can now use bridges, tunnels and roadstops (as for now, every roadstop, not just drive-through ones, and there aren't drawn rails on tunnels, bridges and roadstops).
And because, every screenshot I posted was from temperate climate, here are arctic ones
Now, I can't go to bed anymore... Am too excited *lol*
by the way, can you post a bin file (win32) ?
Sorry

For beeing able to provide you with a win32 executable, I would need to install a cross-compiler. Haven't found time to do it yet. But perhaps one of the windows users here, could post one?
Posted: 13 Feb 2007 01:23
by Digitalfox
Keep the good work Valance..

Posted: 13 Feb 2007 02:16
by athanasios
N8king wrote:
2. Picture the poles appear very often and look very shiny, so thats looks ugly IMO.
As in cities with tramroads all catanery is fixed on the buildings walls they passes, there are only a few poles when there is needet. So I think it would be better the poles would disappear when buildings are near the tramroad.
N8king
Well, in 128x63 they wouldn't be ugly. For current tile size yes.
In my city they use their own poles for tram and trolleys. Support from nearby buildings was something common in the past, not now anymore.
Posted: 13 Feb 2007 17:14
by DeletedUser21
I have to say depite the realism, I hate the catenary because it cloggs any junctions or (in this case) the roads. It would be good to see it reduced somewhat like rail catenary. Is it do-able?

Posted: 13 Feb 2007 19:11
by Valance
I have to say depite the realism, I hate the catenary because it cloggs any junctions or (in this case) the roads. It would be good to see it reduced somewhat like rail catenary. Is it do-able?
Sorry, it's not the purpose of this patch to provide other sprites than the original ones. It's up to the player to choose grfs they like. Just look (e.g. search forum) for a tramtrack spriteset you like
Ok, I've fixed the drawing of poles/wires at slopes and got the drive through bus stops to change their sprite according which type of road (normal, road + tramrails, lightrails) is connected to them. Don't know whether this behavior is wished. Or should I try to find a spare bit in station tiles to separate them into stops with/without rails like in ttdpatch?