Various thoughts (growing list, the post with a former long title)

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Post Reply
User avatar
SciFurz
Traffic Manager
Traffic Manager
Posts: 154
Joined: 13 Oct 2018 16:33
Contact:

Various thoughts (growing list, the post with a former long title)

Post by SciFurz »

Been playing with Pelya's Android port of JGR's patch version for the last couple of weeks and noted a few thoughts on the game.

Cargo without destination.
Can a check be made on "any station cargo" before loading (like cargo with destination) to avoid it loading onto a train with the same destination as it came from?
Seeing how cargo has a "from" label I think that should be possible and it'll avoid the train hauling first produced cargo back and forth until another train picks it up.

Cargo route including industries/cities.
One more thing I thought of that would also solve the request to split cargo at stations, extend the cargo route with the actual sender and recipient. Instead of from and to station it would be to and from industry/city. Accepts already exist on these objects so that wouldn't make a difference.

Time.
The wall clock and departure board are useful to have but since real time doesn't sync with the TTD clock it makes no sense looking at the times. Instead of real time, why not use time based on the ticks? Instead of 60 seconds, minutes, use 74 "TTD seconds and minutes" and make an option to set the number of "TTD hours" in a day?
For example, I run with a daylength factor of 125 and would divide the virtual 9250 ticks in one day into 25 "hours", with 74 "minutes" each lasting 5 ticks. The clock would run from 00:00 to 24:73 and things like dispatch and waiting time would line up with each day.
Alternative would be to reset the current clock at midnight and deal with a day lasting only 19 real hours for instance.

Speaking of daylength, at factor 125 a tile becomes roughly 18 km long according to a simple test of a train running a syraight line betwern two stations. Although I think this is much better, I'd like to see daylength stretched even more so as to get a tile size of 1 km or 500m. This would make country heightmaps way better.
I only read a bit on how a higher factor breaks save files and wonder in what way. It also made me think of approaching this issue from the other side, what if the global date and time variables were fed real time?
Apart from the game running real slow, would it still function as it is?

City area border.
One more I almost forgot, An option to zoning which displays the city area border. Sometimes an industry is named after one city but it's listed in the directory under another. It'll also make it easier to determine if and where an industry can be plunked down.

Wait time at waypoints.
The only way as far as I can tell now to park a train is use either a depot, station, or possibly a programmable signal.
I'd like to set waiting time at waypoints as well to have a big yard of trains because in a depot you can't see them, at a station they'll stand loading/unloading, and after a while at a signal they'll complain about not finding a path.

edit 1: added zoning suggestion.
edit 2: cargo sender/recipient.
edit 3: waypoint wait time.
Last edited by SciFurz on 16 Oct 2018 08:53, edited 2 times in total.
Tinkering in the code in between writing mostly naughty stuff.
See http://scifurz.wordpress.com/
User avatar
Gwyd
Chief Executive
Chief Executive
Posts: 721
Joined: 17 Apr 2017 16:52
Location: Western Ile-de-France Region

Re: Cargo without destination, TTD time, daylength, city area border thoughts

Post by Gwyd »

Cargo can have a destination, with a feature called cargodist. If you set this symmetric, the game will calculate the demand for the cargo to each destination. The game will also send this back (for passengers afaik). If you set it to asymmetric, it will work out the demand in each direction. You just need to check the settings.
User avatar
SciFurz
Traffic Manager
Traffic Manager
Posts: 154
Joined: 13 Oct 2018 16:33
Contact:

Re: Cargo without destination, TTD time, daylength, city area border thoughts

Post by SciFurz »

Gwyd wrote:Cargo can have a destination, with a feature called cargodist. If you set this symmetric, the game will calculate the demand for the cargo to each destination. The game will also send this back (for passengers afaik). If you set it to asymmetric, it will work out the demand in each direction. You just need to check the settings.
Did all that first thing.
It doesn't avoid the first cargo generated by town or industry getting assigned "any station". Only after cargo is actually dropped off somewhere does cargodist create a direct link.
Symmetric options deal only with how much cargo gets sent back, not assigning destinations.

To clarify, this is a problem occuring with feeder system stations that do not accept cargo on their own.
Tinkering in the code in between writing mostly naughty stuff.
See http://scifurz.wordpress.com/
Eddi
Tycoon
Tycoon
Posts: 8257
Joined: 17 Jan 2007 00:14

Re: Cargo without destination, TTD time, daylength, city area border thoughts

Post by Eddi »

i tend to start feeder systems with specific "unload and no loading" options, to avoid the mess that "no destination" cargo can cause initially, before the feeder system gets fully recognized.

i couldn't make any sense out of what your suggestion about time was meant to say. the idea for the current time patches is always to make timetabling more consistent/reliable, to avoid the variations in timetabling with random 30 or 31 day months and leap years. i don't think anyone would be helped with cycles of "24:73" (wtf?)
User avatar
SciFurz
Traffic Manager
Traffic Manager
Posts: 154
Joined: 13 Oct 2018 16:33
Contact:

Re: Cargo without destination, TTD time, daylength, city area border thoughts

Post by SciFurz »

Eddi wrote:i tend to start feeder systems with specific "unload and no loading" options, to avoid the mess that "no destination" cargo can cause initially, before the feeder system gets fully recognized.
That doesn't work when return cargo is the same as what's dropped off, like passengers and mail.
Eddi wrote:i couldn't make any sense out of what your suggestion about time was meant to say. the idea for the current time patches is always to make timetabling more consistent/reliable, to avoid the variations in timetabling with random 30 or 31 day months and leap years. i don't think anyone would be helped with cycles of "24:73" (wtf?)
What I've seen some people do is choose some daylength and a number for ticks in a minute and that's never in sync between the days passing by and the time displayed by the clock. The (wallclock version in JGR at least) does not reach 00:00 each time a new day starts. The closest it gets is at daylength 117 and 6 ticks per minute, where a day lasts 8640 ticks and the clock turns at 8658 ticks. Midnight on the clock shifts each time compared to midnight from the game time.

I get the idea about consistency but that's totally ignoring the date and that makes no sense if one also claims to want to make things realistic. For that I suggest TTD time and then you can truly schedule things like trains at fixed times during the day.

edit: typos
Tinkering in the code in between writing mostly naughty stuff.
See http://scifurz.wordpress.com/
Eddi
Tycoon
Tycoon
Posts: 8257
Joined: 17 Jan 2007 00:14

Re: Cargo, TTD time, daylength, city area border thoughts

Post by Eddi »

the problem you're missing there is that the concept of a "day" is pretty meaningless unless you choose ridiculously long daylength factors, so syncing up the "day" to the "clock" is not a reasonable issue for most people.

there are many ways to make things "realistic", the game scales different things in different ways, like the length of a runway has different scale than the size of a bus stop. and the 24h clock is intentionally disconnected from the date in that sense.

if you really want to make the clock sync up with the day, you have to pick a very specific daylength factor and matching ticks-per-minute factor so both are the same length in ticks:

Code: Select all

ticks per day = 74*day length
ticks per 24h = 60*24*ticks per minute
least common multiple of 74 and 60*24 = 53280
=> daylength = 720
=> ticks per minute = 37
you can only get close to that for lower daylength factors. or you must allow fractional ticks per minute values somehow (remember that floating point values are forbidden in the game mechanics, because they are not compatible with multiplayer)

if you want lower daylengths, you must keep the ticks-per-minute at 37, then you can have 12h, 8h or 6h days with a daylength of 360, 240 or 180. the clock will still wrap around at 24h though.
User avatar
SciFurz
Traffic Manager
Traffic Manager
Posts: 154
Joined: 13 Oct 2018 16:33
Contact:

Re: Cargo, TTD time, daylength, city area border thoughts

Post by SciFurz »

Eddi wrote:the problem you're missing there is that the concept of a "day" is pretty meaningless unless you choose ridiculously long daylength factors, so syncing up the "day" to the "clock" is not a reasonable issue for most people.
...
if you want lower daylengths, you must keep the ticks-per-minute at 37, then you can have 12h, 8h or 6h days with a daylength of 360, 240 or 180. the clock will still wrap around at 24h though.
I'm well aware of what you mentioned, hence my example of daylength 117 and 6 ticks as the closest optoon with the current game.
The game is nothing more than representations, yes, and therefore nothing is at scale, but that still doesn't seem like a reason to not use real time. The game clock could have been using half or quarter hours as time units and just display whole hours next to the date.
And if the concept of a day is meaninglesss in the game (and I agree at its fast pace), why do people still want to set things by the 24 hour clock? Seems more logic to set things by the day instead when every thing happening takes at least one day to do so.
Well, I do understand, but the logic fails me since that's how my mind works.

If you're like me and enjoy the simulation side of the game more, building networks, industrial sites, and relaxingly watching the trains go about their business, getting more realism in it is better. And I think it'll even make the gaming side better.
The current factor at 125 gives me about 5 minutes for a game day and this works well to keep an eye on things while setting up more industries or rebuild entire stations or sites while keeping disruption to traffic low (one of the fun little challenges).

One thing will have to be adressed sooner or later for both aspects anyway, with the increase in possible cargos and industries the map in standard settings will become overcrowded and there'll be no room left for green areas or to build stations handling 10+ tile long trains (I think at least one group ran servers with a 20 tile limit, meaning on through load a length of at least 42 tiles for a straight line).
The more objects available in the game, the more time and breathing space is needed to play.
That's why I wonder if the game could function on real time without a tremendous amount of coding effort. When that works well it might be little trouble speeding things up again for the classic game mode.

Unfortunately I don't have the means right now to tinker with the code myself, otherwise I'd try getting my hands dirty on it myself.
Tinkering in the code in between writing mostly naughty stuff.
See http://scifurz.wordpress.com/
Eddi
Tycoon
Tycoon
Posts: 8257
Joined: 17 Jan 2007 00:14

Re: Cargo, TTD time, daylength, city area border thoughts

Post by Eddi »

SciFurz wrote:why do people still want to set things by the 24 hour clock? Seems more logic to set things by the day instead when every thing happening takes at least one day to do so.
the 24h clock allows more consistently repeatable cycles. like you can make two trains meet every 30 days, but which exact day that is varies from month to month, because some months are longer than 30 days, and some shorter. with 24h clock you can make trains meet every 4 hours, and it will always be the same hours, no matter how long you have played since setting up the timetable.
Eddi
Tycoon
Tycoon
Posts: 8257
Joined: 17 Jan 2007 00:14

Re: Cargo, TTD time, daylength, city area border thoughts

Post by Eddi »

SciFurz wrote:I'm well aware of what you mentioned, hence my example of daylength 117 and 6 ticks as the closest optoon with the current game.
since 37 is prime, you cannot have days and clock be in sync with any lower tick-per-minute values

(37 comes from the original daylength, which is 74 (=2*37) ticks. i don't know why that value was chosen, but it's what the original game used over 20 years ago, and nobody attempted to change that. the game also uses 185 (=5*37) ticks, or 2.5 days, in some places)
User avatar
SciFurz
Traffic Manager
Traffic Manager
Posts: 154
Joined: 13 Oct 2018 16:33
Contact:

Resolving timing and clock part

Post by SciFurz »

Haven't been able to get back to OpenTTD until recently and began messing with the source code of the JGR branch.

Spent some time yesterday looking into running openTTD in realtime and currently running a test game (with slight acceleration and various newgrf's), which seems functional so far. One obvious consequence though is large production output on industries since their rates aren't scaled with the running speed of the game. Everything that's set to a fixed number of ticks will have to be replaced by a scaled amount.
I didn't take the daylength approach by inserting a delay between normal ticks, but instead used day ticks as a "real" clock, and it solved the issue I have with the wallclock and departure board not syncing with the game days. The date switches nicely at midnight. :-)
The option daylength factor I'll keep but reverse it and make it a speed-up factor to reduce the number of ticks available in a day.

While I was at it, changed the autosave function from months to days and it's creating daily autosaves now.

If the test game keeps running fine I'll see if I can modify the official branch and create a patch file for that one.
Tinkering in the code in between writing mostly naughty stuff.
See http://scifurz.wordpress.com/
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 3 guests