I'm making a very large game in Ren'Py, so I have a few questions about making it as efficiently as possible:
Should I typically be writing in many different script files? I only have the main one and I'm considering jumping to another after every major decision. If so, how do I make another one? How does the game know which one to run first?
I understand that the game allows you to make global or local variables. Are there any disadvantages to using global variables only, besides the inability to reuse variable names? As I'm the only one writing the game, I think I can keep track of what variables I have and haven't used.
That's it, thanks for any responses!
A question about writing a long game...
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.
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.
- Ocelot
- Eileen-Class Veteran
- Posts: 1883
- Joined: Tue Aug 23, 2016 10:35 am
- Github: MiiNiPaa
- Discord: MiiNiPaa#4384
- Contact:
Re: A question about writing a long game...
Whatever is more convenient to you.Should I typically be writing in many different script files?
Just create a text file with .rpy extentionIf so, how do I make another one?
It does not. The thing is, you already have different script files. From the game point of view, there is no difference between script.rpy, screens.rpy, and others. YOu can write screen code in options.rpy, you can write game script in gui.rpy, you can configure your game in screens.rpy and it would work because game does not care about names. It uses main_menu screen to show menu, it starts game from start label, it loads game wherever you stop.How does the game know which one to run first?
RenPy script does not have the notion of local variables. You will have to deal with globals (or simulate locals by some means). Python code can and should use locals. Luckily, you have to go extra mile to create globals from Python code.I understand that the game allows you to make global or local variables.
In RemPy script there are more reasons to use globals, than in usual programming language. If you are interested in general problems with globals, this article might help: http://wiki.c2.com/?GlobalVariablesAreBadAre there any disadvantages to using global variables only, besides the inability to reuse variable names?
< < insert Rick Cook quote here > >
Re: A question about writing a long game...
Thanks a lot for your post! It answered all of my questions. I'll browse through the other script files before continuing my VN.
Re: A question about writing a long game...
If the story is linear, then I see no problem in making a gigantic script. But if you have several parallel stories (or multiple characters), then it is much better to do multiple scripts. I'm creating a visual novel with several characters and the fact that each one has its own script makes the work much more pleasant, efficient and rational.
Who is online
Users browsing this forum: Google [Bot]