News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Load/unload cargo/passenger to take some time OpenTTD style...

Started by Max-Max, April 29, 2013, 10:46:07 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Max-Max

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.
- My code doesn't have bugs. It develops random features...

An_dz

Where's James? Simutrans Experimental already have loading time.

jamespetts

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?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Fabio

cars loading slowly would be unsuitable for busy lines or require more platforms...

jamespetts

Fabio - is that not more related to the dwell time, which is already simulated in both Standard and Experimental?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi

There is a loading time also in standard. Though it is at maximum 2s per convoi.

jamespetts

Has Standard not recently introduced a variable loading time?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi


Max-Max

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....
- My code doesn't have bugs. It develops random features...

jamespetts

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?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Max-Max

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.

QuoteI 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?
- My code doesn't have bugs. It develops random features...

Ters

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?

Max-Max

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:

####################################################
# 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.
- My code doesn't have bugs. It develops random features...

prissi

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.

greenling

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.
Opening hours 20:00 - 23:00
(In Night from friday on saturday and saturday on sunday it possibly that i be keep longer in Forum.)
I am The Assistant from Pakfilearcheologist!
Working on a big Problem!

prissi

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.

jamespetts

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.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

An_dz

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.

Vladki

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.

Ters

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.

Vladki

Quote from: Ters on May 02, 2013, 02:49:17 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.

Ters

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.

Max-Max

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.
- My code doesn't have bugs. It develops random features...

Markohs

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.

VS

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.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

prissi

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.