Can we play sound loop when textbox is showing text?
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.
Can we play sound loop when textbox is showing text?
Once text is fully showed, stop sound effect.
stay hungry,stay foolish.
Re: Can we play sound loop when textbox is showing text?
Yes, but maybe 99% of people don't like "teletype" text.
In general, dialog phrases should be shown instantly.
"Slow typing" makes sense only in rare particular cases, as a kind of special effect.
With that in mind, one of the ways to do that is:
(1) You start playing sound (in a loop)
(2) You show dialog with {nw} at the end. It means not wait for the user input but immediately go on further.
(3) Then you stop sound and use "extend" to finish the dialog interaction. See
https://renpy.org/doc/html/dialogue.htm ... characters
Audio (play, stop) see
https://renpy.org/doc/html/audio.html#play-statement
In general, dialog phrases should be shown instantly.
"Slow typing" makes sense only in rare particular cases, as a kind of special effect.
With that in mind, one of the ways to do that is:
Code: Select all
label reveal_inscription:
play sound "bubbles.opus" loop
slow "This is the phrase accompanied by looping sound.{nw}"
stop sound
extend ""
(2) You show dialog with {nw} at the end. It means not wait for the user input but immediately go on further.
(3) Then you stop sound and use "extend" to finish the dialog interaction. See
https://renpy.org/doc/html/dialogue.htm ... characters
Audio (play, stop) see
https://renpy.org/doc/html/audio.html#play-statement
If the problem is solved, please edit the original post and add [SOLVED] to the title.
- m_from_space
- Eileen-Class Veteran
- Posts: 1198
- Joined: Sun Feb 21, 2021 3:36 am
- Contact:
Re: Can we play sound loop when textbox is showing text?
Not sure why you would say that. Instant text gives a very different feel than typed text. I prefer typed text - as long as we're not talking about some kind of phone vn using a messenger app.
You can simply use the "all character callback" event.
Code: Select all
init python:
def sound_callback_for_all(event, interact=True, **kwargs):
if not interact:
return
if event == "begin":
# let's use the "audio" channel, so other music isn't stopped
renpy.music.play("audio/mysound.ogg", channel="audio", loop=True)
elif event == "slow_done":
renpy.music.stop(channel="audio")
return
define config.all_character_callbacks = [sound_callback_for_all]
Re: Can we play sound loop when textbox is showing text?
Because I want to receive and process the text, instantly, rather than feel its process of appearance.m_from_space wrote: ↑Sun Mar 03, 2024 5:38 amNot sure why you would say that. Instant text gives a very different feel than typed text. I prefer typed text
There are other elements to give the perception feel: the text meaning and wording, the visual and audio contents etc.
If you conduct a poll, I bet that vast majority would prefer the ability to see the text instantly, rather than waiting for it to come. To me that would be hindering and distracting from my smooth perception process.I prefer typed text
If the problem is solved, please edit the original post and add [SOLVED] to the title.
- m_from_space
- Eileen-Class Veteran
- Posts: 1198
- Joined: Sun Feb 21, 2021 3:36 am
- Contact:
Re: Can we play sound loop when textbox is showing text?
There is difference between "waiting for a text to come" (meaning the cps value is too low, meaning you're reading faster than the text appears) and a cps that's suitable for your reading speed. So of course there should always be an option to alter cps. Not sure about the outcome of a poll, but I guess there are many people out there who don't even bother reading, because they want to get to the nude parts of some eroge or they don't have the attention span. I mean it's the age of TikTok.
Re: Can we play sound loop when textbox is showing text?
Reading process is actually not just getting first letter, then the second letter... It's more complex than that and involves recognition of whole words. As an expeirment, it was proven that people often don't notice if two or more symbols swapped positions in a word.m_from_space wrote: ↑Mon Mar 04, 2024 4:02 pmThere is difference between "waiting for a text to come" (meaning the cps value is too low, meaning you're reading faster than the text appears) and a cps that's suitable for your reading speed. So of course there should always be an option to alter cps. Not sure about the outcome of a poll, but I guess there are many people out there who don't even bother reading, because they want to get to the nude parts of some eroge or they don't have the attention span. I mean it's the age of TikTok.
So yeah, thank you for the compliment, but indeed I read fast and have little tolerance for impediments, especially introduced artificially. And whatever you call this age, the amount of information I need to read (or sometimes just skim through) creates a habit of reading fast.
That's how we modern kids do nowadays.
If the problem is solved, please edit the original post and add [SOLVED] to the title.
- m_from_space
- Eileen-Class Veteran
- Posts: 1198
- Joined: Sun Feb 21, 2021 3:36 am
- Contact:
Re: Can we play sound loop when textbox is showing text?
Yeah, in fact you can actually scramble all letters between a word's first and last letter and people will be able to read it. Reading is like recognizing faces: you don't have to think about it. Unless you encounter a new word or a foreign language.jeffster wrote: ↑Tue Mar 05, 2024 6:07 am Reading process is actually not just getting first letter, then the second letter... It's more complex than that and involves recognition of whole words. As an expeirment, it was proven that people often don't notice if two or more symbols swapped positions in a word.
Re: Can we play sound loop when textbox is showing text?
Yeah, and you can understand why, if symbols appear one by one, it can be almost irritating, even if relatively fast. (But slow enough to need a sound loop of variable length)...m_from_space wrote: ↑Tue Mar 05, 2024 1:30 pmYeah, in fact you can actually scramble all letters between a word's first and last letter and people will be able to read it. Reading is like recognizing faces: you don't have to think about it. Unless you encounter a new word or a foreign language.jeffster wrote: ↑Tue Mar 05, 2024 6:07 am Reading process is actually not just getting first letter, then the second letter... It's more complex than that and involves recognition of whole words. As an expeirment, it was proven that people often don't notice if two or more symbols swapped positions in a word.
And even if whole words appear one by one, I can feel it as some impediment, because normally looking at text we see the structure, placement of words of various lengths; short words might be recognized even before we read long ones... I mean, I didn't do a scientific research on that (hence can't say with 100% certainty), but that's how I feel. For comfortable reading I want the whole chunk of text, and no distraction from moving line of visibility etc. The artsy experience can be created by other visual elements: UI, scene etc.
People are different, it's just my view on the topic and why I think that probably the majority wouldn't enjoy much text-delay effects. It's like with fancy fonts: often the more exotic and impressive it is, the harder it is to read in actual text (longer than just trademark or something)...
If the problem is solved, please edit the original post and add [SOLVED] to the title.
- m_from_space
- Eileen-Class Veteran
- Posts: 1198
- Joined: Sun Feb 21, 2021 3:36 am
- Contact:
Re: Can we play sound loop when textbox is showing text?
Whatever your opinion, if you have not yet played it, you still might enjoy the game "Pentiment", in which script and written out text in different styles playes a huge role: https://store.steampowered.com/app/1205520/Pentiment/jeffster wrote: ↑Tue Mar 05, 2024 7:28 pm People are different, it's just my view on the topic and why I think that probably the majority wouldn't enjoy much text-delay effects. It's like with fancy fonts: often the more exotic and impressive it is, the harder it is to read in actual text (longer than just trademark or something)...
Who is online
Users browsing this forum: No registered users