How to do rolling credits in Ren'Py

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
User avatar
thelastsecret
Regular
Posts: 117
Joined: Tue Mar 01, 2022 1:32 pm
Completed: The Last Secret
Projects: Sweet Science – The Girls from Silversee Castle
itch: thelastsecret
Discord: TheLastSecret #5266
Contact:

How to do rolling credits in Ren'Py

#1 Post by thelastsecret »

I thought that might be a time saver for some Ren'Py programmers:

If you want to add some rolling credits (or any text scrolling through) to your game, here's how you can do that easily:

Code: Select all

label finalcredits:
    scene black
    show screen creditscreen
    pause 100 # or however long it takes to scroll through in a reasonable speed
    pause
    hide screen creditscreen
    return

screen creditscreen:
    vbox:
        xsize 1000 # horizontal size of the credits
        ysize 5500 # how much vertical space your rolling credits take.
        xalign 0.5
        yalign 0.0
        at transform:
            subpixel True
            easein 100: # or however long it takes to scroll through in a reasonable speed
                yalign 1.0
        vbox:
            ysize 720 # enter vertical resolution, so that it starts with an empty screen
        text "Sweet Science":
            font "FredokaOne-regular.ttf"
            color "#F9A"
            size 100
            xalign 0.5
        text "The Girls of Silversee Castle":
            font "FredokaOne-regular.ttf"
            color "#79F"
            size 50
            xalign 0.5
        text ""
        text "Made with Ren'Py.":
            font "ZCOOLXiaoWei-Regular.ttf"
            bold True
            xalign 0.5
        vbox:
            ysize 100 # some empty space in between
        add "a/a cg piano.png": # adding a picture in-between the text
            zoom 0.75
            xalign 0.5
        text "Music credits:":
            font "ZCOOLXiaoWei-Regular.ttf"
            bold True
            xalign 0.5
	text "......." # add all your credits here
This is taken from one of my games. Feel free to use and modify it.

Hope it helps! :)

Post Reply

Who is online

Users browsing this forum: Bing [Bot], GetOutOfMyLab, Ocelot