Animation slows down

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
Line of lust
Regular
Posts: 27
Joined: Sat Oct 05, 2019 8:52 am
Contact:

Animation slows down

#1 Post by Line of lust »

Hello, when starting a video (animation) in renpy, the animation lags a bit, how can this be fixed? Thank you very much in advance!
(1920 x 1080 | 1 second | 998 kb)

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: Animation slows down

#2 Post by rayminator »

Post your code so someone can help you better

Line of lust
Regular
Posts: 27
Joined: Sat Oct 05, 2019 8:52 am
Contact:

Re: Animation slows down

#3 Post by Line of lust »

rayminator wrote: Wed Jan 13, 2021 3:18 pm Post your code so someone can help you better

Code: Select all

image anim1 = Movie(channel="anim", play="movies/anim_five.webm") # Video.
scene anim1

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Animation slows down

#4 Post by Alex »

Any chance that few lines later in game you have lots of images/videos to show, so the lag is caused by Ren'Py trying to preload those images/videos?

Have you tried to show the other movie in this line - is the lag persist?

Line of lust
Regular
Posts: 27
Joined: Sat Oct 05, 2019 8:52 am
Contact:

Re: Animation slows down

#5 Post by Line of lust »

Alex wrote: Wed Jan 13, 2021 4:12 pm Any chance that few lines later in game you have lots of images/videos to show, so the lag is caused by Ren'Py trying to preload those images/videos?

Have you tried to show the other movie in this line - is the lag persist?
After the animation I thought about it beforehand and removed everything to the end of the label, I used other animations and such a delay was not or I did not notice, but put the animation by looping through file sharing and everything looked fine, only renpy lags

Line of lust
Regular
Posts: 27
Joined: Sat Oct 05, 2019 8:52 am
Contact:

Re: Animation slows down

#6 Post by Line of lust »

Alex wrote: Wed Jan 13, 2021 4:12 pm Any chance that few lines later in game you have lots of images/videos to show, so the lag is caused by Ren'Py trying to preload those images/videos?

Have you tried to show the other movie in this line - is the lag persist?
And although by inserting a different animation, I also notice some lags

rayminator
Miko-Class Veteran
Posts: 793
Joined: Fri Feb 09, 2018 12:05 am
Location: Canada
Contact:

Re: Animation slows down

#7 Post by rayminator »

how many frames are you using?
and I would use show instead of scene
if the animation are only 5 frames then I would this code here

Code: Select all

image anim_scene_1:
    "images/anim/image1.png"
    pause 1.0
    "images/anim/image2.png"
    pause 1.0
    "images/anim/image3.png"
    pause 1.0
    "images/anim/image4.png"
    pause 1.0
    "images/anim/image5.png"
    repeat 

Line of lust
Regular
Posts: 27
Joined: Sat Oct 05, 2019 8:52 am
Contact:

Re: Animation slows down

#8 Post by Line of lust »

rayminator wrote: Wed Jan 13, 2021 4:49 pm how many frames are you using?
and I would use show instead of scene
if the animation are only 5 frames then I would this code here

Code: Select all

image anim_scene_1:
    "images/anim/image1.png"
    pause 1.0
    "images/anim/image2.png"
    pause 1.0
    "images/anim/image3.png"
    pause 1.0
    "images/anim/image4.png"
    pause 1.0
    "images/anim/image5.png"
    repeat 
Frankly, I would prefer a video format, I just need to eliminate lags, but I do not understand how to do it and would be grateful for any help with this

User avatar
Alex
Lemma-Class Veteran
Posts: 3094
Joined: Fri Dec 11, 2009 5:25 pm
Contact:

Re: Animation slows down

#9 Post by Alex »

Line of lust wrote: Wed Jan 13, 2021 4:30 pm ...
Try to make the actual size of images/videos smaller than the screen size, then apply the zoom transform (zoom 1.5 shouldn't reduce the image quality too much).

https://www.renpy.org/doc/html/atl.html
https://www.renpy.org/doc/html/atl.html ... perty-zoom

Line of lust
Regular
Posts: 27
Joined: Sat Oct 05, 2019 8:52 am
Contact:

Re: Animation slows down

#10 Post by Line of lust »

Alex wrote: Wed Jan 13, 2021 5:56 pm
Line of lust wrote: Wed Jan 13, 2021 4:30 pm ...
Try to make the actual size of images/videos smaller than the screen size, then apply the zoom transform (zoom 1.5 shouldn't reduce the image quality too much).

https://www.renpy.org/doc/html/atl.html
https://www.renpy.org/doc/html/atl.html ... perty-zoom
I already converted the video to webp format, which reduced the quality, if I further reduce the size and scale, the quality will drop even more and the picture becomes unbearable, are there any other options how I can put the video without small lags? Perhaps something with Renpy?

Line of lust
Regular
Posts: 27
Joined: Sat Oct 05, 2019 8:52 am
Contact:

Re: Animation slows down

#11 Post by Line of lust »

upp

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

Re: Animation slows down

#12 Post by Imperf3kt »

Line of lust wrote: Wed Jan 13, 2021 3:35 pm
rayminator wrote: Wed Jan 13, 2021 3:18 pm Post your code so someone can help you better

Code: Select all

image anim1 = Movie(channel="anim", play="movies/anim_five.webm") # Video.
scene anim1
Where do you have the first line in this? It should ideally be placed somewhere before the start label.
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

Line of lust
Regular
Posts: 27
Joined: Sat Oct 05, 2019 8:52 am
Contact:

Re: Animation slows down

#13 Post by Line of lust »

Imperf3kt wrote: Sat Jan 16, 2021 5:07 pm
Line of lust wrote: Wed Jan 13, 2021 3:35 pm
rayminator wrote: Wed Jan 13, 2021 3:18 pm Post your code so someone can help you better

Code: Select all

image anim1 = Movie(channel="anim", play="movies/anim_five.webm") # Video.
scene anim1
Where do you have the first line in this? It should ideally be placed somewhere before the start label.
It is placed right in front of the label start

Post Reply

Who is online

Users browsing this forum: Dark79, Google [Bot], Majestic-12 [Bot]