Can I create a "real time" clock and date system?

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
nanashine
Regular
Posts: 129
Joined: Thu Nov 30, 2017 1:44 pm
itch: renpytom
Contact:

Can I create a "real time" clock and date system?

#1 Post by nanashine »

I wanted my game to have a clock that would show the real time when the person is playing it. Also, the date.
For example, let's say it's January 13th 3:30pm, and at the screen top it would appear 01/13/2018 3:30pm.
Is it possible? Thanks :)
I can't access my other account cause I don't remember the e-mail I used *cries in emoji*.

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Can I create a "real time" clock and date system?

#2 Post by trooper6 »

Check out the clock recipe in my signature
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

nanashine
Regular
Posts: 129
Joined: Thu Nov 30, 2017 1:44 pm
itch: renpytom
Contact:

Re: Can I create a "real time" clock and date system?

#3 Post by nanashine »

Thank you! I want it to look like a digital clock, like those in the screen of our cellphones. I'll check if I can find it in one of the tutorials :)
I can't access my other account cause I don't remember the e-mail I used *cries in emoji*.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3792
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Can I create a "real time" clock and date system?

#4 Post by Imperf3kt »

There should be a digital clock within the clock recipe suggested. May I suggest the font "7seg" aka 7segment

Additionally, you could do more than just display the date. Consider adding holly and tinsel to your menu on Christmas day, or balloons and streamers on the player's birthday (if supplied)
viewtopic.php?f=8&t=46795
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

nanashine
Regular
Posts: 129
Joined: Thu Nov 30, 2017 1:44 pm
itch: renpytom
Contact:

Re: Can I create a "real time" clock and date system?

#5 Post by nanashine »

Thank you so much! :)
I can't access my other account cause I don't remember the e-mail I used *cries in emoji*.

User avatar
trooper6
Lemma-Class Veteran
Posts: 3712
Joined: Sat Jul 09, 2011 10:33 pm
Projects: A Close Shave
Location: Medford, MA
Contact:

Re: Can I create a "real time" clock and date system?

#6 Post by trooper6 »

Remember that my recipe is also a tutorial of sorts about making clocks...and if you don't care about the details and all the different ways the clock can be done and acknowledgments of other ways it has been done, just skip to point 5 of my first post.
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Check out My Clock Cookbook Recipe: http://lemmasoft.renai.us/forums/viewto ... 51&t=21978

nanashine
Regular
Posts: 129
Joined: Thu Nov 30, 2017 1:44 pm
itch: renpytom
Contact:

Re: Can I create a "real time" clock and date system?

#7 Post by nanashine »

Thank you so much! Your tutorial is great.
But I'm a newbie, so I ended up messing everything up hah
I wanted to have the hour showing like this, since it would be important to the story I'm making: https://i.imgur.com/bgVom9D.png

But that's ok, I think I want something too complicated for someone who's starting now hah

Anyway, thanks for your help and attention :)
I can't access my other account cause I don't remember the e-mail I used *cries in emoji*.

Post Reply

Who is online

Users browsing this forum: No registered users