The visual novel I'm developing tracks 24 hours independently of system time... ...though at the moment the demo has a bug/quirk where it is possible to have a 26-hour day when using the computer. (Guess what I'm currently troubleshooting? Also, guess who's planning on having most "days"' activity end before midnight in future to get round this problem and some related ones? And if only we actually could add 2 hours onto our days simply by using our computers...)
A certain amount of the freedom of the 24-hour approach is illusory. You still have to program enough things to do to fill all that time, as well as provide at least some of the player guidance Jackkel Dragon discusses. Time-skipping isn't allowed in Budacanta, though skipping certain events is, but even then I had to be careful to make sure it was clear what was happening. In the demo, the player is also automatically brought to the next "plot event" when I told the player it was going to be time for it to happen. In other words, it's currently impossible to be late for anything. While I am planning on it being possible to miss/delay certain events later on, it's important to make sure players are unlikely to do so by accident.
I'd also recommend not giving the player too many options at once for using their "free time", especially in the beginning. Having just a few options with which to orient oneself makes it much easier to choose one and therefore make progress in the game. You can always gradually add extra options as the game makes progress and your player has plot/character reasons to do additional things. Some parser games have good solutions to the problem of gradually adding more content that can be usefully applied here - The Weight of a Soul is a recent example worth studying.
Mechanically, there are three variables holding the time which need to go between your character list and the main part of the script:
Code: Select all
default day = 1
default hour = 10
default minute = 11
Note the numbers are Budacanta's starting values; you can use any other values that make sense for your game. You'd almost certainly also want:
(It doesn't handle minutes below 10 very well, a bug I'm currently working around rather than fixing).
At points where it would be possible for the minute to become an hour - actually, that's not currently possible in Budacanta. But it will be, and if I don't find a better way, I am considering the following:
Code: Select all
if minute >= 60:
$ hour += 1
$ minute -= 60
As for the hour turning into the next day, the mechanism I'm using is:
Code: Select all
if hour >= 24:
$ day += 1
$ hour -= 24
However, to combine them is a bit more complicated, else you find yourself skipping the entire midnight hour:
Code: Select all
if minute >= 59:
$ hour += 1
$ minute -= 60
if hour >= 23:
$ day += 1
$ hour -= 24
else:
pass
else:
if hour >= 23:
$ day += 1
$ hour -= 24
else:
pass
The full version of Budacanta is only meant to run across 12 days, and does not state-track weeks (though these will be implied by the activities on offer). However, the same concept could also be applied to weeks, as long as you know yourself what number day of the week applies to which day (Ren'Py prefers adding and taking away from numbers rather than words):
Code: Select all
if day >= 8:
$ week += 1
$ day -= 7
If you need to know what day of the week it is, you could use a tuple to map each day to a day of the week, though I've never actually done this to check the exact code that does the job.
Anything that moves time on gets the relevant lines of the following:
Code: Select all
$ minute += 1
$ hour += 1
$ day += 1
$ week += 1
Months, if you get that far, will be more complicated and I have no relevant experience to offer. In all cases, if you're setting it on a different world where time works differently, please adjust the numbers to suit.
I was hoping to be able to put in an all-purpose code block along the following lines into the start of the script, with the idea it would automatically check it (this will save a ton of code later on). However, I'm not doing very well with it and won't presume to offer advice on that element.