The International Simutrans Forum

 

Author Topic: Load/unload cargo/passenger to take some time OpenTTD style...  (Read 10634 times)

0 Members and 1 Guest are viewing this topic.

Offline Max-Max

  • Coder/patcher
  • *
  • Posts: 670
    • MK Development
  • Languages: SV,EN
When cargo/passengers are loading/unloading it happens instantly. I really like the way OpenTTD does it, wagon by wagon where it takes time to load and unload.

The time depends is further extended if the wagon doesn't fit on the platform.

We can argue if it is possible to load and unload outside a platform and yes passenger and smaller goods would be possible but just takes more time. We could also argue why it its possible (today) to unload 6 wagons of passengers on a cargo platform next to a bus stop...

If we implemented load/unload time, we could adjust it to the type of platform vs type of wagon as well.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2920
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #1 on: April 29, 2013, 10:55:40 PM »
Where's James? Simutrans Experimental already have loading time.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 20266
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #2 on: April 30, 2013, 01:18:26 AM »
This is an interesting idea. What is proposed is different to what we have in Experimental: in Experimental, there is a variable dwell time for convoys in stops (which is also now in Standard, with some small differences that are not relevant here) set by the pakset maintainers for each vehicle. In Experimental, there is also a waiting time and (in the latest release candidates) a transfer time, but these figures are both used for journey time calculations for the purposes of choosing which route to take and the journey time tolerance. What we do not have in Experimental is a system whereby the actual loading/unloading of packets of passengers, mail and goods is delayed based on a loading time factor.

The question is - would this add anything of substance compared to our existing notional system or would it merely be cosmetic? I tend to incline towards the latter; but can anyone suggest any real differences that this might make to the simulation that might justify the significant coding that it would require?

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #3 on: April 30, 2013, 11:27:51 AM »
cars loading slowly would be unsuitable for busy lines or require more platforms...

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 20266
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #4 on: April 30, 2013, 11:42:19 AM »
Fabio - is that not more related to the dwell time, which is already simulated in both Standard and Experimental?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10220
  • Languages: De,EN,JP
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #5 on: April 30, 2013, 10:12:44 PM »
There is a loading time also in standard. Though it is at maximum 2s per convoi.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 20266
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #6 on: April 30, 2013, 10:20:05 PM »
Has Standard not recently introduced a variable loading time?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10220
  • Languages: De,EN,JP
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #7 on: April 30, 2013, 10:30:40 PM »
Yes, but it will be slower than 2000 milliseconds.

Offline Max-Max

  • Coder/patcher
  • *
  • Posts: 670
    • MK Development
  • Languages: SV,EN
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #8 on: May 01, 2013, 12:35:34 AM »
It will contribute to gaming experience in a way that you need to build your platforms and convoys to match for best result. In OpenTTD the load/unload time are significant increased for wagons outside the platform.

We could bring it one step further to also delay cargo unloaded/loaded on the wrong type of platform. The PAK could specify for each wagon type (or goods type) what platform(s) it prefers and/or accepts where no-platform is one of the selectable types.

Prefered platforms has no extra impact on time (same as now).
Accepted platforms are not optimal and has some impact.
A platform not specified in any of the lists is unaccepted and behave as it do now while outside a platform.

This would for example allow the PAK designer to design a car ramp that only take cars and nothing else.
The cars would have a station tile with a car ramp as the prefered and maybe a crane as accepted to lift them off and as long no-platform isn't specified, it won't unload/load outside any platform.

The extra time can be expressed as a float in the PAK to extend the dwell time per wagon, like 1.0 for prefered and 1.3 for accepted and 2.0 for outside platform (for types that can be handled outside platform.

I guess you get the idea....

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 20266
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #9 on: May 01, 2013, 12:46:03 AM »
Ahh, this is not what I imagined when you first posted.  You are referring to here variable dwell time depending upon the suitability of the station/stop facilities (rather than, as we have at present, variable dwell time depending on the vehicles, and, in Experimental, the amount that needs to be loaded/unloaded to/from them).

I thought that you were originally referring to actually delaying packets of goods, passengers and mail that have arrived at a stop from boarding any outgoing convoy until a time representing a transfer time has elapsed.

May I ask - do you have any historical/current precedents/prototypes showing the actual figures for dwell times of vehicles and how they vary depending on the factors to which you refer?

Offline Max-Max

  • Coder/patcher
  • *
  • Posts: 670
    • MK Development
  • Languages: SV,EN
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #10 on: May 01, 2013, 01:01:58 AM »
No I have no figures nor experience of this. I was kind'a brainstorming on the unload/load times. OpenTTD shows a % number while unloading and loading, this gives you a nice indication of how long time it takes, from there we could let the platform have impact on it too.

I can only draw the conclusion that it goes faster to load/unload if you have the tools for it. You can unload chemicals without a pump, but it would take a heck of a time compared to a pump station.

It would be up to the PAK designer to specify what platforms can be used for a specific type of cargo.

Quote
I thought that you were originally referring to actually delaying packets of goods, passengers and mail that have arrived at a stop from boarding any outgoing convoy until a time representing a transfer time has elapsed.

Isn't this the same thing but the time is also pending on the wagon and platforms?

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5670
  • Languages: EN, NO
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #11 on: May 01, 2013, 07:35:42 AM »
The trouble is that some wagons can't really be loaded outside the loading area. If the train is too long, then it has to load the first (or last) wagons, move forwards (or backwards) a bit, load the next few wagons and so on. Whether passenger wagons can be (un)loaded outside a platform depends on time and space. As I understand it, this has recently been outlawed in Norway, with several stations being closed down because it was not deemed worth it to lengthen the platforms in order to make it legal for the trains to stop there.

If platforms didn't need to match train length, then players would only need a single platform tile. One would suffer some time penalties, but would it outweigh the money saved?

Offline Max-Max

  • Coder/patcher
  • *
  • Posts: 670
    • MK Development
  • Languages: SV,EN
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #12 on: May 01, 2013, 04:19:31 PM »
As I suggested, this would be up to the PAK designer to decide what cargo and wagons can be handled outside the platform and how much penalty it will give.

I don't know what would be best practice to implement this but here is a pseudo example:

Code: [Select]
####################################################
# Regular Expressions for dummies
# Test data:
#
# PassengerPlatform
# CargoPlatform
# ExpressPassengerPlatform
# No-Platform
# CarPlatform
# PassengerStation
# PlatformExpress
#
#"Passenger" Matches all containing "Passenger"
# PassengerPlatform
# ExpressPassengerPlatform
# PassengerStation
#
#"^Passenger" Matches all beginning with "Passenger"
# PassengerPlatform
# PassengerStation
#
#"Platform$" Matches all ending with "Platform"
# PassengerPlatform
# CargoPlatform
# ExpressPassengerPlatform
# No-Platform
# CarPlatform
#
#"^(?!.*Passenger).*$" Matches all not containing "Passenger"
# CargoPlatform
# No-Platform
# CarPlatform
# PlatformExpress

#"^(?!Passenger).+" Matches all not beginning with "Passenger"
# CargoPlatform
# ExpressPassengerPlatform
# No-Platform
# CarPlatform
# PlatformExpress

#".*(?<!Platform)$" Matches all not ending with "Platform"
# PassengerStation
# PlatformExpress

###########################################################################################
# Platforms, no additional data
Obj=building
Name=PassengerPlatform
type=stop
waytype=track

Obj=building
Name=ExpressPlatform
type=stop
waytype=track

Obj=building
Name=CarLoadingPlatform
type=stop
waytype=track

Obj=building
Name=GoodsPlatform
type=stop
waytype=track


###########################################################################################
# Wagons, addition of platform data

# Passenger wagon
obj=vehicle
name=PassengerWagon
waytype=track
freight=Passenger
# Here we specify the bonus/penalty for different platforms
# A passenger platform gives a 1.00 factor
# A goods platform gives a 1.10 factor
# A passenger car loading platform gives a 1.60 penalty factor
# Outside a platform 2.00 penalty factor
platform[0]=PassengerPlatform,100
platform[1]=GoodsPlatform,110
platform[2]=CarLoadingPlatform,160
platform[3]=No-Platform,200 # <--- Built in platform type to specify "outside" platform

# Car wagon
obj=vehicle
name=CarWagon
waytype=track
freight=Cars
# Here we specify the bonus/penalty for different platforms
# Cars can ONLY be handled by a CarLoadingPlatform.
# All unspecifyed platforms will not perform any loading/unloading.
platform[0]=CarLoadingPlatform,100

# General goods wagon
obj=vehicle
name=GenWagon
waytype=track
freight=goods
# If we use the platform name as a regular expression we could create both simple
# and complex rules. This will match any platform ending with "Platform" but not beginning with "No-".
platform[0]=^(?!No-).+Platform$,100

#For those who are not so familiar with Regular expressions the same result can be achieved with multiple rules.
platform[0]=Platform$,100 # All platforms ending with "Platform" gets a 1.00 factor.
platform[1]=No-Platform,- # The "No-Platform" is not supported.

The new platform array defines how the wagon would be accepted for a particular platform. If we use regular expressions we can define quite advanced rules. For those (I guess the majority) the ^ and $ are very simple to grasp and will get you very far. For more examples the Regesp for dummies will serve as a copy paste library for the most common cases.

The idea is to compare each wagon's platform array against the the platform name. On a match the factor is added to the load/unload calculation. If we can handle this per wagon the display could actually show that some wagons are empty before others are (nice eye candy).

We could also discuss if we should compare the platform to a wagon or have another approach where we specify goods on a platform and compare it to the goods loaded on a wagon, in a similar manner.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10220
  • Languages: De,EN,JP
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #13 on: May 01, 2013, 08:08:32 PM »
This was possible in old simutrans until some 0.82.xx or so. But stations cause quite large maintenance costs each tile. If this is introduced, it would not make sense for freight to use anything else but 1 tile stations. (Especially on laoding stations, where the waiting for full load is the limit an not the loading speed.)

Furthermore, choose signals e.g. assume that a platform is safe to use only if the number of tiles match the convoi's length. Without this, blockings will occur.

Offline greenling

  • Lounger
  • *
  • Posts: 1728
  • Simutransarchology it my hobby!
  • Languages: DE,EN
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #14 on: May 01, 2013, 08:31:40 PM »
Hello Prissi,Max-Max,Ters and the other
I can me remember that's in east germany have give some station they was shorter than the used train.
Those Stations was marked in the timetable.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10220
  • Languages: De,EN,JP
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #15 on: May 01, 2013, 08:35:51 PM »
Those exist in many places, also in Lodon are stations which are shorter than the trains. The long distance sleeper trains form Munich to Italy also had regularely more cars than would fit on a plaform (in the 70ies and 80ies). But indeed, I think also in Germany operation of such long trains are no longer permitted. If memory servers me right, there was an accident related to this.

Offline jamespetts

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 20266
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #16 on: May 01, 2013, 09:05:48 PM »
I should add to what Prissi writes about London stations: when trains are too short for the platforms here, the automatic doors on the rear carriages will not open, and passengers have to move along the train to alight from carriages nearer the front of the train. In some Underground stations (Charing Cross on the Northern Line, for instance), a single set of doors at the rear of the train will not open.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2920
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #17 on: May 02, 2013, 01:07:24 AM »
In Brazil, for cargo trains, they go further the station after loading/unloading the wagons which fitted the station to load/unload the next wagons that were left outside until all wagons are done.

Offline Vladki

  • Devotee
  • *
  • Posts: 3438
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #18 on: May 02, 2013, 09:01:25 AM »
Hello, it seems that three different issues poped up here.

As to the length of platforms I would stick to current behavior - cars outside platform do not (un)load. Maybe some intelligence added - so that passengers/cargo enter only cars that they can leave later. It happened to me that passengers enter the last car and stay on board forever, because they cannot leave the train.

As to the type of platform, I would like it as option similar to separate cargo capacities - so that mail & passengers do not unload on cargo platforms and vice versa, perhaps with some more specialty platforms (bulk, oil, cars) available. However it would require extra info in dat files - load/unload ability for certain cargo, and storage capacity for certain cargo. As a default where not specified in dat I would suggest that goods platforms will accept anything except mail and passengers, and passenger platforms will accept only passengers and mail. AFAIK there aren't many mail platforms (only extensions) in paksets.

And for loading time, this would be interesting improvement especially for passenger trains - each car would have set how fast it can load/unload (tons/second, passengers/second). Suburban cars usually have more doors than express cars - so they (un)load faster - but have lower top speed (lower speedbonus). But faster (un)loading could somewhat reduce the speedbonus (and comfort in experimantal) penalty for suburban (undergroud) trains. Gradually loading cars would also lead to spreading the passengers among cars - one car is unloading, while the other is loading, and this would mean that half-full train is faster than crowded train.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5670
  • Languages: EN, NO
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #19 on: May 02, 2013, 02:49:17 PM »
What is the difference between goods and passenger platforms that should affect loading times? From what I've seen of either kind, goods platforms tend to be higher so that they are level with the doors, while older passenger platforms require passenger to climb a step or two on the passenger cars. This could mean that loading passengers on a goods platform might be faster than on a passenger platform. However newer passenger platform are level with the doors, while modern goods platforms don't seem to exist at all. Goods is rather loaded and unloaded at freight terminals with no platforms whatsoever, and these areas are too dangerous for passengers to be allowed there.

Having dedicated station tiles that can only load certain goods might be too detailed for some players. And I don't think it would add much to the realism or challenge either. Not without going for a much more complex solution, which would certainly alienate some players, and definitively steepen the already steep learning curve.

Offline Vladki

  • Devotee
  • *
  • Posts: 3438
    • My addons, mostly roadsigns, pak128.cs
  • Languages: EN, CS
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #20 on: May 02, 2013, 07:59:02 PM »
Having dedicated station tiles that can only load certain goods might be too detailed for some players. And I don't think it would add much to the realism or challenge either. Not without going for a much more complex solution, which would certainly alienate some players, and definitively steepen the already steep learning curve.

I agree that it will be too hard for beginners, so it should be definitely an option (like separate capacities for cargo/mail/pass) and disabled by default. Just for those who think that the game is too easy, or those who need more realism. I think some players might like it, but I can live without it.

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5670
  • Languages: EN, NO
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #21 on: May 03, 2013, 04:21:40 AM »
We can't just make everything an option, or we'll end up with billions of different configurations that need to be tested and balanced for.

Offline Max-Max

  • Coder/patcher
  • *
  • Posts: 670
    • MK Development
  • Languages: SV,EN
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #22 on: May 03, 2013, 04:00:17 PM »
In reply #12 I suggest a system of how to configure this in the PAK dat files. It is up to the PAK designer to decide the complexity! This will only give the designer the tools to develop this further. Note that it is also up to the PAK designer to decide what is possible load/unload outside a platform!

Regarding options, many games have a difficulty setting, easy, normal and hard that controls several options at once.
In some games even the most advanced functions can only be enabled by manually edit a config file, so don't be afraid to add options, it can be made simple for the inexperienced player.

I think it would add quite a lot of fun game planning (and playing) if you, for example, only can load/unload oil on a station that supports it.

Offline Markohs

  • DevTeam, Coder/patcher
  • Devotees (Inactive)
  • *
  • Posts: 1559
  • Languages: EN,ES,CAT
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #23 on: May 03, 2013, 04:23:02 PM »
Regarding what Ters comments, I have to agree in the way we sure, can add options and different configurations to the game, that's no problem but:

- This configurations make code more complex, thus harder and slower development, and the more chances for bugs to appear. It's hard to extend the code when you have to keep compatibility with all implemented features, because you have to be careful to not break any of them.
- This versatility has to be carefully implemented so game performance is not affected, so only viariations that don't affect performance (or do it sightly) should be incorporated.
- Also, this features have to be smooth to the user, and not make the game harder or annoying to play.
- Said this, ofc improvements and changes are welcome, but they have to be worth the time it takes to implement them, and the time will take from future development and maintenance to keep it alive and bug free.

 About this feature in particular, I have nothing against it, but I fear it changes the gameplay too much. I'd personally not implement it, and if someone wants to implement it, he has to be very careful in how will affect the gaming experience.

 To implement it fully, pak objects (wagons and stations) should have to have a loading/unloading throughput per second, that forces new settings to ad to the objects. Too much work, imho.

 But ofc, as I said, I'm not against the idea, if someone wants to discuss and implement this, it can be done.

EDIT: Some day we should talk about if it whould be possible to develop a plugin system for this game, so all this extensions are implemented as module, and Simutrans remains as the minimal stable engine of the game. So if someone wants to implement things, he can do it freely, and if it's successful and popular in the community it can allways be turned to the core plugins distribution of simutrans.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4856
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #24 on: May 03, 2013, 07:52:15 PM »
Once I had this idea, where the transfer of goods is "per partes" and a station will accept only as much as is its capacity. That would give a whole new meaning to extension buildings, as for large hubs and ports you would need huge storage capacities.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10220
  • Languages: De,EN,JP
Re: Load/unload cargo/passenger to take some time OpenTTD style...
« Reply #25 on: May 03, 2013, 08:52:21 PM »
That is somehow implementend in the avoid overcrowding. One could instead of not loading jsut do not unloading. It would for sure avoid some deadlocks (or rather delay them a little), but might soon lead to banrupsy, as nothing is transported in the end and passengers and livestock starves on the trains.