Printing out your game
Forum rules
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Ren'Py specific questions should be posted in the Ren'Py Questions and Annoucements forum, not here.
Printing out your game
I'm going through all my debugging and it's becoming a real pain to scroll through 115 pages of code to find stuff. I really want to print everything out so I can flipp through everything quickly, but again, it's 115 pages at 9pt font and extended margins.
Is there any good way to print the code in a condensed sort of format with limited waste of paper/ink?
Is there any good way to print the code in a condensed sort of format with limited waste of paper/ink?
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Well, if you're using Ren'Py, you can use dump_text to dump the text to a file, and then put that file into a word processor, and adjust as you see fit.
You do lose all of the Ren'Py commands when you do this... Maybe you can print the script 2-up or something.
You do lose all of the Ren'Py commands when you do this... Maybe you can print the script 2-up or something.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Well, I cut the intial start up code and moved everything into word, and besides the loss of that wonderful color coding that sort of works. But there's still a lot of space that seems like it's being wasted. I was just wondering if there was a good way to format code for printing really.
But I can't for the life of me see any other way than just printing the thing and dealing with the fact that there's very little on each page.
But I can't for the life of me see any other way than just printing the thing and dealing with the fact that there's very little on each page.
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
One thing that I found when editing MW is that some things that worked in the script didn't work when in VN format. For example, when one is writing something on paper or on the computer, you use alot of pronouns. That reads fine on paper, because you can always go up to the previous sentence and see what the pronoun refers to.
In a VN, I think one wants to use less pronouns, as the text is being presented to the user one screen at a time, making it hard for people to go back and see what came before. This is less true for pronouns that stay bound for a long time (such as "she", when "she" consistently refers to the girl that you're talking to). But if you switch around what "she" refers to (say, by talking about your sister), this can rapidly become confusing.
So I think what I'm saying is that while editing on paper may be good for a first pass that catches many grammatical and spelling mistakes, it's still important to edit while playing through the game,
In a VN, I think one wants to use less pronouns, as the text is being presented to the user one screen at a time, making it hard for people to go back and see what came before. This is less true for pronouns that stay bound for a long time (such as "she", when "she" consistently refers to the girl that you're talking to). But if you switch around what "she" refers to (say, by talking about your sister), this can rapidly become confusing.
So I think what I'm saying is that while editing on paper may be good for a first pass that catches many grammatical and spelling mistakes, it's still important to edit while playing through the game,
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
One of the problems I found with the Japanese releases (alltogether) is that I often got confused with just who was actually speaking. This may boil down to the same thing PyTom mentioned - in a book this would never happen, a book can go on and on without the reader getting confused, because there's this sense of an overview that you get when you have all that text in a page.
VNs are usually line-by-line and especially when one is not using name tags to indicate who is speaking, at times it's good to help by adding "Natane said.." or similar, to refresh/confirm to the player who is talking. So that's one more consideration when writing the script like any other text, notepad-style.´
One more thought: In English, you can usually not distinguish whether the gender of the person who speaks is male or female. Perhaps in Japanese, you can, so a dialogue between a boy and a girl can never get confusing... it is similar in my language, you can basically not refer to anything in the past or present perfect without revealing your gender, so conversations will usually not have a problem like this.
VNs are usually line-by-line and especially when one is not using name tags to indicate who is speaking, at times it's good to help by adding "Natane said.." or similar, to refresh/confirm to the player who is talking. So that's one more consideration when writing the script like any other text, notepad-style.´
One more thought: In English, you can usually not distinguish whether the gender of the person who speaks is male or female. Perhaps in Japanese, you can, so a dialogue between a boy and a girl can never get confusing... it is similar in my language, you can basically not refer to anything in the past or present perfect without revealing your gender, so conversations will usually not have a problem like this.
Well my VN has no narration, so that's not much of a problem. The main reason I want to print stuff out is because as I play through the game I see errors and I want to quickly flip to the line where that error is and make notes about what I need to do to fix things. That's more difficult to do when the whole code isn't completely in front of me.
You know, I agree with this, it was often a bit of a problem for me with Ren'Py when I wanted to edit the script. I started playing, checking, then I got to a mistake or sentence I wanted to alter, and I had to switch to the notepad with the script and edit it there. Then, if I wanted to see if it worked, I needed to quit the game and go all the way to that spot to see whether it worked. It took quite some time to do it.
In Jet's engine/system (BP, RT, K*, TT, M3) I am actually able, when editing, to jump into the game at any point, so I see changes instantly, it has something like "Run from line XY" option. This way our old system is much easier to work with in the fine tuning phase. Although it has to be said, that it's incredibly clumsy when you want to add scenes and so on, you'll have to have your project almost entirely done when you want to put it into the code - that's why generally Ren'Py is much better for on-the-go editing, but that fine tuning takes some time.
My solution that sped up the process was that I had a label to which the game jumped at start and I always moved that label near the scene I was editing. It's much copy/pasting, but it gets the job done.
Ummm, I actually thought about a way of helping this, perhaps there could be a developer's executable that would at startup show bookmarks in the script (you could insert a bookmark anywhere) and you could choose which to jump to. This way you could make bookmarks at crucial points or scenes you needed to change and fine tune, and you could make those adjustments very fast. You could delete those bookmarks later, they would be there only for quick testing. I really like that "Run From Line" thing, it saves a lot of time, so that's why I brought this up - but it's more something to add to a suggestion pool than a serious request.
In Jet's engine/system (BP, RT, K*, TT, M3) I am actually able, when editing, to jump into the game at any point, so I see changes instantly, it has something like "Run from line XY" option. This way our old system is much easier to work with in the fine tuning phase. Although it has to be said, that it's incredibly clumsy when you want to add scenes and so on, you'll have to have your project almost entirely done when you want to put it into the code - that's why generally Ren'Py is much better for on-the-go editing, but that fine tuning takes some time.
My solution that sped up the process was that I had a label to which the game jumped at start and I always moved that label near the scene I was editing. It's much copy/pasting, but it gets the job done.
Ummm, I actually thought about a way of helping this, perhaps there could be a developer's executable that would at startup show bookmarks in the script (you could insert a bookmark anywhere) and you could choose which to jump to. This way you could make bookmarks at crucial points or scenes you needed to change and fine tune, and you could make those adjustments very fast. You could delete those bookmarks later, they would be there only for quick testing. I really like that "Run From Line" thing, it saves a lot of time, so that's why I brought this up - but it's more something to add to a suggestion pool than a serious request.
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Actually I just started implementing run from line, which I'm calling warp, a few hours ago. It should be in the next release, whenever that comes out.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
Or.... or you edit on the fly . Also used as a debug mode tool, you could press a key that turns static text into a text box that you can edit. Spot a typo ? Just press a key, correct it, and go out of edit mode.
Since you can already go back and forth (thanks to the rollback system), you could make almost a single run through the game and have all typos fixed once you reach the endings .
Since you can already go back and forth (thanks to the rollback system), you could make almost a single run through the game and have all typos fixed once you reach the endings .
-
- Miko-Class Veteran
- Posts: 576
- Joined: Fri May 07, 2004 9:40 am
- Completed: GO! Magical Boy (2006), Angelic Orbs (soundtrack)
- Projects: Cyberlin (in progress)
- Location: Finland
- Contact:
To solve that "jump to" problem, I have a temporary menu at the start of the game that lets me jump to different chapters, or to the specific point(s) I'm editing right now, or to a special label where I continuously do wild testing (it's currently a nice mess with mixed bits of music, all characters all over the place, and different backgrounds and overlays... scary).
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Just finished adding two new features to Ren'Py to address some of the ideas found in this thread.
The first is the "warp" feature. One can now invoke run_game with the --warp option, followed by a filename:line pair. For example:
Ren'Py will find the statement preceding that line, and will try to find a path through the code from a scene statement to that statement. It will run the scene and any show and hide commands that it finds along that path. Once done, it will begin executing at the statement it found.
The result is something resembling a preview of a Ren'Py game, at least graphically. The one issue is that no python blocks will have run, which means some variables may be unbound. (We do support an after_warp block that is called, that can set those values up.) But for games totally determined by control-flow, this is actually a fairly good way of getting a preview of the game.
The second feature is editor support. One can set the config.editor variable to the command line for an editor program, including substitutions for filename and line number. Once done, when you push 'E' (that's shift-e), Ren'Py will determine the filename and line number of the current statement, and will launch your editor with those parameters.
These aren't perfect, and both can make mistakes given sufficently complex code, but hopefully they'll help.
It would be quite difficult to make an interactive version of Ren'Py, as monele proposes. For one thing, Ren'Py loads and parses the script at startup, and to make it be able to deal with changes in the script after it has already started would be a major change.
The first is the "warp" feature. One can now invoke run_game with the --warp option, followed by a filename:line pair. For example:
Code: Select all
run_game.py --warp script.rpy:458
The result is something resembling a preview of a Ren'Py game, at least graphically. The one issue is that no python blocks will have run, which means some variables may be unbound. (We do support an after_warp block that is called, that can set those values up.) But for games totally determined by control-flow, this is actually a fairly good way of getting a preview of the game.
The second feature is editor support. One can set the config.editor variable to the command line for an editor program, including substitutions for filename and line number. Once done, when you push 'E' (that's shift-e), Ren'Py will determine the filename and line number of the current statement, and will launch your editor with those parameters.
These aren't perfect, and both can make mistakes given sufficently complex code, but hopefully they'll help.
It would be quite difficult to make an interactive version of Ren'Py, as monele proposes. For one thing, Ren'Py loads and parses the script at startup, and to make it be able to deal with changes in the script after it has already started would be a major change.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
I was mostly dreaming there anyway .
Yesterday I thought about the starting debug menu idea given by Alessio and thought of using it along with that keymapping function so the debug menu would be accessible from anywhere in the game by just pressing a key ('J'?). There will still be a problem with variables so another key might bring a menu to change these. It would be a rather complex menu though :/.
Btw, is my memory faulty or was there a debug displays of variables available ?
Yesterday I thought about the starting debug menu idea given by Alessio and thought of using it along with that keymapping function so the debug menu would be accessible from anywhere in the game by just pressing a key ('J'?). There will still be a problem with variables so another key might bring a menu to change these. It would be a rather complex menu though :/.
Btw, is my memory faulty or was there a debug displays of variables available ?
- PyTom
- Ren'Py Creator
- Posts: 16096
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
- Contact:
Your memory is faulty, since you forgot the name of renpy.watch().monele wrote:Btw, is my memory faulty or was there a debug displays of variables available ?
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom(When was the last time you backed up your game?)
Software > Drama • https://www.patreon.com/renpytom
I *knew* there was something like that, thanks! XD
EDIT : guh... having problems with it though :/...
"TypeError: iteration over non-sequence"
At the beginning of the game :
$ renpy.watch('cDebrouillard')
At some point in the game (when it crashes) :
$ cDebrouillard = cDebrouillard + 1
(I used $cDebrouillard += 1 before that, no difference :/)
EDIT : guh... having problems with it though :/...
"TypeError: iteration over non-sequence"
At the beginning of the game :
$ renpy.watch('cDebrouillard')
At some point in the game (when it crashes) :
$ cDebrouillard = cDebrouillard + 1
(I used $cDebrouillard += 1 before that, no difference :/)
Who is online
Users browsing this forum: No registered users