this weekend i& #39;m adding speech bubbles to a prototype
it might get messy and to keep me motivated i& #39;ll post the progress here so mute this thread if you& #39;re not interested in speech bubbles and nobody will judge you for it
the objective is to make this dog talk
basic styling and hitting my first hurdle as i can& #39;t find a proper english word for the little trail attached to the bubble
it& #39;s a tail/pointer, moving on
basic tracking
a Transform represents the talker& #39;s origin, i& #39;m adding an offset to get the bubble world& #39;s origin (blue point), then translating it from world space to screen space, and finally adding a screen offset
this way i can also get the trail& #39;s direction, which will be the direction from the bubble to the talker& #39;s origin, both in screen space
i don& #39;t want the tail to ever go in a straight vertical direction so i added an automatic x offset to the bubble according to the talker& #39;s direction vs player& #39;s position
clamping it like a pro
using textmeshpro to predict the bubble size according to the text + adding some padding
taking a quick break to decipher the guitar chords of the bridge from the 1995 hit song SECRET HEART by Ron Sexsmith
it& #39;s Fm(add9)
moving on to animation
moving on to animation
alright now
launching the "talk" action starts a coroutine which handles the whole dialogue, it
- scales up the speech bubble
- setups the bubble size
- displays the text one character at a time
- waits for the player& #39;s input
- loops back if there is another line, else scales down
- scales up the speech bubble
- setups the bubble size
- displays the text one character at a time
- waits for the player& #39;s input
- loops back if there is another line, else scales down
the text animation is a well known trick which consists of setting the whole text with maxVisibleCharacters to 0, and increasing this last value over time (vs creating a new string each time by adding a character
https://abs.twimg.com/emoji/v2/... draggable="false" alt="đ" title="Auf den Kopf gestelltes Gesicht" aria-label="Emoji: Auf den Kopf gestelltes Gesicht">)
added a small lerp to the offset thing + events when a bubble starts and ends
there is a bug, the height of a block of text is randomly overestimated from time to time and i& #39;ll fix it tomorrow because i& #39;m done for today
there is a bug, the height of a block of text is randomly overestimated from time to time and i& #39;ll fix it tomorrow because i& #39;m done for today
i fixed the bug it was a margin issue
today i& #39;m going to try adding text animations
here is a mockup for reference
today i& #39;m going to try adding text animations
here is a mockup for reference
it is too difficult©
instead i made a pooling system for the bubbles and added the option for automatic closing vs wait for player& #39;s input
instead i made a pooling system for the bubbles and added the option for automatic closing vs wait for player& #39;s input
with help from @mikeevmm, now with characters animation !!
very happy to be on vacation while the indie video game discourse is apparently about text boxes now