The International Simutrans Forum

Development => Extension Requests => Topic started by: wlindley on November 16, 2011, 09:17:17 PM

Title: Taxi-Cab Company
Post by: wlindley on November 16, 2011, 09:17:17 PM
For Multiplayer, it might be possible to play entirely as a Taxi-Cab company.  That would require writing some code to emulate the operation of a taxi:

That would work equally well for "Jitney" bus services, of course.

And having to write non-trivial code like the above explains why we don't already have taxis in Simutrans!
Title: Re: Possible if taxis are made as buses?
Post by: greenling on November 16, 2011, 09:27:15 PM
wlindley
i do look after modells for taxis!
Title: Re: Taxi-Cab Company
Post by: Fabio on November 18, 2011, 09:43:10 AM
Split from: http://forum.simutrans.com/index.php?topic=3706.0

I like wlindley's suggestion, it's the most articulated I ever read about taxis. It's worth its own extension request.

Discussion about making taxi addons (for pak128) with existing code can go on here: http://forum.simutrans.com/index.php?topic=3706.0
Title: Re: Taxi-Cab Company
Post by: stmaker on November 18, 2011, 11:04:28 AM
Awesome.

I'll try to prepare the taxis. need to try my vehicle-making skills first. :)
Title: Re: Taxi-Cab Company
Post by: wlindley on November 18, 2011, 01:20:24 PM
Perhaps the route and line dialogs could have a "destination" instruction called "Operate as taxi" which would engage the above behaviour.  You could set the route to be:

1. London King's Cross (50% full)
2. Operate as taxi
3. London Waterloo International (wait 1/16 month)
4. Operate as taxi

so the cab would wait at King's Cross for a passenger, then per the second instruction "ask" that passenger where he is going, choose that as a destination (adding it temporarily to the route list, just like Go To Depots currently do), go directly there, and discharge the passenger. 

A first pass at the code could stop there -- it does mean taxicabs would run empty back to their next destination (unless, perhaps, there happened to be someone waiting right there who wants to ride toward the next destination in the list).  Once all that is working, then possibly handle another temporary destination with a flag that means "Move to destination, while looking for walking person who is hailing cab from sidewalk" -- that would be engaged whenever transitioning from the "operate as taxi" and whenever the taxi has no passengers.

It would be kinda cool to see a loaded Eurostar arrive at the station, followed by a flurry of taxicabs departing...
Title: Re: Taxi-Cab Company
Post by: stmaker on November 18, 2011, 01:31:58 PM
Quote from: wlindley on November 18, 2011, 01:20:24 PM
Perhaps the route and line dialogs could have a "destination" instruction called "Operate as taxi" which would engage the above behaviour.  You could set the route to be:

1. London King's Cross (50% full)
2. Operate as taxi
3. London Waterloo International (wait 1/16 month)
4. Operate as taxi

so the cab would wait at King's Cross for a passenger, then per the second instruction "ask" that passenger where he is going, choose that as a destination (adding it temporarily to the route list, just like Go To Depots currently do), go directly there, and discharge the passenger. 

A first pass at the code could stop there -- it does mean taxicabs would run empty back to their next destination (unless, perhaps, there happened to be someone waiting right there who wants to ride toward the next destination in the list).  Once all that is working, then possibly handle another temporary destination with a flag that means "Move to destination, while looking for walking person who is hailing cab from sidewalk" -- that would be engaged whenever transitioning from the "operate as taxi" and whenever the taxi has no passengers.

You sir are awesome. I love your idea. ;)
Title: Re: Taxi-Cab Company
Post by: ojii on November 18, 2011, 01:39:28 PM
Quote from: wlindley on November 18, 2011, 01:20:24 PMIt would be kinda cool to see a loaded Eurostar arrive at the station, followed by a flurry of taxicabs departing...

THIS!
Title: Re: Taxi-Cab Company
Post by: Dwachs on November 18, 2011, 01:44:09 PM
Quote from: wlindley on November 18, 2011, 01:20:24 PM
so the cab would wait at King's Cross for a passenger, then per the second instruction "ask" that passenger where he is going, choose that as a destination (adding it temporarily to the route list, just like Go To Depots currently do), go directly there, and discharge the passenger. 
How to determine the range of the taxi? I mean, passengers to which destinations should take the particular taxi?
Title: Re: Taxi-Cab Company
Post by: ojii on November 18, 2011, 01:46:36 PM
Quote from: Dwachs on November 18, 2011, 01:44:09 PM
How to determine the range of the taxi? I mean, passengers to which destinations should take the particular taxi?

How about a (pakset?) setting to define the probability that a passenger will take a taxi for a distance of n. The chances should be very low if n is very low (they could walk) or very high (taxi is too expensive in real life).

EDIT: Maybe Log-Normal distribution where the setting defines the alpha value?
Title: Re: Taxi-Cab Company
Post by: transporter on November 18, 2011, 03:04:22 PM
Great idea. Would be a cool new (large) addition to the game
Title: Re: Taxi-Cab Company
Post by: ӔO on November 18, 2011, 03:39:31 PM
Quote from: Dwachs on November 18, 2011, 01:44:09 PM
How to determine the range of the taxi? I mean, passengers to which destinations should take the particular taxi?

surprisingly: http://www.taxi-driver.co.uk/phpBB2/viewtopic.php?f=1&t=17643
Title: Re: Taxi-Cab Company
Post by: Combuijs on November 18, 2011, 03:53:24 PM
Yes, but that will be different in different countries. In England I recently took a taxi from Sheffield to Hope (15 miles?) which cost me about 20 pounds. In the Netherlands I would never do that, I would be broke!