Looking for a Typewrite module

Started by Narehop, Sun 27/05/2018 21:31:36

Previous topic - Next topic

Narehop

I'm using the Speech Bubble module from Snarky and I would like to add a typewrite style to the text. Does anyone know if there is a compatible module to do so? I would also like to add a sound every time a Speech Bubble appears, something like this:

(AT 00:43)

I have been seeing in the forum several modules that do the same but I do not think that anyone has compatibility with the Speech Bubble by Snarky:(

Crimson Wizard

#1
My TypedText module can work with any built-in GUI or Overlay with text property, and any kind of DrawingSurface.

So the question is how SpeechBubble works and whether it may
- provide a surface it draws bubble on for external use;
- tell when it starts and stops displaying bubble.

If it can do these things (or at least second thing), then these two modules could be bound together.

The text may be typed either on bubble's surface, or an additional overlay created over the bubble. Either way, knowing when to start and stop is most important.

Narehop

Quote from: Crimson Wizard on Sun 27/05/2018 21:44:00
My TypedText module can work with any built-in GUI or Overlay with text property, and any kind of DrawingSurface.

So the question is how SpeechBubble works and whether it may
- provide a surface it draws bubble on for external use;
- tell when it starts and stops displaying bubble.

If it can do these things (or at least second thing), then these two modules could be bound together.

Here you can download the last version that Snarky made if you want to test it. I would do it myself if it were not because surely die in the attempt because I am not too well programming...
SpeechBubble v0.8.10

Crimson Wizard

#3
To think of it, there are two ways to bind these modules.
1) SpeechBubble displays the bubble and tells when it starts/stops, while TypedText types the text on provided GUI or drawing surface.
2) SpeechBubble displays everything, and TypedText gives the text for SpeechBubble to show. In other words, SB is handling visuals and events, while TT manages logical text change over time.

Probably the 2) is easier to implement. TypedText class was created as an abstract text manipulator, which may be attached to any kind of "text displayer".

I will perhaps be able to check this in following days. Or someone else could (Snarky?).
This will be a nice test for our both modules :).
Maybe even worth including in the Typewriter Demo Game (I am using modified Phylactere module there).

Narehop

yep I hope Snarky can read this post and try to guide us about it. :D

Snarky

It's not going to be easy.

- SpeechBubble needs the full spoken text in order to determine bubble formatting and timing
- SpeechBubble always renders this text immediately onto the bubble
- If you changed the text content, SpeechBubble would have to redraw the entire bubble, and this might affect aspects of the layout
- With typewriter text, the timing should probably also be calculated differently

Enabling dynamic text change would require significant changes to the module logic. Some of those changes might be useful improvements, but it also risks adding complexity to an already complex module. I'm starting to think it would be easier to just write a custom system specifically for this game.

Narehop

Quote from: Snarky on Sun 27/05/2018 22:14:28
It's not going to be easy.

- SpeechBubble needs the full spoken text in order to determine bubble formatting and timing
- SpeechBubble always renders this text immediately onto the bubble
- If you changed the text content, SpeechBubble would have to redraw the entire bubble, and this might affect aspects of the layout
- With typewriter text, the timing should probably also be calculated differently

Enabling dynamic text change would require significant changes to the module logic. Some of those changes might be useful improvements, but it also risks adding complexity to an already complex module. I'm starting to think it would be easier to just write a custom system specifically for this game.

Sorry to be a problem hahaha, I'm giving too much work to Snarky, I'm sure you have nightmares with me :~(:~(:~(

Crimson Wizard

It's definitely something to think through, but few quick notes:

Quote from: Snarky on Sun 27/05/2018 22:14:28
- SpeechBubble needs the full spoken text in order to determine bubble formatting and timing
- SpeechBubble always renders this text immediately onto the bubble
- If you changed the text content, SpeechBubble would have to redraw the entire bubble, and this might affect aspects of the layout

TypedText may provide both full spoken text and current displayed text. So, there could be a way to "prepare" bubble's layout for one text and then tell to type another. Or not tell to type at all, but type separately on your own.

Quote from: Snarky on Sun 27/05/2018 22:14:28
- With typewriter text, the timing should probably also be calculated differently
Typewriter may provide relatively accurate time of typing. But probably adding some events system would be better. E.g. lock bubble, then release it and let decay until it decides its over.

Narehop

So what solution do you propose?

Narehop


Snarky

The solution was already proposed, it just needs somebody to do it. I cannot commit to it right now (and frankly, even if I had the time I wouldn't want to: the weather is too nice to spend time inside coding :cool: ).

I suggest you skip this effect. As a player I always found it rather annoying when used for all text, anyway.

Narehop

Quote from: Snarky on Sun 03/06/2018 07:14:23
The solution was already proposed, it just needs somebody to do it. I cannot commit to it right now (and frankly, even if I had the time I wouldn't want to: the weather is too nice to spend time inside coding :cool: ).

I suggest you skip this effect. As a player I always found it rather annoying when used for all text, anyway.

if I skip this effect my lipsync made whit gibberish doesn't have sense... so I will not use any type of sound to speech characters :(

Crimson Wizard

Quote from: Narehop on Sun 03/06/2018 12:28:14
if I skip this effect my lipsync made whit gibberish doesn't have sense... so I will not use any type of sound to speech characters :(

To clarify, you need typewriter to follow lipsync? Because right now it only types in predefined speed.

Narehop

Quote from: Crimson Wizard on Sun 03/06/2018 13:07:23
Quote from: Narehop on Sun 03/06/2018 12:28:14
if I skip this effect my lipsync made whit gibberish doesn't have sense... so I will not use any type of sound to speech characters :(

To clarify, you need typewriter to follow lipsync? Because right now it only types in predefined speed.

Normally all the examples of gibberish I have seen are heard at the same time that you are writing the text, this way you get it look like they're actually talking.

SMF spam blocked by CleanTalk