Clock not updating [still not solved-small glitch]

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.
Message
Author
User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Clock not updating

#16 Post by xela »

SundownKid wrote:I was going to say solved, but there is another glitch that came up. In 12-hour mode, whenever the last 2 numbers of time are 00, it says the time as, say 4:0 instead of 4:00.
It's not a glitch, it works like it is supposed to :) You can straiten this our by building simple strings in side of the functions, just if/else and + operators... This should show you the time as 00:07 for example. I didn't test it but there is no reason for it not to work unless I messed up syntax.

Code: Select all

    def min_to_string():
        m = store.minutes
        
        hour = (m // 60) % 12
        min = m % 60
        if hour < 10:
            hs = "0" + str(hour)
        else:
            hs = str(hour)
        if min < 10:
            ms = "0" + str(min)
        else:
            ms = str(min)
        return ":".join([hs, ms])
SundownKid wrote:EDIT: Also, another problem - is there a way to actually add minutes to the clock without having to define the exact time? For example, let's say I had 3 choices and you could do them one after the other. i couldn't just define a time for each of them because the one you start is not known.

Code: Select all

    def uc(minutes, t=0, add_mins=False):
        """
        Update clock function. Allows animation or instant update depending on positional arguments provided.
        Example: Update without animation: $ uc(550).
        Example: Update with animation: $ uc(1550, 4) will animate to minute 1550, animation will take 4 seconds.
        """
        if not hasattr(store, "minutes"):
            store.minutes = 0
        start = store.minutes
        if add_mins:
            store.minutes += minutes
        else:    
            store.minutes = minutes
        renpy.show_screen("clock", start, store.minutes, t)
To add minutes, instead of setting them:

Code: Select all

    $ uc(100, 1, True)
I've also tested to_string function, it seems to be working...
Last edited by xela on Sun Dec 21, 2014 12:40 pm, edited 1 time in total.
Like what we're doing? Support us at:
Image

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Clock not updating [still not solved-small glitch]

#17 Post by xela »

trooper6 wrote:If there is something unclear about the tutorial, let me know how to make it more clear. If there is some other feature you need, let me know and I'll see if I can add it.
The tutorial is good. I think he means that you can't animate the clock from one time to another like you can with the screen version without modifying your code first.
Like what we're doing? Support us at:
Image

SundownKid
Lemma-Class Veteran
Posts: 2299
Joined: Mon Feb 06, 2012 9:50 pm
Completed: Icebound, Selenon Rising Ep. 1-2
Projects: Selenon Rising Ep. 3-4
Organization: Fastermind Games
Deviantart: sundownkid
Location: NYC
Contact:

Re: Clock not updating [still not solved-small glitch]

#18 Post by SundownKid »

Yes... what Xela said. Well, I guess it does technically "work", but not really "working" for the purposes of the digital clock.

Anyway, thanks, Xela, it that works it should solve all my issues. I will go test it out.

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Clock not updating [still not solved-small glitch]

#19 Post by xela »

SundownKid wrote:Anyway, thanks, Xela, it that works it should solve all my issues. I will go test it out.
Good luck :)

I also updated trooper's UDD so it could be animated and fixed a couple of oddities:

1) visit method was misnamed.
2) math module was imported but math.hypot not used to get hypotenuse for offset???
3) There is no point of using math module since we're dealing with square images so we have sides of the same length, meaning hypotenuse can be calculated by a simple side * square root...
4) subpixel positioning was not used causing glitches on redraws (hands shaking).
and some minor issues.

*Still not perfect but people can customize it as they see fit for their needs...

Code: Select all

init python:
    from datetime import datetime
    img = ["00 images/VintageClockBase450x450.png", "00 images/VintageClockHour450x450.png", "00 images/VintageClockMinute450x450.png"]
    
    class Clock(renpy.Displayable):
        def __init__(self, m, img, resize=150, **kwargs):
            """
            m = Minutes to provide initial position of the clock.
            resize = Size of the clock we want to display
            img = Expects a list/tuple of images in order of base, hour, minute 
            """
            super(Clock, self).__init__(**kwargs)

            self.width = resize
            self.height = resize
            
            # Images:
            self.bI = im.Scale(img[0], resize, resize)
            self.hI = im.Scale(img[1], resize, resize)
            self.mI = im.Scale(img[2], resize, resize)
            
            self.minutes = m
            self.auto_run = False
            self.realtime_run = False
            self.offset = (resize*2**0.5-resize)/2
            
            self.step = 0
            self.minutes_target = 0
            
        def render(self, width, height, st, at):
            if self.minutes_target > self.minutes:
                 self.minutes += self.step
            tM = Transform(child=self.mI, rotate=self.minutes*6, subpixel=True)
            tH = Transform(child=self.hI, rotate=self.minutes*0.5, subpixel=True)

            base = renpy.render(self.bI, width, height, st, at)
            minutes = renpy.render(tM, width, height, st, at)
            hours = renpy.render(tH, width, height, st, at)
            
            self.autoclock(st)
            self.realclock()
                
            render = renpy.Render(self.width, self.height)
            render.blit(base, (0, 0))
            render.blit(minutes, (-self.offset, -self.offset))
            render.blit(hours, (-self.offset, -self.offset))
            
            if self.auto_run:
                renpy.redraw(self, 1)
            else:    
                renpy.redraw(self, 0.1)
            
            return render

        def set_time(self, h, m):
            self.minutes = (h*60)+m
 
        def add_time(self, m, animate=0):
            """
            m: Minutes
            animate: Animation time in seconds.
            In animated mode:
                - will terminate auto_run.
                - will only work with reasonable values.
            """
            self.realtime_run = False
            if animate:
                self.auto_run = False
                self.step = m // float(animate * 10)
                self.minutes_target = self.minutes + m
            else:
                self.minutes += m
 
        def autoclock(self, st):
            if self.realtime_run:
                self.auto_run = False
            if self.auto_run:
                mbase = st
                mcheck = st-1
                add = (mbase-mcheck) / 60
                self.minutes += add
            
        def realclock(self):
            if self.realtime_run:
                t = datetime.today()
                self.minutes = 60 * t.hour + t.minute
                
        def visit(self):
            return [self.bI, self.hI, self.mI]
            
label start:
    $ clock = Clock(0, img, 200)
    show black
    $ renpy.show("clock", what=clock, at_list=[Transform(align=(0.5, 0.5))])
    with Dissolve(1)
    
    pause
    $ clock.add_time(60, 1)
    pause
    $ clock.add_time(60, 2)
    pause
    $ clock.add_time(60, 3)
    pause
    $ clock.auto_run = True
    pause
    $ clock.realtime_run = True
    pause
Like what we're doing? Support us at:
Image

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: Clock not updating [still not solved-small glitch]

#20 Post by trooper6 »

Hi xela!

First off thanks for your code!

I worked up an animate for my clock last night--great minds think alike. I did it differently than you did...I have no idea which version is better, do you have any thoughts on my solution?

I switched the redraw rate to .1 and then did this:

Code: Select all

        def add_time_slow(self, h, m):
            num = (h*60)+m
            for x in range(num):
                self.minutes += 1
                renpy.pause(0.1)
I'm also going to go through your code to figure out generally how to slim down and improve my own code--I already added sub-pixel True and fixed the visit typo. I'm going to ponder the hypotenuse and resize situations as well--also your awesome image list.

I haven't posted my code yet because I have been adding some more bells and whistles:
*I added a second hand...which involved a bit of messing around because of wanting the rotation to be smooth and then needing to change the redraw rate and then the math. A user is now able to show or hide the second hand.
*I added the ability to turn on/off audio of a second hand ticking

At the moment I'm stuck on a function I want to add, perhaps you have an idea? I want to Clock to play a chime file whenever the clock strikes the hour. But I am having trouble with figuring out how to have the clock monitor the minutes and trigger the chime when the minutes happen upon an hour. I figure math-wise, I just need to do minutes%60 == 0 to determine when the clock is on the hour...but I don't know how to get the clock to continuously monitor that variable and trigger at the right time while still having the game continue on.

I was thinking a while loop...but that causes the clock to hang up infinitely. I was trying to figure out if I should make a separate ClockAudio class and that could be hanging out in an infinite look to monitor the minutes...but that caused a hang up as well. I've not figured out how to have callbacks do this either.

So, do you have any idea on how to do that? If I can solve that pickle, then I think I'll do a bit more noodling then be ready to post the new UDD.
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

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Clock not updating [still not solved-small glitch]

#21 Post by xela »

trooper6 wrote:I worked up an animate for my clock last night--great minds think alike. I did it differently than you did...I have no idea which version is better, do you have any thoughts on my solution?

I switched the redraw rate to .1 and then did this:

Code: Select all

        def add_time_slow(self, h, m):
            num = (h*60)+m
            for x in range(num):
                self.minutes += 1
                renpy.pause(0.1)
You're creating a loop that loops every 0.1 seconds inside of a loop (redraw) that also refreshes every 0.1 seconds. To what end? You also animate a minute per 0.1 seconds which will take too long for higher numbers, without using steps.
trooper6 wrote:I haven't posted my code yet because I have been adding some more bells and whistles:
*I added a second hand...which involved a bit of messing around because of wanting the rotation to be smooth and then needing to change the redraw rate and then the math. A user is now able to show or hide the second hand.
*I added the ability to turn on/off audio of a second hand ticking
So time is now being calculated in seconds instead of minutes?
trooper6 wrote:At the moment I'm stuck on a function I want to add, perhaps you have an idea? I want to Clock to play a chime file whenever the clock strikes the hour. But I am having trouble with figuring out how to have the clock monitor the minutes and trigger the chime when the minutes happen upon an hour. I figure math-wise, I just need to do minutes%60 == 0 to determine when the clock is on the hour...but I don't know how to get the clock to continuously monitor that variable and trigger at the right time while still having the game continue on.

I was thinking a while loop...but that causes the clock to hang up infinitely. I was trying to figure out if I should make a separate ClockAudio class and that could be hanging out in an infinite look to monitor the minutes...but that caused a hang up as well. I've not figured out how to have callbacks do this either.

So, do you have any idea on how to do that? If I can solve that pickle, then I think I'll do a bit more noodling then be ready to post the new UDD.
Put it directly inside of the render loop and fix any oddities with attributes. It might be a good idea to use renpy.redraw(self, 0) (I mean generally, not just for the sounds) and properly work with st value instead of renpy.redraw(self, 0.1). It's both more professional and easier to work with as you advance your code.
Like what we're doing? Support us at:
Image

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: Clock not updating [still not solved-small glitch]

#22 Post by trooper6 »

xela wrote: You're creating a loop that loops every 0.1 seconds inside of a loop (redraw) that also refreshes every 0.1 seconds. To what end? You also animate a minute per 0.1 seconds which will take too long for higher numbers, without using steps.
I did that because otherwise the animation was immediate rather than taking time. I tried your step animation, but the chimes didn't work. Though now I'm thinking it might not be the step issue but a chimes issue. I'll try the step again after i get the chimes to work auto_run
xela wrote:So time is now being calculated in seconds instead of minutes?
For the user it is still calculated in minutes. I did some math on the inside to make it work out...but...
xela wrote:Put it directly inside of the render loop and fix any oddities with attributes. It might be a good idea to use renpy.redraw(self, 0) (I mean generally, not just for the sounds) and properly work with st value instead of renpy.redraw(self, 0.1). It's both more professional and easier to work with as you advance your code.
I actually got it to work (mostly), right before you posted this after I slimed down my code inspired by yours. The chimes don't work with autorun. I'm not quite sure why. Though it does work with real clock. This probably has something to do with trickiness with the st value. I'm going to try to use the renpy.redraw(self,0) and see if I can get that to work. I'm having some success so far. But it is really late. I'm going to bed...then I'm going to ponder the mysteries of the relationship between st and updating minutes tomorrow...I have an idea of some things I can try.
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

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Clock not updating [still not solved-small glitch]

#23 Post by xela »

st is just the time counter that start at 0 when you show the displayable and counts up in something close to nano-seconds (value itself is in seconds like 3.43245354 is something you might expect after about 3 and a half seconds have passed after the displayable was shown).
I have no idea what you do with the sounds so I can't advice...

This:

Code: Select all

            if self.auto_run:
                mbase = st
                mcheck = st-1
                add = (mbase-mcheck) / 60
                self.minutes += add
is exactly the same as:

Code: Select all

            if self.auto_run:
                self.minutes += 1.0/60
Like what we're doing? Support us at:
Image

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: Clock not updating [still not solved-small glitch]

#24 Post by trooper6 »

Xela--who is so marvelous!

So, I got the clock working...everything I wanted. Woot! I tried your animated add--but as written it wouldn't trigger the chimes. They key is that the minutes have to increment by 1 so that the clock can notice if it passes the 12 with the minute hand and set off the chimes when it does so. The steps sometimes result in stepping over the 12. It also wasn't working with the new redraw(0). Also, there is a check for the chimes that happens in the render, so the check for the steps has to happen outside the render so it is alway checking it.

So what I did was modify my original animated add to be more like yours. I came up with the idea that I could vary the length of the pauses between 1 minute clicks based on how quickly or slowly you wanted the animation to happen. Something like: Pause = animation/minutes. It results in a faster animation to be sure...but...I don't think the speed is varying based on the animation variable. Do you have any thoughts on how to fix this?

Anyhow, I'm going to post the clock.rpy project here...It isn't completely annotated for new users yet, but I'm hold off doing that until the Clock code is finalized. Once everything is completely updated, I'll rethink about the explanations to new users and repost it to the Cookbook.

Code: Select all

init -1 python:
    from datetime import datetime #This is to get the realtime datetime
    import math
    import time
    
    img = ["00 images/VintageClockBase450x450.png", "00 images/VintageClockHour450x450.png", "00 images/VintageClockMinute450x450.png", "00 images/VintageClockSecond400x400.png"]
    renpy.music.register_channel("TockBG", mixer= "sfx", loop=True)
    renpy.music.register_channel("ChimeBG", mixer= "sfx", loop=False, tight=True)        
    
    #as a UDD this needs to extend the Displayable class)
    class Clock(renpy.Displayable):
        
        #The clock class constructor
        def __init__(self, h, m, resize=150, sH=True, **kwargs):
            super(Clock, self).__init__(**kwargs)
            self.width = resize
            self.height = resize
            
            self.bI = im.Scale(img[0], resize, resize)
            self.hI = im.Scale(img[1], resize, resize)
            self.mI = im.Scale(img[2], resize, resize)
            self.sI = im.Scale(img[3], resize, resize)
            
            self.minutes = (h*60)+m
            self.seconds = 0
            self.minutes_target = 0 #Do I need this
            self.step = 0 #Do I need this
            
            self.auto_run = False
            self.realtime_run = False
            self.sec_run = False
            self.offset = (resize*2**0.5-resize)/2
            self.secondHand = sH
            self.sound = False
            self.chime_run = False
            
            self.last_sec = None #Used in secondson
            self.old_minute = None #Used in autorun
            self.last_minute = 0
            self.chplay = False
            
        def render(self, width, height, st, at):
            # Create transform to rotate the second hand
            tM = Transform(child=self.mI, rotate=self.minutes*6, subpixel=True)
            tH = Transform(child=self.hI, rotate=self.minutes*0.5, subpixel=True)

            # Create a render from the child.
            base_render = renpy.render(self.bI, width, height, st, at)
            minute_render = renpy.render(tM, width, height, st, at)
            hour_render = renpy.render(tH, width, height, st, at)
  
            self.realclock()
            self.autoclock(st)
            if self.chime_run == True:
                if self.last_minute != self.minutes:
                    self.chplay = False
                    self.last_minute = self.minutes
                self.chimeon()
                
            # Create the render we will return.
            render = renpy.Render(self.width, self.height)

            # Blit (draw) the child's render to our render.
            render.blit(base_render, (0, 0))
            render.blit(minute_render, (-self.offset, -self.offset))
            render.blit(hour_render, (-self.offset, -self.offset))
            
            if self.secondHand:
                tS = Transform(child=self.sI, rotate=self.seconds*6, subpixel=True)
                sec_render = renpy.render(tS, width, height, st, at)
                render.blit(sec_render, (-self.offset, -self.offset))
                self.secondson(st)
            
            #This makes sure our object redraws itself after it makes changes
            renpy.redraw(self, 0)

            # Return the render.
            return render

        #Returns a list of all the child displayables for this displayable...but be here
        def visit(self):
            return [self.bI, self.hI, self.mI, self.sI]

        def get_time(self):
            h, m = divmod(self.minutes, 60)
            if h is 0:
                h = 12
            elif h > 12:
                h = h%12
            h = int(h)
            m = int(m)
            return h, m
            
        #Directly set the time of the watch
        def set_time(self, h, m):
            self.minutes = (h*60)+m
            self.seconds = 0
 
        #Manually add a certain amount of time to the clock
        def add_time(self, h, m, animate=0): #This is working, but it isn't really slowing down
            if self.realtime_run == False:
                num = (h*60)+m
                if animate:
                    p = float(animate/num)
                    for x in range(num):
                        self.minutes += 1
                        renpy.pause(p)
                else:
                    self.minutes += num
                        
        def autoclock(self, st):
            if self.auto_run:
                self.realtime_run = False 
                if self.old_minute is None:
                    dt = 0
                else:
                    dt = st//60 - self.old_minute
                self.old_minute = st//60
                self.minutes += dt
                
        def realclock(self):
            if self.realtime_run:
                self.auto_run = False 
                t = datetime.today()
                self.minutes = (60 * t.hour) + t.minute
        
        def secondson(self, st):
            if self.sec_run:
                if self.realtime_run:
                    t = datetime.today()
                    self.seconds =  t.second
                else:
                    if self.last_sec is None:
                        dt = 0
                    else:
                        dt = st - self.last_sec
                    self.last_sec = st
                    self.seconds += dt
                    
        def runmode(self, mode, snd=True):
            if mode == "none":
                self.realtime_run = False
                self.auto_run = False
                self.sec_run = False
                self.sound_on(snd, snd)
            else:
                self.sec_run = True
                self.sound_on(snd, snd)
                if mode == "auto":
                    self.realtime_run = False
                    self.auto_run = True
                elif mode == "real":
                    self.auto_run = False
                    self.realtime_run = True
                
        def sound_on(self, sndR, chR):
            self.sound = sndR
            self.chime_run = chR
            if self.sound:
                if renpy.music.is_playing(channel='TockBG'):
                    renpy.music.stop(channel='TockBG', fadeout=0.1)
                renpy.music.play("00 sounds/ClockTick1.flac", channel='TockBG')
            else:
                renpy.music.stop(channel='TockBG')
            if self.chime_run:
                self.chime_run = True
            else:
                renpy.music.stop(channel='ChimeBG')
                self.chime_run = False
            
        def chime_looper(self):
            h, m = self.get_time()
            ch = ["00 sounds/ChimePart.ogg",]*(h-1)
            ch.append("00 sounds/Chime1.ogg")
            return ch
                
        def chimeon(self): 
            if self.chime_run:    
                if not self.chplay:
                    if self.minutes%60 == 0:
                        self.chplay = True
                        cf = self.chime_looper()
                        renpy.music.queue(cf, channel='ChimeBG')
                        
Attachments
Trooper6_ClockCDD_ExampleU2.zip
(1.15 MiB) Downloaded 30 times
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

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Clock not updating [still not solved-small glitch]

#25 Post by xela »

I am on android atm so I can't check new clock. I'll try to do that tomorrow. There are some minor things that could be improved in the code and you are still trying to animate a clock that should run in seconds vs a timer that counts in seconds using renpy.pause. It needs to be fixed because it sounds like poor advice and practice. I believe that if we that if we count clock time in seconds instead of minutes internaly, we could come up with pretty and clear code for the clock and get sounds to work properly under any conditions...
Like what we're doing? Support us at:
Image

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: Clock not updating [still not solved-small glitch]

#26 Post by trooper6 »

I'm really excited to see your code improvements! Both small and large. It will make me a better Python/Renpy coder (I am new to Python and trying to figure it out randomly), and make the clock better.

Btw, I was particularly proud of finding a solution to this one problem of stopping the chimes from triggering multiple times per minute by adding a flag. It took a while to come up with that.

Oh, and if you see ways to make the code more elegant and Pythonic, please let me know so I can be a better coder in the end. Like, for example, are those nested if statements in my chimeson function better written as one if with a lot of ands? Things like that.

I'm going to think about the idea of it running on seconds. That is interesting! I think as long as the user still interacts with the clock in minutes and hours (because that will be easier for the end user), I suppose it doesn't matter if it runs on seconds internally.

And I'll annotate everything so that new people will understand what is going on and hopefully they will become better coders too. For example, through this round of the process, I finally understood that the render is a loop I can use to monitor things continuously, including variables. That is very powerful with many other future coding implications!
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

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Clock not updating [still not solved-small glitch]

#27 Post by xela »

Right, I'll try to do it a bit later tonight or tomorrow. The trouble with sounds solution being so complicated is because while for the old clock, the original code made sense, for the new version, it's seems absurd because we're trying to reinvent what Ren'Py provides to us by default (a timer that counts up for us, just like a clock would) in somewhat silly ways... at least that's what I think at the moment.
Like what we're doing? Support us at:
Image

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: Clock not updating [still not solved-small glitch]

#28 Post by trooper6 »

At one point I though linear might be a way to adjust the timing on the animations...but that is a Ren'py thing and this is in Python...so I wasn't sure if that were possible...plus I'm not sure if that is adjustable by the user.
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

User avatar
xela
Lemma-Class Veteran
Posts: 2481
Joined: Sun Sep 18, 2011 10:13 am
Contact:

Re: Clock not updating [still not solved-small glitch]

#29 Post by xela »

trooper6 wrote:At one point I though linear might be a way to adjust the timing on the animations...but that is a Ren'py thing and this is in Python...so I wasn't sure if that were possible...plus I'm not sure if that is adjustable by the user.
This might work... I need to think about it (and that's not easy atm due to severe intoxication :) ). I am trying to build some experience in working with CDDs with this, it's prolly the last area in Ren'Py that I am sorely lacking in.
Like what we're doing? Support us at:
Image

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: Clock not updating [still not solved-small glitch]

#30 Post by trooper6 »

Have a drink for me! I have to do grading and can't be drunk for that.
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

Post Reply

Who is online

Users browsing this forum: No registered users