Hello folks!
Unsure if this is the right section, feel free to move it if that is not the case ^_^
I have been thinking about something. You know the text in many visual novels appear animated? Like the computer is typing the message to you as you watch it. First, one letter pops up, then the next, and next, and next. I have been trying to figure out how to do this in my own visual novel engine that im currently building, but with no luck. Therefore i thought i'd ask you guys. You work with visual novels all the time, so do you mind sharing some of that wisdom?
Animated text isn't critically necessary for my own build, but it would be a nice feature to implement =)
//Kurten
Making animated text
- 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: Making animated text
What's the problem you're having? The way Ren'Py does it is to:
1) Break the text up into lines.
2) Based the on the time the text has been shown for, decide how many character to show. Call this n.
3) For each line:
3a) Draw the first n characters of the line, or the whole line if n is greater than the line length.
3b) Subtract the line length from n.
3c) Break if n <= 0.
4) Repeat steps 2-4 until all text is shown.
1) Break the text up into lines.
2) Based the on the time the text has been shown for, decide how many character to show. Call this n.
3) For each line:
3a) Draw the first n characters of the line, or the whole line if n is greater than the line length.
3b) Subtract the line length from n.
3c) Break if n <= 0.
4) Repeat steps 2-4 until all text is shown.
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
Re: Making animated text
Awesome, just the answer i was looking for! ^_^ Thx PyTom!
I will try to build something similar in my engine! ^_^
I will try to build something similar in my engine! ^_^
Who is online
Users browsing this forum: No registered users