Page 1 of 1

Can Ren'Py do...?

Posted: Thu Aug 17, 2006 11:54 am
by fanguad
Hi there, I'm a new possible user/developer of Ren'Py, and I'm trying to determine if Ren'Py is suitable for my team's Ren'ai game. I'll probably add to this thread as questions come up. As much fun as writing another engine would be, there's no sense in doing that if Ren'Py does the job.

So, my first question:

Can Ren'Py do dynamic menus? For example, let's say that I have a list stored in user-state, maybe with some strings and function names, and I want to build a menu out of that list. Is that possible?

Posted: Thu Aug 17, 2006 12:10 pm
by PyTom
Yes.

There are three ways you can do this, depending on how static the menu is, and how much programming you want to do.

The first is to use a menu with conditions on it. These conditions control which menu options are presented to the user. For example:

Code: Select all

menu:
    "Choice 1" if allow_choice_1:
        jump choice_1_target
    "Choice 2" if allow_choice_2:
        jump choice_2_target
    ...
And so on.

The second way is to use renpy.display_menu. You should use this if the menu choices are constructed dynamically, like you seem to be proposing. So you could have:

Code: Select all

# These choices are probably computed by python code.
$ choices = [ 
    ( "Where do you want to go?", None),
    ( "Go to school", "school" ),
    ( "Go to work", "work" ),
    ( "Go wild." , "wild"), 
    ]

$ result = renpy.display_menu(choices)
jump expression result
This code will jump to the label in the second part of the tuple. If you want to do something more sophisticated, you can actually use the value of result for something.

Finally, you can use the ui functions to build your own user interface. Check out the dse demo (by running tools/run_dse.bat) to see this in action.

Could you describe your game in a little more detail? Ren'Py is focused on Visual Novels and, to a lesser extent, Dating Sims. (Mostly lesser because I haven't worked with a user who seriously wanted to make a DS.)

There are also some provisions for extension if someone wanted to integrate pygame-based minigames with Ren'Py, but those provisions aren't overly documented.

Oh, and welcome to the forum. (I've been a bit negligent in welcoming new users, recently, so welcome to everyone else who's new.)

Posted: Thu Aug 17, 2006 1:11 pm
by monele
When talking about menus, I always wonder if we're talking about the *main* menu interface (start, load, save) or in-game choices... Random thought ^^;

Posted: Thu Aug 17, 2006 1:13 pm
by Guest
Well, I don't want to go into too much detail (partly because we're still working on them ourselves, partly so we can be the "first-to-market"), but we are working on a visual novel that leans heavily towards a dating sim. We're planning on building certain extension points into the game to allow for a modular architecture.

And thanks for the warm welcome!

Posted: Thu Aug 17, 2006 1:15 pm
by Guest
monele wrote:When talking about menus, I always wonder if we're talking about the *main* menu interface (start, load, save) or in-game choices... Random thought ^^;
I was talking about in-game menus. The display_menu() function wasn't a top-level heading, so I didn't find it when I read the documentation.

Posted: Thu Aug 17, 2006 1:19 pm
by DaFool
I wonder if this is Hirameki's American Visual Novel Project team in action. And isn't Okashi Studios using Ren'Py code?

Posted: Thu Aug 17, 2006 1:52 pm
by PyTom
Okashi is using a custom engine.

Posted: Thu Aug 17, 2006 2:07 pm
by Guest
I'm associated with neither of the named groups. Well, except that I'm eagerly awaiting Shira Oka.

Posted: Thu Aug 17, 2006 3:50 pm
by fanguad
Oops... I didn't notice that I wasn't logged in on those last couple of posts. All the "Guest"s above this post are me.

Posted: Thu Aug 17, 2006 8:14 pm
by Watercolorheart
Me too. My friend Omega is a writer for Shira Ohka. I'm also thinking of asking how to do all of Yukina's line, my "younger" voiceactor can't be found. :(