AGS Awards nominations close at 13:59 GMT on Saturday 10 February 2018. You haven't yet nominated, so you've got 17 days and 8 hours left to play the games and decide which to nominate!

Author Topic: MODULE: SpeechBubble v0.8.0  (Read 1059 times)

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Hi. Our names are FRIGGING ADORABLE.
    • Lifetime Achievement Award Winner
    •  
    • Dave Gilbert worked on a game that was nominated for an AGS Award!
      Dave Gilbert worked on a game that won an AGS Award!
Re: Speech Bubble Module (v0.7.6)
« Reply #20 on: 12 Dec 2017, 18:56 »
I just want to say that this module is FANTASTIC. It's too late in my game's production to use it for my own, but I will definitely look into it for the next one.

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Re: Speech Bubble Module (v0.7.6)
« Reply #21 on: 12 Dec 2017, 19:19 »
Thanks again, Dave! ;-D

I've forgotten to mention that bx83 hired me to develop this module for his upcoming game (and agreed to let it be made available to the AGS community), so he deserves the kudos for its existence. Check out his game when it's finished: from what I've seen it looks pretty slick!

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Re: MODULE: SpeechBubble v0.8.0
« Reply #22 on: 23 Dec 2017, 12:06 »
Bump for latest update, v0.8.0:
-Implemented Character.SayBackgroundBubble() (as requested by Dave Gilbert)
-Added SpeechBubble.DefaultGui property (to address issue reported by Bavolis)
-Fixed crash with characters that don't have a speech view set (as reported by Loslem)

dayowlron

  • been programming computers since 1981
    • I can help with AGS tutoring
    •  
    • I can help with proof reading
    •  
    • I can help with scripting
    •  
    • I can help with story design
    •  
Re: MODULE: SpeechBubble v0.8.0
« Reply #23 on: 10 Jan 2018, 14:53 »
This is a great module. I wanted think bubble to work also so I looked at how this was working and you had "//TODO" with no code for the thinkBubble function so I added the following code into the think bubble routine and it worked great.
It is basically calling the say bubble function but passing a false to the renderBubble32 function to change the tail.
Code: Adventure Game Studio
  1.  
  2. // TODO
  3. void ThinkBubble(this Character*, String message, GUI* bubbleGui)
  4. {
  5.   if(message == null) return;
  6.   if(!game.bgspeech_stay_on_display)
  7.     _stopAllBackgroundBubbles();
  8.   if((Speech.VoiceMode == eSpeechVoiceOnly && hasVoiceClip(message)) || message == "...")
  9.     this.SB_sayImpl(message);
  10.   else
  11.   {
  12.     DynamicSprite* bubbleSprite = this.renderBubble32(message, false);
  13.     // Position bubble over character head
  14.     int x = this.x - GetViewportX() - bubbleSprite.Width/2;
  15.     x = _clampInt(x, 0, System.ViewportWidth - bubbleSprite.Width);
  16.     int y = this.y - GetViewportY() - bubbleSprite.Height - this.GetHeight() - (_heightOverHead - _talkTailHeight + 1);
  17.     y = _clampInt(y, 0, System.ViewportHeight - bubbleSprite.Height);
  18.  
  19.     this.realSayAtBubble(x, y, message, bubbleGui, bubbleSprite);
  20.   }
  21.  
  22. }
  23.  
  24.  

I also wanted the think bubble to be a different color so I set the _backgroundColor at the top of the function to a different color then set it back at the bottom of the function.

Snarky, if you add this to your module as an enhancement make it where there is another property for Think Background Color.
« Last Edit: 10 Jan 2018, 15:13 by dayowlron »
Pro is the opposite of Con
This fact can clearly be seen,
If progress means to move forward
Then what does congress mean?  --Nipsey Russell

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Re: MODULE: SpeechBubble v0.8.0
« Reply #24 on: 10 Jan 2018, 21:12 »
Thanks, dayowlron!

I'm glad you were able to get it to work for you. To fully implement the Think bubble I want to make sure it plays the character's think animation and otherwise behaves just like Character.Think(), which is a little different from Character.Say().

Snarky, if you add this to your module as an enhancement make it where there is another property for Think Background Color.

Good note, thanks!

Dave Gilbert

  • Mittens Vassal
  • AGS Baker
  • Hi. Our names are FRIGGING ADORABLE.
    • Lifetime Achievement Award Winner
    •  
    • Dave Gilbert worked on a game that was nominated for an AGS Award!
      Dave Gilbert worked on a game that won an AGS Award!
Re: MODULE: SpeechBubble v0.8.0
« Reply #25 on: 14 Jan 2018, 22:31 »
Hey! Finally playing around with this. I'm really digging it so far, but is there way to tell the module to NOT use a talking view for background speech? I use portrait view for all my characters and the module keeps changing the character sprite to the portrait. Thanks in advance! :)

edit: Aha! Nevermind. Figured it out. I do have another question. Is there a way to set the position of the background bubble? There is an option to set the position of the standard bubble, but not the background one.
« Last Edit: 14 Jan 2018, 22:43 by Dave Gilbert »

Snarky

  • Global Moderator
  • Mittens Earl
  • Private Insultant
    • I can help with proof reading
    •  
    • I can help with translating
    •  
Re: MODULE: SpeechBubble v0.8.0
« Reply #26 on: 15 Jan 2018, 05:40 »
Hey! Finally playing around with this. I'm really digging it so far, but is there way to tell the module to NOT use a talking view for background speech? I use portrait view for all my characters and the module keeps changing the character sprite to the portrait. Thanks in advance! :)

edit: Aha! Nevermind. Figured it out.

Presumably you passed false for the animate parameter? I think that should do the trick.

Quote
I do have another question. Is there a way to set the position of the background bubble? There is an option to set the position of the standard bubble, but not the background one.

No, not at the moment. I'm not happy with the bubble positioning logic overall (I particularly want to ensure that the tail is always positioned to point to the character, even when the bubble butts up against the side of the screen), and it's one part I really want to redo.

However, unless this is urgent I'll put it on pause for a bit to focus on the Awards Ceremony.