Ren'Py How would I go about making an interactive phone in Renpy?

Apr 19, 2022
3
10
I'm interested in creating a game based completely on an in-game phone. Essentially, you'll be texting multiple partners, and assuming a conversation goes well, you will be rewarded with an animated scene with that certain partner.

I'm a bit overwhelmed on where to start on something like this though. I've made a few simple visual novels in Renpy before, all with branching stories and options to choose. But making a "fake messaging app", complete with animated, incoming texts is something I'm not sure how to tackle.

Any tips/advice is welcome!
 

Winterfire

Forum Fanatic
Respected User
Game Developer
Sep 27, 2018
5,504
8,040
It would work the same way as normal dialogue, but with delays and structured in a more fancy way.
I'd start from playing around there, otherwise look up for examples on Google.
 

MidnightArrow

Active Member
Aug 22, 2021
500
452
You'd need to use a custom screen. Dynamically add each "text" as a label to a vbox and animate it with ATL. TBH I'm not even sure if Ren'py is capable of that. You should look into Godot instead, it has a similar GUI style to Ren'py but it handles dynamics and animation better.
 

79flavors

Well-Known Member
Respected User
Jun 14, 2018
1,611
2,258
There are a couple of predefined phone systems already out there these days.

Here's a couple...



They do require a certain understanding of both RenPy and Python to use effectively.
Though realistically, if you can't make either work - you probably wouldn't have been able to write one from scratch yourself either.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,979
16,236
You'd need to use a custom screen. Dynamically add each "text" as a label to a vbox and animate it with ATL. TBH I'm not even sure if Ren'py is capable of that.
Python:
screen phone( thread ):

    vbox:
        viewport:
            yinitial 1.0

            vbox:
                for incoming, message in thread:
                    text "[message]":
                        if incoming:
                            style "incoming_message"
                        else:
                            style "outgoing_message"

        textbutton "advance":
            action Return()

default sisterMessages = []

style incoming_message is text:
   [whatever style you want]
style outgoing_message is text:
   [whatever style you want]

label whatever:
    $ sisterMessages.append( ( True, "Hey dickhead, mom want you to buy some bread before you come back home." ) )
    call screen phone
    $ sisterMessages.append( ( False, "Are you sure she didn't asked your lazy ass for this ?" ) )
    call screen phone
    [...]
And it's just the most basic approach, it's possible to go further and have something way better.

As I said, less than one month ago on this section of the forum, you can even do this without the need for a different syntax than the basic dialogs. Or there's this a bit more advanced approach.


There's really no need for an engine like Godot for something as basic as this kind of game feature.