Scrolling credits stop scrolling

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
JimPanse
Newbie
Posts: 13
Joined: Wed Apr 28, 2021 1:36 pm
Contact:

Scrolling credits stop scrolling

#1 Post by JimPanse »

Hey there guys,

I'm trying to implement a scrolling credits screen at the end of my game and tried to keep it as simple as possible. So what I've done is creating an image in photoshop with a transparent background and put all the credits on there (easy to change and edit stuff if needed).

Then I thought I'd go with this simple code line at the end of the game:

Code: Select all

    label credits:
    $ credits_speed = 25
    scene black
    show credits at Move((0.5, 1.0), (0.5, -1.0), credits_speed,
                  xanchor=0.5, yanchor=0)
    with Pause(credits_speed+10)
'credits_speed' being the time in seconds it takes the credits to scroll and 'credits' being the credits.png file created in photoshop.

What now happens is, the credits image starts to scroll fine and after the 25 seconds set in 'credits_speed' it stops, which of course is what it should do.
BUT: Let's say I change that value to 60 seconds, what happens is, it just scrolls much slower and stops at exactly the same spot as with 25 seconds, which is in the middle of the credits. So no matter what value I use for the time, it always stops at the exact same spot.

What am I doing wrong here? Is there something I'm missing to tell renpy to keep on scrolling up to a certain point?
Oh and on a side note: The image size of the credits file is 1920x6480, just in case there is a maximum renpy can handle, which I don't think there is.

So if any of you knows what I'm missing here, any help would be greatly appreciated.

User avatar
_ticlock_
Miko-Class Veteran
Posts: 910
Joined: Mon Oct 26, 2020 5:41 pm
Contact:

Re: Scrolling credits stop scrolling

#2 Post by _ticlock_ »

JimPanse wrote: Thu Dec 15, 2022 12:33 am

Code: Select all

    label credits:
    $ credits_speed = 25
    scene black
    show credits at Move((0.5, 1.0), (0.5, -1.0), credits_speed,
                  xanchor=0.5, yanchor=0)
    with Pause(credits_speed+10)
I think it is easier to use ATL. For example:

Code: Select all

image credits_img:
    "credits.png"
    subpixel True
    yalign 0.0
    linear 25.0 yalign 1.0

Code: Select all

label credits:
    show credits_img
    pause
or ATL transform for reuse and speed adjustment:

Code: Select all

transform show_long_image(move_time):
    subpixel True
    yalign 0.0
    linear move_time yalign 1.0

Code: Select all

label credits:
    show credits at  show_long_image(25.0)
    pause

JimPanse
Newbie
Posts: 13
Joined: Wed Apr 28, 2021 1:36 pm
Contact:

Re: Scrolling credits stop scrolling

#3 Post by JimPanse »

Wow, thank you so much mate. Your solution works like a charm. That's awesome.
One small thing though: Somehow this way, the textbox overlay is still displayed while the credits scroll. So the lower part is a bit darkened until the credits move above the textbox. Any way to hide the textbox while the credits roll?
If not, it's not that big of a deal :-)

But thanks a lot again, mate. You really helped me out there. Much appreciated.

User avatar
_ticlock_
Miko-Class Veteran
Posts: 910
Joined: Mon Oct 26, 2020 5:41 pm
Contact:

Re: Scrolling credits stop scrolling

#4 Post by _ticlock_ »

JimPanse wrote: Thu Dec 15, 2022 2:37 pm Any way to hide the textbox while the credits roll?

Code: Select all

label credits:
    window hide
    show credits_img
    pause
https://www.renpy.org/doc/html/dialogue ... management

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], giorgi1111, Google [Bot]