Patch: Drive-Through Road Vehicle Stops

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

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

Patch: Drive-Through Road Vehicle Stops

Post by mart3p »

This patch adds drive-through bus and truck stops. It is intended to work like the same feature in TTDPatch. This is an initial release and needs thoroughly testing, please give it a try and report back with any problems.

Using Drive-Through Road Stops

1. It's best to have both sides of the stop connected to the road network. If one side is unconnected vehicles will still use the stop and then turn around, to come back through the stop again when they leave. There must be at least one full tile on the exit from the stop to allow vehicles to turn (this is also required in TTDPatch).

Edit: from the version against r8643 (08/02/07), this is no longer a requirement. Vehicles can now turn around at the exit of a drive-through road stop. Of course, it is still better if both ends of the stop are connected. ;)


2. Multistop bus and truck stops can be created in any combination of position and orientation. Of course there are limitations to the arrangements that can be used if vehicles are to access the stops efficiently.

3. Opponents’ vehicles can also go through your drive-through stops without stopping (and your vehicles can go through theirs). A vehicle that is not actually stopping at a drive through stop treats it as a normal road.

Continued next post (so I can add more attachments)...


Edit: New patch update at r5526. Build on slopes bug fixed. Drive-through road stops now use custom graphics. Sceenshot updated to show new graphics. If you are using the patch you will also need roadstops.grf. Just put it in your data folder, it does not require a config. file entry. 20/07/06

Note to those who download roadstops.grf: This is NOT a NewGRF file. If you use it without the drive-through road stops patch IT WILL NOT WORK. Anyone who ignores this warning and then asks why roadstops.grf doesn't work, will probably be flamed. ;)

Zip file with updated win32 exe is now in the next post It includes roadstops.grf.

Edit: updated version against r5656. Compile warnings silenced. Connecting road bug fixed. 30/07/06
This patch is now included in the MiniIN. Find the most recent MiniIN builds for all platforms here.

Edit: patch updated against r5910. 15/08/06
Edit: patch updated against r6080. 23/08/06
Edit: patch updated against r6247. 30/08/06
Edit: patch updated against r6380. Fixed: broken build sound effect and selection window close. 4/09/06
Edit: patch updated against r6561. 28/09/06
Edit: patch updated against r6698. 08/10/06
Edit: patch updated against r6901. Fixed: bug that prevented town growth past a drive-though stop. 23/10/06
Edit: patch updated against r7071. 06/11/06
Edit: patch updated against r7130. New features: build over player owned roads, YAPF penalty for passing through stop. 11/11/06
Edit: patch updated against r7152. New feature: remove tool now removes stop and leaves road in place. 15/11/06
Edit: patch updated against r7217. 19/11/06
Edit: patch updated against r7326. 02/12/06
Edit: patch updated against r7647. 30/12/06
Edit: patch updated against r7799. 03/01/07
Edit: patch updated against r8069. 11/01/07
Edit: patch updated against r8152. 16/01/07
Edit: patch updated against r8425. New feature: in-line drive-through stops now work. 27/01/07
Edit: patch updated against r8643. New features: build on town-owned roads, turn around in road stop. 08/02/07
Edit: patch updated against r8704. New feature: NPF penalty for passing through stop. For details of other changes see my latest post. 13/02/07
Edit: patch update against r8712 and a number of small improvements (see latest post for details). 13/02/07
Edit: patch updated against r8733. 14/02/07
Attachments
roadstops.grf
Please read note above
(2.35 KiB) Downloaded 1658 times
Mart3p Bus Co,  28th Nov 1974.png
Mart3p Bus Co, 28th Nov 1974.png (91.72 KiB) Viewed 22640 times
Drive_Thru_r8733.patch
(48.36 KiB) Downloaded 847 times
Last edited by mart3p on 14 Feb 2007 14:14, edited 29 times in total.
Image
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Post by mart3p »

Graphics

I have used existing game graphics for the bus and truck stops (as TTDPatch does). Ideally I would like to add new dedicated graphics for drive-through stops. If there are any artists who would like to give it a go, post your ideas here. The new graphics would need to fit the style of the existing bus and truck bays and use company colours in a similar manner. They should use the standard paved road sprite as a ground tile (trg1r.pcx sprites 1313 and 1314), this way the road will be displayed correctly if an alternative roadset is used.

And Finally

While coding and testing this patch I found a few bugs in the trunk code that the patch also fixes. These are:
1. A problem with Multistop when using NPF I have posted a bug report on Flyspray (FS#242). Edit: fixed in trunk at r5899
2. A small problem when using YAPF, road vehicles prefer bends to straight road, details here. Edit: fixed in trunk at r6164
3. Another YAPF problem, road vehicles trying to use opponent’s depots, details here. Edit: fixed in trunk at r5897
4. The problem that, when you press the Goto Depot button, you often get the message "Unable to find local depot" even when there is a depot within a few tiles. I think fixing this also fixes a few pathfinding issues as well. I must post another bug report. ;)
Edit Bug report now posted on Flyspray (FS#249). Edit: fixed in trunk at r5898

Enjoy! :)

Edit: New win32 exe added, In-line drive-through stops now work. 28/01/07
Edit: New win32 exe. New features: build on town-owned roads, turn around in road stop. 08/02/07
Edit: New win32 exe. Bugfix 10/02/07
Attachments
Mart3p Transport, 18th Jul 2006.png
Mart3p Transport, 18th Jul 2006.png (75.93 KiB) Viewed 23204 times
Mart3p Bus Co., 26th Oct 1969 #3.png
Mart3p Bus Co., 26th Oct 1969 #3.png (82.98 KiB) Viewed 23218 times
OTTD-win32-r8656-dt.zip
Drive-Through Road Stops win32 exe
(1.83 MiB) Downloaded 584 times
Last edited by mart3p on 10 Feb 2007 01:56, edited 8 times in total.
Image
User avatar
Graphite
Engineer
Engineer
Posts: 84
Joined: 17 Nov 2005 20:56
Location: Netherlands
Contact:

Post by Graphite »

Had a quick look just now and it seems to be working fairly well. Even stress-tested it a bit by putting three stations next to each other and then sending a truckload of buses to them and they seemed to handle them just fine.

One of the first things I tried to do was to place the bus-stop on an existing road-tile of the town. I was a bit surprised that that wasn't possible. I hope that's a feature in the making, since it would make adding buses to an existing town so much easier and less "invasive" for the town.
A computer scientist is someone who, when told to "Go to Hell," sees the "go to," rather than the destination, as harmful.
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Post by mart3p »

Thanks for your comments Graphite.
Graphite wrote:One of the first things I tried to do was to place the bus-stop on an existing road-tile of the town. I was a bit surprised that that wasn't possible. I hope that's a feature in the making, since it would make adding buses to an existing town so much easier and less "invasive" for the town.
I have coded this initially to have the same functionality as in TTDPatch, where you have to remove the road before placing a drive-through stop. Your suggestion is certainly worth considering though. For now, switch on extra dynamite (allow removal of more town-owned roads etc.) :)
Image
User avatar
White Rabbit
Tycoon
Tycoon
Posts: 1734
Joined: 22 Jun 2005 19:15

Post by White Rabbit »

I think that it'd be useful if the cargo boxes weren't made transparent. When you press X, you do it because taller buildings block your view, but it's not of much help when the truck station you're looking for has gone transparent too!
Image
User avatar
XeryusTC
Tycoon
Tycoon
Posts: 15415
Joined: 02 May 2005 11:05
Skype: XeryusTC
Location: localhost

Post by XeryusTC »

White Rabbit wrote:I think that it'd be useful if the cargo boxes weren't made transparent. When you press X, you do it because taller buildings block your view, but it's not of much help when the truck station you're looking for has gone transparent too!
That happens with train stations and other bus stations too, you could prevent it with Wolf01's patch IIRC.
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
Image
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
Image Image Image Image Image Image Image
User avatar
Born Acorn
Tycoon
Tycoon
Posts: 7596
Joined: 10 Dec 2002 20:36
Skype: bornacorn
Location: Wrexham, Wales
Contact:

Post by Born Acorn »

Great work mart3p, another feature I love in the patch implemented in OpenTTD!

I recommend not using new graphics (since more often that not they never look original, and it requires new or modified grf files, but using these two sprites from tg1r.grf:
Attachments
busstop.PNG
busstop.PNG (1.79 KiB) Viewed 23111 times
Image
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Post by mart3p »

White Rabbit wrote:I think that it'd be useful if the cargo boxes weren't made transparent.
My answer to your comment is the same as my answer to Graphite:
mart3p wrote: I have coded this initially to have the same functionality as in TTDPatch
;)
But you’re right it might be better, I’ll have a look to see if it’s possible.
XeryusTC wrote:That happens with train stations and other bus stations too, you could prevent it with Wolf01's patch IIRC.
That’s right, Wolf01’s patch does allow you to keep stations non-transparent.
Image
Goldwyn
Engineer
Engineer
Posts: 29
Joined: 21 Mar 2005 20:25

Post by Goldwyn »

While placing drive through stops over existing roads would be a nice feature, for all the other stations, you still need to clear the tiles before placing stations.

Would it be feasible to allow all stations to be placed over existing titles like buildings and roads if you implement placing drive through stops over existing roads?
User avatar
Born Acorn
Tycoon
Tycoon
Posts: 7596
Joined: 10 Dec 2002 20:36
Skype: bornacorn
Location: Wrexham, Wales
Contact:

Post by Born Acorn »

I doubt it. Other players may want to use said tiles. With building drive through stations over roads, the functionality of the road is maintained for all companies.
Image
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Post by mart3p »

Thanks for you comments Born Acorn. :)
Born Acorn wrote:I recommend not using new graphics (since more often that not they never look original)
Well I agree with you that they should look as original as possible. That’s why I said above:
mart3p wrote:The new graphics would need to fit the style of the existing bus and truck bays and use company colours in a similar manner.
Born Acorn wrote:and it requires new or modified grf files.
I’ve got no problems with using new grf files, it’s just the artwork bit that I’m not so good at. ;)

But now that you’ve pointed out those sprites, I’ll check out how they look in the game.
Image
User avatar
Born Acorn
Tycoon
Tycoon
Posts: 7596
Joined: 10 Dec 2002 20:36
Skype: bornacorn
Location: Wrexham, Wales
Contact:

Post by Born Acorn »

The problem with asking for original looking graphics is that the ones that come back often don't, due to many people's graphical styles being different to that of Simon Foster. (The original graphics dude).

I'd think that lorry bay graphics would be especially hard, due to the appropriate loading graphics must be fitted within a 5 pixel wide area.
Image
User avatar
prissi
Chief Executive
Chief Executive
Posts: 648
Joined: 15 Nov 2004 19:46
Location: Berlin, Germany
Contact:

Post by prissi »

Here the little exhanced busstop (because the above sprites have to pillars) I made for the simuTTD.
Attachments
ttd-busstop.png
ttd-busstop.png (1.46 KiB) Viewed 23055 times
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Post by mart3p »

Born Acorn: here is how the bus stops look with the sprites you suggested. IMO they look ok, but some of the bus shelter supports are missing in some views (these supports aren’t visible where the sprites are used for the original bus depots)
Born Acorn wrote:I'd think that lorry bay graphics would be especially hard, due to the appropriate loading graphics must be fitted within a 5 pixel wide area.
Good point, but the TTDPatch drive-through style lorry stop is distinguishable from a normal road tile. It’s the drive-through bus stops that are difficult to see.
Attachments
Drive_Thru2, 22nd Jan 1954.png
Drive_Thru2, 22nd Jan 1954.png (87.67 KiB) Viewed 23060 times
Image
User avatar
Korenn
Tycoon
Tycoon
Posts: 1735
Joined: 26 Mar 2004 01:27
Location: Netherlands
Contact:

Post by Korenn »

hm that actually looks pretty good :)
l_Blue_l
Transport Coordinator
Transport Coordinator
Posts: 285
Joined: 29 Mar 2006 22:42
Contact:

Post by l_Blue_l »

This is just an idea but i think with haveing the new on road bus stops i think it should have its own independent coverage area while everything els stays the same.

btw great work.
User avatar
Born Acorn
Tycoon
Tycoon
Posts: 7596
Joined: 10 Dec 2002 20:36
Skype: bornacorn
Location: Wrexham, Wales
Contact:

Post by Born Acorn »

Korenn wrote:hm that actually looks pretty good :)
I agree, It makes it more like a bus station and less like a road tile.
Image
User avatar
bobingabout
Tycoon
Tycoon
Posts: 1850
Joined: 21 May 2005 15:10
Location: Hull, England

Post by bobingabout »

looks great.

there is 1 question that begs asking

in TTDP i found it annoying how you had to demolish the road tile before being able to place a bus stop on it(which makes it impossable to place them in the middle of a town/city), but it would be unfair to allow placing them on oponants or town roads, as it would be a key way to "Steal" their road for demolision. any idea on how to get around this? (i thought that demolishing a but stop would return the road to its previous owner, however this then begs the question of how it would remember that)
JPG SUX!!! USE PNG!!!
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.

[/url]
User avatar
mart3p
Tycoon
Tycoon
Posts: 1030
Joined: 31 Oct 2005 21:00
Location: UK

Post by mart3p »

mart3p wrote:
Graphite wrote:One of the first things I tried to do was to place the bus-stop on an existing road-tile of the town. I was a bit surprised that that wasn't possible. I hope that's a feature in the making, since it would make adding buses to an existing town so much easier and less "invasive" for the town.
I have coded this initially to have the same functionality as in TTDPatch, where you have to remove the road before placing a drive-through stop. Your suggestion is certainly worth considering though. For now, switch on extra dynamite (allow removal of more town-owned roads etc.) :)
bobingabout wrote:in TTDP i found it annoying how you had to demolish the road tile before being able to place a bus stop on it (which makes it impossable to place them in the middle of a town/city), but it would be unfair to allow placing them on oponants or town roads, as it would be a key way to "Steal" their road for demolision. any idea on how to get around this?
Yes, a good point. With this in mind, I think that having to remove the road before building a drive-through stop, should stay.
Image
User avatar
Born Acorn
Tycoon
Tycoon
Posts: 7596
Joined: 10 Dec 2002 20:36
Skype: bornacorn
Location: Wrexham, Wales
Contact:

Post by Born Acorn »

But this can also deny service to other companies. Building expansion "grids" in cities to force faster growth will prevent people building bus stops later on, and they will have to demolish the city to build a terminal bus stop. Is it possible to keep the owner of the road the same while making the bus stop your own?
Image
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 18 guests