Making Dates

3

Benimo12 2025-01-13 04:21

Is it possible to write a program that retrieves the current date of the calendar? I don’t think TIMER will work because it resets everyday but, a manual way I’d do it is to have a counter for when TIMER resets and use that as the basis for counting days.


was8bit 2025-01-13 04:42 (Edited)

Sorry, no...

TIMER
Returns the number of frames shown since LowRes NX was started. The value wraps to 0 when 5184000 is reached, which is about 24 hours.

So TIMER always starts at 0 when lowres is opened, so you have no mechanism of letting the program know about the real passage of time beyond how long lowres has been turned on..

You CAN use PERSIST memory to keep a running total of how long a player has played a game, as well as maybe handle assumed passage of time between saves

So, save TIMER value when game,starts, then when game is saved with PERSIST memory take another reading of TIMER and save a running total of gameplay time into PERSIST ...

IF you assume that player only plays once per day, you can just assume the day ends when they save the game .... it will end up playing like it does in Harvest Moon


Benimo12 2025-01-13 04:46

So, PERSIST is my answer then


was8bit 2025-01-13 04:49

Its your only resource .... whether you track gameplay time or just assume a day at save, or both, its your choice :)


Benimo12 2025-01-13 04:51

Thank you so much


was8bit 2025-01-13 05:04

No problem :)

Original lowres let you actually get the current time and date, but it would be cumbersome converting dates and times to calculate precisely how much time since the game was last played....


Benimo12 2025-01-13 05:09

I think I could make it work. I think you actually will just need 1 active variable I.e the PERSIST’ed variable, like 3-4 passive variables to set date/time with and converters which can also calculate the difference. But, this would all be reliant on the TIMER variable. (I’m also trying to use as little variables as possible as a programming exercise)


was8bit 2025-01-13 05:13 (Edited)

... last thoughts....

Based on what i have seen others do, there are two easy options:

1) use virtual game time (like in Harvest Moon) where the player experiences the virtual passage of time inside the game...

2) for precise actual times and days, at game start have the player actually enter real time/date or real passage of time... you will see this on older exercise devices that couldnt track actual time/date but needed that info to give you accurate data results

(Our posts keep criss crossing) ;)


Benimo12 2025-01-13 05:16

I was planning on doing method #2 but, I’ll see if I can also implement method #1. Thank you so much!


was8bit 2025-01-13 05:19

:)


Benimo12 2025-01-13 15:12 (Edited)

This thread was helpful. Thanks @was8bit


was8bit 2025-01-13 16:41

We have a lot of wonderful people here :) i am happy to help as i can :)


SP4CEBAR 2025-01-14 10:16 (Edited)

You may be interested in:


Sylveon 2025-01-26 15:49

In the original lowres you could use the date parameter :3


Log in to reply.