New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Change speed of calendar progress #10322
Conversation
Your checklist doesn't mention town growth, is that covered under house generation? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found some minor items whose grammar could be improved.
9b320d5
to
843c463
Compare
The preview game crashes very quickly (once when I trying to build a station, the second time when the vehicle arrived at the station, the third time when I was not doing anything), so it's hard to judge how it works. Overall it might be good maybe very good but I have a few doubts. 1 - Release dates for new vehicles 2 - Running costs, production, everything else based on real time 3 - Percentage setting of the calendar speed 4 - Broader game pace setting instead of just calendar pace Settings > Generating world > Game pace:
Yes, this idea probably excludes the third point. :) |
Why would it depend on the game start date? When the calendar shows 1990 things that appear in 1990 will appear.
It is real-time, and real-time only. Real-time based on the wall clock in your real room, nothing production or earning or scoring related is based on the game calendar.
You need to re-state this question. The game setting is already configured in percent.
In my understanding/opinion, this is out of scope. |
843c463
to
be0a77f
Compare
be0a77f
to
c6eca85
Compare
c6eca85
to
27b574b
Compare
27b574b
to
1218274
Compare
Regarding the timetable change, would it be possible to allow timetabling to the nearest second (including odd numbers of seconds), instead of just rounding to an even number of seconds? An economy day contains 74 ticks and lasts 1.998 seconds (very close to 2 seconds) after this change; therefore, there are 37 ticks in a second, which should make this feasible based on how the numbers line up. |
It's possible, although it would require changing timetables from using dates to using ticks. I don't think many people use timetables for anything beyond separating vehicles with shared orders and I plan to upstream the JGRPP autoseparation feature soon™️ (my next big project after this), so I'm not convinced it's worth the effort. Rounding to even seconds is only a visual change, after all -- the timetable resolution is unchanged. |
1218274
to
0fe4f3c
Compare
0fe4f3c
to
7d240d9
Compare
03848b7
to
e0f02fa
Compare
Note: Getting and setting the calendar progress speed is already possible using GSGameSettings
e0f02fa
to
7d40aef
Compare
Is it possible to have economy time related to calendar time, so the length of the economy month is variable instead of moving to fixed 30-economy days? At 1x, there'd be 1:1 relationship with economy and calendar, and the game is effectively the same as without this. Changing day length mid-game would make it go out of sync though, but that may not be a huge problem -- it would just be as the PR already is. |
Superseded by #10605, in which real-world time display is optional. |
Motivation / Problem
In the daylength discussion, @andythenorth gives motivations for players to configure how fast technology progresses in OpenTTD:
Additional usecases might be:
Description
This implements @nielsmh's approach described in my previous attempt to implement this (#9789).
Date/time handling is separated into two systems:
Calendar time for technology and world appearance
Economy time
Calendar time is kept in a common Gregorian calendar, with 365 days in a year, leap years, variable length months, and so on.
Economy time is kept in (approximate) real time. There are logical days with a duration of 1.998 seconds, logical months with a duration of 1 minute, and logical years with a duration of slightly more than 12 minutes.
Internally a calendar with 12 months of 30 days is observed. There are no leap periods.
In the user interface, all elements that run on economy time are presented in real time units:
Seconds (multiples of 2), for things which were originally daily
Minutes, for things which were originally monthly:
Economic periods (sometimes described as simply 12 minutes) for things which were originally yearly:
Internally most events will still be referenced as daily/monthly/yearly.
Limitations
This changes MILLISECONDS_PER_TICK from 30ms to 27ms to make an in-game day last 1.99 seconds instead of 2.2 seconds, making real-world time feasible. This actually matches TTD and closes #10205. 😉
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.