Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Mon Nov 11, 2024 8:29 pm
All times are UTC + 0
OpenTTD: Don’t get your buses in a bunch!
Moderators: Global Moderators
Post new topic   Reply to topic Page 1 of 1 [1 Post] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Banshee
Supreme Banshee


Also Known As: banshee_revora (Steam)
Joined: 15 Aug 2002
Location: Brazil

PostPosted: Wed Feb 14, 2024 2:28 am    Post subject:  OpenTTD: Don’t get your buses in a bunch!
Subject description: I wish we had this solution in real life, since bus bunching happens a lot where I live.
Reply with quote  Mark this post and the followings unread

Aloha! The developers from OpenTTD released a new announcement for the community a while ago about a new feature presented on OpenTTD 14, which deals with bus bunching. For those unaware of what is being written here, OpenTTD is an open-source re-creation of Transport Tycoon Deluxe, a business simulation game where you control a transport company. OpenTTD extends the experience of Transport Tycoon Deluxe with bigger map sizes, customizable artificial intelligence bots, downloadable customizations, ports for several operating systems, support for many languages, etc. Here are the official words about it:

Quote:
Have you ever waited for a late bus, and then two arrived at once?


This is called “bus bunching,” and I bet you’ve seen it happen in OpenTTD – and not just with buses.


For years, players have requested an easier way to keep vehicles with shared orders spaced out along their route. In OpenTTD 14, we’ve added one.



To keep vehicles spaced evenly, we can either speed up or slow down vehicles.
Speeding up vehicles is tricky even in real life, requiring adding extra vehicles, skipping stops, or turning a vehicle around before its final destination.
It’s much easier to simply slow them down. Real transit schedules have extra time built in to pad the schedule, often coinciding with the driver’s breaks.
A late-running vehicle can take a shorter break and depart on time. This is also possible in OpenTTD using timetables, but that’s a lot of manual work.
The most popular fork of OpenTTD, JGR’s Patch Pack, includes an “autoseparation” feature that uses timetables to automatically keep vehicles spread out.


With any delay-based unbunching method, there is a fundamental danger of the feature: deadlocks.
Vehicles get out of order, they block each other waiting to be on time, and the player has no idea why.
We’ve seen a few attempts at solving the problem, most with a relatively complex algorithm to avoid deadlocks, which are hard to test.


A new approach

There is one place where vehicles cannot deadlock: Depots.


Vehicles in depots don’t take up space on roads or rails in the game world, so they cannot block each other.
This is the trick to the new unbunching feature in OpenTTD 14.





Vehicles can have orders to get serviced or stop at a depot.
This feature adds a new type of depot order, marking that depot as the unbunching point for a group of vehicles that share orders.
This is chosen from the depot action dropdown where you’d choose “Service,” “Stop,” etc.
Vehicles that share orders with each other will depart the depot at a consistent, repeating interval.


How does it work?

When a vehicle enters a depot, it records the duration of the trip it just completed. When it tries to exit a depot, it checks if its next departure time has arrived yet. If we are past the departure time, it leaves and immediately calculates the departure time of the next vehicle.


This calculation is simple: Take the average last trip duration of all vehicles, divide by the number of vehicles to get the interval between trips, and then add that interval to the current time.
Because we look at the average trip duration, inconsistencies due to traffic or routing are canceled out.

If vehicles are extremely delayed or if new vehicles get added to the shared order route, the interval takes a few cycles to stabilize, but it will work itself out shortly.

A vehicle can only have one depot order marked for unbunching, so if you try and add a second, you get an error.
In addition, unbunching cannot be used with full load or conditional orders because these orders can take a very variable amount of time.

Trying to add one of these orders or trying to mark a depot for unbunching when the order list already includes one of these orders blocks the new change and shows an error.


What about timetables?

Timetabling vehicles is not required to use the unbunching feature.
However, if you like to timetable your vehicles, you can use the two features together.
When a vehicle leaves a depot after being unbunched, it is marked “on time.”
The only oddity of overriding the timetable in this way is that the expected arrival/departure times of orders after the depot may not be correct if the vehicle is held in the depot for unbunching.


More about OpenTTD 14

This is part of a weekly series of dev diaries about the major new features in OpenTTD 14.
Next week, we’ll delve into the design of OpenTTD’s new typography.




Bear in mind that they are beta testing OpenTTD 14, and the latest beta is OpenTTD 14.0-beta3.


You can learn more about OpenTTD by visiting the Official Website, and Forums. That's all, folks! Stay tuned at PPM for more news coverage on OpenTTD!


Key Words: #News #OpenTTD 

_________________


Mods, Mods Support, Public Researchs, Map Archives, Tutorials, A Friendly Community and much more. Check it out now!

Back to top
View user's profile Send private message Visit poster's website Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [1 Post] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only two of the following words separated by a sharp: Brotherhood, unity, peace! 

 
You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.2069s ][ Queries: 11 (0.0073s) ][ Debug on ]