how to make a loading screen where the player is reminded of what happened at a previous point in the plot?

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
cursedarchi
Newbie
Posts: 7
Joined: Tue Feb 27, 2024 9:47 am
Projects: Грёзы Фантома 3: Война в Ярославле/Sweet Dreams of Fantom 3: Yaroslavl' at War
Discord: cursedarchi
Contact:

how to make a loading screen where the player is reminded of what happened at a previous point in the plot?

#1 Post by cursedarchi »

by itself it is an imitation of loading cuz renpy load scenes very fast. i want to make something like loading from the witcher 3. some time is allocated for “loading” so that the player can read or listen to what happened before. In any case, in the code you can somehow provide some checkpoints so that the game understands which picture and which replica to load

halp

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2428
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: how to make a loading screen where the player is reminded of what happened at a previous point in the plot?

#2 Post by Ocelot »

Always have data you want to show after loading up to date in your game, and then use after_load special label to show some screens telling player what happened before.
https://www.renpy.org/doc/html/label.ht ... ial-labels

Example:

Code: Select all

default happened_before = ["you have started the game"]

label start:
    "A boring day" # Save-Load there and you will see default message
    $ happened_before = ["Something unexpected happened", "Who could have thought?"]
    "A surprising twist" # Save-Load there and you will see new messages
    return

label after_load:
    "In previous episodes"
    $ i = 0
    while i < len(happened_before):
        narrator happened_before[i]
        $ i += 1
    return
< < insert Rick Cook quote here > >

jeffster
Veteran
Posts: 461
Joined: Wed Feb 03, 2021 9:55 pm
Contact:

Re: how to make a loading screen where the player is reminded of what happened at a previous point in the plot?

#3 Post by jeffster »

cursedarchi wrote: Sat Mar 30, 2024 11:23 am by itself it is an imitation of loading cuz renpy load scenes very fast. i want to make something like loading from the witcher 3. some time is allocated for “loading” so that the player can read or listen to what happened before. In any case, in the code you can somehow provide some checkpoints so that the game understands which picture and which replica to load
Ocelot wrote: Sat Mar 30, 2024 3:15 pm Always have data you want to show after loading up to date in your game, and then use after_load special label to show some screens telling player what happened before.
https://www.renpy.org/doc/html/label.ht ... ial-labels
Here's another example of what Ocelot said:

1. You prepare a list to keep pictures and comments for "Previously in the game...":

Code: Select all

default recap = []
2. In the course of the game, you add pairs of [picture, comment] to that list:

Code: Select all

    $ recap.append(["bg", "You met Vikram"])
3. In the label after_load you show all the pictures and comments of "previously":

Code: Select all

label after_load:
    python:
        for pic, replica in recap:
            renpy.show(pic)
            renpy.say(None, replica)
4. You can add a button to skip the "previously" intro:

Code: Select all

screen skip_recap():
    button:
        background "#A00"
        text "{b}Previously...{/b}\nClick here to skip"
        xalign 0.5
        action Call("after_load_finish")
All that together gives this code:

Code: Select all

default recap = []

screen skip_recap():
    button:
        background "#A00"
        text "{b}Previously...{/b}\nClick here to skip"
        xalign 0.5
        action Call("after_load_finish")


label after_load:
    show screen skip_recap
    scene black
    python:
        for pic, replica in recap:
            renpy.show(pic)
            renpy.say(None, replica)

label after_load_finish:
    hide screen skip_recap
    return


label start:
    $ recap.append(["bg", "You met Vikram"])

    scene bg
    "Hi! I'm Vikram. Will you help me?"

    menu:
        "Help Vikram":
            $ recap.append(["bg1", "You agreed to help Vikram"])

            scene bg1
            "Thank you!"

        "Refuse":
            $ recap.append(["bg2", "You refused to help Vikram"])

            scene bg2
            "Shame on you!"

    "Anyway, it is what it is."

    "THE END"
If the problem is solved, please edit the original post and add [SOLVED] to the title. 8)

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot]