News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

Long Convoy Patch

Started by THLeaderH, April 28, 2017, 09:20:35 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

THLeaderH

This patch is originally made by @Lus1531 ‏ and I introduce this on this forum with his permission.
This extends the limit of convoy length from 4 (cars) or 24 (trains) to 8 (cars) or 64 (trains).
Now we can enjoy American style very long freight trains ;)

Leartin

Are there any negative side effects?

I like it, especially the change for cars. The four-car-limit only considered trucks, not motorcades. Now I only have to pixel a capitol to produce presidents every four years, which can be transported in an 8-car-convoy to the white house...

prissi

Is there anywhere in the world a 8 car freight road train? Australia never uses more than three trailers, and I though this was the pratical limit (due to overtaking and curves etc.).

And the only negative side effect is the missing scroll bar in the depot window for the extra cars.

THLeaderH

QuoteAnd the only negative side effect is the missing scroll bar in the depot window for the extra cars.
Please run this patch and you'll find the scroll bar for the extra cars!

Leartin

Quote from: prissi on April 28, 2017, 12:58:07 PM
Is there anywhere in the world a 8 car freight road train? Australia never uses more than three trailers, and I though this was the pratical limit (due to overtaking and curves etc.).

No, but there are convoys longer than 4 cars, nobody said they need to be connected. p192c already uses something like that - you cannot use a bus to transport prisoners by itself, it always requires a normal police car in front as protection. This could be expanded for hazardous materials. Say, you have a nuclear power plant and deliver uranium or something to it. It would make sense to have the truck that actually carrys the stuff be accompanied by some containment unit, just in case. However, if you had two trucks transporting uranium, one containment unit might still be enough. And of course, virtually every special transportation has a pilot car.
Sure, these monsters would rarely be overtaken and cause traffic issues - but that's what they do in real life too, don't they?

DrSuperGood

So instead of having 12 km long stations we will need 24 long stations... I think the 24 unit length limit on trains was there for practical reasons, not so much that it was technically challenging to extend.

Experimental (extended) changed theirs ages ago however this resulted in the stupid situation on the server where players were running 60 tile long trains across the map, limited only by the limits experimental used. If this makes it into standard I will just be running 24 tile long subways with 24 tile long feeder trains instead of 12 tile long, the definition of inflation.

Ters

I find this just weirds up the scale in Simutrans even more. Train stations easily dwarf industries and even some towns as it is. But each player sees Simutrans differently.

Quote from: Leartin on April 28, 2017, 02:21:32 PM
No, but there are convoys longer than 4 cars, nobody said they need to be connected.

That is the unfortunate side effect of a bad name in Simutrans. Simutrans "convoys" are meant to be connected vehicles, not literal convoys. We just haven't found a good (and short) name to describe that concept across road, rail, water and air transportation.

Leartin

Quote from: Ters on April 28, 2017, 03:26:52 PM
That is the unfortunate side effect of a bad name in Simutrans. Simutrans "convoys" are meant to be connected vehicles, not literal convoys. We just haven't found a good (and short) name to describe that concept across road, rail, water and air transportation.
Is that so? How so? I mean, if I wanted you to implement actual convoys as unconnected vehicles, how would you do it, and how would it be different in gameplay from what we already have? Because all I can see is the same as we have now, but without shared power. But power only really matters with trains, since for cars, the really barrier is the max_speed per vehicle - which would still apply.

pumuckl999

Not only cars using the depot....;)

http://www.reitsportnews.at/de/archiv/3694-reitsportnews--pferdesport--reitsport--weltweit--1-klick-weltrekord-im-oman-linnicher-trainierte-koenigliche-prunkkutsche-mit-40-araber-pferde

More possibilities are never bad.

Create for fun a 200m carnival procession for example... If it placed in the tram menu, the trucks and busses can override the procession. But we don´t play GTA.

Ters

Quote from: Leartin on April 28, 2017, 03:44:39 PM
Is that so? How so?

pak64 displays everything the game was meant to do, because Simutrans and pak64 was once a single thing. A feature would not originally have been implemented unless it could be used. convoi_t was used to combine the individual vehicles that make up a train, and also to represent truck and trailed for road vehicles. Whether tugboats was part of the initial design is unknown to me, but in any case, boats and airplanes would also be use convoi_t to simplify programming.

Quote from: Leartin on April 28, 2017, 03:44:39 PM
I mean, if I wanted you to implement actual convoys as unconnected vehicles, how would you do it

I wouldn't, because it is not part of the gameplay. Vehicles are also effectively tokens, not realistic depictions of actual traffic because: 1) a bus would not take a whole day to do complete a circuit around a few city blocks 2) trains are unrealistically short. If trains had a realistic number of cars, they would have spanned half the map, at least with the map sizes when Simutrans was made. Not to mention how many times you could have them loop around themselves.

Note the first paragraph of my previous post. In particular the last sentence. I would like to see long trains snake their way through the landscape, but then everything would have to scale up with it. Maps would have to be tens of thousands of tiles along both sides. Big cities would need to have millions of buildings, when maps probably don't have a million buildings in total now. Gradients should be realistic, as should turns. They should be smooth, not these jagged steps we have now. Anything in between this and the simplistic, symbolic landscape we have now would be an ugly uncanny valley for me.

Leartin

Quote from: Ters on April 28, 2017, 06:13:43 PM
pak64 displays everything the game was meant to do, because Simutrans and pak64 was once a single thing. A feature would not originally have been implemented unless it could be used. convoi_t was used to combine the individual vehicles that make up a train, and also to represent truck and trailed for road vehicles. Whether tugboats was part of the initial design is unknown to me, but in any case, boats and airplanes would also be use convoi_t to simplify programming.

In pak64, take a look at the materials wholesale factory. You'll see that the factory uses frontimage to display a vehicle over a static background. Was that what frontimage was designed to do? Clearly not - afaik frontimages are way older than animation, which would give us a first clue. They also only work on ground level of a building, which makes thems rather awkward to use in some cases. So there is something displayed in pak64 which the game was not even meant to do, but - as a happy little accident - works anyway. So pak 64 displays something the game was not even meant to do.
The game allows for non-rectangular buildings. Might be it was an accidental functionality at first, but at least with map rotations it was intentionally designed to work again, even if 0.0 is not occupied. I have not seen such buildings in pak 64. So pak64 does not display something the game was meant to do.
Add these two, and your first arguement becomes invalid. Plus, it really doesn't matter if something was 'intended' or not, as long as it works.

Quote from: Ters on April 28, 2017, 06:13:43 PMI wouldn't, because it is not part of the gameplay. Vehicles are also effectively tokens, not realistic depictions of actual traffic because: 1) a bus would not take a whole day to do complete a circuit around a few city blocks 2) trains are unrealistically short. If trains had a realistic number of cars, they would have spanned half the map, at least with the map sizes when Simutrans was made. Not to mention how many times you could have them loop around themselves.

But don't you see an issue here? I want to have convoys. There is something called convoys in the game, and it allows me to get what I want reasonably well. But you come along and take my toy away, saying that's not how to use it, but don't give me an alternative. I really don't care why you don't want convoys in the game, composing them adds as much gameplay as composing trains, and they are not less realistic as far as tokens go than trains are. So yeah, I say convoys are exactly what you would use if you want to have convoys, just like frontimages are what you use for animations, intended or not.

Quote from: Ters on April 28, 2017, 06:13:43 PMNote the first paragraph of my previous post. In particular the last sentence. I would like to see long trains snake their way through the landscape, but then everything would have to scale up with it. Maps would have to be tens of thousands of tiles along both sides. Big cities would need to have millions of buildings, when maps probably don't have a million buildings in total now. Gradients should be realistic, as should turns. They should be smooth, not these jagged steps we have now. Anything in between this and the simplistic, symbolic landscape we have now would be an ugly uncanny valley for me.

For you. I'm fine with that, really, but don't try to impose that view on others. This whole Simutrans-Scale-Business is completely subjective, and also different from pakset to pakset. I'm pretty sure cities of the same number of tiles and inhabitants can look like big cities or small countryside villages, all depending on which pakset you use. And there are people who make a giant map of one city while others play a map of all of europe, everyone has preferences, and by raising a limit nothing is lost.

Ters

I did not try to impose my views on others any more than you or anyone else did. For the most part, I was trying to explain the misuse of the word convoy in Simutrans.

Sarlock

Wonderful!  Having long trains snake through the landscape is a wonderful thing... that's what real trains are to the North American child in me, not these short passenger things ;)  Though, is 64 long enough?  Most freight trains around here are 100+ cars long.  There's that whole scale vs. reality thing again.

Is this something that could/should be set within the settings so that it can be controlled by the user/pakset/online game admin?
Current projects: Pak128 Trees, blender graphics

Junna

Quote from: DrSuperGood on April 28, 2017, 02:52:38 PM
Experimental (extended) changed theirs ages ago however this resulted in the stupid situation on the server where players were running 60 tile long trains across the map, limited only by the limits experimental used. If this makes it into standard I will just be running 24 tile long subways with 24 tile long feeder trains instead of 12 tile long, the definition of inflation.

What's stupid about it-- nonsense. Anyway, the ex limit is still there. Not sure what it is but it's like 64 or 70 vehicles (depending on the length of vehicles, like 30 tiles). You're just being silly here.

THLeaderH

Some of you insists that the current restriction of convoy's length should be kept mainly because the scaling issue. However, I have to tell you the fact that some Japanese players love very long trains with this patch and that they strongly desire the integration to the standard. Thus, the limit of convoy's length has to be set in simuconf.tab. The current restriction are imposed as the default setting but advanced players can change this and enjoy very long trains. This enables JUST extending the possibility of simutrans!

Yona-TYT


I think someone already mentioned it, but I think it would be good to implement an automatic restriction depending on the size of the map, to prevent the scale from lose sense in small maps.

sheldon_cooper

#16
I think it's interesting, I'm doing trailers to dock, the limit is three (the truck and three more trailers) plus this patch will stay opsional, help with transportation, transporting more products, and live up to the Simutrans name. :D
Quote from: prissi on April 28, 2017, 12:58:07 PM
Is there anywhere in the world a 8 car freight road train? Australia never uses more than three trailers, and I though this was the pratical limit (due to overtaking and curves etc.).

And the only negative side effect is the missing scroll bar in the depot window for the extra cars.

The maximum I know four, and is usually tank and only walks on highways to avoid complications in the cities... :)

Vladki

I also welcome this patch. Some pak authors of pak.128.cs worked around this limit by putting waggon twins in pakset. So if this patch is accepted, these duplicates could be removed and depots would less cluttered.

Sent from my ONEPLUS A3003 using Tapatalk


Isaac Eiland-Hall

Well...

https://www.youtube.com/watch?v=F68TPXjrbUU

About one minute in, the "Centipede" with 6 trailers: https://www.youtube.com/watch?v=jgbJoQweF_U

I remember seeing a documentary from at least a decade ago (possibly from the 90s) where some company was actually using something like 12-14 trailers. I remember - there were two of them, because the documentary made a big deal about catching footage of them passing (going opposite directions). I think they were mining trailers, but they might have been fluids. I'm nearly certain they were white and green. They were also not full-length trailers - but still, it was something like 10-12-14. I don't remember the precise number.

gauthier

This patch is great for some articulated trains which have small vehicles, like the Z50000 addon for pak128. Then, it's up to the player to play Simutrans as he likes, with or without long convoys. As long as it does not break balancing of the game and ends up to an exploit, removing a limit like this is nice. Thanks !

Junna

Quote from: Yona-TYT on April 29, 2017, 02:02:50 AM
I think someone already mentioned it, but I think it would be good to implement an automatic restriction depending on the size of the map, to prevent the scale from lose sense in small maps.

Why? If you don't want to use it, you don't need to. If you think it looks awful, then you also don't need use the feature.

The length in Extended needs to be increased to at least 100 vehicles.

An_dz

Why not just let the limit be a uint8 (up to 255), with default to current settings, but if the pakset or the user wish to change it this can be done with parameters in simuconf.tab?

Quote from: THLeaderH on April 29, 2017, 01:16:43 AM
(...) the limit of convoy's length has to be set in simuconf.tab. The current restriction are imposed as the default setting but advanced players can change this and enjoy very long trains.

Yona-TYT

Quote from: Junna on April 30, 2017, 09:02:58 AM
Why? If you don't want to use it, you don't need to. If you think it looks awful, then you also don't need use the feature.

The length in Extended needs to be increased to at least 100 vehicles.

Quote from: An_dz on April 30, 2017, 03:37:49 PM
Why not just let the limit be a uint8 (up to 255), with default to current settings, but if the pakset or the user wish to change it this can be done with parameters in simuconf.tab?


Many novice players (including me) do not know or just do not like to configure parameters in a file, that's why I like the idea of an automatic configuration (depending on the size of the map), this could be the default value.  8)




Quote from: Isaac.Eiland-Hall on April 29, 2017, 12:34:28 PM
Well...



About one minute in, the "Centipede" with 6 trailers:


I remember seeing a documentary from at least a decade ago (possibly from the 90s) where some company was actually using something like 12-14 trailers. I remember - there were two of them, because the documentary made a big deal about catching footage of them passing (going opposite directions). I think they were mining trailers, but they might have been fluids. I'm nearly certain they were white and green. They were also not full-length trailers - but still, it was something like 10-12-14. I don't remember the precise number.

It is obvious that these trucks can not pass through a curba, in case of some future implementation, it is necessary to restrict the passage of vehicles (more than three trailers) in the curbs.  :P


Ters

In the end, the only objective argument for or against this is whether or not the length limits for consists is increased, is whether or not this affects the performance of the game in a particular way. And perhaps whether or not it can be exploited for creating grief in multiplayer games, but have no experience with multiplayer games.

Quote from: Yona-TYT on April 30, 2017, 05:22:52 PM
Many novice players (including me) do not know or just do not like to configure parameters in a file, that's why I like the idea of an automatic configuration (depending on the size of the map), this could be the default value.

Would that really be intuitive to the player? Would they understand the correlation? And if economics is taken into consideration, one might suddenly find that trains can't be profitable at all, since they can't be built as long as the pak set author intends.

prissi

I do not think that allowing more trailers is such a big issue. pak64 did not allow any extra trailer (I hope), and thus the issue ill not arise. Programmatically, very long road convoys will mess up traffic lights and also the (old) overtaking code did not really check for convoy length.

Apart from that it is really up to the user.

(BTW: Animations (old coal mine) are as old as foreground images (passenger station), since the first version releae (0.78) or so had both of them. Not that I was in charge of it, and neither they were called like this, since they had a completely different packing system.)

THLeaderH

Now you can set the length limit of convoi in simuconf.tab! Write parameters in simuconf.tab like

max_rail_convoi_length = 128
max_road_convoi_length = 32
max_ship_convoi_length = 32
max_air_convoi_length = 32

and you can enjoy very long trains. These parameters are stored as uint16, so the limit of the parameters are 65535. If these parameters are not written, the default values are applied, which are

  • max_rail_convoi_length = 24
  • max_road_convoi_length = 4
  • max_ship_convoi_length = 4
  • max_air_convoi_length = 1

I don't know what happens on multiple air vehicles but it's all up to players. I set a limitation for beginners and give a possibility to advanced players. Also, overtaking would not work correctly on super long road trains, but that should be discussed as another topic, since IT'S ALL UP TO PLAYERS whether they change the length limitation of convoy. At least, this patch does not make any memory errors.

Leartin

Must be really strong coupling to carry 60.000 wagons  :o

Would it be possible to define seperate lengths for different types of track, such that narrowgauge, monorail and maglev could be longer or shorter than normal track?

Flemmbrav

You can just put locos in between, don't worry :P

Ters

Quote from: Flemmbrav on May 03, 2017, 02:00:30 PM
You can just put locos in between, don't worry :P

But you don't have to, so the super strong couplings must exists whether you need them or not. (Furthermore, most locomotives in pak64 don't allow a vehicle before them, and most of those that do can only have the same kind of locomotive in front, but now I'm perhaps getting too serious.)

THLeaderH

So I'm waiting for the code review...

An_dz

I would lower to uint8 as it's already almost impossible to exist a 200 vehicles long trains. Maximum I've seen in real life was ~190. And it's just absurd for the other transports. And 255 vehicles in a convoy is already asking for troubles, more it's almost suicidal. Tests are needed to see if bugs would not blow the game.

There's some dirt in the patch that needs to be removed before commit:
line_selector.set_max_size(scr_size(DEPOT_FRAME_WIDTH - D_MARGIN_RIGHT - D_MARGIN_LEFT - selector_x, LINESPACE * 13 + 2 + 16));

/*
- * [CONVOI]
- */
+ * [CONVOI]
+ */
convoi.set_grid(scr_coord(grid.x - grid_dx, grid.y));
convoi.set_placement(scr_coord(placement.x - placement_dx, placement.y));

THLeaderH

QuoteThere's some dirt in the patch that needs to be removed before commit:
Thank you. These dirt should be removed before commit.

QuoteI would lower to uint8 as it's already almost impossible to exist a 200 vehicles long trains. Maximum I've seen in real life was ~190. And it's just absurd for the other transports. And 255 vehicles in a convoy is already asking for troubles, more it's almost suicidal. Tests are needed to see if bugs would not blow the game.
Some players would make the super long convoy with the vehicles whose length is very short. In this case, the number of vehicles in a convoy can exceed uint8's maximum. But I'd like to lower the limit of length to uint8 because we're not sure whether it brings us to a fatal result.

So this patch needs

  • removing the dirt.
  • lowering the length limit of convoy to uint8.
but these are easy to fix and I'll be very glad when the great dev team commits this patch with these fixing.

Is there anything to be solved?

jamespetts

Quote from: DrSuperGood on April 28, 2017, 02:52:38 PM
Experimental (extended) changed theirs ages ago however this resulted in the stupid situation on the server where players were running 60 tile long trains across the map, limited only by the limits experimental used. If this makes it into standard I will just be running 24 tile long subways with 24 tile long feeder trains instead of 12 tile long, the definition of inflation.

The limit to the sensible length of trains in Extended are economic, just as in reality. An arbitrary limit imposed because the economic limits are not simulated properly is not good game design.
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.

Ters

Real train lengths are limited by the amount of cargo per time slot (you need enough to cover the cost of the locomotive, fuel and crew, but you can't wait forever), and the length of passing loops where applicable. However, time has little meaning in Simutrans (you can wait forever, at least until fixed cost is introduced), and extending passing loops require virtually no effort. The limits to train lengths in Simutrans are therefore unrealistic, whether put in by the developers or the pak makers. Because ultimately, there must be some limit, since computers don't handle infinity well.

jamespetts

Quote from: Ters on May 13, 2017, 03:53:12 PM
Real train lengths are limited by the amount of cargo per time slot (you need enough to cover the cost of the locomotive, fuel and crew, but you can't wait forever), and the length of passing loops where applicable. However, time has little meaning in Simutrans (you can wait forever, at least until fixed cost is introduced), and extending passing loops require virtually no effort. The limits to train lengths in Simutrans are therefore unrealistic, whether put in by the developers or the pak makers. Because ultimately, there must be some limit, since computers don't handle infinity well.

The code limits should generally be beyond the economic limits so that the practical limitations faced by players are the economic limits: Standard is different, of course, but Extended has a fixed costs feature (has this not been implemented in Standard?) and goods will take the quickest route to their destination, meaning that players with a low frequency service might find themselves out competed by players with a higher frequency service. Introducing maximum journey times for some sorts of goods (in place of the speed bonus) is also under consideration in Extended.
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.