Author Topic: Looking for a Typewrite module  (Read 296 times)

Narehop

  • Solodev on @Outline_team
Looking for a Typewrite module
« on: 27 May 2018, 21:31 »
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)
<a href="https://www.youtube.com/v/HV0yJ2cae9Q" target="_blank" class="new_win">https://www.youtube.com/v/HV0yJ2cae9Q</a>

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

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: Looking for a Typewrite module
« Reply #1 on: 27 May 2018, 21:44 »
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.
« Last Edit: 27 May 2018, 21:52 by Crimson Wizard »

Narehop

  • Solodev on @Outline_team
Re: Looking for a Typewrite module
« Reply #2 on: 27 May 2018, 21:48 »
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

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: Looking for a Typewrite module
« Reply #3 on: 27 May 2018, 21:52 »
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).
« Last Edit: 27 May 2018, 21:58 by Crimson Wizard »

Narehop

  • Solodev on @Outline_team
Re: Looking for a Typewrite module
« Reply #4 on: 27 May 2018, 22:05 »
yep I hope Snarky can read this post and try to guide us about it. :D

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Re: Looking for a Typewrite module
« Reply #5 on: 27 May 2018, 22:14 »
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

  • Solodev on @Outline_team
Re: Looking for a Typewrite module
« Reply #6 on: 27 May 2018, 22: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

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: Looking for a Typewrite module
« Reply #7 on: 27 May 2018, 22:37 »
It's definitely something to think through, but few quick notes:

- 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.

- 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

  • Solodev on @Outline_team
Re: Looking for a Typewrite module
« Reply #8 on: 28 May 2018, 17:39 »
So what solution do you propose?

Narehop

  • Solodev on @Outline_team
Re: Looking for a Typewrite module
« Reply #9 on: 03 Jun 2018, 00:03 »
nobody? :(:(

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Re: Looking for a Typewrite module
« Reply #10 on: 03 Jun 2018, 07:14 »
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

  • Solodev on @Outline_team
Re: Looking for a Typewrite module
« Reply #11 on: 03 Jun 2018, 12:28 »
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

  • AGS Project Tracker Admins
    • Best Innovation Award Winner 2013, for spearheading the AGS 3.3.0 project
    •  
    • Lifetime Achievement Award Winner
    •  
    • Crimson Wizard worked on a game that was nominated for an AGS Award!
      Crimson Wizard worked on a game that won an AGS Award!
Re: Looking for a Typewrite module
« Reply #12 on: 03 Jun 2018, 13:07 »
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

  • Solodev on @Outline_team
Re: Looking for a Typewrite module
« Reply #13 on: 03 Jun 2018, 14:39 »
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.