A Specific Question about Coding Style

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
Ezeze
Newbie
Posts: 7
Joined: Wed Aug 20, 2014 8:00 pm
Contact:

A Specific Question about Coding Style

#1 Post by Ezeze »

I have several points in my game where the player has to make a large number of inter-related choices in a short span of time. In a situation like that, is it better to use nested menu commands or a large number of jump commands?

User avatar
Holland
Regular
Posts: 92
Joined: Mon Jun 09, 2014 4:10 pm
Projects: Lycoris: Their Journies [WIP], With or Without You [NaNo19]
Location: NJ, USA
Contact:

Re: A Specific Question about Coding Style

#2 Post by Holland »

If these choices are entirely linear, then using nested menus would save you some time. But do you have multiple answers (or a combination of them) that lead to the same question branch? (Ex- answer1 and answer3 both lead you to question5.) You should use jumps in that case, even if it's just one or two outside of the nesting, to avoid having to repeat the same script twice.

User avatar
Taleweaver
Writing Maniac
Posts: 3428
Joined: Tue Nov 11, 2003 8:51 am
Completed: Metropolitan Blues, The Loyal Kinsman, Daemonophilia, The Dreaming, The Thirteenth Year, Adrift, Bionic Heart 2, Secrets of the Wolf, The Photographer
Projects: The Pilgrim's Path, Elspeth's Garden, Secret Adventure Game!
Organization: Tall Tales Productions
Location: Germany
Contact:

Re: A Specific Question about Coding Style

#3 Post by Taleweaver »

This is more of a Ren'Py-specific question.

Moving.
Scriptwriter and producer of Metropolitan Blues
Creator of The Loyal Kinsman
Scriptwriter and director of Daemonophilia
Scriptwriter and director of The Dreaming
Scriptwriter of Zenith Chronicles
Scriptwriter and director of The Thirteenth Year
Scriptwriter and director of Romance is Dead
Scriptwriter and producer of Adrift
More about me in my blog
"Adrift - Like Ever17, but without the Deus Ex Machina" - HigurashiKira

User avatar
fluxus
Regular
Posts: 133
Joined: Thu Jun 19, 2014 8:06 am
Projects: Animal Anaesthesia (a teaching game)
Contact:

Re: A Specific Question about Coding Style

#4 Post by fluxus »

What is 'a large number'?
Would it make sense to store user choices in a list, dict or other data structure, then decide on new menu choices or jumps on the basis of that data structure?

A dict like
{ "Bought the ring": True, "Pursued the other girl": True, "NumberOfSmiles": 4, "Bought the roses": False}
might make sense if there's a lot of choices and the player frequently returns to the same situation.

Though if there's continuous progress so that previous choices get more and more irrelevant, then branching (by jumps or menus) would likely be the better choice.

Post Reply

Who is online

Users browsing this forum: Google [Bot]