Page 1 of 4
[patch] drive-through depots
Posted: 12 Mar 2009 20:38
by racetrack
Here's a patch that adds drive-through depots, that is, depots that you can enter from both sides and drive through if the vehicle's orders permit. It works for both trains and road vehicles. It seems pretty stable and I'm keen to hear your thoughts.
Links to the patch and some videos here:
Drive-Through depots
Re: [patch] drive-through depots
Posted: 12 Mar 2009 21:22
by JacobD88
racetrack wrote:Here's a patch that adds drive-through depots, that is, depots that you can enter from both sides and drive through if the train's orders permit. There's still a few things to sort out but its working enough for you to play with if you like.
Welcome to the forums
Huzah!

Just the thing I'm looking for to accompany the "bigger depots" GRF, would you be interested in joining me on the servicing-stations project?...
https://www.tt-forums.net/viewtopic.php?f=36&t=40577
The thing i'm working on is more planned towards station like functionality and construction of depots, even using the station building interface, but if your up for it, it might be worth joining efforts?
The advantage of creating special "station" tiles to act as depots would also get around your bi-derectionality (drive-thru) question, and resolve any collisions between vehicles (if you construct the service-station correctly with signals et al)
I already have sprites too

and am continuing work on a whole set of servicing/depot sprites and tiles to go with it all
above based on Snorbuckle's work 2005
Feel free to PM me if you like...
Have also added a link to your patch on my threads FP
screenshot mock-up of "servicing-stations" also includes ISR set
Re: [patch] drive-through depots
Posted: 12 Mar 2009 21:26
by CommanderZ
racetrack wrote:Here's a patch that adds drive-through depots, that is, depots that you can enter from both sides and drive through if the train's orders permit. There's still a few things to sort out but its working enough for you to play with if you like.
Links to the patch and some videos here:
Drive-Through depots
--r.
Looks good. Will the pathfinder allow the trains to use the depot as a piece of track (with severe penalty maybe)?
BTW, Welcome to the tt-forums racetrack

Re: [patch] drive-through depots
Posted: 12 Mar 2009 21:42
by HackaLittleBit
Looks promising
Hope you join forces with JacobD88.
Keep up the good work.
Regards HackaLittleBit
Re: [patch] drive-through depots
Posted: 13 Mar 2009 03:46
by racetrack
JacobD88 wrote:Huzah!

Just the thing I'm looking for to accompany the "bigger depots" GRF, would you be interested in joining me on the servicing-stations project?...
http://www.tt-forums.net/viewtopic.php?f=36&t=40577
The thing i'm working on is more planned towards station like functionality and construction of depots, even using the station building interface, but if your up for it, it might be worth joining efforts?
The advantage of creating special "station" tiles to act as depots would also get around your bi-derectionality (drive-thru) question, and resolve any collisions between vehicles (if you construct the service-station correctly with signals et al)
I'm not uninterested, but I think my simple hack and your goals are actually quite different. By the sounds of it you're really looking at making stations that can do something other than load/unload cargo. Stations and depots are handled quite differently by the code, and while you could argue that stations and depots should be treated the same its going to be a much bigger patch (and thus much harder to get accepted into trunk).
I won't discuss it further here but I'll have a read through your thread and see if I can add anything. I'm certainly going to need something to do after finishing this patch; maybe that will be it
CommanderZ wrote:Will the pathfinder allow the trains to use the depot as a piece of track (with severe penalty maybe)?
I haven't tested it extensively, but I think the pathfinder is currently treating the depot as a block signal. I suppose it should have a configurable penalty, but I really don't know what would be appropriate. If I decide to make it so that trains can drive straight through without stopping (though presumably at reduced speed), then that would affect the cost again. Any ideas?
Re: [patch] drive-through depots
Posted: 13 Mar 2009 07:24
by JacobD88
racetrack wrote:
I'm not uninterested, but I think my simple hack and your goals are actually quite different. By the sounds of it you're really looking at making stations that can do something other than load/unload cargo. Stations and depots are handled quite differently by the code, and while you could argue that stations and depots should be treated the same its going to be a much bigger patch (and thus much harder to get accepted into trunk).
I won't discuss it further here but I'll have a read through your thread and see if I can add anything. I'm certainly going to need something to do after finishing this patch; maybe that will be it
Thanks for taking a look, i agree, the end goals are much more code intensive, but at least with your existing patch, upon completion, will still mean that the "build depot" function will not be rendered obsolete and it already accompanies the "bigger depot" GRF well as i have said.
As to patching in "servicing stations", i'm still trying to work out if a code re-write or massive addition is necessary, as both the station code and depot code already allow for the functions i require, so i am pondering over if and how it is possible to code in "bridges" for the code as necessary, for example, code the depot sprites as station tiles, then either create a GRF action and/or (hopefully smaller) patch bridge to tell the game engine that if these tiles are present to behave as a piece of station tile, but with the properties of a depot as and where appropriate
I re-iterate, i am still trying to work out if this is possible, but once you have finished this patch i would appreciate any help as im also trying to learn how to code as part of my project so my ability to spot how these things can be done is somewhat limited and noobish
Many thanks
Jacob
Re: [patch] drive-through depots
Posted: 13 Mar 2009 10:49
by Ammler
That looks awesome!
IMO, there is no need for special code for servicing station. Just make the bigger depot also available as station and you can make your big Service Stations, with a drive-though depot in the middle.
Greets
Ammler
Re: [patch] drive-through depots
Posted: 13 Mar 2009 11:41
by HackaLittleBit
Agree with ammler.
Maybe restrict drive through depot to situation on photo (imagine depot in between the stations).
Why? The classic depot in ttd gave many many headaches to many many peoples.
Changing that could take away the charm of the game. be careful.
Although building a depot complex like JacobD88 is very nice.
So putting the drive though depot in between two stations plus a nice time penalty (CommanderZ) would be an option.
also you would avoid buttons and options etc because simply if the train enters the depot and sees next tile as station it automatically assumes drive trough depot.
Regards
Re: [patch] drive-through depots
Posted: 13 Mar 2009 11:44
by JacobD88
Ammler wrote:IMO, there is no need for special code for servicing station. Just make the bigger depot also available as station and you can make your big Service Stations, with a drive-though depot in the middle.
That's a good point, though it would require
racetrack to make depots act as simply plain track tiles that trains could pass through without stopping and stop trains entering from both sides, otherwise you would end up with two trains entering one track of a "servicing station" and seemingly disappearing, something would have to be done to make
racetracks depots aware of other trains on the track entering the depot.
This is probably the largest difference between what i envision with "servicing stations" and
racetrack has already achieved in part,
racetracks patch modifies the existing depots to be drive-thru, and maybe in future versions pass-thru, but with servicing stations i mostly want to achieve the ability to service engines at stations with these special tiles, not build them or remove them from the tracks at stations (and therefore render
racetracks depot patch obsolete)...
In short "servicing stations" aims at allowing engines to have a "go to station xxx for servicing" command, upon which trains will simply move into a free station track, stop, and move off having been serviced, where-as
racetracks work gives existing depots bi-directional entry and maybe pass-thru
Maybe one day servicing stations will also become suitable for building trains (as i mentioned this as a possibility on my thread sometime ago), but after some thought i would rather not render OTTD functions totally obsolete, dump all over
racetracks patch, and force users to use "servicing stations" to build and service engines, one of the things i love about all TTO/TTD games is choice

and it would be nice to offer users the option to build depots as normal, add racetracks features, and add to the existing depot system by allowing trains to be serviced at stations with "servicing stations" rather than force a user to use one of the above

Re: [patch] drive-through depots
Posted: 14 Mar 2009 00:51
by SirXavius
I decree that this must be perfected.
Many have waited for a more realistic train depot, and now we have it. Not only have you got the thing to basic functionality, but you understand the problems that have to addressed. That's impressive. This is a fine example if an idea that was thought at one time, i'm sure, to never be implementable. Now someone has taken the time to study it, and code it. Excellent work!!
Ideally it would be great to have a realistic ONE-PIECE depot building (which jacob has created the sprite for), enter in one direction, and leave in this opposite side. Eventually i hope a train yard can serve as a depot, but that's for a future patch. Any train that enters the depot of course will be slowed considerably, and that can serve as the penalty for using a depot as a glorified waypoint.
Re: [patch] drive-through depots
Posted: 15 Mar 2009 20:02
by SirkoZ
I went through the patch and saw the videos - there doesn't seem to be included or mentioned in the wiki for that matter that if the depot is of same length as a train, train will enter it with higher speed than ordinary depots (measely 61km/h).
This higher entering speed would trully differentiate these long depots from the ordinary depots with the so-called realistic acceleration ON.
Re: [patch] drive-through depots
Posted: 15 Mar 2009 21:07
by peter1138
Yeah, you're right there, I don't think, in real life, an engine would ever enter a depot at anywhere NEAR 61km/h. The limit should be much LOWER.
Re: [patch] drive-through depots
Posted: 15 Mar 2009 22:11
by racetrack
SirkoZ wrote:I went through the patch and saw the videos - there doesn't seem to be included or mentioned in the wiki for that matter that if the depot is of same length as a train, train will enter it with higher speed than ordinary depots (measely 61km/h).
This patch has nothing to do with long depots. Please study the above posts a little more closely; there's been some discussion about how the drive-through depot patch might be used with JacobD88's long depot/service station work, but thats not what this is.
Re: [patch] drive-through depots
Posted: 15 Mar 2009 23:37
by racetrack
Just uploaded an updated patch that adds drive-through depots for road vehicles, and a new video showing it off.
Re: [patch] drive-through depots
Posted: 16 Mar 2009 00:36
by Flavius
Hi racetrack
Congratsulations on your new patch, simply stunning. Bravo

Everyone will love this.
Methinks Depots need to have very low speed entry, eg 15mph; because it is a work area and safety would be paramount of course.
Ideal usage would be a dedicated side track with signals and one way traffic.

Re: [patch] drive-through depots
Posted: 16 Mar 2009 00:54
by maquinista
Rollo wrote:Hi racetrack
Congratsulations on your new patch, simply stunning. Bravo

Everyone will love this.
Methinks Depots need to have very low speed entry, eg 15mph; because it is a work area and safety would be paramount of course.
Ideal usage would be a dedicated side track with signals and one way traffic.

I don't like this idea. It's more realistic, but It's too slow in the OpenTTD world.
Re: [patch] drive-through depots
Posted: 16 Mar 2009 01:48
by racetrack
maquinista wrote:Rollo wrote:Methinks Depots need to have very low speed entry, eg 15mph; because it is a work area and safety would be paramount of course.
Ideal usage would be a dedicated side track with signals and one way traffic.

I don't like this idea. It's more realistic, but It's too slow in the OpenTTD world.
Don't worry, its nothing to do with this patch. If/when I implement non-stop for drive-through depots, it'll be at the depot speed limit. Any other change to depot limits will have to be done elsewhere, probably by someone else.
Re: [patch] drive-through depots
Posted: 16 Mar 2009 13:31
by SirkoZ
peter1138 wrote:Yeah, you're right there, I don't think, in real life, an engine would ever enter a depot at anywhere NEAR 61km/h. The limit should be much LOWER.
Get this through your head, Mr. Caps:
How long does a day last in OpenTTD?
Now back to the topic.
racetrack wrote:maquinista wrote:Rollo wrote:Methinks Depots need to have very low speed entry, eg 15mph; because it is a work area and safety would be paramount of course.
Ideal usage would be a dedicated side track with signals and one way traffic.

I don't like this idea. It's more realistic, but It's too slow in the OpenTTD world.
Don't worry, its nothing to do with this patch. If/when I implement non-stop for drive-through depots, it'll be at the depot speed limit. Any other change to depot limits will have to be done elsewhere, probably by someone else.
Then it's back to good old single tile depots. Phew.

Re: [patch] drive-through depots
Posted: 16 Mar 2009 14:24
by peter1138
SirkoZ wrote:How long does a day last in OpenTTD?
2.2 seconds. It is not realistic. Therefore, changes from one arbitrary unrealistic speed to another arbitrary unrealistic speed, for the benefit of just one user, won't happen. Get that into your head.
How're the issues coming along, racetrack?
Re: [patch] drive-through depots
Posted: 17 Mar 2009 06:33
by Forked
This would be an excellent feature for those of us who build depots that try to be at least the same length as the trains running the track.
I noticed one slightly strange thing when doing a quick test now. (replicated without having any newgrf's loaded too).
When the train is coming back to the depots, it drives straight through depot 1 and instead enters depot 2. When coming out of depot 2 again towards the stations (through depot 1) it goes in to depot 1 and then exits it again before continuing.

- dtd.png (85.49 KiB) Viewed 3564 times