Ren'Py Is there a way to implement interactive Live 2D scenes in Ren'Py (accidental repost)

fuckin-pepe

New Member
Nov 5, 2022
5
1
Hello, I was wondering whether you're able to implement some sort of interactive Live2D scenes in Ren'Py (interactive as in draggable clothes) as well as interactive, animated, sex scenes (mouse drag for insertion and pulling out), etc, or is that far too complex for a VN engine like Ren'Py and should I stick to Unity/Godot for something like that instead?

I've had previous experience with Unity as well as Godot, I thought why not try out Ren'Py and test it's limits, hence why I'm asking + it's a VN game with interactive elements, so I thought a VN specific engine might save me some time making the VN part of the game.
Thanks in advance!

(I apologize for reposting this, I accidentally posted it in Programming, Development & Art first and then managed to mess it all up)

Sincerely,
Yessirskies
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,976
16,232
Hello, I was wondering whether you're able to implement some sort of interactive Live2D scenes in Ren'Py
Well, taking a look at the official documentation, and reading the whole section , would probably answer your question. Then you take a look at the whole section , and continue browsing the documentation, because it's what it's made for.
 
  • Like
Reactions: fuckin-pepe

fuckin-pepe

New Member
Nov 5, 2022
5
1
Well, taking a look at the official documentation, and reading the whole section , would probably answer your question. Then you take a look at the whole section , and continue browsing the documentation, because it's what it's made for.
I know that there's a Live2D SDK for Ren'Py, I was just wondering whether it's possible to implement such thing (interactive, mouse event triggered animations) and also has it been done before in any games?
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,976
16,232
I was just wondering whether it's possible to implement such thing (interactive, mouse event triggered animations)
And as I said, browsing the documentation will answer to those questions.

I can tell you that "yes, it's possible", what is true. But it wouldn't tell you if, for you personally, using Godot or Unity wouldn't be easier, since you already have experience with both.
 
  • Like
Reactions: fuckin-pepe

MidnightArrow

Active Member
Aug 22, 2021
500
451
Hello, I was wondering whether you're able to implement some sort of interactive Live2D scenes in Ren'Py (interactive as in draggable clothes) as well as interactive, animated, sex scenes (mouse drag for insertion and pulling out), etc, or is that far too complex for a VN engine like Ren'Py and should I stick to Unity/Godot for something like that instead?

I've had previous experience with Unity as well as Godot, I thought why not try out Ren'Py and test it's limits, hence why I'm asking + it's a VN game with interactive elements, so I thought a VN specific engine might save me some time making the VN part of the game.
Thanks in advance!

(I apologize for reposting this, I accidentally posted it in Programming, Development & Art first and then managed to mess it all up)

Sincerely,
Yessirskies
I have experience with Godot and Ren'py.

Ren'py has the same GUI elements as Godot, but Ren'py's are all fucking terribly made. Rather than a coherent API with function calls, you declare them with pseudo-CSS. There's no code completion*, nor does it have Godot's built-in IDE and documentation, so you just have to memorize everything off the website. And it's "all variables are global, just declare 'em wherever" Python scripting is a headache compared to Godot's node-based namespacing and observer pattern signals. Plus Godot has a WYSIWYG editor while Ren'py scripting is all text, so you need to compile the game, run it, and create a dummy screen call just to see if it's working right.

You'd have an easier time making a bespoke visual novel interface with Godot's GUI toolset than you will making a creator-defined displayable to do what you want inside Ren'py.

Use Ren'py only if you need "easy mode VN" features like it's simplistic, automated save system.

I've been using both programs for about the same length of time. I've pretty much memorized Godot's GUI tools, while I STILL need to pour over the fucking Ren'py website to .

* By which I mean, IDEs do have code completion, but since the GUI elements aren't object-based, it does "dumb" code completion where it just lists stuff declared in your files. It can't tell you what properties are part of the object you're trying to change.
 

fuckin-pepe

New Member
Nov 5, 2022
5
1
I have experience with Godot and Ren'py.

Ren'py has the same GUI elements as Godot, but Ren'py's are all fucking terribly made. Rather than a coherent API with function calls, you declare them with pseudo-CSS. There's no code completion*, nor does it have Godot's built-in IDE and documentation, so you just have to memorize everything off the website. And it's "all variables are global, just declare 'em wherever" Python scripting is a headache compared to Godot's node-based namespacing and observer pattern signals. Plus Godot has a WYSIWYG editor while Ren'py scripting is all text, so you need to compile the game, run it, and create a dummy screen call just to see if it's working right.

You'd have an easier time making a bespoke visual novel interface with Godot's GUI toolset than you will making a creator-defined displayable to do what you want inside Ren'py.

Use Ren'py only if you need "easy mode VN" features like it's simplistic, automated save system.

I've been using both programs for about the same length of time. I've pretty much memorized Godot's GUI tools, while I STILL need to pour over the fucking Ren'py website to .

* By which I mean, IDEs do have code completion, but since the GUI elements aren't object-based, it does "dumb" code completion where it just lists stuff declared in your files. It can't tell you what properties are part of the object you're trying to change.
thank you so much for a proper explanation. Really appreciate it.

And as I said, browsing the documentation will answer to those questions.

I can tell you that "yes, it's possible", what is true. But it wouldn't tell you if, for you personally, using Godot or Unity wouldn't be easier, since you already have experience with both.
Again, thanks to you too, for taking your time to reply. I really appreciate it!
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,976
16,232
[...] Rather than a coherent API with function calls, you declare them with pseudo-CSS.
All this knowledge and years of experiences you have regarding Ren'Py, and you still haven't seen that the documentation page explaining how to build screens is named "Screen and Screen Language".
 

MidnightArrow

Active Member
Aug 22, 2021
500
451
All this knowledge and years of experiences you have regarding Ren'Py, and you still haven't seen that the documentation page explaining how to build screens is named "Screen and Screen Language".
Why is it a separate language? Why can I override with dissolve with with Dissolve() but I can't override frame: with Frame():? Why is the syntax for Ren'py, ATL, and screen language totally different?

In Godot (or Java's Swing or C# for that matter), GUI construction follows the same object-oriented syntax as the rest of the program. You create a GUI element or a style object, you pass arguments via method calls, you can use derived classes in place of base classes and it works fine. There's no memorizing how name mangling works to pass style parameters to a textbutton. And everything inherits from a common ancestor, so they all share the same layout properties. Whereas with Ren'py you need to juggle the screen language page and the screen properties page to find out which GUI elements take margin, which take padding, and which don't take either.

Godot has better GUI design, even without taking the WYSIWYG editor into account. When you write screen language, you basically write the same thing as a Godot node hierarchy (add a vbox, set the y alignment to 1.0 to make it appear on the right side of the screen, add child labels, etc.), except without any of the benefits of Godot's OOP design.

If OP wants a better GUI experience, then they should use Godot.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,976
16,232
Why is it a separate language?
Yeah, exactly, why the language that describe screen isn't the same than the one used to build scripts ?
After all, it's something never seen before, and clearly not the most used couple on the networks... It would be known if we needed one language to describe web pages, and another language to turn them interactive ; this with a weird API in between.


Why can I override with dissolve with with Dissolve() but I can't override frame: with Frame():?
Are you seriously comparing the behavior of a parameter (with dissolve) with the behavior of a command (frame:) ?

But what is really surprising is that you ask this, while already knowing the answer.
If you use with Dissolve(), Ren'Py will throw an exception, because the class expect at least one parameter. A parameter that is absent when you write with dissolve. Isn't this a strong hint that they aren't exactly the same thing ?
Therefore, while you can use both, there's on, and only one, case when the two will lead to the same result ; when you use with Dissolve( 0.5 ). This because dissolve is nothing more than a short cut (a macro if you prefer) for Dissolve( 0.5 ). Use any other value with Dissolve(), and you'll get a transition that will last more, or less, than 0.5 second.

In the end, your question is nothing more than asking why you can replace print CONSTANT by print "some constant text", but not exit by exit(). Programmatically speaking it's a pure none sense.


Why is the syntax for Ren'py, ATL, and screen language totally different?
Well, they are three different languages, that each have its own needs. And like any languages, they have their particularities and differences.

But contrarily to what you think, only the Animation and Transformation Language effectively have a syntax different from the two others. The syntax for both the script language and the screen language is one single line.
It happen that, for a reason of convenience, you can split all screen statements into blocks. But it's a question of convenience and readability, not their base syntax.
Code:
textbutton "whatever":
    style "myButton"
    action NullAction()
    alternate NullAction()
    selected not flag
can perfectly be wrote textbutton "whatever" style "myButton" action NullAction() alternate NullAction() selected not flag, and it would do exactly the same thing. In fact, most of the default screens rely on this syntax for any statement that isn't natively a block.

Of course, you can claim that putting the parameters and the content on the same level is weird. But here again it's nothing more than a question of convenience.
While something like this would be clear
Code:
frame xpadding 10 ypadding 10 xalign 0.5 yalign 0.5:

    vbox:
        [...]
Something like this would be really confusing
Code:
frame
    xpadding 10
    ypadding 10
    xalign 0.5
    yalign 0.5:

    vbox:
        [...]
And, on a technical note, it would also uselessly over complicate the parser.

All this being said, the SL1 syntax is still available. You can perfectly design screens in pure Python, by only calling function, if really it's your thing. And the same apply for almost all statement of the script language. In the end, you can perfectly write a full Ren'Py game by only using functions calls ; except for the labels, that you'll have to declare using the script language.
I doubt that the auto-completion file, for Visual Studio or Atom, pick the one you prefer, include all those functions, but you can extend it yourself after all.


In Godot (or Java's Swing or C# for that matter), GUI construction follows the same object-oriented syntax as the rest of the program.
An unique language that follow an unique structure... What a surprise.


Whereas with Ren'py you need to juggle the screen language page and the screen properties page to find out which GUI elements take margin, which take padding, and which don't take either.
Well, if you can't figure by yourself that text is a text, and therefore will not take window/box style properties, while frame being a window/box, it will not take button properties, I doubt that it's the fault of Ren'Py. But I'm can be wrong...
 
  • Haha
Reactions: osanaiko

MidnightArrow

Active Member
Aug 22, 2021
500
451
I know Dissolve() takes a parameter. I omitted it for brevity. And all GUI code is ultimately putting boxes inside boxes, so there's no reason why all those boxes, buttons and frames like, can't inherit a shared layout system from a common ancestor. As they do in OOP designs like Godot and Swing. If you have a button, you subclass it from its ancestor and add button-specific stuff. There's no reason why you should deny it having margins/padding too because it's "not a frame". It's a box for content all the same.

You can defend Ren'py's current GUI design all you want, Godot still has a better one (from an end user perspective).

The whole thing runs on OOP and the observer pattern, there's no multiple languages with their own peculiarities. If you know how to fire a signal with the observer pattern in one component, then you know how to fire a signal to update a text label too. It's built right into the language itself.

All this being said, the SL1 syntax is still available. You can perfectly design screens in pure Python, by only calling function, if really it's your thing. And the same apply for almost all statement of the script language. In the end, you can perfectly write a full Ren'Py game by only using functions calls ; except for the labels, that you'll have to declare using the script language.
Isn't there an important manual page with a warning saying "You can't declare these programmatically, you have to use my custom language"? Can't remember which one off the top of my head, but I know it's in there.

Please, point me to the manual page that allows me to declare screens through code, because I've looked and I can't find it. All I see is which gives you basic variables for sorting screens. I'm guessing it's either deprecated (and due to be removed) or it uses some weird Ren'py-specific terminology that isn't turning up in my searches.

Edit: Are you referring to this?
Code:
    $ ui.vbox(xpos=0.5, ypos=0.5)
    $ ui.imagebutton("newgame1.png", "newgame2.png", clicked=ui.returns("start"))
    $ ui.imagebutton("loadgame1.png", "loadgame2.png", clicked=ui.returns("load"))
    $ ui.imagebutton("options1.png", "options2.png", clicked=ui.returns("prefs"))
    $ ui.imagebutton("exit1.png", "exit2.png", clicked=ui.returns("quit"))
    $ ui.close()
This was marked as deprecated even in the old Historic documentation. I don't think it works anymore.
 
Last edited:

MidnightArrow

Active Member
Aug 22, 2021
500
451
The code you're referring to was on the Screens and Python page.



However it is gone as of right now.



So I assume it's been removed. Even if it's still there, I'm not using deprecated, undocumented code in production, even if it does let me get around dealing with screen language.
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,976
16,232
You can defend Ren'py's current GUI design all you want, Godot still has a better one (from an end user perspective).
From your end user perspective.
Anyone who don't have (much) codding experience will prefer a descriptive approach to a building one, and a language with a human-like syntax to a pure codding one. Precisely because if don't have (much) experience with the second, while he use the first one since its early days at school.


Please, point me to the manual page that allows me to declare screens through code, because I've looked and I can't find it.
Seriously, you want the permission to use available functions ?
That you struggle to find the documentation for them, I can get it. The first version of the screen language is depreciated since more than 10 years. Yet you can find it in the 6.10.2 version, the last before the introduction of SL2. This while the version 7.4.9 was still explicitly addressing them in the "Screens and Python" page.
But that you expect an authorization, it's truly amazing.


I don't think it works anymore.
Stop thinking and start doing.

As I said, it's not addressed anymore since the 7.5.x and 8.x branch. But before this the documentation said that "the UI functions are Python equivalents of the screen language statements. For each screen language statement, there is a ui function with the same name. For example, ui.text corresponds to the text statement, and ui.add corresponds to the add statement."
PyTom removed it because, starting the 7.5.0/8.0 version, the new screen language statements will not necessarily have their Python equivalent. But all those functions are still available. And, them being nothing more than an API to the statements, they are all fully working ; even in the 7.5.x and 8.x branches.
 

MidnightArrow

Active Member
Aug 22, 2021
500
451
From your end user perspective.
Anyone who don't have (much) codding experience will prefer a descriptive approach to a building one, and a language with a human-like syntax to a pure codding one. Precisely because if don't have (much) experience with the second, while he use the first one since its early days at school.
OP asked if they should switch from Godot to Ren'py. Since they presumably already know Godot, I'm telling them Ren'py is the same thing but worse.

Also, I said I was leaving out Godot's WYSIWYG editor. People without coding experience can make a rudimentary GUI without needing any code at all and see what it looks like directly in the editor.

As for using deprecated legacy code in production, I'm not even going to comment on that.
 
  • Haha
Reactions: anne O'nymous

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,976
16,232
As for using deprecated legacy code in production, I'm not even going to comment on that.
Good, since I explicitly said that the code is not depreciated, since it's the one used by the statements themselves...