Scrolling text in NVL mode
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.
- 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:
Scrolling text in NVL mode
Title says it all. How do I make the text scroll as it reaches the bottom of the window in NVL mode? And how does this work with Rollback?
Scriptwriter and producer of Metropolitan Blues
Creator of The Loyal Kinsman
Scriptwriter and director of DaemonophiliaScriptwriter and director of The Dreaming
Scriptwriter of Zenith ChroniclesScriptwriter and director of The Thirteenth Year
Scriptwriter and director of Romance is DeadScriptwriter and producer of Adrift
More about me in my blog"Adrift - Like Ever17, but without the Deus Ex Machina" - HigurashiKira
- 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:
Re: Scrolling text in NVL mode
The current version of Ren'Py doesn't support scrolling the text when it hits the bottom of the window. (I'm not 100% what that even means - do we see the text moving up the screen?)
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
- 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: Scrolling text in NVL mode
I know it doesn't support it. That's why I'm asking for a how-to. It must be able to code something like this.PyTom wrote:The current version of Ren'Py doesn't support scrolling the text when it hits the bottom of the window. (I'm not 100% what that even means - do we see the text moving up the screen?)
What I'm thinking of is a classic scrolling effect, like in the good old times. You're in front of a computer screen, you enter text, and if you enter more text than fits on the screen, once you get to the end of the last line on the screen, all the text you've typed moves up one line and you get a new line at the bottom of the screen.
It has always bugged me that NVL mode doesn't already do that by itself. Instead, when the text goes below the bottom boundary, it just does that - it goes on, and you can't read it because it's below the bottom boundary. How do I make it just scroll upwards?
Scriptwriter and producer of Metropolitan Blues
Creator of The Loyal Kinsman
Scriptwriter and director of DaemonophiliaScriptwriter and director of The Dreaming
Scriptwriter of Zenith ChroniclesScriptwriter and director of The Thirteenth Year
Scriptwriter and director of Romance is DeadScriptwriter and producer of Adrift
More about me in my blog"Adrift - Like Ever17, but without the Deus Ex Machina" - HigurashiKira
Re: Scrolling text in NVL mode
The complexity of a scrolling textbox depends on some implementation choices:
- Is the up-scroll animated?
- Is one line of text added at a time, or one sentence (possibly consisting of multiple lines)?
- Are all lines the same height?
- Is the text clipped at the top/bottom, or should there be a fading edge?
- If there is a fading edge, is the background opaque?
- 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: Scrolling text in NVL mode
- Is the up-scroll animated?
Needn't be. Would be sweet if possible, but it's not technically necessary. - Is one line of text added at a time, or one sentence (possibly consisting of multiple lines)?
One sentence. - Are all lines the same height?
Yes. - Is the text clipped at the top/bottom, or should there be a fading edge?
Clipped. - If there is a fading edge, is the background opaque?
There is no fading edge.
Scriptwriter and producer of Metropolitan Blues
Creator of The Loyal Kinsman
Scriptwriter and director of DaemonophiliaScriptwriter and director of The Dreaming
Scriptwriter of Zenith ChroniclesScriptwriter and director of The Thirteenth Year
Scriptwriter and director of Romance is DeadScriptwriter and producer of Adrift
More about me in my blog"Adrift - Like Ever17, but without the Deus Ex Machina" - HigurashiKira
-
- Regular
- Posts: 65
- Joined: Thu Dec 29, 2011 4:19 am
- Projects: Chronicles of the Timetraveler's Wars
- Organization: ProgMan Productions; Polymorphic Games
- Location: Oregon
- Contact:
Re: Scrolling text in NVL mode
I'm not certain how to do it at the moment, but it's certainly something I'd be interested in having in my code library, now that you bring it up. It would make any sort of console interaction with computers in-game much easier to handle, if nothing else. Give me a bit to come up with something, and I'll see what I can do.
Re: Scrolling text in NVL mode
I implemented something like that a few years back (though not in Ren'Py).
Everytime you would normally append text to the main textbox, instead you create a new Text object for that text. Internally, you store a list of all Text objects created this way. When the new Text object is added, you update the positions of all the text objects -- Place the last-added Text object wherever you want it on the screen, the walk the list of Text objects last to first, positioning Text objects one above the other.
To add clipping, place the Text objects in a Viewport? (not sure about the name) with the clipping bounds you want. When a Text object is moved out of the clipping rect on the top (text.y+text.h < clip.y), destroy it and remove it from your internal list of Texts.
Everytime you would normally append text to the main textbox, instead you create a new Text object for that text. Internally, you store a list of all Text objects created this way. When the new Text object is added, you update the positions of all the text objects -- Place the last-added Text object wherever you want it on the screen, the walk the list of Text objects last to first, positioning Text objects one above the other.
To add clipping, place the Text objects in a Viewport? (not sure about the name) with the clipping bounds you want. When a Text object is moved out of the clipping rect on the top (text.y+text.h < clip.y), destroy it and remove it from your internal list of Texts.
-
- Regular
- Posts: 65
- Joined: Thu Dec 29, 2011 4:19 am
- Projects: Chronicles of the Timetraveler's Wars
- Organization: ProgMan Productions; Polymorphic Games
- Location: Oregon
- Contact:
Re: Scrolling text in NVL mode
I've hit a bit of a snag, in that I, for the life of me, can't understand the structure of the 'dialogue' list which contains the text to be displayed. Is it a multi-dimensional array placed inside a handy little wrapper or something? If so, how do I access individual elements, or, rather, the set of elements that is who, what, who_id, what_id, and window_id? There doesn't seem to be anything in the Ren'Py documentation on its structure, and it's only briefly mentioned in a few places, none of which do a bit of help in understanding how it works.
Am I better off digging through the source code for these answers?
Am I better off digging through the source code for these answers?
Who is online
Users browsing this forum: Bing [Bot]