Remix wrote: ↑Sat Jan 09, 2021 9:48 am
Variable Speed Animation:
(Yes, this *Should* solve your variable speed animation question)
Rather than using "pause", use "function" toggling a boolean to dictate block/unblock...
Right, so the solution I got last time also involved using the "function" keyword to build the animation. It was built a little differently, but after testing for a while, I can confirm that this has the same issue. I've been trying to figure out a good way to present the issue, but
uuuugghh, it's so hard to test well and describe. I hope you can bear with me.
Let me try to demonstrate, with a more elaborate version of the animation (that won't give you a seizure, heh).
(code in the init python block is identical, so I'm ignoring that here)
Code: Select all
default preferences.gl_framerate = 10 ## I'll bring this up in a bit
default pause_complete = True
default pause_duration = 0.04
image variable_anim:
Solid("#F00", xysize=(20, 20), yalign=0.5)
function variable_pause
Solid("#F00", xysize=(25, 25), yalign=0.5)
function variable_pause
Solid("#F00", xysize=(30, 30), yalign=0.5)
function variable_pause
Solid("#F00", xysize=(35, 35), yalign=0.5)
function variable_pause
Solid("#F00", xysize=(40, 40), yalign=0.5)
function variable_pause
Solid("#F00", xysize=(45, 45), yalign=0.5)
function variable_pause
Solid("#F00", xysize=(50, 50), yalign=0.5)
function variable_pause
Solid("#F00", xysize=(55, 55), yalign=0.5)
function variable_pause
Solid("#F00", xysize=(50, 50), yalign=0.5)
function variable_pause
Solid("#F00", xysize=(45, 45), yalign=0.5)
function variable_pause
Solid("#F00", xysize=(40, 40), yalign=0.5)
function variable_pause
Solid("#F00", xysize=(35, 35), yalign=0.5)
function variable_pause
Solid("#F00", xysize=(30, 30), yalign=0.5)
function variable_pause
Solid("#F00", xysize=(25, 25), yalign=0.5)
function variable_pause
Solid("#F00", xysize=(20, 20), yalign=0.5)
function variable_pause
repeat
label start:
scene expression "#876"
show variable_anim
"Normal."
$ pause_duration = 0.02
"Double speed."
$ pause_duration = 0.04
while True:
$ pause_duration -= 0.002
"[pause_duration]"
Ignoring the while loop, just try playing this at regular speed, and then double speed.
At "preferences.gl_framerate = 10," I see expected behavior on my machine. It goes twice as fast.
However, at "preferences.gl_framerate = None" (which will draw at max framerate), It does
not. It goes faster than normal, but definitely not twice as fast. This is just one example; throughout the while loop, there seem to be periods where it just feels stubborn, until it jumps up. At framerate 10, though, it behaves as I would expect.
The PROBLEM IS, I don't know if you'll see the same thing on your machine. For my VN (setting framerate to 10), one of my friends reported the animations looking smooth/fine, while for another there was clear stuttering (both were on gaming computers).
I don't know if this is just some simple math thing with framerate that I don't understand, but I've been hung up on this for days.